Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old August 9th, 2002, 02:01 AM
Pixel_Damage Pixel_Damage is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 6 Pixel_Damage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
from dynamic jsp page to static...

Hi there

This might be obvious, and to be honest whenever thinking about it before I thought it would be simple... how can I get my dynamic pages to generate flat html files (unique versions so each time they are 'processed' it might be file1.html, next file2.html etc.)?

At the moment my controller fowards its request, response (via dispatcher) to a jsp file which is then built from previously entered data stored in objects and kept in the users session. I need to be able to generate a static html version of this. I have tried using java.net.Url.openStream() and sending this to a BufferedReader, however tomcat then gives errors about not being able to instantiate my stored session objects...

Does anybody know of a better way to do this, I have tried to search for clues (large sites generally want flat files to reduce server load so i thought it wouldnt be too hard to find)...

Hope this is clear, thanks for any help

Reply With Quote
  #2  
Old August 10th, 2002, 01:43 PM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
Not quite sure what you are trying to accomplish. I could only see this as feasible if the data for the page changes so little (once a week) or the site has a huge hit count. However, if the trigger for the html file creation is someone requesting a link to a jsp, then how do you think you are going to save server resources by generating an html file?

If you think that generating an html file in your controller and then forwarding it to the html file is going to save you resources over forwarding it directly to a jsp (that essentially does the same thing), I believe you are mistaken.

Reply With Quote
  #3  
Old August 10th, 2002, 09:19 PM
Pixel_Damage Pixel_Damage is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 6 Pixel_Damage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
my client wants a hard copy (record) of each change made to the page, so instead of storing each version in a database i also create flat html files that dont have to be used within the web - containter...

i was only referring to large sites (mostly using a cms of some kind) that generate flat files, which will definately reduce load on the server

thanks for your reply. any other ideas or suggestions more than welcome

Reply With Quote
  #4  
Old August 11th, 2002, 02:06 AM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,711 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 6 Days 5 h 22 m 58 sec
Reputation Power: 259
I'm reading this interesting tutorial about writing to a file, maybe it can help you http://sylistron.org/tutorial/files/index.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > from dynamic jsp page to static...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway