"C.S.Sriram" wrote:
>
> Hi,
>
> Instead of writing the HTML in the servlet code
> like
> out.println("<HTML><BODY><B>blah blah b<B></BODY></HTML>
>
> can we call a Html file that contains these HTML tags directly into Servlert
> code???
>
> Is that possible?? If so how??
>
sure is possible. I do it like this:
private void sendHTMLForm(HttpServletResponse res){
PrintWriter out = null;
try{
out = res.getWriter();
} catch (IOException ex){
ex.printStackTrace(System.out);
}
try{
BufferedReader in = new BufferedReader(new
InputStreamReader(new
FileInputStream("/usr/local/jserv/reciadmin/incluir_pago_form.txt")));
String line = "";
while((line = in.readLine()) != null){
out.println(line);
}
} catch (IOException ex){
ex.printStackTrace(out);
}
} // from sendTitForm();
--
Sven E. van 't Veer, llm.
Departamento de Desenvolvimento
Brasil Informatica.
http://www.brvip.com.br
___________________________________________________________________________
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