File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Writing Secure Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Writing Secure Servlets" Watch "Writing Secure Servlets" New topic
Author

Writing Secure Servlets

Jaggi Kunal
Ranch Hand

Joined: Jan 21, 2003
Posts: 45
I have recently started writing Servlet code. I want to know, how to send data from a web page to a Servlet in an encrypted format?
Here is the web page
<form method='post' action='/servlet/UserLogin'>
<table>
<tr>
<td><b>ID</b></td>
<td><input type='text' name='id'></td>
</tr>
<tr>
<td><b>Password</b></td>
<td><input type='password' name='pass'></td>
</tr>
<tr>
<td><input type='submit' value='Submit'></td>
</tr>
</table>
</form>
In the servlet I am retriving the parameters using HttpservletRequest.getParameter(String) method.
In an ordinary case, the client establishes a socket connection with the web server and passes data as plain text but I want the same to be send in encrypted form.
I have no prior knowledge of Java Security API. And, I don’t want to establish a SSL connection.

Regards,
Kunal Jaggi
SCJP2
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
SSL is the standard way communications are secured over the web. There are others, but SSL is most likely the best solution for your problem. Could you enlighten us on why you do not want to use it?
Jaggi Kunal
Ranch Hand

Joined: Jan 21, 2003
Posts: 45
Can anybody explain me a step-by-step procedure about how to establish a SSL connection?
Regards,
Kunal Jaggi
SCJP2
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Writing Secure Servlets