• Post Reply Bookmark Topic Watch Topic
  • New Topic

Include html file from outside web application?

 
Milen Angelov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
Is there a way somebody can think of how to include and html page with pictures from the file system outside application server dir. and application itself. What I was thinking is to create a tag lib for reading the html file as plain text and write into the servlet output, but the problem with tags like <img> and <script> appeared as a problem. Sure I can copy binary the images into the web app. itself but then every time I have to check whether I have already copied it and if yes is the modified date the same, i.e. is there a newer version of the image.
Any ideas?

p.s. I know about the security issues, I'm fully aware of them, but so the client and this is how they want it done.
 
Daniel Rhoades
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how about a symbolic or hard link?
 
Milen Angelov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was my first thought, but then I was 'surprised' to find that the server runs under Windows and I don't know if that is possible under M$ Win.
[ August 15, 2005: Message edited by: Milen Angelov ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The servlet spec is pushing the principal of fully self contained app these days. With disk space as cheap as it is these days, I think it makes sense.

Rather than trying to share files among various apps at run time, you might want to consider creating an ANT build script that compiles your app by collecting all the various files needed. You would have a one step build and you would know that everything you need is right within your webapps's directory structure.
 
Harish Madhavan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just wanted to understand the need of such a requirement of moving html,images outside your approot.
In a typical production environment, all the static contents like html,images,js and downloadable applets will be put under a dedicated http servers.In such a case, you can very well share images and other resources for different applications.

Harish
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!