aspose file tools*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 9280
    
  17

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...
 
 
subject: Url Pattern
 
Similar Threads
home page downloads as a file using ssl
Problem on Handler Mapping
goGet vs. doPost
WARNING: Unexpected error forwarding to login page
Resource not found