开发者

Servlets and downloading files

开发者 https://www.devze.com 2023-02-21 06:38 出处:网络
I want t开发者_StackOverflowo download an image file using a javascript client. Then I want to call the servlet in apache tomcat from the applet.

I want t开发者_StackOverflowo download an image file using a javascript client. Then I want to call the servlet in apache tomcat from the applet.

How do I host the file on tomcat. i.e. the same as hosting it in the 'docroot' folder on regular webserver?


Just drop the file in a subfolder of the /webapps folder. E.g. Tomcat/webapps/images/foo.png. It'll be available by http://localhost:8080/image/foo.png. Or if you already have a webapp, just drop it in the web folder (there where you also put your JSP files and where the /WEB-INF folder is also present).

0

精彩评论

暂无评论...
验证码 换一张
取 消