tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evan Yang <e...@netsco.com>
Subject Re: question regarding to severlet definition in web.xml
Date Thu, 06 Jul 2000 19:20:07 GMT
I found out my problem, nothing to do with Tomcat.
Just let you kown in case there are people actually reading this mail.

Evan

Evan Yang wrote:

> Hi,
>
> I just subscribed to this mailing list, so excuse me if my question is
> old.
> I have a frame work for using servlet in kind of MVC pattern.
> The servlet controller class is a dummy class derived from HttpServlet,
> all it does is direct the actions form html to the model object using
> java reflection,
> then after the model has done with it's process, the data is send to
> view object for displaying.
> The model and view objects are constructed dynamically when controller
> (a servlet) is instantiated.
> The class of model and view are defined in a property file.
> In this design the controller never changed.
>
> But then the problem with the Tomcat configuration in web.xml:
>
>    <servlet>
>       <servlet-name>testSession</servlet-name>
>       <servlet-class>com.netsco.util.servlet.ServletBase</servlet-class>
>
>       <init-param>
>             <param-name>PropertyFile</param-name>
>
> <param-value>/web/docroot/WEB-INF/conf/testSession.properties</param-value>
>
>       </init-param>
>    </servlet>
>    <servlet>
>       <servlet-name>testSession2</servlet-name>
>       <servlet-class>com.netsco.util.servlet.ServletBase</servlet-class>
>
>       <init-param>
>             <param-name>PropertyFile</param-name>
>
> <param-value>/web/docroot/WEB-INF/conf/testSession2.properties</param-value>
>
>       </init-param>
>    </servlet>
>
> If the first testSession servlet is instantiated, then the second
> testSession2 will never be created.
> May be due to they are the same class ?
>
> But in my design they should be different instances using different
> model and view to handle different events.
> Is there a way the Tomcat can construct new servlet even if they defined
> as the same class ?
> Thanks for any response in advance.
>
> Evan
>
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message