Servlet execution problem please reply asap
I am working on a servlet which accepts login and password.
Currently we are not doing any encryption at the application level.
Now we need to put a encryption logic for the password and then store that enrypted password in the database. Now here is the problem.
When I am resetting the password in the servlet I am calling a stored proc to reset it but since the encrypted password has some "^ @&=" typ of characters the execute sql statement is throwing an exception stating that "syntax error near" ^". I have been tryiing this from last 2 days.
I wrote a test program where i am passsing the same set of parameters and enclosing the encrypted password with ' '.The code is runing fine but when I am putting the same thing in my real code Its complaining for the same error.
I am using stmtl.execute(sql) to execute the stored procwhere sql contains the name of stored proc and parameters enclosed by ' '.
Please suggest ASAP.
I think that was what I used in the past (I know it works in java, but I'm not confusing it, as I think it does in SQL too)
I got the solution to my problem.
I had to restart my servlet engine. The servlet code was calling the old class.
After I restarted the machine everything worked fine.
Didn't knew restarting could do wonders.
this could help also..
if your using tomcat (dunno if this works in the previous versions of jserv and what nots) but you can add this in your conf/server.xml:
after the comments
<! Define properties for each web application. This is only needed if you want to set non-default properties, or have web application document roots in places other than the virtual host's appBase directory. !>
This will reload any class file that has been modified. Slows down performance tho so you should take it out for your release