#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Posts
    6
    Rep Power
    0

    Servlet execution problem please reply asap


    HI,
    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.
  2. #2
  3. No Profile Picture
    Java Developer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Posts
    5
    Rep Power
    0
    Try \

    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)

    Any good?

    Oscagne
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Posts
    6
    Rep Power
    0

    Thanks


    Hi oscagne,
    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.

    Thanks,
    vsk
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2002
    Location
    Chicago
    Posts
    3
    Rep Power
    0
    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. !>

    add this:

    <DefaultContext reloadable="true"/>

    This will reload any class file that has been modified. Slows down performance tho so you should take it out for your release

IMN logo majestic logo threadwatch logo seochat tools logo