You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by "Kelly C. Goedert" <ke...@nexxera.com> on 2004/08/25 15:55:23 UTC
help with sample application
I'm trying to run cactus sample application as is explained in cactus
page. But I get this error: _The requested resource
(/test/ServletTestRunner) is not available.
_The url I'm typing is
http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
I'm using tomcat 5.0.27 and java 1.4.2_04
I already tried placing the libs in common/lib and in webapps/test/lib
without results.
All the requested libraries are also in my classpath
Could anyone help me?
Kelly.
Re: help with sample application
Posted by "Kelly C. Goedert" <ke...@nexxera.com>.
I already checked tomcat logs, they give me no hints.
Kazuhito SUGURI wrote:
>Hi Kelly,
>
>In article <41...@nexxera.com>,
>Wed, 25 Aug 2004 10:55:23 -0300,
>"Kelly C. Goedert" <ke...@nexxera.com> wrote:
>kelly> I'm trying to run cactus sample application as is explained in cactus
>kelly> page. But I get this error: _The requested resource
>kelly> (/test/ServletTestRunner) is not available.
>
>Instantiation of ServletTestRunner may failed.
>
>Your tomcat's log may give you hints to solve your problem.
>
>Regards,
>----
>Kazuhito SUGURI
>mailto:suguri.kazuhito@lab.ntt.co.jp
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
Re: help with sample application
Posted by Kazuhito SUGURI <su...@lab.ntt.co.jp>.
Hi Kelly,
In article <41...@nexxera.com>,
Wed, 25 Aug 2004 10:55:23 -0300,
"Kelly C. Goedert" <ke...@nexxera.com> wrote:
kelly> I'm trying to run cactus sample application as is explained in cactus
kelly> page. But I get this error: _The requested resource
kelly> (/test/ServletTestRunner) is not available.
Instantiation of ServletTestRunner may failed.
Your tomcat's log may give you hints to solve your problem.
Regards,
----
Kazuhito SUGURI
mailto:suguri.kazuhito@lab.ntt.co.jp
Re: help with sample application
Posted by "Kelly C. Goedert" <ke...@nexxera.com>.
Hi Vincent,
now I decided to start from a clean installation and everything worked.
Just couldn't figure what was wrong the first time.
Thanks for your help.
Kelly.
Vincent Massol wrote:
>Hi Kelly,
>
>I've taken the time to do the exercise and to follow the explanation on that
>page from bottom to end on a clean Tomcat 5.x installation.
>
>Here are my comments:
>
>1/ It worked :-)
>2/ You do not need any cactus.properties at all
>3/ The only place that is misleading is that you may be temptes to use the
>precompiled version of the SampleServlet and TestSampleServlet classes. Do
>not as they were compiled with an old version of Cactus. It will result in
>an IncompatibleClassChangeError.
>4/ I did not get any 404. That's definitely due to some error on your side
>on the mapping.
>
>I'll fix point 3 in the doc.
>
>Thanks
>-Vincent
>
>
>
>>-----Original Message-----
>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>Sent: mercredi 25 août 2004 22:09
>>To: Cactus Users List
>>Subject: Re: help with sample application
>>
>>Same error even if I edit global web.xml. The jar files are in
>>TOMCAT_HOME/common/lib which is also in my classpath.
>>
>>I tried another thing, which was placing a cactus.properties in my home
>>directory than the error changed. Now I get this:
>>
>>java.lang.IncompatibleClassChangeError
>> at TestSampleServlet.beginSaveToSessionOK(TestSampleServlet.java:22)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
>>39)
>> at
>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
>>pl.java:25)
>> at
>>org.apache.cactus.internal.client.ClientTestCaseCaller.callGenericBeginMet
>>hod(ClientTestCaseCaller.java:358)
>> at
>>org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_aro
>>undBody0(ClientTestCaseCaller.java:192)
>> at
>>org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_aro
>>undBody1$advice(ClientTestCaseCaller.java:124)
>> at
>>org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod(Cli
>>entTestCaseCaller.java)
>> at
>>org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestC
>>aseCaller.java:141)
>> at
>>org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCa
>>ctusTestCase.java:215)
>> at
>>org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTe
>>stCase.java:133)
>> at
>>org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.ja
>>va:315)
>> at
>>org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Servle
>>tTestRunner.java:193)
>> at
>>org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advice
>>(ServletTestRunner.java:124)
>> at
>>org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.
>>java)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>> at
>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati
>>onFilterChain.java:237)
>> at
>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter
>>Chain.java:157)
>> at
>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.
>>java:214)
>> at
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
>>ext.java:104)
>> at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
>>)
>> at
>>org.apache.catalina.core.StandardContextValve.invokeInternal(StandardConte
>>xtValve.java:198)
>> at
>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.
>>java:152)
>> at
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
>>ext.java:104)
>> at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
>>)
>> at
>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1
>>37)
>> at
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
>>ext.java:104)
>> at
>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
>>17)
>> at
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
>>ext.java:102)
>> at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
>>)
>> at
>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja
>>va:109)
>> at
>>org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
>>ext.java:104)
>> at
>>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
>>)
>> at
>>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>> at
>>org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>> at
>>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>> at
>>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCon
>>nection(Http11Protocol.java:705)
>> at
>>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>> at
>>
>>My classes are like this:
>>
>>import javax.servlet.http.HttpServlet;
>>import javax.servlet.http.HttpServletRequest;
>>
>>public class SampleServlet extends HttpServlet
>>{
>> public void saveToSession(HttpServletRequest request)
>> {
>> String testparam = request.getParameter("testparam");
>> request.getSession().setAttribute("testAttribute", testparam);
>> }
>>}
>>
>>import junit.framework.Test;
>>import junit.framework.TestSuite;
>>
>>import org.apache.cactus.ServletTestCase;
>>import org.apache.cactus.WebRequest;
>>
>>public class TestSampleServlet extends ServletTestCase
>>{
>> public TestSampleServlet(String theName)
>> {
>> super(theName);
>> }
>>
>> public static Test suite()
>> {
>> return new TestSuite(TestSampleServlet.class);
>> }
>>
>> public void beginSaveToSessionOK(WebRequest webRequest)
>> {
>> webRequest.addParameter("testparam", "it works!");
>> }
>>
>> public void testSaveToSessionOK()
>> {
>> SampleServlet servlet = new SampleServlet();
>> servlet.saveToSession(request);
>> assertEquals("it works!", session.getAttribute("testAttribute"));
>> }
>>}
>>
>>
>>I thought that since the jar files I am using to compile the cliente are
>>the same that are on the server, I wouldn't get an error like this. I've
>>seen this kind of error when you compile the classes with one version of
>>the library and try to execute it with another version.
>>
>>Thanks again.
>>
>>Kelly.
>>
>>
>>
>>Vincent Massol wrote:
>>
>>
>>
>>>Hi Kelly,
>>>
>>>On http://jakarta.apache.org/cactus/integration/howto_tomcat.html, it
>>>
>>>
>>says
>>
>>
>>>to edit the global web.xml but you said you have created a web.xml in
>>>
>>>
>>your
>>
>>
>>>webapp. Can you try to do exactly as described on the page and see if it
>>>works?
>>>
>>>Where have you put the cactus jars (commons-logging, aspectjrt, cactus,
>>>etc)?
>>>
>>>What is the name of your war (more specifically have you named it
>>>
>>>
>>"test")?
>>
>>
>>>Thanks
>>>-Vincent
>>>
>>>PS: We'll get it to work, no worries... ;-)
>>>
>>>
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>>>Sent: mercredi 25 août 2004 21:40
>>>>To: Cactus Users List
>>>>Subject: Re: help with sample application
>>>>
>>>>Sorry for the lack of information....
>>>>
>>>>The web.xml is as follow and is located in my application WEB-INF
>>>>directory:
>>>>
>>>><web-app>
>>>>
>>>><servlet>
>>>> <servlet-name>ServletRedirector</servlet-name>
>>>> <servlet-class>
>>>> org.apache.cactus.server.ServletTestRedirector
>>>> </servlet-class>
>>>> <init-param>
>>>> <param-name>param1</param-name>
>>>> <param-value>value1 used for testing</param-value>
>>>> </init-param>
>>>></servlet>
>>>>
>>>><servlet>
>>>> <servlet-name>ServletTestRunner</servlet-name>
>>>> <servlet-class>
>>>> org.apache.cactus.server.runner.ServletTestRunner
>>>> </servlet-class>
>>>></servlet>
>>>>
>>>><servlet-mapping>
>>>> <servlet-name>ServletRedirector</servlet-name>
>>>> <url-pattern>/ServletRedirector</url-pattern>
>>>></servlet-mapping>
>>>>
>>>><servlet-mapping>
>>>> <servlet-name>ServletTestRunner</servlet-name>
>>>> <url-pattern>/ServletTestRunner</url-pattern>
>>>></servlet-mapping>
>>>>
>>>></web-app>
>>>>
>>>>
>>>>The page I was referring to is this one:
>>>>
>>>>http://jakarta.apache.org/cactus/integration/howto_tomcat.html
>>>>
>>>>I'm trying to follow this example.
>>>>
>>>>Thanks
>>>>
>>>>Kelly
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>Vincent Massol wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>>>-----Original Message-----
>>>>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>>>>>Sent: mercredi 25 août 2004 21:33
>>>>>>To: Cactus Users List
>>>>>>Subject: Re: help with sample application
>>>>>>
>>>>>>Hi Vincent,
>>>>>>
>>>>>>yes it is a 404. I copied and pasted the web.xml that is in the
>>>>>>
>>>>>>
>>example
>>
>>
>>>>>>page. I 'm wondering it is a problem with my tomcat version. I'm using
>>>>>>tomcat 5.0.27
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>What web.xml? The global one or the one in your war's web-inf/Web.xml?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>Could
>>>>
>>>>
>>>>
>>>>
>>>>>you show us your web.xml?
>>>>>
>>>>>Could you also tell me what example page you are referring to?
>>>>>
>>>>>There should be no pb with your Tomcat install.
>>>>>
>>>>>Thanks
>>>>>-Vincent
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>Kelly.
>>>>>>Vincent Massol wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi Kelly,
>>>>>>>
>>>>>>>What error are you getting? A 404? If so it means your mapping in
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>web.xml
>>>>
>>>>
>>>>
>>>>
>>>>>>>
>>>>>>>
>>>>>>is
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>not correct. If it's a 500 error then your tomcat logs should have
>>>>>>>
>>>>>>>
>>the
>>
>>
>>>>>>>error.
>>>>>>>
>>>>>>>Thanks
>>>>>>>-Vincent
>>>>>>>
>>>>>>>PS: Could you please tell me what Cactus page you are referring to?
>>>>>>>
>>>>>>>
>>If
>>
>>
>>>>>>>there's something to fix in the doc we need to know where it's not
>>>>>>>
>>>>>>>
>>well
>>
>>
>>>>>>>explained.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>-----Original Message-----
>>>>>>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>>>>>>>Sent: mercredi 25 août 2004 15:55
>>>>>>>>To: cactus-user@jakarta.apache.org
>>>>>>>>Subject: help with sample application
>>>>>>>>
>>>>>>>>I'm trying to run cactus sample application as is explained in
>>>>>>>>
>>>>>>>>
>>cactus
>>
>>
>>>>>>>>page. But I get this error: _The requested resource
>>>>>>>>(/test/ServletTestRunner) is not available.
>>>>>>>>_The url I'm typing is
>>>>>>>>
>>>>>>>>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
>>>>>>>>
>>>>>>>>I'm using tomcat 5.0.27 and java 1.4.2_04
>>>>>>>>
>>>>>>>>I already tried placing the libs in common/lib and in
>>>>>>>>
>>>>>>>>
>>webapps/test/lib
>>
>>
>>>>>>>>without results.
>>>>>>>>
>>>>>>>>All the requested libraries are also in my classpath
>>>>>>>>
>>>>>>>>Could anyone help me?
>>>>>>>>
>>>>>>>>Kelly.
>>>>>>>>
>>>>>>>>--------------------------------------------------------------------
>>>>>>>>
>>>>>>>>
>>-
>>
>>
>>>>>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>---------------------------------------------------------------------
>>>>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
>
RE: help with sample application
Posted by Vincent Massol <vm...@pivolis.com>.
Hi Kelly,
I've taken the time to do the exercise and to follow the explanation on that
page from bottom to end on a clean Tomcat 5.x installation.
Here are my comments:
1/ It worked :-)
2/ You do not need any cactus.properties at all
3/ The only place that is misleading is that you may be temptes to use the
precompiled version of the SampleServlet and TestSampleServlet classes. Do
not as they were compiled with an old version of Cactus. It will result in
an IncompatibleClassChangeError.
4/ I did not get any 404. That's definitely due to some error on your side
on the mapping.
I'll fix point 3 in the doc.
Thanks
-Vincent
> -----Original Message-----
> From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> Sent: mercredi 25 août 2004 22:09
> To: Cactus Users List
> Subject: Re: help with sample application
>
> Same error even if I edit global web.xml. The jar files are in
> TOMCAT_HOME/common/lib which is also in my classpath.
>
> I tried another thing, which was placing a cactus.properties in my home
> directory than the error changed. Now I get this:
>
> java.lang.IncompatibleClassChangeError
> at TestSampleServlet.beginSaveToSessionOK(TestSampleServlet.java:22)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorIm
> pl.java:25)
> at
> org.apache.cactus.internal.client.ClientTestCaseCaller.callGenericBeginMet
> hod(ClientTestCaseCaller.java:358)
> at
> org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_aro
> undBody0(ClientTestCaseCaller.java:192)
> at
> org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_aro
> undBody1$advice(ClientTestCaseCaller.java:124)
> at
> org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod(Cli
> entTestCaseCaller.java)
> at
> org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestC
> aseCaller.java:141)
> at
> org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCa
> ctusTestCase.java:215)
> at
> org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTe
> stCase.java:133)
> at
> org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.ja
> va:315)
> at
> org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(Servle
> tTestRunner.java:193)
> at
> org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advice
> (ServletTestRunner.java:124)
> at
> org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.
> java)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicati
> onFilterChain.java:237)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilter
> Chain.java:157)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.
> java:214)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
> )
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardConte
> xtValve.java:198)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.
> java:152)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
> )
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1
> 37)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:104)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
> 17)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:102)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
> )
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja
> va:109)
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:104)
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
> )
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCon
> nection(Http11Protocol.java:705)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> at
>
> My classes are like this:
>
> import javax.servlet.http.HttpServlet;
> import javax.servlet.http.HttpServletRequest;
>
> public class SampleServlet extends HttpServlet
> {
> public void saveToSession(HttpServletRequest request)
> {
> String testparam = request.getParameter("testparam");
> request.getSession().setAttribute("testAttribute", testparam);
> }
> }
>
> import junit.framework.Test;
> import junit.framework.TestSuite;
>
> import org.apache.cactus.ServletTestCase;
> import org.apache.cactus.WebRequest;
>
> public class TestSampleServlet extends ServletTestCase
> {
> public TestSampleServlet(String theName)
> {
> super(theName);
> }
>
> public static Test suite()
> {
> return new TestSuite(TestSampleServlet.class);
> }
>
> public void beginSaveToSessionOK(WebRequest webRequest)
> {
> webRequest.addParameter("testparam", "it works!");
> }
>
> public void testSaveToSessionOK()
> {
> SampleServlet servlet = new SampleServlet();
> servlet.saveToSession(request);
> assertEquals("it works!", session.getAttribute("testAttribute"));
> }
> }
>
>
> I thought that since the jar files I am using to compile the cliente are
> the same that are on the server, I wouldn't get an error like this. I've
> seen this kind of error when you compile the classes with one version of
> the library and try to execute it with another version.
>
> Thanks again.
>
> Kelly.
>
>
>
> Vincent Massol wrote:
>
> >Hi Kelly,
> >
> >On http://jakarta.apache.org/cactus/integration/howto_tomcat.html, it
> says
> >to edit the global web.xml but you said you have created a web.xml in
> your
> >webapp. Can you try to do exactly as described on the page and see if it
> >works?
> >
> >Where have you put the cactus jars (commons-logging, aspectjrt, cactus,
> >etc)?
> >
> >What is the name of your war (more specifically have you named it
> "test")?
> >
> >Thanks
> >-Vincent
> >
> >PS: We'll get it to work, no worries... ;-)
> >
> >
> >
> >>-----Original Message-----
> >>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> >>Sent: mercredi 25 août 2004 21:40
> >>To: Cactus Users List
> >>Subject: Re: help with sample application
> >>
> >>Sorry for the lack of information....
> >>
> >>The web.xml is as follow and is located in my application WEB-INF
> >>directory:
> >>
> >><web-app>
> >>
> >><servlet>
> >> <servlet-name>ServletRedirector</servlet-name>
> >> <servlet-class>
> >> org.apache.cactus.server.ServletTestRedirector
> >> </servlet-class>
> >> <init-param>
> >> <param-name>param1</param-name>
> >> <param-value>value1 used for testing</param-value>
> >> </init-param>
> >></servlet>
> >>
> >><servlet>
> >> <servlet-name>ServletTestRunner</servlet-name>
> >> <servlet-class>
> >> org.apache.cactus.server.runner.ServletTestRunner
> >> </servlet-class>
> >></servlet>
> >>
> >><servlet-mapping>
> >> <servlet-name>ServletRedirector</servlet-name>
> >> <url-pattern>/ServletRedirector</url-pattern>
> >></servlet-mapping>
> >>
> >><servlet-mapping>
> >> <servlet-name>ServletTestRunner</servlet-name>
> >> <url-pattern>/ServletTestRunner</url-pattern>
> >></servlet-mapping>
> >>
> >></web-app>
> >>
> >>
> >>The page I was referring to is this one:
> >>
> >>http://jakarta.apache.org/cactus/integration/howto_tomcat.html
> >>
> >>I'm trying to follow this example.
> >>
> >>Thanks
> >>
> >>Kelly
> >>
> >>
> >>
> >>
> >>
> >>Vincent Massol wrote:
> >>
> >>
> >>
> >>>
> >>>
> >>>>-----Original Message-----
> >>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> >>>>Sent: mercredi 25 août 2004 21:33
> >>>>To: Cactus Users List
> >>>>Subject: Re: help with sample application
> >>>>
> >>>>Hi Vincent,
> >>>>
> >>>>yes it is a 404. I copied and pasted the web.xml that is in the
> example
> >>>>page. I 'm wondering it is a problem with my tomcat version. I'm using
> >>>>tomcat 5.0.27
> >>>>
> >>>>
> >>>>
> >>>>
> >>>What web.xml? The global one or the one in your war's web-inf/Web.xml?
> >>>
> >>>
> >>Could
> >>
> >>
> >>>you show us your web.xml?
> >>>
> >>>Could you also tell me what example page you are referring to?
> >>>
> >>>There should be no pb with your Tomcat install.
> >>>
> >>>Thanks
> >>>-Vincent
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>Kelly.
> >>>>Vincent Massol wrote:
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>Hi Kelly,
> >>>>>
> >>>>>What error are you getting? A 404? If so it means your mapping in
> >>>>>
> >>>>>
> >>web.xml
> >>
> >>
> >>>>>
> >>>>>
> >>>>is
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>>not correct. If it's a 500 error then your tomcat logs should have
> the
> >>>>>error.
> >>>>>
> >>>>>Thanks
> >>>>>-Vincent
> >>>>>
> >>>>>PS: Could you please tell me what Cactus page you are referring to?
> If
> >>>>>there's something to fix in the doc we need to know where it's not
> well
> >>>>>explained.
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>>-----Original Message-----
> >>>>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> >>>>>>Sent: mercredi 25 août 2004 15:55
> >>>>>>To: cactus-user@jakarta.apache.org
> >>>>>>Subject: help with sample application
> >>>>>>
> >>>>>>I'm trying to run cactus sample application as is explained in
> cactus
> >>>>>>page. But I get this error: _The requested resource
> >>>>>>(/test/ServletTestRunner) is not available.
> >>>>>>_The url I'm typing is
> >>>>>>
> >>>>>>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
> >>>>>>
> >>>>>>I'm using tomcat 5.0.27 and java 1.4.2_04
> >>>>>>
> >>>>>>I already tried placing the libs in common/lib and in
> webapps/test/lib
> >>>>>>without results.
> >>>>>>
> >>>>>>All the requested libraries are also in my classpath
> >>>>>>
> >>>>>>Could anyone help me?
> >>>>>>
> >>>>>>Kelly.
> >>>>>>
> >>>>>>--------------------------------------------------------------------
> -
> >>>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>---------------------------------------------------------------------
> >>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>---------------------------------------------------------------------
> >>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
Re: help with sample application
Posted by "Kelly C. Goedert" <ke...@nexxera.com>.
Same error even if I edit global web.xml. The jar files are in
TOMCAT_HOME/common/lib which is also in my classpath.
I tried another thing, which was placing a cactus.properties in my home
directory than the error changed. Now I get this:
java.lang.IncompatibleClassChangeError
at TestSampleServlet.beginSaveToSessionOK(TestSampleServlet.java:22)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callGenericBeginMethod(ClientTestCaseCaller.java:358)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_aroundBody0(ClientTestCaseCaller.java:192)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod_aroundBody1$advice(ClientTestCaseCaller.java:124)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callBeginMethod(ClientTestCaseCaller.java)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:141)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.java:315)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(ServletTestRunner.java:193)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advice(ServletTestRunner.java:124)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
My classes are like this:
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
public class SampleServlet extends HttpServlet
{
public void saveToSession(HttpServletRequest request)
{
String testparam = request.getParameter("testparam");
request.getSession().setAttribute("testAttribute", testparam);
}
}
import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.cactus.ServletTestCase;
import org.apache.cactus.WebRequest;
public class TestSampleServlet extends ServletTestCase
{
public TestSampleServlet(String theName)
{
super(theName);
}
public static Test suite()
{
return new TestSuite(TestSampleServlet.class);
}
public void beginSaveToSessionOK(WebRequest webRequest)
{
webRequest.addParameter("testparam", "it works!");
}
public void testSaveToSessionOK()
{
SampleServlet servlet = new SampleServlet();
servlet.saveToSession(request);
assertEquals("it works!", session.getAttribute("testAttribute"));
}
}
I thought that since the jar files I am using to compile the cliente are
the same that are on the server, I wouldn't get an error like this. I've
seen this kind of error when you compile the classes with one version of
the library and try to execute it with another version.
Thanks again.
Kelly.
Vincent Massol wrote:
>Hi Kelly,
>
>On http://jakarta.apache.org/cactus/integration/howto_tomcat.html, it says
>to edit the global web.xml but you said you have created a web.xml in your
>webapp. Can you try to do exactly as described on the page and see if it
>works?
>
>Where have you put the cactus jars (commons-logging, aspectjrt, cactus,
>etc)?
>
>What is the name of your war (more specifically have you named it "test")?
>
>Thanks
>-Vincent
>
>PS: We'll get it to work, no worries... ;-)
>
>
>
>>-----Original Message-----
>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>Sent: mercredi 25 août 2004 21:40
>>To: Cactus Users List
>>Subject: Re: help with sample application
>>
>>Sorry for the lack of information....
>>
>>The web.xml is as follow and is located in my application WEB-INF
>>directory:
>>
>><web-app>
>>
>><servlet>
>> <servlet-name>ServletRedirector</servlet-name>
>> <servlet-class>
>> org.apache.cactus.server.ServletTestRedirector
>> </servlet-class>
>> <init-param>
>> <param-name>param1</param-name>
>> <param-value>value1 used for testing</param-value>
>> </init-param>
>></servlet>
>>
>><servlet>
>> <servlet-name>ServletTestRunner</servlet-name>
>> <servlet-class>
>> org.apache.cactus.server.runner.ServletTestRunner
>> </servlet-class>
>></servlet>
>>
>><servlet-mapping>
>> <servlet-name>ServletRedirector</servlet-name>
>> <url-pattern>/ServletRedirector</url-pattern>
>></servlet-mapping>
>>
>><servlet-mapping>
>> <servlet-name>ServletTestRunner</servlet-name>
>> <url-pattern>/ServletTestRunner</url-pattern>
>></servlet-mapping>
>>
>></web-app>
>>
>>
>>The page I was referring to is this one:
>>
>>http://jakarta.apache.org/cactus/integration/howto_tomcat.html
>>
>>I'm trying to follow this example.
>>
>>Thanks
>>
>>Kelly
>>
>>
>>
>>
>>
>>Vincent Massol wrote:
>>
>>
>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>>>Sent: mercredi 25 août 2004 21:33
>>>>To: Cactus Users List
>>>>Subject: Re: help with sample application
>>>>
>>>>Hi Vincent,
>>>>
>>>>yes it is a 404. I copied and pasted the web.xml that is in the example
>>>>page. I 'm wondering it is a problem with my tomcat version. I'm using
>>>>tomcat 5.0.27
>>>>
>>>>
>>>>
>>>>
>>>What web.xml? The global one or the one in your war's web-inf/Web.xml?
>>>
>>>
>>Could
>>
>>
>>>you show us your web.xml?
>>>
>>>Could you also tell me what example page you are referring to?
>>>
>>>There should be no pb with your Tomcat install.
>>>
>>>Thanks
>>>-Vincent
>>>
>>>
>>>
>>>
>>>
>>>>Kelly.
>>>>Vincent Massol wrote:
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>Hi Kelly,
>>>>>
>>>>>What error are you getting? A 404? If so it means your mapping in
>>>>>
>>>>>
>>web.xml
>>
>>
>>>>>
>>>>>
>>>>is
>>>>
>>>>
>>>>
>>>>
>>>>>not correct. If it's a 500 error then your tomcat logs should have the
>>>>>error.
>>>>>
>>>>>Thanks
>>>>>-Vincent
>>>>>
>>>>>PS: Could you please tell me what Cactus page you are referring to? If
>>>>>there's something to fix in the doc we need to know where it's not well
>>>>>explained.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>-----Original Message-----
>>>>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>>>>>Sent: mercredi 25 août 2004 15:55
>>>>>>To: cactus-user@jakarta.apache.org
>>>>>>Subject: help with sample application
>>>>>>
>>>>>>I'm trying to run cactus sample application as is explained in cactus
>>>>>>page. But I get this error: _The requested resource
>>>>>>(/test/ServletTestRunner) is not available.
>>>>>>_The url I'm typing is
>>>>>>
>>>>>>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
>>>>>>
>>>>>>I'm using tomcat 5.0.27 and java 1.4.2_04
>>>>>>
>>>>>>I already tried placing the libs in common/lib and in webapps/test/lib
>>>>>>without results.
>>>>>>
>>>>>>All the requested libraries are also in my classpath
>>>>>>
>>>>>>Could anyone help me?
>>>>>>
>>>>>>Kelly.
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
>
RE: help with sample application
Posted by Vincent Massol <vm...@pivolis.com>.
Hi Kelly,
On http://jakarta.apache.org/cactus/integration/howto_tomcat.html, it says
to edit the global web.xml but you said you have created a web.xml in your
webapp. Can you try to do exactly as described on the page and see if it
works?
Where have you put the cactus jars (commons-logging, aspectjrt, cactus,
etc)?
What is the name of your war (more specifically have you named it "test")?
Thanks
-Vincent
PS: We'll get it to work, no worries... ;-)
> -----Original Message-----
> From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> Sent: mercredi 25 août 2004 21:40
> To: Cactus Users List
> Subject: Re: help with sample application
>
> Sorry for the lack of information....
>
> The web.xml is as follow and is located in my application WEB-INF
> directory:
>
> <web-app>
>
> <servlet>
> <servlet-name>ServletRedirector</servlet-name>
> <servlet-class>
> org.apache.cactus.server.ServletTestRedirector
> </servlet-class>
> <init-param>
> <param-name>param1</param-name>
> <param-value>value1 used for testing</param-value>
> </init-param>
> </servlet>
>
> <servlet>
> <servlet-name>ServletTestRunner</servlet-name>
> <servlet-class>
> org.apache.cactus.server.runner.ServletTestRunner
> </servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>ServletRedirector</servlet-name>
> <url-pattern>/ServletRedirector</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
> <servlet-name>ServletTestRunner</servlet-name>
> <url-pattern>/ServletTestRunner</url-pattern>
> </servlet-mapping>
>
> </web-app>
>
>
> The page I was referring to is this one:
>
> http://jakarta.apache.org/cactus/integration/howto_tomcat.html
>
> I'm trying to follow this example.
>
> Thanks
>
> Kelly
>
>
>
>
>
> Vincent Massol wrote:
>
> >
> >
> >>-----Original Message-----
> >>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> >>Sent: mercredi 25 août 2004 21:33
> >>To: Cactus Users List
> >>Subject: Re: help with sample application
> >>
> >>Hi Vincent,
> >>
> >>yes it is a 404. I copied and pasted the web.xml that is in the example
> >>page. I 'm wondering it is a problem with my tomcat version. I'm using
> >>tomcat 5.0.27
> >>
> >>
> >
> >What web.xml? The global one or the one in your war's web-inf/Web.xml?
> Could
> >you show us your web.xml?
> >
> >Could you also tell me what example page you are referring to?
> >
> >There should be no pb with your Tomcat install.
> >
> >Thanks
> >-Vincent
> >
> >
> >
> >>Kelly.
> >>Vincent Massol wrote:
> >>
> >>
> >>
> >>>Hi Kelly,
> >>>
> >>>What error are you getting? A 404? If so it means your mapping in
> web.xml
> >>>
> >>>
> >>is
> >>
> >>
> >>>not correct. If it's a 500 error then your tomcat logs should have the
> >>>error.
> >>>
> >>>Thanks
> >>>-Vincent
> >>>
> >>>PS: Could you please tell me what Cactus page you are referring to? If
> >>>there's something to fix in the doc we need to know where it's not well
> >>>explained.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>>-----Original Message-----
> >>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> >>>>Sent: mercredi 25 août 2004 15:55
> >>>>To: cactus-user@jakarta.apache.org
> >>>>Subject: help with sample application
> >>>>
> >>>>I'm trying to run cactus sample application as is explained in cactus
> >>>>page. But I get this error: _The requested resource
> >>>>(/test/ServletTestRunner) is not available.
> >>>>_The url I'm typing is
> >>>>
> >>>>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
> >>>>
> >>>>I'm using tomcat 5.0.27 and java 1.4.2_04
> >>>>
> >>>>I already tried placing the libs in common/lib and in webapps/test/lib
> >>>>without results.
> >>>>
> >>>>All the requested libraries are also in my classpath
> >>>>
> >>>>Could anyone help me?
> >>>>
> >>>>Kelly.
> >>>>
> >>>>---------------------------------------------------------------------
> >>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>>---------------------------------------------------------------------
> >>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
Re: help with sample application
Posted by "Kelly C. Goedert" <ke...@nexxera.com>.
Sorry for the lack of information....
The web.xml is as follow and is located in my application WEB-INF directory:
<web-app>
<servlet>
<servlet-name>ServletRedirector</servlet-name>
<servlet-class>
org.apache.cactus.server.ServletTestRedirector
</servlet-class>
<init-param>
<param-name>param1</param-name>
<param-value>value1 used for testing</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>ServletTestRunner</servlet-name>
<servlet-class>
org.apache.cactus.server.runner.ServletTestRunner
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletRedirector</servlet-name>
<url-pattern>/ServletRedirector</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ServletTestRunner</servlet-name>
<url-pattern>/ServletTestRunner</url-pattern>
</servlet-mapping>
</web-app>
The page I was referring to is this one:
http://jakarta.apache.org/cactus/integration/howto_tomcat.html
I'm trying to follow this example.
Thanks
Kelly
Vincent Massol wrote:
>
>
>>-----Original Message-----
>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>Sent: mercredi 25 août 2004 21:33
>>To: Cactus Users List
>>Subject: Re: help with sample application
>>
>>Hi Vincent,
>>
>>yes it is a 404. I copied and pasted the web.xml that is in the example
>>page. I 'm wondering it is a problem with my tomcat version. I'm using
>>tomcat 5.0.27
>>
>>
>
>What web.xml? The global one or the one in your war's web-inf/Web.xml? Could
>you show us your web.xml?
>
>Could you also tell me what example page you are referring to?
>
>There should be no pb with your Tomcat install.
>
>Thanks
>-Vincent
>
>
>
>>Kelly.
>>Vincent Massol wrote:
>>
>>
>>
>>>Hi Kelly,
>>>
>>>What error are you getting? A 404? If so it means your mapping in web.xml
>>>
>>>
>>is
>>
>>
>>>not correct. If it's a 500 error then your tomcat logs should have the
>>>error.
>>>
>>>Thanks
>>>-Vincent
>>>
>>>PS: Could you please tell me what Cactus page you are referring to? If
>>>there's something to fix in the doc we need to know where it's not well
>>>explained.
>>>
>>>
>>>
>>>
>>>
>>>>-----Original Message-----
>>>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>>>Sent: mercredi 25 août 2004 15:55
>>>>To: cactus-user@jakarta.apache.org
>>>>Subject: help with sample application
>>>>
>>>>I'm trying to run cactus sample application as is explained in cactus
>>>>page. But I get this error: _The requested resource
>>>>(/test/ServletTestRunner) is not available.
>>>>_The url I'm typing is
>>>>
>>>>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
>>>>
>>>>I'm using tomcat 5.0.27 and java 1.4.2_04
>>>>
>>>>I already tried placing the libs in common/lib and in webapps/test/lib
>>>>without results.
>>>>
>>>>All the requested libraries are also in my classpath
>>>>
>>>>Could anyone help me?
>>>>
>>>>Kelly.
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>>
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
>
RE: help with sample application
Posted by Vincent Massol <vm...@pivolis.com>.
> -----Original Message-----
> From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> Sent: mercredi 25 août 2004 21:33
> To: Cactus Users List
> Subject: Re: help with sample application
>
> Hi Vincent,
>
> yes it is a 404. I copied and pasted the web.xml that is in the example
> page. I 'm wondering it is a problem with my tomcat version. I'm using
> tomcat 5.0.27
What web.xml? The global one or the one in your war's web-inf/Web.xml? Could
you show us your web.xml?
Could you also tell me what example page you are referring to?
There should be no pb with your Tomcat install.
Thanks
-Vincent
>
> Kelly.
> Vincent Massol wrote:
>
> >Hi Kelly,
> >
> >What error are you getting? A 404? If so it means your mapping in web.xml
> is
> >not correct. If it's a 500 error then your tomcat logs should have the
> >error.
> >
> >Thanks
> >-Vincent
> >
> >PS: Could you please tell me what Cactus page you are referring to? If
> >there's something to fix in the doc we need to know where it's not well
> >explained.
> >
> >
> >
> >>-----Original Message-----
> >>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> >>Sent: mercredi 25 août 2004 15:55
> >>To: cactus-user@jakarta.apache.org
> >>Subject: help with sample application
> >>
> >>I'm trying to run cactus sample application as is explained in cactus
> >>page. But I get this error: _The requested resource
> >>(/test/ServletTestRunner) is not available.
> >>_The url I'm typing is
> >>
> >>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
> >>
> >>I'm using tomcat 5.0.27 and java 1.4.2_04
> >>
> >>I already tried placing the libs in common/lib and in webapps/test/lib
> >>without results.
> >>
> >>All the requested libraries are also in my classpath
> >>
> >>Could anyone help me?
> >>
> >>Kelly.
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
Re: help with sample application
Posted by "Kelly C. Goedert" <ke...@nexxera.com>.
Hi Vincent,
yes it is a 404. I copied and pasted the web.xml that is in the example
page. I 'm wondering it is a problem with my tomcat version. I'm using
tomcat 5.0.27
Kelly.
Vincent Massol wrote:
>Hi Kelly,
>
>What error are you getting? A 404? If so it means your mapping in web.xml is
>not correct. If it's a 500 error then your tomcat logs should have the
>error.
>
>Thanks
>-Vincent
>
>PS: Could you please tell me what Cactus page you are referring to? If
>there's something to fix in the doc we need to know where it's not well
>explained.
>
>
>
>>-----Original Message-----
>>From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
>>Sent: mercredi 25 août 2004 15:55
>>To: cactus-user@jakarta.apache.org
>>Subject: help with sample application
>>
>>I'm trying to run cactus sample application as is explained in cactus
>>page. But I get this error: _The requested resource
>>(/test/ServletTestRunner) is not available.
>>_The url I'm typing is
>>
>>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
>>
>>I'm using tomcat 5.0.27 and java 1.4.2_04
>>
>>I already tried placing the libs in common/lib and in webapps/test/lib
>>without results.
>>
>>All the requested libraries are also in my classpath
>>
>>Could anyone help me?
>>
>>Kelly.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>>
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
>
RE: help with sample application
Posted by Vincent Massol <vm...@pivolis.com>.
Hi Kelly,
What error are you getting? A 404? If so it means your mapping in web.xml is
not correct. If it's a 500 error then your tomcat logs should have the
error.
Thanks
-Vincent
PS: Could you please tell me what Cactus page you are referring to? If
there's something to fix in the doc we need to know where it's not well
explained.
> -----Original Message-----
> From: Kelly C. Goedert [mailto:kelly.goedert@nexxera.com]
> Sent: mercredi 25 août 2004 15:55
> To: cactus-user@jakarta.apache.org
> Subject: help with sample application
>
> I'm trying to run cactus sample application as is explained in cactus
> page. But I get this error: _The requested resource
> (/test/ServletTestRunner) is not available.
> _The url I'm typing is
>
> http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
>
> I'm using tomcat 5.0.27 and java 1.4.2_04
>
> I already tried placing the libs in common/lib and in webapps/test/lib
> without results.
>
> All the requested libraries are also in my classpath
>
> Could anyone help me?
>
> Kelly.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
Re: help with sample application
Posted by "Kelly C. Goedert" <ke...@nexxera.com>.
Yes I did the mapping on web.xml. About the libraries shouldn't it be
enough put the on TOMCAT_HOME/common/lib?
Sebastian Wiehage wrote:
>Hi!
>
>
>
>>I already tried placing the libs in common/lib and in
>>webapps/test/lib without results.
>>
>>
>
>Shouldn't it be -------
> $TOMCAT_HOME$/webapps/test/WEB-INF/lib
>?? -------
>
>
>
>
>>http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
>>
>>
>
>Did you cactify your Application? You need something this
>mapping for the ServletTestRunner in your web.xml:
>
> <servlet>
> <servlet-name>ServletTestRunner</servlet-name>
> <servlet-class>
> org.apache.cactus.server.runner.ServletTestRunner
> </servlet-class>
> </servlet>
> <servlet>
> <servlet-name>ServletRedirector</servlet-name>
> <servlet-class>
> org.apache.cactus.server.ServletTestRedirector
> </servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>ServletRedirector</servlet-name>
> <url-pattern>/ServletRedirector</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
> <servlet-name>ServletTestRunner</servlet-name>
> <url-pattern>/ServletTestRunner</url-pattern>
> </servlet-mapping>
>
>
>It might help,
>bye
>
>Sebastian
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
Re: help with sample application
Posted by Sebastian Wiehage <tr...@uni-muenster.de>.
Hi!
> I already tried placing the libs in common/lib and in
> webapps/test/lib without results.
Shouldn't it be -------
$TOMCAT_HOME$/webapps/test/WEB-INF/lib
?? -------
> http://localhost:8080/test/ServletTestRunner?suite=TestSampleServlet
Did you cactify your Application? You need something this
mapping for the ServletTestRunner in your web.xml:
<servlet>
<servlet-name>ServletTestRunner</servlet-name>
<servlet-class>
org.apache.cactus.server.runner.ServletTestRunner
</servlet-class>
</servlet>
<servlet>
<servlet-name>ServletRedirector</servlet-name>
<servlet-class>
org.apache.cactus.server.ServletTestRedirector
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServletRedirector</servlet-name>
<url-pattern>/ServletRedirector</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ServletTestRunner</servlet-name>
<url-pattern>/ServletTestRunner</url-pattern>
</servlet-mapping>
It might help,
bye
Sebastian