Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java servlet newbie problem

Reply
Thread Tools

java servlet newbie problem

 
 
lasse_heinonen7@hotmail.com
Guest
Posts: n/a
 
      07-14-2006
Hi, I can't get my Java servlets to work. Tomcat-4.1.31 and the example
servlets work fine.
I have added my own context "eka" under webapps.
The code builds ok:

package paketti1;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class Eka1 extends HttpServlet {

public void doGet ( HttpServletRequest request,
HttpServletResponse response )
throws ServletException, IOException {

response.setContentType("text/html");
PrintWriter out = response.getWriter();

out.println("<html>");
out.println("<head><title>He llo, Cruel
World!</title></head>");
out.println("<body>");
out.println("<h1>Hello, Cruel World !</h1>");
out.println("This is my last servlet.");
out.println("</body>");
}// end doGet

}///:~


This is what I have added to server.xml:
<Context path="/eka" docBase="eka" debug="0" reloadable="true" />

my web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>
<servlet-name>Eka1</servlet-name>
<servlet-class>paketti1.Eka1</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>Eka1</servlet-name>
<url-pattern>/Eka1</url-pattern>
</servlet-mapping>

</web-app>

My class file is here:
/usr/local/jakarta-tomcat-4.1.31/webapps/eka/WEB-INF/classes/paketti1

I put this to address bar http://localhost:8080/eka/Eka1
and I received an error message:

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

javax.servlet.ServletException: Wrapper cannot find servlet class
paketti1.Eka1 or a class it depends on
at
org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:844)
at
org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:621)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:163)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:144)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.catalina.core.StandardContext.invoke(St andardContext.java:235
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:133)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:11
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:594)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:116)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:594)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:127)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:152)
at
org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)

root cause

java.lang.ClassNotFoundException: paketti1.Eka1
at
org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1407)
at
org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1252)
at
org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:83
at
org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:621)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:163)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:144)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.catalina.core.StandardContext.invoke(St andardContext.java:235
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:133)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:11
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:594)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:116)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:594)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:127)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:596)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
at
org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:152)
at
org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)

Apache Tomcat/4.1.31

What have I done wrong?
Regars Lasse

 
Reply With Quote
 
 
 
 
Greger
Guest
Posts: n/a
 
      07-14-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> Hi, I can't get my Java servlets to work. Tomcat-4.1.31 and the example
> servlets work fine.
> I have added my own context "eka" under webapps.
> The code builds ok:
>
> package paketti1;
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class Eka1 extends HttpServlet {
>
> public void doGet ( HttpServletRequest request,
> HttpServletResponse response )
> throws ServletException, IOException {
>
> response.setContentType("text/html");
> PrintWriter out = response.getWriter();
>
> out.println("<html>");
> out.println("<head><title>He llo, Cruel
> World!</title></head>");
> out.println("<body>");
> out.println("<h1>Hello, Cruel World !</h1>");
> out.println("This is my last servlet.");
> out.println("</body>");
> }// end doGet
>
> }///:~
>
>
> This is what I have added to server.xml:
> <Context path="/eka" docBase="eka" debug="0" reloadable="true" />
>
> my web.xml:
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app>
>
> <servlet>
> <servlet-name>Eka1</servlet-name>
> <servlet-class>paketti1.Eka1</servlet-class>
> </servlet>
>
> <servlet-mapping>
> <servlet-name>Eka1</servlet-name>

====>>> <url-pattern>/Eka1</url-pattern>


> </servlet-mapping>
>
> </web-app>
>
> My class file is here:
> /usr/local/jakarta-tomcat-4.1.31/webapps/eka/WEB-INF/classes/paketti1


>
> I put this to address bar http://localhost:8080/eka/Eka1


try
http://localhost:8080/Eka1


Greger
> and I received an error message:
>
> HTTP Status 500 -
>
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
>
> exception
>
> javax.servlet.ServletException: Wrapper cannot find servlet class
> paketti1.Eka1 or a class it depends on
> at
>

org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:844)
> at
>

org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:621)
> at
>

org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:163)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
>

org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:144)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
> org.apache.catalina.core.StandardContext.invoke(St andardContext.java:235
> at
>

org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:133)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:11
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> at
>

org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:116)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
>

org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:127)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:152)
> at
> org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
> at
> org.apache.coyote.http11.Http11Protoco

$Http11ConnectionHandler.processConnection(Http11P rotocol.java:705)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
> at
> org.apache.tomcat.util.threads.ThreadPoo

$ControlRunnable.run(ThreadPool.java:683)
> at java.lang.Thread.run(Thread.java:595)
>
> root cause
>
> java.lang.ClassNotFoundException: paketti1.Eka1
> at
>

org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1407)
> at
>

org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1252)
> at
>

org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:83
> at
>

org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:621)
> at
>

org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:163)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
>

org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:144)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
> org.apache.catalina.core.StandardContext.invoke(St andardContext.java:235
> at
>

org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:133)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:11
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> at
>

org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:116)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
>

org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:127)
> at
> org.apache.catalina.core.StandardPipelin

$StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> at
>

org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> at
> org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> at
> org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:152)
> at
> org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
> at
> org.apache.coyote.http11.Http11Protoco

$Http11ConnectionHandler.processConnection(Http11P rotocol.java:705)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
> at
> org.apache.tomcat.util.threads.ThreadPoo

$ControlRunnable.run(ThreadPool.java:683)
> at java.lang.Thread.run(Thread.java:595)
>
> Apache Tomcat/4.1.31
>
> What have I done wrong?
> Regars Lasse

--
QxRSSReader v1.2.6a released (30-06-2006)
http://www.gregerhaga.net/
There are no stupid questions, only stupid answers.
 
Reply With Quote
 
 
 
 
lasse_heinonen7@hotmail.com
Guest
Posts: n/a
 
      07-14-2006
This didn't help:
HTTP Status 404 - /Eka1

type Status report

message /Eka1

description The requested resource (/Eka1) is not available.
Apache Tomcat/4.1.31


Greger kirjoitti:

> (E-Mail Removed) wrote:
>
> > Hi, I can't get my Java servlets to work. Tomcat-4.1.31 and the example
> > servlets work fine.
> > I have added my own context "eka" under webapps.
> > The code builds ok:
> >
> > package paketti1;
> > import java.io.*;
> > import javax.servlet.*;
> > import javax.servlet.http.*;
> >
> > public class Eka1 extends HttpServlet {
> >
> > public void doGet ( HttpServletRequest request,
> > HttpServletResponse response )
> > throws ServletException, IOException {
> >
> > response.setContentType("text/html");
> > PrintWriter out = response.getWriter();
> >
> > out.println("<html>");
> > out.println("<head><title>He llo, Cruel
> > World!</title></head>");
> > out.println("<body>");
> > out.println("<h1>Hello, Cruel World !</h1>");
> > out.println("This is my last servlet.");
> > out.println("</body>");
> > }// end doGet
> >
> > }///:~
> >
> >
> > This is what I have added to server.xml:
> > <Context path="/eka" docBase="eka" debug="0" reloadable="true" />
> >
> > my web.xml:
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!DOCTYPE web-app
> > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> > "http://java.sun.com/dtd/web-app_2_3.dtd">
> >
> > <web-app>
> >
> > <servlet>
> > <servlet-name>Eka1</servlet-name>
> > <servlet-class>paketti1.Eka1</servlet-class>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>Eka1</servlet-name>

> ====>>> <url-pattern>/Eka1</url-pattern>
>
>
> > </servlet-mapping>
> >
> > </web-app>
> >
> > My class file is here:
> > /usr/local/jakarta-tomcat-4.1.31/webapps/eka/WEB-INF/classes/paketti1

>
> >
> > I put this to address bar http://localhost:8080/eka/Eka1

>
> try
> http://localhost:8080/Eka1
>
>
> Greger
> > and I received an error message:
> >
> > HTTP Status 500 -
> >
> > type Exception report
> >
> > message
> >
> > description The server encountered an internal error () that prevented
> > it from fulfilling this request.
> >
> > exception
> >
> > javax.servlet.ServletException: Wrapper cannot find servlet class
> > paketti1.Eka1 or a class it depends on
> > at
> >

> org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:844)
> > at
> >

> org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:621)
> > at
> >

> org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:163)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> >

> org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:144)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> > org.apache.catalina.core.StandardContext.invoke(St andardContext.java:235
> > at
> >

> org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:133)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:11
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> > at
> >

> org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:116)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> >

> org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:127)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:152)
> > at
> > org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
> > at
> > org.apache.coyote.http11.Http11Protoco

> $Http11ConnectionHandler.processConnection(Http11P rotocol.java:705)
> > at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
> > at
> > org.apache.tomcat.util.threads.ThreadPoo

> $ControlRunnable.run(ThreadPool.java:683)
> > at java.lang.Thread.run(Thread.java:595)
> >
> > root cause
> >
> > java.lang.ClassNotFoundException: paketti1.Eka1
> > at
> >

> org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1407)
> > at
> >

> org.apache.catalina.loader.WebappClassLoader.loadC lass(WebappClassLoader.java:1252)
> > at
> >

> org.apache.catalina.core.StandardWrapper.loadServl et(StandardWrapper.java:83
> > at
> >

> org.apache.catalina.core.StandardWrapper.allocate( StandardWrapper.java:621)
> > at
> >

> org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:163)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> >

> org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:144)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> > org.apache.catalina.core.StandardContext.invoke(St andardContext.java:235
> > at
> >

> org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:133)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.java:11
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> > at
> >

> org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:116)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:594)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> >

> org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:127)
> > at
> > org.apache.catalina.core.StandardPipelin

> $StandardPipelineValveContext.invokeNext(StandardP ipeline.java:596)
> > at
> >

> org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:433)
> > at
> > org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:94
> > at
> > org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:152)
> > at
> > org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:799)
> > at
> > org.apache.coyote.http11.Http11Protoco

> $Http11ConnectionHandler.processConnection(Http11P rotocol.java:705)
> > at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:577)
> > at
> > org.apache.tomcat.util.threads.ThreadPoo

> $ControlRunnable.run(ThreadPool.java:683)
> > at java.lang.Thread.run(Thread.java:595)
> >
> > Apache Tomcat/4.1.31
> >
> > What have I done wrong?
> > Regars Lasse

> --
> QxRSSReader v1.2.6a released (30-06-2006)
> http://www.gregerhaga.net/
> There are no stupid questions, only stupid answers.


 
Reply With Quote
 
Juha Laiho
Guest
Posts: n/a
 
      07-20-2006
(E-Mail Removed) said:
>Hi, I can't get my Java servlets to work. Tomcat-4.1.31 and the example
>servlets work fine.
>I have added my own context "eka" under webapps.


Pretty much everything seems ok.

>The code builds ok:
>
>package paketti1;
>import java.io.*;
>import javax.servlet.*;
>import javax.servlet.http.*;
>
>public class Eka1 extends HttpServlet {


I suppose the generated class file is named Eka1.class (note the capital
E in the file name)?

>This is what I have added to server.xml:
><Context path="/eka" docBase="eka" debug="0" reloadable="true" />


Looks good. You could try increasing the debug level, though.

>My class file is here:
>/usr/local/jakarta-tomcat-4.1.31/webapps/eka/WEB-INF/classes/paketti1


Seems correct. Does the Tomcat runtime account (so, the user account
under which you're running the tomcat processes) have at least read
access to everything within webapps/eka?

>javax.servlet.ServletException: Wrapper cannot find servlet class
>paketti1.Eka1 or a class it depends on


.... I wonder where/why this happens. The error message is clear, at
least.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this response javadev Java 5 11-16-2006 11:22 AM
Offending class: javax/servlet/Servlet.class chamikara Java 1 06-19-2004 05:42 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM
how to get my servlet configuration before the servlet is initialised Andy Fish Java 4 12-17-2003 09:47 PM



Advertisments