2

I am using Spring to create a web application in which a user can upload a zipped folder containing an index.html file along with all it's resources(pretty much like an Adobe captivate generated webpage). The user should be able to request the uploaded web pages in the form of inner web pages.

I can only go as far as unzipping the folder itself, but I have no idea how to launch the index.html present inside the zipped folder.

How do I achieve this?

Starscream1984
  • 3,072
  • 1
  • 19
  • 27
user3414321
  • 421
  • 1
  • 4
  • 11

1 Answers1

1

Quite honestly Spring has no restrictions or advantages over displaying your subpages inside another page. However you can use Spring MVC to dynamically serve the web pages from the uploaded folder.

More over you have to play the tricks from browser side. Going with iFrame seems to be the best option from client side, though there are many other options. Please check this thread.

You can write some smart APIs in SpringController which accepts the folder path or folder name as parameter, picks the necessary pages from the requested folder and serves the user.

Another approach could be to use a headless browser for the server side rendering and give the output as screenshots to client. This can render the pages server side. Please check this thread for more details.

I hope this helps you!

Community
  • 1
  • 1
SyntaX
  • 2,090
  • 17
  • 30
  • i have proposed the screen shot solution, but the uploaded webpage should be able to render media such as that of video, image, audio... – user3414321 Nov 14 '15 at 23:23