This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Url Pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

Url Pattern

Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi,

I am currently unsure in my web apps if I am correctly assigning the correct url.

I have a list of links where user can download several files:



My url pattern for the following is set as

But when I click the link, I always get a 404 error and my servlet does not capture the url.

The resource folder is under the WEB-INF folder and I am planning to stream the files into the servlet output response.
I am not sure but I think I miss something.


Sean Clark ---> I love this place!!!
Me ------> I definitely love this place!!!
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9404
    
  20

Where is the page on which the links that you've given are?? You are using relative paths in the links, use full paths from the root of the context i.e. like


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Mark Reyes
Ranch Hand

Joined: Jul 09, 2007
Posts: 426
Hi Ankit,

Thank you.. that is what I missed...

I will my post follow up question on the Spring forum since its spring specific.. I just tested it out on plain Servlet and JSP..

Kudos to you...
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Url Pattern
 
It's not a secret anymore!