Apache - Tomcat servlets..
Hejsa!Jeg har installeret Tomcat 5.0 på En freeBSD 4.8 STABLE.
Jeg er MEGET grøn mht java, servlets og tomcat, så have venligst tålmodighed..
Når jeg laver en autonom Servlet og tester den, så kører det fint.
Men når jeg vil bruge mine egne ikke-servlet klasser fra en servlet, så går det galt. Skal man gøre noget specielt for at kunne anvende regulære klasser fra servlets eller hvordan?
Den siger at det kikser i TOSForm.java:29..
public class TOSForm extends IForm {
private ITextInput name;
private ITextInput descr;
public TOSForm(String title, String action) throws Exception {
[29]-> super(title, action, "tosform", "post");
this.name = new ITextInput("name");
this.descr = new ITextInput("description");
this.addFormElement(this.name);
this.addFormElement(this.descr);
}
[...]
}
2004-07-20 21:29:24 StandardWrapperValve[TestServlet]: Servlet.service() for servlet TestServlet threw exception
java.lang.NoClassDefFoundError: java/lang/CharSequence
at dk.[CENSUR - regulært pakkenavn ].qosrs.forms.TOSForm.<init>(TOSForm.java:29)
at TestServlet.doPost(TestServlet.java:41)
at TestServlet.doGet(TestServlet.java:30)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:509)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
at java.lang.Thread.run(Thread.java:484)
2004-07-20 21:29:30 StandardContext[/qosrs]InvokerFilter(ApplicationFilterConfig[name=Path Mapped Filter, filterClass=filters.ExampleFilter]): 1 milliseconds
root@QoSrs% pwd
/usr/local/jakarta-tomcat5.0/webapps/qosrs/WEB-INF/classes
root@QoSrs% find ./ -name "*.class"
./dk/[CENSUR]/qosrs/OSDB/TestNodes.class
./dk/[CENSUR]/qosrs/OSDB/TOS.class
./dk/[CENSUR]/qosrs/OSDB/TestNode.class
./dk/tele/ip/qosrs/OSDB/Paths.class
./dk/[CENSUR]/qosrs/OSDB/Path.class
./dk/[CENSUR]/qosrs/OSDB/TOSSES.class
./dk/[CENSUR]/qosrs/OSDB/Routers.class
./dk/[CENSUR]/qosrs/OSDB/Router.class
./dk/[CENSUR]/qosrs/OSDB/TestNodeGroup.class
./dk/[CENSUR]/qosrs/OSDB/RouterGroups.class
./dk/[CENSUR]/qosrs/OSDB/OSDB.class
./dk/[CENSUR]/qosrs/OSDB/TestNodeGroups.class
./dk/[CENSUR]/qosrs/OSDB/RouterGroup.class
./dk/[CENSUR]/qosrs/OSDB/IPRanges.class
./dk/[CENSUR]/qosrs/OSDB/MeasureSpecs.class
./dk/[CENSUR]/qosrs/OSDB/IPRange.class
./dk/[CENSUR]/qosrs/OSDB/MeasureSpec.class
./dk/[CENSUR]/qosrs/OSDB/IPAddresses.class
./dk/[CENSUR]/qosrs/OSDB/IPAddress.class
./dk/[CENSUR]/qosrs/OSDB/OutcomeAreaMaps.class
./dk/[CENSUR]/qosrs/OSDB/Group.class
./dk/[CENSUR]/qosrs/OSDB/OutcomeAreaMap.class
./dk/[CENSUR]/qosrs/OSDB/MeasureSchedParam.class
./dk/[CENSUR]/qosrs/OSDB/IOSDBTable.class
./dk/[CENSUR]/qosrs/OSDB/IOSDBDataType.class
./dk/[CENSUR]/qosrs/OSDB/MeasureSchedParams.class
./dk/[CENSUR]/qosrs/OSDB/Groups.class
./dk/[CENSUR]/qosrs/OSDB/DropOuts.class
./dk/[CENSUR]/qosrs/OSDB/DropOut.class
./dk/[CENSUR]/qosrs/forms/IFormElement.class
./dk/[CENSUR]/qosrs/forms/IForm.class
./dk/[CENSUR]/qosrs/forms/ITextInput.class
./dk/[CENSUR]/qosrs/forms/IButton.class
./dk/[CENSUR]/qosrs/forms/IReset.class
./dk/[CENSUR]/qosrs/forms/ISubmit.class
./dk/[CENSUR]/qosrs/forms/ICheckbox.class
./dk/[CENSUR]/qosrs/forms/IRadio.class
./dk/[CENSUR]/qosrs/forms/IHidden.class
./dk/[CENSUR]/qosrs/forms/IPassword.class
./dk/[CENSUR]/qosrs/forms/ISelect.class
./dk/[CENSUR]/qosrs/forms/ISelect$Option.class
./dk/[CENSUR]/qosrs/forms/TOSSelect.class
./dk/[CENSUR]/qosrs/forms/TOSForm.class
./OSDBTestClass.class
./TestServlet.class
./TOSForm.class