In other words, you want the "processed" JSP output, in a file. Yes. We do
this to send an HTML form to email via a JSP page that uses a bean to fill
in the "email" html form with dynamic content.
Use this:
sb = new StringBuffer();
URL url = new URL( emailUrl );
BufferedReader in = new BufferedReader( new
nputStreamReader( url.openStream() ) );
while( (str = in.readLine()) != null )
sb.append(str);
Then, the sb.toString() contains the output..so you'll have to write that to
a file. You can use this to process any http page, including from other
sites. We pass in the actual absolute page on our site, but you can easily
do http://somepage.com as well.
Hope this helps.
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets