문제

I have followed this blog: A programmer's blog. All upload images go to

Z:\glass_server_upload and I added a file named ImageView#img.xml in the tomcat C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\Catalina\localhost. And the file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Context docBase="Z:/glass_server_upload" reloadable="true" crossContext="true" path="/ImageView/img" debug="9"></Context>

And now I want to display the images, so I enter the browser like this: localhost:8080/ImageView/img/pulpit.jpg. But the result is sadly 404.

도움이 되었습니까?

해결책

According to the post the file should be

<Context docBase="Z:/glass_server_upload">
</Context>

What do you need to do:

  1. Locate $CATALINA_BASE/conf/Catalina/localhost
  2. Create a textfile there named ImageView#img.xml with the contents above
  3. Start/restart Tomcat
  4. Enter in the browser via http://localhost:8080/ImageView/img/yourimage.jpg
  5. if the file exists and you have permission to read the file, then it will be shown.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top