0

I have a quick question and wonder if anyone has come across this issue before?

I am trying to read a file from my classpath into a .jsp with spring but I keep getting a 404 even when the url is correct.

eg

/var/lib/tomcat7/webapps/ROOT/WEB-INF/classes/file/MyProcess.bpmn

The file is available in the browser from the above url but not through the .jsp in the Spring Framework where a 404 (Not Found)is returned.

Has anyone come across this problem before?

Jomd
  • 1
  • How do you try to open the file in your jsp ? The 404 suggests you tried to forward (which would require a path relative to the servlet context), or redirect (which would require a HTTP url) and you show an absolute path... – Serge Ballesta Feb 12 '16 at 15:46

1 Answers1

0

You have to move your file out of the WEB-INF directory I think because it won't be accessible from your jsp page.

This link should be useful

What is WEB-INF used for in a Java EE web application?

Community
  • 1
  • 1
kavind
  • 261
  • 2
  • 13