tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Lines-Davies" <...@spd.sonybpe.com>
Subject RE: jspInit and load-on-startup
Date Fri, 01 Mar 2002 16:40:36 GMT
Hi Randy

My web.xml file is as below, but it turns out to be a bug in Tomcat 3.3, and
3.3.1 has fixed it.

cheers

Mark

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

<web-app>
    <servlet>
      <servlet-name>all</servlet-name>
      <jsp-file>zzz.jsp</jsp-file>
	  <load-on-startup>1</load-on-startup>
    </servlet>
	<servlet-mapping>
        <servlet-name>all</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

</web-app>

-----Original Message-----
From: Randy Layman [mailto:randy.layman@aswethink.com]
Sent: 01 March 2002 15:23
To: 'Tomcat Users List'
Subject: RE: jspInit and load-on-startup



	What does your web.xml file look like for this tag?  (Please include
the entire <servlet> declaration.)

	Randy

> -----Original Message-----
> From: Mark Lines-Davies [mailto:mld@spd.sonybpe.com]
> Sent: Friday, March 01, 2002 10:21 AM
> To: tomcat-user@jakarta.apache.org
> Subject: FW: jspInit and load-on-startup
>
>
> Hello
>
> I would like to have a JSP page loaded by Tomcat 3.3 when it
> starts up.
>
> I have added <load-on-startup> to the web.xml file and my JSP
> page looks
> like this:
>
> <%@ page import="java.io.*" contentType="text/xml" %>
> <%!
> public void
> Init(){
>         System.out.println("Hello World");
> }
> %>
> <%
>         System.out.println("Normal call");
>         out.println("<HTML>Hi there</HTML>");
> %>
>
> I assumed that when Tomcat starts, I would see the "Hello
> World" message
> displayed in my Tomcat console window. Instead, I see a message saying
> "LoadOnStartupInterceptor: Initializing JSP with JspWrapper".
>
> If I then make a browser call to this JSP page I get
>
> Hello World
> Normal call
>
> and subsequent calls just give "Normal call".
>
> I guess I have misunderstood what <load-on-startup> is for....?
>
> regards
>
> Mark Lines-Davies
>
>
>
>
> **************************************************************
> ***********
> The information contained in this message or any of its
> attachments may be privileged and confidential and intended
> for the exclusive use of the addressee. If you are not the
> addressee any disclosure, reproduction, distribution or other
> dissemination or use of this communication is strictly prohibited
> **************************************************************
> ***********
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message