You are re-inventing jsp...
--Olu E.
> -----Original Message-----
> From: Chris Pratt [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, August 10, 1999 9:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: out.println(".....");? "EASY is the word!!!"
>
> > Or, how about we
> > store the data in a txt file, something in the java.io package to just
> read
> > the entire file into the script, and then output that to the web?
>
> Here it is
> (*Chris*)
>
> public SimpleServlet extends HttpServlet {
>
> public void doGet(HttpServletRequest req,HttpServletResponse res) throws
> IOException {
> String line;
> BufferedReader in = new BufferedReader(new FileReader("static.html"));
> StringWriter str = new StringWriter();
> PrintWriter out = new PrintWriter(str);
> while((line = in.readLine()) {
> out.println(line);
> }
> in.close();
> line = str.toString();
> res.setContentType("text/html");
> res.getContentLength(line.length());
> out = res.getWriter();
> out.print(line);
> out.close();
> }
>
> public void doPost(HttpServletRequest req,HttpServletResponse res) throws
> IOException {
> doGet(req,res);
> }
>
> }
> ----- Original Message -----
> From: John McDonald <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, August 10, 1999 5:18 PM
> Subject: Re: out.println(".....");? "EASY is the word!!!"
>
>
> > My thoughts exactly. I'm the originator of this post, and I guess I
> should
> > have been more specific from the beginning. I would like and API,
> through
> > which I can use a simple tag, like print qq, to output HTML data to a
> web
> > page. Peter hit the nail on the head when he said that the products
> > (templates, API's) available today are quite difficult to use and are
> not
> > for the mainstream. I am fairly familiar with Java, however I am NOT a
> guru,
> > but I grow to love the language more and more daily. I would like a way
> for
> > someone, who is new to java, to be able to easily post dynamic data to
> there
> > web(extranet, intranet, ecommerce, business to business VPN ecommerce)
> page
> > quickly and efficiently, like Perl has the ability to do. I learned the
> > fundamentals of Perl in about two weeks. I've been working with Java for
> six
> > months and have yet to be able to post dynamic web data in an efficient
> > manner without MUCH laborious out.println("...") coding.
> >
> > So I POST this question again....in a different light. How difficult
> would
> > it be to come up with a 100% pure java API which would encompass
> fundamental
> > HTML(<head><body><table> would be a great start) and then make calls to
> this
> > API just like we do with every other darn OO language. Or, how about we
> > store the data in a txt file, something in the java.io package to just
> read
> > the entire file into the script, and then output that to the web? Great
> > idea.
> >
> > If anyone knows how to do this, please let me know.
> >
> >
> >
> > John D. McDonald
> > Phone: 415-703-8800 x 342
> > Fax: 415-703-8801
> > email: [EMAIL PROTECTED]
> > web: www.InfoSolv.net
> > InfoSolv, Inc.
> > Web Security Consulting
> > Integration and Training
> >
> > -----Original Message-----
> > From: Peter <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > Date: Tuesday, August 10, 1999 6:02 AM
> > Subject: Re: out.println(".....");? "EASY is the word!!!"
> >
> >
> > >>I have tought that webmacro, freemaker etc. are too complex to be used
> > >>by me.
> > >
> > >That's exactly my point!!!! Why can't these stuff be a bit easier ?
> Things
> > >dont have to be complicated to be used. Instead of offering
> alternatives,
> > >most of you guys just keep pushing your webmacro, jsp, freemarker cr*p
> down
> > >our throats. The strangest thing is that, most of these template tools
> web
> > >sites dont provide easy AND workable examples on their functionality.
> Most
> > >are just plain ads coupled with convoluted examples and the infamous
> Hello
> > >world servlet. Please .......
> > >
> > >So when people like yours truly complaint on how complicated they are
> to
> > >use, then came forth those derogatory remarks such as "unreformed perl
> > >programmer", "messy coder" etc-etc ....... well go ahead and make
> yourself
> > >feel superior by trashing out at us .......
> > >
> > >I really hope that in the future, servlet development will not be so
> > painful
> > >and messy as it is at the present.
> > >
> >
> >_________________________________________________________________________
> __
> > >To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > >of the message "signoff SERVLET-INTEREST".
> > >
> > >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > >Resources: http://java.sun.com/products/servlet/external-resources.html
> > >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> >
> >
> __________________________________________________________________________
> _
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html