access a tomcat project builded in eclipse

From: marcelino (marc.bertholl_at_md-pro.de)
Date: 01/26/04


Date: 26 Jan 2004 05:38:54 -0800

Hello java-community,

I'm trying to run a servlet in tomcat 4.1.27 developed in eclipse
using the tomcat-plugin from sysdeo version 2.2.1.
If I copy the binary from my eclipse workspace to the
webapps/examples/WEB-INF/classes- directory it runs with this call:

http://localhost:8080/examples/servlet/HelloWorld2

The Location of binaries rendered by eclipse is:

file:/home/myhome/workspace/tctest/WEB-INF/classes

If I try to run the servlet from the eclipse-workspace -after updated
the server.xml- with this call:

http://localhost:8080/tctest/servlet/HelloWorld2
and also
http://localhost:8080/servlet/tctest.HellowWorld2

I see the error 404.
tctest is my eclipse- project HelloWorld2 is part of.
In server.xml I can find the following context-element:

<Context path="/tctest" reloadable="true"
docBase="/home/mbert/workspace/tctest"
workDir="/home/mbert/workspace/tctest/work/org/apache/jsp" />

Maybe there is something wrong in the configuration. So here are some
environment variables

global:
JRE_HOME=/usr/lib/java/jre
PATH=/home/mbert/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/java/bin
JAVA_BINDIR=/usr/lib/java/bin
JAVA_HOME=/usr/lib/java
SDK_HOME=/usr/lib/java
JDK_HOME=/usr/lib/java
JAVA_ROOT=/usr/lib/java

eclipse:
JRE_HOME=/usr/lib/SunJava-1.4.2/jre
PATH=/home/mbert/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/SunJava-1.4.2/bin
JAVA_BINDIR=/usr/lib/SunJava-1.4.2/bin
JAVA_HOME=/usr/lib/SunJava-1.4.2
SDK_HOME=/usr/lib/SunJava-1.4.2
JDK_HOME=/usr/lib/SunJava-1.4.2
JAVA_ROOT=/usr/lib/SunJava-1.4.2

At the moment I can't figure out the cause of my problem. If somebody
can give me a hint I would appreciate it.

thanks in advance

Marcelino

thanks in advance

martina



Relevant Pages

  • Re: servlet project setup in Eclipse
    ... The way I set up Eclipse for web application projects is this. ... configure WEB-INF/src as a source folder for the project, ... See the Tomcat ... there isn't supposed to be a servlet directory underneath webapps. ...
    (comp.lang.java.help)
  • log4j file appender relative path + sysdeo plugin in Eclipse for launching Tomcat
    ... If I launch Tomcat using the tomcat monitor program (i.e. outside Eclipse), log4j writes to a log file with a path relative to the servlet root, which is the desired behaviour. ...
    (comp.lang.java.programmer)
  • Re: Problem with a servlet
    ... I do not use eclipse but it should have a "new servlet" function and give you the correct code template. ... Devo passare dei parametri da una form in html ad un ...
    (comp.lang.java.help)
  • Re: access a tomcat project builded in eclipse
    ... > I'm trying to run a servlet in tomcat 4.1.27 developed in eclipse ... > tctest is my eclipse- project HelloWorld2 is part of. ...
    (comp.lang.java.programmer)
  • servlet project setup in Eclipse
    ... I'm following a tutorial on using Struts with Eclipse. ... servlet in the browser at localhost:8080/servlet/HelloWorldServlet. ... It seems to assume you know Eclipse and Tomcat however because it says ... underneath webapps but I don't see one. ...
    (comp.lang.java.help)