• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting the Query String from a URL having a different format

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 153
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no query string on your URL, so of course getQueryString() returns nothing.

You'll need to parse the path info yourself.
 
Uday Bhagwat
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic