• 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

"case insensitive" url

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i make my URL to be case insensitive?. I.E my application is testapplication. If anybody types TEStAPPlicatiN in the url, the application(testapplication) should get invoked. I am using JBoss as app server. Please help me.

Pradeep
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Pradeep"-
Welcome to the JavaRanch! Please adjust your displayed name to meet the

JavaRanch Naming Policy.

You can change it

here.

Thanks! and welcome to the JavaRanch!

Mark

p.s. Basically it is just about your last name. LV isn't a real last name.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
URLs are case sensitive according to the HTTP specification (everything except the domain name that is, the domain name is NOT case sensitive).
Any server that doesn't check for this is buggy (only ones I know of are very old versions of IIS).
 
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Jeroen said, i dont think this can be done directly.

However i think this can be done programmatically...

here is how i think i would do it:

1. Let one servlet handle all requests.

2. In the servlet, use HttpServletRequest.getServletPath() to get the name of the servlet actually required.

3. once you get the name os the servlet, get it in the form you require, for ex: do a String.toLower() on it so that you have all servlet names in all small letters.

4. call RequestDispatcher.forward() to forward the request to the particular servlet.

I havent tried it, but this should work. What say, Jeroen?
 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic