This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Getting the Query String from a URL having a different format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Getting the Query String from a URL having a different format" Watch "Getting the Query String from a URL having a different format" New topic
Author

Getting the Query String from a URL having a different format

Uday Bhagwat
Greenhorn

Joined: Feb 18, 2010
Posts: 7
Hi folks,

I have the following URL :

http://localhost:8080/knowledgecenter/DocViewWindow.html#!docviewwidget;documentId=10011;feedbackId=5;feedbackTabInFocus=true

When in my ServletFilter I try do a :



It gives me a null.
What I would want is #!docviewwidget;documentId=10011;feedbackId=5;feedbackTabInFocus=true.
This basically is for a GWT page.
Please let me know as to what I can do..Thanks in advance


Try to achieve Excellence in whatever you do, Rank will follow!
Karn Kumar
Ranch Hand

Joined: Aug 06, 2009
Posts: 146

Can you try to get below Url

http://localhost:8080/knowledgecenter/DocViewWindow.html?#!docviewwidget;documentId=10011;feedbackId=5;feedbackTabInFocus=true

Not confirm but please try to pass parameters after ? and after that any additional parameter can be passed by separating with & .

http://localhost:8080/knowledgecenter/DocViewWindow.html?Param1=Value1&Param2=Value2&Param3=Value3

This might help you to get query string after ? i.e. Param1=Value1&Param2=Value2&Param3=Value3
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66

There is no query string on your URL, so of course getQueryString() returns nothing.

You'll need to parse the path info yourself.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Uday Bhagwat
Greenhorn

Joined: Feb 18, 2010
Posts: 7
Oh ok...
Any idea how I can do that? Since I get theurl from the request object.
And a request.getRequestURL gives me only -> knowledgecentral/DocViewWindow.html

Please let me know on this regard,
Thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting the Query String from a URL having a different format