tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lacerda, Wellington (AFIS)" <Wellington.Lace...@fao.org>
Subject RE: embedding jsp into an html file.
Date Wed, 15 Nov 2000 15:01:00 GMT
You can't do that, but you can mimic that.

You can create your file as a JSP and then use this definition on the
web.xml descriptor of your application:

<servlet>
  <servlet-name>apage</servlet-name>
  <jsp-file>/another_page.jsp</jsp-file>
 </servlet>
 <servlet-mapping>
  <servlet-name>apage</servlet-name>
  <url-pattern>/apage.htm</url-pattern>
 </servlet-mapping>

It will work as an htm file. If you put your jsp under web-inf this will be
the only way to access that.

Wellington

		-----Original Message-----
		From:	Christoph Kukulies
[mailto:kuku@gilberto.physik.rwth-aachen.de]
		Sent:	15 November 2000 15:36
		To:	tomcat-user@jakarta.apache.org
		Subject:	embedding jsp into an html file.

		How can I use jsp in a normal html file (extension .html)
with tomcat?

		test.html:

		<html>
		<FORM>
		<INPUT TYPE='text'
		           NAME='hn'
		           VALUE='<%= request.GetRemoteHost() %>'
		           SIZE='15'>
		</FORM>
		</html>

		-- 
		Chris Christoph P. U. Kukulies
kuku@gil.physik.rwth-aachen.de

Mime
View raw message