Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

parsing queryString from Browser: time variable

Posted on 2006-05-05
6
Medium Priority
?
186 Views
Last Modified: 2010-04-01
Hi,
I am trying to parse the queryString("email=foota@hotmail.com&timestamp=20061005152900") from browser
after i do "String queryString = request.getQueryString()" in my servlet, i am getting:

"email=foota@hotmail.com×tamp=20061005152900" , basically 'times' is being relpaced by 'x'

How can fix this so that after my queryString is still exactly the same.

0
Comment
Question by:komlaaa
  • 4
  • 2
6 Comments
 
LVL 23

Assisted Solution

by:Siva Prasanna Kumar
Siva Prasanna Kumar earned 400 total points
ID: 16619495
great &times stands for multiplication in HTML so only its getting replaced by X check out

http://www.w3schools.com/html/html_entities.asp

just try masking it with in some escape tags.
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 16620789
Im wondering why &times is being converted to X, AFAIK × (with semicolon) is the correct notation
however you can url encode it
query = java.net.URLEncoder.encode(query, "UTF-8");
0
 
LVL 23

Expert Comment

by:Siva Prasanna Kumar
ID: 16620821
>>Im wondering why &times is being converted to X

check out the link i have given.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:hoomanv
ID: 16620836
> check out the link i have given.
I know Html Entities but my wonder is why &times without the semicolon ; is being converted
0
 
LVL 14

Expert Comment

by:hoomanv
ID: 16620845
if it was ×tamp
convertion would be correct
but its &timestamp
0
 
LVL 14

Accepted Solution

by:
hoomanv earned 600 total points
ID: 16620881
try

query = query.replace("&", "&");

before showing within html
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Moore’s Law has proven itself time and time again since it was first introduced. So what’s next? Will Moore’s law continue to remain relevant, or will new technology take over and bring us the next big advancement in computing?
In the below post we have mentioned the best hosting type for startups. Also, check out some of the superlative web hosting companies that are proposing affordable web hosting solutions to host your startup website.
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question