Exactly.

Something like java.net.URLConnection.getContent(), I believe.

John


> -----Original Message-----
> From: Bodycombe, Andrew [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 10:48 AM
> To: 'Tomcat Users List'
> Subject: RE: JSP source
> 
> 
> Fetching the HTML is straightforward. Just create a URL 
> connection and read
> the data from the stream.
> 
> You could try the following:
> 
> 1. Implement your report as a JSP or Servlet
> 
> 2. Write an email component that acts as a client to this 
> servlet which
>     a) opens a URL connection to your servlet
>     b) reads the HTML
>     c) mails it to the intended recipients.
> 
> 3. Write a cron job to run your email component
> 
> Andy
> 
> -----Original Message-----
> From: Deepa Raja [mailto:[EMAIL PROTECTED]]
> Sent: 09 January 2003 15:43
> To: Tomcat Users List
> Subject: RE: JSP source
> 
> 
> Hi John
> 
> With JSP it is like a template and I need not worry about placing the
> content 
> within the template. that is the only reason for me to use a JSP.
> 
> We have some applications already running Apache - Tomcat
> and adding a JSP is not going to be difficult
> 
> Also with JSP I can alter the format very easily 
> 
> Please feel free to point out if I'm wrong.
> 
> how could I get the html source? Could you please explain it for me.
> 
> Thanks
> Deepa
> 
> 
> -----Original Message-----
> From: Turner, John [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 09, 2003 3:02 PM
> To: 'Tomcat Users List'
> Subject: RE: JSP source
> 
> 
> 
> If you combine #3 and #4, your problem is solved.  "Format 
> the details as a
> report"...how would you format them if not HTML?  All you 
> have to do is
> stream the HTML into a buffer, then send that out as the body 
> of a message.
> You'll want to set the ContentType on your message to HTML.
> 
> You could do all of this from a JSP, but why would you want 
> to?  A cron job
> can call java and execute a class.
> 
> If, on the other hand, you are saying that you already have a JSP that
> generates the report to a browser, and you want to sent that output to
> someone as an email message, that's different. 
> 
> John
> 
> > -----Original Message-----
> > From: Deepa Raja [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 09, 2003 8:30 AM
> > To: [EMAIL PROTECTED]
> > Subject: JSP source
> > 
> > 
> > Hi 
> >  
> > I want to do some reporting that is to be called by a cron job.
> >  
> > I do not want to use a reporting tool. Can use JSP 
> >  
> > 
> > *   to talk to the database 
> > *   fetch the relevant details
> > *   format the details as a report
> > *   fetch the HTML  source of the generated report
> > *   and email it to intended recipients
> > 
> > My doubt is 
> >  
> > is it possible to fetch the HTML source of a  JSP?
> >  
> > I know I could use java mail to email if I could manage to 
> > get the source.
> >  
> > Please pour in your suggestions
> >  
> > Thanks
> > deepa
> > 
> > 
> > 
> > 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to