So what you need to do is to add path to your tomcat sever.xml file. If you using eclipse you should have a server project in your workspace, here is how it should be looked (yours would be probably called just Servers):
If you are not using eclipse find this file in your system.
Open this file (marked in blue on the image) and add this line of code in under your <host> tag:
<Context docBase="full_path_to_image_folder" path="/image" />
Note: full_path_to_image_folder is something like C:/images.
After this just reset your tomcat server and try to access some image via your browser, here is an example:
http://localhost:8080/image/my_image.png
You may need to restart your machine in order for the changes will take their place.
No comments:
Post a Comment