Computing.Net > Forums > Programming > Java Servlets and DB passwords

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

Reply to Message Icon

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



Sponsored Link
Ads by Google

Response Number 1
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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


PHP/Access DB problem Executable exits!



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Java Servlets and DB passwords

SQL / Oracle / Java Problem with results www.computing.net/answers/programming/sql-oracle-java-problem-with-results/2315.html

Password Script (JAVA) www.computing.net/answers/programming/password-script-java/7344.html

Java/Servlets/JSp with Excel www.computing.net/answers/programming/javaservletsjsp-with-excel/9052.html