943,899 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 784
  • JSP RSS
Jul 14th, 2009
0

Java Servlet Security Question

Expand Post »
I have a passkey to authenticate access to a web service in the code of one of my java serlvets. How easy is it for someone to view the code for my java servlet when it is on my web server? It would pose a security risk to my entire web application if someone was able to find out my passkey. Should i try to find some way around putting this information in my servlet? Does it matter which folder on my web server I put the servlet?
Similar Threads
Reputation Points: 11
Solved Threads: 2
Light Poster
kinger29 is offline Offline
35 posts
since Mar 2008
Jul 16th, 2009
0

Re: Java Servlet Security Question

Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jul 16th, 2009
0

Re: Java Servlet Security Question

What do you mean you store your password in the servlet? Is it a field of the class or directly typed in the source code?

If so then maybe your not doing it the way it meant to be...
Use a doPost (not doGet )method do get the username and pass from a form that's located on the site. Save these in static class fields, or better, in a database!

The most secure way i can think of is getting your password and username from a database ant compare them with the form's input parameters.

If you don't know what is doPost, html form then i suggest googl'ing. Then tell me about your results.
Ps: hope you know about databases too.
Reputation Points: 10
Solved Threads: 3
Junior Poster
Alex_ is offline Offline
175 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: help me in interfaces
Next Thread in JSP Forum Timeline: how to create a hypertext link in servlet





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC