This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSP and the fly likes how can dispaly the pics that are not included in the program folder. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how can dispaly the pics that are not included in the program folder. " Watch "how can dispaly the pics that are not included in the program folder. " New topic
Author

how can dispaly the pics that are not included in the program folder.

zhong jin
Greenhorn

Joined: Dec 28, 2002
Posts: 3
e.g the program put in the dir"C:\Program Files\Apache Tomcat 4.0\webapps\ROOT",and there is a pic "logo.gif" in d:\images\. now ,how can i show the pic "logo.gif" on the brower to client.
Cory Wilkerson
Ranch Hand

Joined: Aug 14, 2001
Posts: 84
Move the image .
Actually, you'll either have to write the image into the response's output stream (response.getOutputStream()) via some server side code or expose it to the web and just path to it. If you go with the response stream route, your code is going to have to know about the path to logo.gif via a property specified at runtime or you could hardcode the thing into your code (boo). All that said -- look into moving it into your webapp.
[ December 30, 2002: Message edited by: Cory Wilkerson ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can dispaly the pics that are not included in the program folder.