This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Image directory  RSS feed

 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
JSP pages are dynamic, but certain elements (like GIFs) are static. So it makes sense for these JSP's HTML's and GIF's to be jar'd together. Then in your JSP, you can simply refer to the image with an src = "gif file name". It will find the image in the jar, and retrieve it. This I understand.

What about the case where I want an image directory? For example, my application requires functionality to upload and display various images. These images can't be jar'd with the WAR file, because they are dynamic. But the problem is: How to get a file system reference?

I have tried a bit of sneakiness. In the J2EE directory, under the repository/computerName/web directory, I can see there is a folder with the same name as my web context root. So in the same directory i placed an 'images' folder and then referred in the JSP to src="../images/image.gif" This did not work.

Any ideas how I can do this?
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well.. 10 minutes later I answered my own question. It's a new personal best.

I can place an images directory here: < J2EE_HOME >/public_html

[This message has been edited by Mike Curwen (edited May 04, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!