Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing a static resource

 
Stephane Eybert
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like this is not inspiring people :-)
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17989
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Stephane Eybert
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic