tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gian-Luca Dei Rossi <gdeir...@dsi.unive.it>
Subject missing setWrapper()
Date Sat, 19 Jul 2003 15:34:26 GMT
Hi,
i've some trouble with a servlet that extends ManagerServlet (i have to
give users the capability of stop and start only a limited subset of
application, without having a 'manager' role), as:

public class proveapache extends ManagerServlet {

when tomcat runs this servlet i obtain the following exception


javax.servlet.UnavailableException: Container has not called
setWrapper() for this servlet
	at org.apache.catalina.servlets.ManagerServlet.init(ManagerServlet.java:444)
	at javax.servlet.GenericServlet.init(GenericServlet.java:256)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
	at java.lang.Thread.run(Thread.java:534)


So i added the following lines to server.xml

<Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true"
   charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext="true"
debug="0"
   displayName="Prove apache" docBase="/proveapache" mapperClass="org.apache.catalina.core.StandardContextMapper"
   path="/proveapache/proveapache" privileged="true" reloadable="true" swallowOutput="false"
useNaming="true" 
   wrapperClass="org.apache.catalina.core.StandardWrapper">
       <ResourceLink global="UserDatabase" name="users" type="org.apache.catalina.UserDatabase"/>
</Context>

I restart tomcat and the same location now gives me a 404 error

I suppose that a wrapped class cannot be a normal servlet in webapps space, but rather a class
in a
separate package, but i don't know if i'm right, and how to add classes visible to web application
in a
"clean" way and then wich parameters are correct in web.xml for that wrapped class.

I beg pardon for my poor english :)
Thanks,

-- 
Gian-Luca Dei Rossi (acaso)
http://wwwstud.dsi.unive.it/~gdeiross/
** PACE **


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message