This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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 ]
 
Consider Paul's rocket mass heater.
 
subject: how can dispaly the pics that are not included in the program folder.
 
Similar Threads
How to got image from jar file?
loading a pic in java
Jtable Back ground
Cutest pic in javaranch?
A question about BufferedImage class.