简体   繁体   中英

Accessing Java Web App from different machine using IP of server

I have deployed a web application (name: SDCS) on tomcat 6.0 server that compares image files from user-provided folder path.

The application is working perfectly fine on the server and its able to pick the images from the folder and proceed.

But when I access it from another machine on the same network by using server's IP, it opens up perfectly but obviously it doesn't pick up the images as it is not able to find the user-provided folder path on the server and the code breaks. Please suggest some workarounds for this problem.

Link when accessing on Server: localhost:8080/SDCS/

Link when accessing on another machine: Server's IP:8080/SDCS

You need to make those images available as a url. Maybe create a servlet to load them and load them via that and not from the file system

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM