aspose file tools*
The moose likes Tomcat and the fly likes Accessing a static resource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Accessing a static resource" Watch "Accessing a static resource" New topic
Author

Accessing a static resource

Stephane Eybert
Ranch Hand

Joined: Mar 15, 2010
Posts: 34
Hello,

I have a static resource, a pdf file, sitting in:

stephane@stephane-ThinkPad-X60:apache-tomcat> ll webapps/annotate-web/pdfs/
total 124
-rw-rw-r-- 1 stephane stephane 125962 2012-03-06 13:28 demo.pdf
stephane@stephane-ThinkPad-X60:apache-tomcat>

I'm trying to access it from the browser with:

http://localhost:8080/annotate-web/pdfs/demo.pdf

But I get a 404 message.

Here is the servlet config for info:





Kind Regards,

Stephane
Stephane Eybert
Ranch Hand

Joined: Mar 15, 2010
Posts: 34
Looks like this is not inspiring people :-)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16057
    
  21

Stephane Eybert wrote:Looks like this is not inspiring people :-)


The downside of free is that you don't get instant answers. Be patient. We do try and make sure all questions are answered, unless the person asking them is so obviously clueless that it wouldn't be worth trying to answer, the person asking is blatantly violating what few ironclad rules we have (mostly obviously bogus names) or nobody else knows the answer either.

I didn't see anything obviously wrong with what you did. Assuming that the Spring stuff isn't doing something obscure with your URL, about the only other reason I can see for a 404 would be if the file cannot be found. That usually is either because Tomcat doesn't have access rights to the file, or the filename requested in the URL isn't capitalized correctly.


Customer surveys are for companies who didn't pay proper attention to begin with.
Stephane Eybert
Ranch Hand

Joined: Mar 15, 2010
Posts: 34
Thanks Tim, no hurry with this issue, it's not a show stopper anyway, I shall try to test around it and see if I can find something in there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Accessing a static resource