• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

problem using '?' in url-pattern

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I have a URL with a '?' symbol in it, which I wanted to map to different url using sendRedirect in a servlet. When I give the url with '?' symbol in url-pattern tag of a servlet-mapping it doesn't take it. Does the symbol has a different meaning like as in regex? Please let me know how to solve this problem.

Thanks in Advance,

Cheers,
Chandu
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can't use regex in url-pattern!

only wildcard id "*" at the least position or at the first - for extension mapping.

mfg,
Flom
 
Chandra Sagi
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How could I map an url with '?' symbol in it.

Thanks!
 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could try
/? or /?/ or /?*.jsp

But since ? does not have any meaning attached to it, I fail to understand why do you wish to use "?" for url-pattern?
 
reply
    Bookmark Topic Watch Topic
  • New Topic