You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Pawson, David" <Da...@rnib.org.uk> on 2004/09/28 10:23:21 UTC

Session based object, accessible to all classes.

My tomcat 5.0.27 app currently generates session based data in
a number of classes.
  Is there a common way of sharing a data structure across
these classes?
 I want to instantiate it when a user logs in, add to it from 
one class, then retrieve data from another class.
  This data will vary across users, hence is not common to 
all sessions. 


TIA,
Regards DaveP.

**** snip here *****

-- 
DISCLAIMER:

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged.  If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system.

RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants.  However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments.

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent
those of RNIB.

RNIB Registered Charity Number: 226227

Website: http://www.rnib.org.uk




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat4 to Tomcat5 web.xml problem

Posted by Ben Souther <bs...@fwdco.com>.
Try moving the servlet-mapping node so that it appears after the servlet
node.



On Tue, 2004-09-28 at 05:45, Shaun Campbell wrote:
> I've got an application that runs fine in Tomcat 4.1.30.  However when I
> place the same webapp in Tomcat 5.0.28 I get an error at startup saying that
> there is an error on line 11 column 21 of web.xml and the app is not loaded.
> Can anyone give me any pointers as to what could be wrong with the file?
> 
> Thanks
> 
> Shaun
> 
> <!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-mapping>
>     <servlet-name>invoker</servlet-name>
>     <url-pattern>/servlet/*</url-pattern>
>   </servlet-mapping>
>   <servlet>
>     <servlet-name>apt</servlet-name>
>     <servlet-class>org.apache.turbine.Turbine</servlet-class>
>     <init-param>
>       <param-name>applicationRoot</param-name>
>       <param-value>webContext</param-value>
>     </init-param>
>     <init-param>
>       <param-name>properties</param-name>
>       <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
>     </init-param>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>   <security-constraint>
>     <web-resource-collection>
>       <web-resource-name>templates</web-resource-name>
>       <url-pattern>/templates/*</url-pattern>
>     </web-resource-collection>
>     <web-resource-collection>
>       <web-resource-name>logs</web-resource-name>
>       <url-pattern>/logs/*</url-pattern>
>     </web-resource-collection>
>     <auth-constraint>
>       <role-name>admin</role-name>
>     </auth-constraint>
>   </security-constraint>
>   <login-config>
>     <auth-method>BASIC</auth-method>
>     <realm-name>Templates</realm-name>
>   </login-config>
> </web-app>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Tomcat4 to Tomcat5 web.xml problem

Posted by Shaun Campbell <sh...@uk2.net>.
I've got an application that runs fine in Tomcat 4.1.30.  However when I
place the same webapp in Tomcat 5.0.28 I get an error at startup saying that
there is an error on line 11 column 21 of web.xml and the app is not loaded.
Can anyone give me any pointers as to what could be wrong with the file?

Thanks

Shaun

<!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-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>apt</servlet-name>
    <servlet-class>org.apache.turbine.Turbine</servlet-class>
    <init-param>
      <param-name>applicationRoot</param-name>
      <param-value>webContext</param-value>
    </init-param>
    <init-param>
      <param-name>properties</param-name>
      <param-value>/WEB-INF/conf/TurbineResources.properties</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <security-constraint>
    <web-resource-collection>
      <web-resource-name>templates</web-resource-name>
      <url-pattern>/templates/*</url-pattern>
    </web-resource-collection>
    <web-resource-collection>
      <web-resource-name>logs</web-resource-name>
      <url-pattern>/logs/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
  </security-constraint>
  <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>Templates</realm-name>
  </login-config>
</web-app>




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org