Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Java Servlets and DB passwords
Name: deity_me Date: October 24, 2003 at 03:53:21 Pacific OS: Mandrake 9.1 CPU/Ram: P3 750
Comment:
I have a java servlet that connects to a MySQL database. My problem is that i'm concerned about my password being hacked and people can login to my SQL server and start playing with my DB. Right now I have my user/pass hardcoded in the java file. even though that gets compiled into a class file - i'm concerned that the class file can be downloaded and decompiled. Is there a better/more secure way to do this? thanks
Name: gpp Date: October 24, 2003 at 05:28:17 Pacific
Reply:
As long as tomcat is set up correctly, servlets cant be downloaded. Usually, usernames and passwords are stored in a properties file.. because its easier to maintain.
0
Response Number 2
Name: nick Date: October 24, 2003 at 07:06:17 Pacific
Reply:
like gpp said, if u set tomcat up corretcly..u'll be ok. also, if you are afraid of your password being snoopedo ut, u should be using the SSL sockets in tomcat
https, instead of http,when logging in, that will encrypt your user/pass so even if someoen does sniff it out, they'll get encryption instead of passwords.
On a side note, think about using property sheets instead of hardcoding your user/pass.
Summary: I am having a few problems and I cannot explain why this is happening. I am using a Java servlet to connect to an Oracle Database. Using the "SELECT * FROM " command, the servlet is to retrieve all re...
Summary: I am trying to write a script to validate a username and password and then take it to a designated Web Page. I have a table with username and password and the user enters in both fields. Then on the...
Summary: Hi all, I am currently working on a web aplication using Java, JSP/Servlets, HTML. This application does creates some reports with numbers/ additions/ etc. I was wondering if anyone knows anything abo...