This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Dynamic URLs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Dynamic URLs" Watch "Dynamic URLs" New topic
Author

Dynamic URLs

ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
Not sure what it's called, but I want be able to have requests that look like:

http://www.mysite.com/users/myNameHere
http://www.mysite.com/posts/00007654

The resource URL part doesn't exist = not a web resource, but I want to strip it and use it much as I would use a usual request parameter.
ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
um, just by looking in the API, I found it can be done as simple as calling:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamic URLs
 
Similar Threads
servlet mapping clarification
Using Directory Path as Parameters?
how to encode query string.
how to access jsps in a different pathinfo path in the same webapp using c:url
how to remove the port number in URL