Trond-
HttpSession.class in servlet-api.jar is an interface as is implemented in several places in the Tomcat source. To add new functionality I would make changes to the following classes and recompile Tomcat:
-javax.servlet.http.HttpSession.java
add your new methods:public void myHelperMethod();
-org.apache.catalina.session.StandardSession.java
implement your new method: public void myHelperMethod()
{
//useful code
}-org.apache.catalina.session.StandardSessionFacade.java
add the lines: public void myHelperMethod()
{
this.session.myHelperMethod();
}-org.apache.catalina.cluster.session.DeltaSession.java
implement your new method: public void myHelperMethod()
{
//useful code
}-org.apache.catalina.cluster.session.DeltaSessionFacade.java
add the lines: public void myHelperMethod()
{
this.session.myHelperMethod();
}Hope this helps!
-Mike Fowler "I could be a genius if I just put my mind to it, and I, I could do anything, if only I could get 'round to it"
Trond Hersl�v wrote:
Hi!
What do I have to do if want to use a modified HttpSession class? Can I do
one of the following:
Hope I don't have to do it this way:
1) extract $CATALINA_HOME/common/lib/servlet-api.jar
2) decompile HttpSession.class --> HttpSession.java
3) make my modifications on HttpSession.java and compile -->
HttpSession.class
4) build a new servlet-api.jar containing the modified HttpSession.class
instead of the original one.
It would be nice if this was possible.
1) create a new class MyHttpSession which extends HttpSession
2) add my extra funcionality to MyHttpSession.
3) compile MyHttpSession --> MyHttpSession.class and putt it into
$CATALINA_HOME/common/classes
4)The big QUESTION: How do I config tomcat to use MyHttpSession.class
instead of HttpSession.
Thanks in advance
\trond
********************************************************************** This email message has been swept by MIMEsweeper for the presence of computer viruses. **********************************************************************
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
