• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

showing html content and its relative assests

 
Ranch Hand
Posts: 49
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Little background:
User Uploads a zip file to my system from a UI, which has a index.html and its assets like images and css, javascript and i have to show this index.html, on my server.

This zip file has to be decompressed and saved on a remote location in my system and index.html has all the links to the images, css and javasripts it requires.

Where I've reached:
User can successfully upload the zip file.
I am able to decompress it and save it to the remote location
I Am able to do java.io operation and show the index.html file on my server.

Bottleneck:
This index.html files has relative paths to the images and css and javascripts. how can i do this any idea?

Things to keep in mind my application uses MVC model.

Any suggestions / thoughts are welcome.
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jilesh Lakhani wrote:
This index.html files has relative paths to the images and css and javascripts. how can i do this any idea?



What is the question here? When you say relative path, it is relative to the location of the html, isnt?
I would say it is better than having the path as an absolute path on some machine
Can you elaborate on your question?

(Since, it is not sure whether the question pertains to html or modifying the paths, moving to JIG-I)
 
Jilesh Lakhani
Ranch Hand
Posts: 49
Python Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well, I've read the HTML page using JAVA.io operations and showing it on my webpage.
now this HTML page has relative paths for images and css (Since the user is uploading standalone zip file) the are not aware of the system location also that location can't be access via URL.
example index.html has <img>

so here just to re-iterate,

A stand alone version of a zip file is uploaded, and it being saved to the servers @ remote location,
I've to now show this standalone version, via an accessible URL, to do so 1st part of showing the index.html file, its absolutely working fine via Java.io operations however its relative paths which is the issue here.

Hopefully I've given enough insights, do let me know if you need further clarifications..

 
reply
    Bookmark Topic Watch Topic
  • New Topic