Another option no-one has posted is the include the html file using
RequestDispatcher.
This several advantages:
1) does not expose direct url to html page (maintains security)
2) does not require each page to be compiled (if it were converted to
.jsp)
3) is faster & more scalable (as Shawn McKisson commented)

for JSP 0.92
this.getServletContext().getRequestDispatcher("page.html").include(request
, response);

for JSP 1.0
config.getRequestDispatcher("page.html").include(request, response);
--^ not sure about "config", I'm still stuck in 0.92

Lance Lavandowska

-----Original Message-----
From: Steven J. Owens <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, October 12, 1999 10:52 AM
Subject: Re: Opening a HTML from servlet


>Hemant writes:
>>     I have validated the user from "login.html" by checking the data in
>> the database. Now if the user is a valid user i have to display aa
>> ALREADY existing  html page. can i do this or will i have to write the
>> whole page in the servlet println code?
>
>     1) redirect the user to the page using the Location: header
>     2) load in the page file upon startup and substitute in any
variables,
>        then print it (there are template packages for this)
>     3) set up the existing HTML page as a JSP with code to insert the
>        variables where appropriate, then in the first servlet, redirect
>        the user to the JSP page.
>
>Steven J. Owens
>[EMAIL PROTECTED]
>[EMAIL PROTECTED]
>
>_________________________________________________________________________
__
>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

Reply via email to