• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem using '?' in url-pattern

 
Chandra Sagi
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • 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
 
Flom Xanther
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
How could I map an url with '?' symbol in it.

Thanks!
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • 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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic