Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 16th, 2002, 08:22 AM
vsk vsk is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 6 vsk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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.

Reply With Quote
  #2  
Old May 17th, 2002, 02:48 AM
oscagne oscagne is offline
Java Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 5 oscagne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #3  
Old May 17th, 2002, 10:38 AM
vsk vsk is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 6 vsk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation 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

Reply With Quote
  #4  
Old June 1st, 2002, 01:04 AM
Radii Radii is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Location: Chicago
Posts: 3 Radii User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Radii Send a message via AIM to Radii
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Servlet execution problem please reply asap

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap