<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.twig.es/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=EmailServlet.java</id>
		<title>EmailServlet.java - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=EmailServlet.java"/>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=EmailServlet.java&amp;action=history"/>
		<updated>2026-05-06T17:32:27Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.0</generator>

	<entry>
		<id>https://wiki.twig.es/index.php?title=EmailServlet.java&amp;diff=1033&amp;oldid=prev</id>
		<title>George2 at 09:39, 22 September 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=EmailServlet.java&amp;diff=1033&amp;oldid=prev"/>
				<updated>2014-09-22T09:39:49Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:39, 22 September 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 82:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if ( searchBy.equals(match2) )&amp;#160; &amp;#160; &amp;#160; &amp;#160; filter = &amp;quot;(proxyAddresses=*&amp;quot;+search+&amp;quot;*)&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;if ( searchBy.equals(match2) )&amp;#160; &amp;#160; &amp;#160; &amp;#160; filter = &amp;quot;(proxyAddresses=*&amp;quot;+search+&amp;quot;*)&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; NamingEnumeration answer = ctx.search(&amp;quot;OU=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Goldsmiths_Users&lt;/del&gt;,dc=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;campus&lt;/del&gt;,dc=&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;goldsmiths&lt;/del&gt;,dc=ac,dc=uk&amp;quot;, filter, ctls);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; NamingEnumeration answer = ctx.search(&amp;quot;OU=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Goldfinger_Users&lt;/ins&gt;,dc=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;camping&lt;/ins&gt;,dc=&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;goldfinger&lt;/ins&gt;,dc=ac,dc=uk&amp;quot;, filter, ctls);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>George2</name></author>	</entry>

	<entry>
		<id>https://wiki.twig.es/index.php?title=EmailServlet.java&amp;diff=1032&amp;oldid=prev</id>
		<title>George2 at 09:38, 22 September 2014</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=EmailServlet.java&amp;diff=1032&amp;oldid=prev"/>
				<updated>2014-09-22T09:38:59Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 09:38, 22 September 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Statement stmt = null;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Statement stmt = null;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ResultSet rs = null;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; ResultSet rs = null;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; String userName = &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;argus&lt;/del&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; String userName = &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;mysql_user&amp;gt;&lt;/ins&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; String passWord = &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;C1n0bbwT&lt;/del&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; String passWord = &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;mysql_password&amp;gt;&lt;/ins&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; String url = &amp;quot;jdbc:mysql://localhost/argus&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; String url = &amp;quot;jdbc:mysql://localhost/argus&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Class.forName (&amp;quot;com.mysql.jdbc.Driver&amp;quot;).newInstance ();&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; Class.forName (&amp;quot;com.mysql.jdbc.Driver&amp;quot;).newInstance ();&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; out.println(&amp;quot;&amp;lt;body bgcolor='#66999'&amp;#160; &amp;gt;&amp;lt;h1&amp;gt;&amp;quot; +&amp;#160; &amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; out.println(&amp;quot;&amp;lt;body bgcolor='#66999'&amp;#160; &amp;gt;&amp;lt;h1&amp;gt;&amp;quot; +&amp;#160; &amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; name = request.getParameter(&amp;quot;username&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; name = request.getParameter(&amp;quot;username&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; name = &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;SA_GDB001&lt;/del&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; name = &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;ad_service_account&amp;gt;&lt;/ins&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; password = request.getParameter(&amp;quot;password&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;//&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; password = request.getParameter(&amp;quot;password&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; password =&amp;#160; &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;eE?aViGAmm@u&lt;/del&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; password =&amp;#160; &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;ad_password&amp;gt;&lt;/ins&gt;&amp;quot;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; searchBy = request.getParameter(&amp;quot;group1&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; searchBy = request.getParameter(&amp;quot;group1&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; search = request.getParameter(&amp;quot;searchString&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; String&amp;#160; search = request.getParameter(&amp;quot;searchString&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 59:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.INITIAL_CONTEXT_FACTORY,&amp;quot;com.sun.jndi.ldap.LdapCtxFactory&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.INITIAL_CONTEXT_FACTORY,&amp;quot;com.sun.jndi.ldap.LdapCtxFactory&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.SECURITY_AUTHENTICATION,&amp;quot;DIGEST-MD5&amp;quot;); //No other SALS worked with me&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.SECURITY_AUTHENTICATION,&amp;quot;DIGEST-MD5&amp;quot;); //No other SALS worked with me&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.PROVIDER_URL, &amp;quot;ldap://&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;cgs-vsvr-dc02.campus.goldsmiths.ac.uk&lt;/del&gt;:389&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.PROVIDER_URL, &amp;quot;ldap://&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;domain_controller&amp;gt;&lt;/ins&gt;:389&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.SECURITY_PRINCIPAL,name); // specify the username ONLY to let Microsoft Happy&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.SECURITY_PRINCIPAL,name); // specify the username ONLY to let Microsoft Happy&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.SECURITY_CREDENTIALS, password);&amp;#160;  //the password&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; env.put(Context.SECURITY_CREDENTIALS, password);&amp;#160;  //the password&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>George2</name></author>	</entry>

	<entry>
		<id>https://wiki.twig.es/index.php?title=EmailServlet.java&amp;diff=1031&amp;oldid=prev</id>
		<title>George2: Created page with &quot;&lt;source lang=&quot;java&quot;&gt;   package myservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.Hashtable; import java.util.*; import javax....&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=EmailServlet.java&amp;diff=1031&amp;oldid=prev"/>
				<updated>2014-09-22T09:37:27Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;   package myservlets; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.Hashtable; import java.util.*; import javax....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
package myservlets;&lt;br /&gt;
import java.io.*;&lt;br /&gt;
import javax.servlet.*;&lt;br /&gt;
import javax.servlet.http.*;&lt;br /&gt;
import java.util.Hashtable;&lt;br /&gt;
import java.util.*;&lt;br /&gt;
import javax.naming.Context;&lt;br /&gt;
import javax.naming.NamingEnumeration;&lt;br /&gt;
import javax.naming.directory.DirContext;&lt;br /&gt;
import javax.naming.directory.InitialDirContext;&lt;br /&gt;
import javax.naming.directory.SearchControls;&lt;br /&gt;
import java.sql.*;&lt;br /&gt;
&lt;br /&gt;
public class EmailServlet extends HttpServlet&lt;br /&gt;
{&lt;br /&gt;
  public void doPost(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;
                                       throws ServletException, IOException&lt;br /&gt;
  {&lt;br /&gt;
      ServletOutputStream  out = response.getOutputStream();&lt;br /&gt;
      List proxyList =  null;&lt;br /&gt;
      HttpSession sess = request.getSession();&lt;br /&gt;
      response.setContentType(&amp;quot;text/html&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
      try {&lt;br /&gt;
          out.println(&amp;quot;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;&amp;quot; +  &amp;quot;&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&amp;quot;);&lt;br /&gt;
          Connection conn = null;&lt;br /&gt;
          HttpSession session = request.getSession(true);&lt;br /&gt;
          Statement stmt = null;&lt;br /&gt;
          ResultSet rs = null;&lt;br /&gt;
          String userName = &amp;quot;argus&amp;quot;;&lt;br /&gt;
          String passWord = &amp;quot;C1n0bbwT&amp;quot;;&lt;br /&gt;
          String url = &amp;quot;jdbc:mysql://localhost/argus&amp;quot;;&lt;br /&gt;
          Class.forName (&amp;quot;com.mysql.jdbc.Driver&amp;quot;).newInstance ();&lt;br /&gt;
          conn = DriverManager.getConnection (url, userName, passWord);&lt;br /&gt;
          String getIt   =  &amp;quot;SELECT user from sessions where session = '&amp;quot;+session.getId()+&amp;quot;'&amp;quot;;&lt;br /&gt;
          stmt = conn.createStatement();&lt;br /&gt;
          rs = stmt.executeQuery(getIt);&lt;br /&gt;
          rs.next();&lt;br /&gt;
&lt;br /&gt;
             String USERNAME = rs.getString(&amp;quot;user&amp;quot;); &lt;br /&gt;
             out.println(&amp;quot;Username os :&amp;quot;+USERNAME);&lt;br /&gt;
             int length = USERNAME.length();&lt;br /&gt;
&lt;br /&gt;
//        out.println(sess.getId());&lt;br /&gt;
        String itemID = sess.getValue(&amp;quot;Pass&amp;quot;).toString();&lt;br /&gt;
        out.println(&amp;quot;&amp;lt;body bgcolor='#66999'  &amp;gt;&amp;lt;h1&amp;gt;&amp;quot; +  &amp;quot;&amp;lt;/h1&amp;gt;&amp;quot;);&lt;br /&gt;
//        String  name = request.getParameter(&amp;quot;username&amp;quot; );&lt;br /&gt;
        String  name = &amp;quot;SA_GDB001&amp;quot;;&lt;br /&gt;
//        String  password = request.getParameter(&amp;quot;password&amp;quot; );&lt;br /&gt;
        String  password =  &amp;quot;eE?aViGAmm@u&amp;quot;;&lt;br /&gt;
        String  searchBy = request.getParameter(&amp;quot;group1&amp;quot; );&lt;br /&gt;
        String  search = request.getParameter(&amp;quot;searchString&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    Hashtable&amp;lt;String, Object&amp;gt; env = new Hashtable&amp;lt;String, Object&amp;gt;(11);&lt;br /&gt;
    env.put(Context.INITIAL_CONTEXT_FACTORY,&amp;quot;com.sun.jndi.ldap.LdapCtxFactory&amp;quot;);&lt;br /&gt;
    env.put(Context.SECURITY_AUTHENTICATION,&amp;quot;DIGEST-MD5&amp;quot;); //No other SALS worked with me&lt;br /&gt;
    env.put(Context.PROVIDER_URL, &amp;quot;ldap://cgs-vsvr-dc02.campus.goldsmiths.ac.uk:389&amp;quot;);&lt;br /&gt;
    env.put(Context.SECURITY_PRINCIPAL,name); // specify the username ONLY to let Microsoft Happy&lt;br /&gt;
    env.put(Context.SECURITY_CREDENTIALS, password);   //the password&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      // Create initial context&lt;br /&gt;
      DirContext ctx = new InitialDirContext(env);&lt;br /&gt;
&lt;br /&gt;
      // Specify the ids of the attributes to return&lt;br /&gt;
      String[] attrIDs = { &amp;quot;proxyAddresses&amp;quot; };&lt;br /&gt;
      SearchControls ctls = new SearchControls();&lt;br /&gt;
      ctls.setReturningAttributes(attrIDs);     &lt;br /&gt;
      ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
String filter =&amp;quot;&amp;quot;;&lt;br /&gt;
String match1 =  &amp;quot;uName&amp;quot;;&lt;br /&gt;
String match2=  &amp;quot;alias&amp;quot;;&lt;br /&gt;
if ( searchBy.equals(match1) )      filter = &amp;quot;(name=&amp;quot;+search+&amp;quot;)&amp;quot;;&lt;br /&gt;
if ( searchBy.equals(match2) )        filter = &amp;quot;(proxyAddresses=*&amp;quot;+search+&amp;quot;*)&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
      NamingEnumeration answer = ctx.search(&amp;quot;OU=Goldsmiths_Users,dc=campus,dc=goldsmiths,dc=ac,dc=uk&amp;quot;, filter, ctls);&lt;br /&gt;
&lt;br /&gt;
      &lt;br /&gt;
Parse_Get_User ffff = new Parse_Get_User();      &lt;br /&gt;
Parse_Get_Proxies ggg = new Parse_Get_Proxies();      &lt;br /&gt;
&lt;br /&gt;
    while (answer.hasMore()) {&lt;br /&gt;
out.println(&amp;quot;&amp;lt;TABLE border='1' &amp;gt;&amp;quot;);&lt;br /&gt;
  String qqqq = answer.nextElement().toString();&lt;br /&gt;
  out.println(&amp;quot;&amp;lt;TR&amp;gt;&amp;lt;TD bgcolor='#C0C0C0'&amp;gt;&amp;quot;+ffff.getUser(qqqq)+&amp;quot;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;quot;);&lt;br /&gt;
   proxyList = ggg.getProxies(qqqq); &lt;br /&gt;
  Iterator it = proxyList.iterator();  &lt;br /&gt;
  while( it.hasNext()) {&lt;br /&gt;
                      out.println(&amp;quot;&amp;lt;TR&amp;gt;&amp;lt;TD bgcolor='#A0A0A0'&amp;gt;&amp;quot; + it.next() + &amp;quot;&amp;lt;/TD&amp;gt;&amp;lt;/TR&amp;gt;&amp;quot;); &lt;br /&gt;
                      }&lt;br /&gt;
out.println(&amp;quot;&amp;lt;/TABLE&amp;gt;&amp;quot;);&lt;br /&gt;
out.println(&amp;quot;&amp;lt;BR&amp;gt;&amp;quot;);&lt;br /&gt;
                             }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
      // Close the context when we're done&lt;br /&gt;
      ctx.close();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
               conn.close();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
         }&lt;br /&gt;
      catch(Throwable  t ) {&lt;br /&gt;
        out.println(&amp;quot;&amp;lt;P&amp;gt;&amp;lt;pre&amp;gt;&amp;quot;);&lt;br /&gt;
        t.printStackTrace( new PrintStream(out) );&lt;br /&gt;
        out.println (&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;P&amp;gt;&amp;quot;);&lt;br /&gt;
                            }&lt;br /&gt;
      out.println (&amp;quot;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>George2</name></author>	</entry>

	</feed>