Hi All,

Here is a problem we are facing:

There are 2 two webpages JSP1 AND JSP2. These pages need some( lets make
it
more than 10..for the sake for discussion )  values as input for
generating
themselves. Now the user has a choice to navigate to JSP3 from either of
these pages. Now, once the user is done with JSP3 , he needs to be
automaticaly taken to the previous page he navigated from(JSP1 or JSP2).
Now, for this to take place, the JSP3 should have the knowledge of its
previous page and also take the responsibilty to pass the required input
values for generating its previous page.

Now, the question is what is the best way for this kind of data to be
passed between these pages. Currently, this problem is solved by using
Session
variables. But, this is becoming a maintenance nightmare, since session
variables are being thrown all over the place.

Are there any patterns or ideas to handle such situations in a more
elegant
way!!!



-Gurudev

Gurudev Devanla
mailto: [EMAIL PROTECTED]
408 573 2556 (O)


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Artigas, Ricardo Y.
Sent: Thursday, February 08, 2001 7:00 PM
To: [EMAIL PROTECTED]
Subject: Re: Servlet Bug!!


check the string for single quote characters, if you find one, insert
another single quote beside it so it will not generate an error.
e.g. input = O'Reilly
       output = O''Reilly

Try using the String.replace() method.
:^)
Ricky Y. Artigas
Analyst/Programmer
Information Technology Division
Easycall Communications Phils., Inc.
- Easycall Internet -
418 Arayat St., Mandaluyong City 1550, Philippines
Personal WAP Site: http://www.buzzed.co.uk/mobile/?rya
Company Website: http://www.easycall.com.ph
Tel.no: (+632) 5338001 ext.6574
Mobile:(+63) 0917-8951783
Pager:  141-002955
Email: [EMAIL PROTECTED]


> -------------------------------
> IMPORTANT NOTICE:

> This message (and any attachment hereto) may contain privileged and/or
> confidential information specific to EasyCall. If you are not the intended
> addressee indicated in this message, you may not copy or disseminate this
> message (or any attachment hereto) to anyone. Instead, please destroy this
> message (and any attachment hereto), and kindly notify the sender by reply
> email. Any information in this message (and any attachment thereto) that
> do not relate to the official business of EasyCall shall be understood as
> neither given nor endorsed by the company.
>
>
> -----Original Message-----
> From: Jennifer Feeney [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, February 09, 2001 9:57 AM
> To:   [EMAIL PROTECTED]
> Subject:      Servlet Bug!!
>
> Hi all,
>
> Once again, thanks to anyone that can offer any help or advise on
> this one!
>
> I have found a bug in my servlet......
>
> Description:
> ========================================================
> I have a servlet developed that allows users to register for
> a service, it all works great, except for one thing, if a person
> enters a Surname of the O'Rourke, O'Reilly, type I get the following
> message........
>
> java.sql>SQLException:Syntax Error(Missing Operator) in expression
> Query.
>
> I know what causes the error, its the " ' " character that messes
> up my InsertIntoDB query......
>
> The code snippet below is what I am using, can anyone tell me how i
> could modify it to allow surnames of this type to be accepted and not
> generate an error.
>
> Code Snippet:
> ================================================================
>
> boolean success = insertIntoDB(
>          "'" + email + "','" + firstName + "','" + lastName + "','" +
>              telNo + "','" + address1 + "','" + address2 +
>              "','" + county + "','" + country + "','" +
> (String.valueOf(IdNo)) + "','" + password  + "'");
> ================================================================
> End Code:
>
> Ps I tried the archives, but the server is down.....
>
> Thanks again to anyone that may be able to help.
>
> Regards,
> Jennifer
>
> _____________________________________
>
> Get your free E-mail at http://www.ireland.com
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to