Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

apostrophe in email

843835Oct 16 2002 — edited Oct 17 2002
Hi All!
My jsp was working fine till it encountered a user with a apostrophe in his name(and hence in his email address). I am getting following error in the jsp. I still want to allow the jsp as well as the url to handle the apostrophe in email. Any solution?
<code>
oracle.jsp.provider.JspCompileException: Errors compiling:c:\oracle\isuites\apache\apache\htdocs\_pages\_webappcore\_common\account.java
c:\oracle\isuites\apache\apache\htdocs\_pages\_webappcore\_common\_account.java:104: Invalid character constant.
EmailAddress = tom.r'more@xyz.com;
^
c:\oracle\isuites\apache\apache\htdocs\_pages\_webappcore\_common\_account.java:104: ';' expected.
emailAddress = tom.r'more@xyz.com;


</code>
FYI emailAddress is type String.
this email address will also show up in javascript function and will also be appended in URL as follows.

<code>
javascript:displayxyz("170IXK",%20"Cre",%20"tom.r'more@xyz.com)
</code>
This is the new URL that works for the add doc function;

<code>
http://209.0.103.245/webApp/common/xyz.jsp?proposalid=0000&email=tom.r'more@xyz.com;&tab_name=Cre&username=21304
</code>


Any solution to above problem? I wish apostrophe should not give me error in

1> String variable
2> javascript
3> URL

thanks,
pp
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2002
Added on Oct 16 2002
5 comments
309 views