aspose file tools*
The moose likes Servlets and the fly likes Unable to read # in input values in doGet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to read # in input values in doGet " Watch "Unable to read # in input values in doGet " New topic
Author

Unable to read # in input values in doGet

A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979

Hi,

I tried reading a # in the input values and unfortunately it doesnt get picked up..

http://localhost:8080/test/test?test=123#¶m2=67#89

in my doGet method, i tried reading the value as



Result is

123
null

Why cant we read the # in the value?

Regards



Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
That is because # is a special character for html anchors.


JDBCSupport - An easy to use, light-weight JDBC framework -
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979


But is there any way i can read the value as is apart from any encoding the char...



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

No. Encode the URL properly or it won't work. It's as simple as that.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to read # in input values in doGet