constructing a invisible wall between servlets api and your webapplication
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   murali_kuppoor
Posted On:   Thursday, November 1, 2001 04:58 PM

We have developed a wireless web application, which has to be installed in different servers like Tomcat, websphere, weblogic etc. each web server has different set of configurations, to make it easy I came out with servlet wrapper classes for HttpServletRequest, Response, ServletContext, Session, Cookie etc., and our web application depends on our wrapper classes for Response, request, session, cookie and context. Our Web application and our servlet wrappers are in a jar file and set to CLASSPATH. And the actual servlet placed in the WEB-INF/classes implements our Eventlistener and uses our Web application package and also core Servlet api. There is addEventlistener method implemented in all our wrapper classes like Request, Response and Session etc., Suppose you    More>>

We have developed a wireless web application, which has to be installed in different servers like Tomcat, websphere, weblogic etc. each web server has different set of configurations, to make it easy I came out with servlet wrapper classes for HttpServletRequest, Response, ServletContext, Session, Cookie etc., and our web application depends on our wrapper classes for Response, request, session, cookie and context. Our Web application and our servlet wrappers are in a jar file and set to CLASSPATH. And the actual servlet placed in the WEB-INF/classes implements our Eventlistener and uses our Web application package and also core Servlet api. There is addEventlistener method implemented in all our wrapper classes like Request, Response and Session etc., Suppose you are calling request.getParameter(name) our Wrapper class Request fires a event and calls the actual getParameter in the HttpRequestObject. So there is an invisible wall between our web application in the jar and servlets. The main servlet uses our libraries, which are in a jar file, but we don’t use any Servlet api directly. Everything is working fine.
I just have to drop my servlet (which implements our EventListener) in a place where each webserver allows to place and our web application is set to CLASSPATH. Is this a good way or can I also use directly servlet api through my webapplication and setting servlet.jar to the classpath. I just want to know is this a good way?

   <<Less

Re: constructing a invisible wall between servlets api and your webapplication

Posted By:   Alex_Chaffee  
Posted On:   Saturday, November 3, 2001 08:47 PM

Yes, it's a good way :-)
About | Sitemap | Contact