« Return to Thread: wrapperClass usage

Re: wrapperClass usage

by goober_nut :: Rate this Message:

Reply to Author | View in Thread

>> What I've done so far is create a very simple servlet which prints hello
>> to the browser and I've written a wrapper class named MyWrapper which
>> extends StandardWrapper. The MyWrapper class just has a constructor
>> which is supposed to print out to the logs "I'm in the wrapper."  Also,
>> in this project, I edited the context.xml file to read <Context
>> wrapperClass="MyWrapper.java"/> and started up the Tomcat server.

>That should be wrapperClass="must.include.the.package.MyWrapper"

Yes, I'm sorry, I did put my package name in there so it does look like wrapperClass="my.class.MyWrapper".
It does read though "my.class.MyWrapper.java", does that make a difference?

>> Can anyone tell me what I'm doing wrong?

>I assume the compiled class has been JAR'd and placed in the
>CATALINA_HOME/lib directory.

I don't have a $CATALINA_HOME/lib, I do have $CATALINA_HOME/common/lib, is that where it's supposed to go?

I did jar my MyWrapper's whole package up and put it in the /common/lib folder and restarted Tomcat. I tried it with both MyWrapper.java and MyWrapper and neither of them are printing for me.

>Mark

 « Return to Thread: wrapperClass usage

LightInTheBox - Buy quality products at wholesale price