getting a problem with an servlet execution

hi

i created an servlet under eclipse and i got an error message.

The archive: /CATALINA_HOME/bin/bootstrap.jar which is referenced by the classpath, does not exist.

i configure web.xml like that.

<?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>MaPremiereServlet</servlet-name> <servlet-class>fr.parcauto.servlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>MaPremiereServlet</servlet-name> <url-pattern>/premiere</url-pattern> </servlet-mapping></web-app>

besides when i lauch eclipse , my projects are located in the workspace so i added an new instruction at the end of file server.xml like that:

:

<!-- <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"/> --></Host></Engine> <Context path="/MonProjetWeb" reloadable="true" docBase="D:\workspace\MonProjetWeb" workDir="D:\workspace\MonProjetWeb\work"/>

I will show you my MaPremiereServlet class:

[code]

package fr.parcauto.servlet;import java.io.IOException; import java.io.*; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;public class MaPremiereServlet extends HttpServlet {protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("<html>"); out.println("<head>"); out.println("<title> Ma premiere Servlet </title>"); out.println("</head>"); out.println("<body>"); out.println("<h1> Voici un test de ma servlet </h1>"); out.println("</body>"); out.println("</html>"); }}

[/Code]

i can't understand why i got that error . i placed the bootstrap.jar

in the library of my application. But the servlet don't work

Have you got any idea?

Thanks you

hanimichi

[2722 byte] By [hanimichi@sun.javaa] at [2007-11-27 9:43:49]
# 1

Please don't go back in history and resubmit the topic instead of using the Edit button and gently edit the message. Now you've 2 topics: http://forum.java.sun.com/thread.jspa?threadID=5191827

And also please introduce linebreaks in your code. It's one long line and scrolling horizontally is annoying.

BalusCa at 2007-7-12 23:49:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

i'm so sorry . i don't know if i can delete the first message.

hi

i created an servlet under eclipse and i got an error message.

The archive: /CATALINA_HOME/bin/bootstrap.jar which is

referenced by the classpath, does not exist.

i configure web.xml like that.

<?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app

PUBLIC "-//Sun Microsystems, Inc.//DTD WebApplication

2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<servlet>

<servlet-name>MaPremiereServlet</servlet-name>

<servlet-class>fr.parcauto.servlet</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>MaPremiereServlet</servlet-name>

<url-pattern>/premiere</url-pattern>

</servlet-mapping>

</web-app>

besides when i lauch eclipse , my projects are located in the workspace so i added an new instruction at the end of file server.xml like that:

:

<!-- <Valve className="org.apache.catalina.valves.FastCommonAccessLogValve

" directory="logs" prefix="localhost_access_log." suffix=".txt"

pattern="common" resolveHosts="false"/> --></Host></Engine>

<Context path="/MonProjetWeb" reloadable="true"

docBase="D:\workspace\MonProjetWeb"

workDir="D:\workspace\MonProjetWeb\work"/>

I will show you my MaPremiereServlet class:

package fr.parcauto.servlet;

import java.io.IOException;

import java.io.*;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

public class MaPremiereServlet extends HttpServlet {

protected void doGet(HttpServletRequest request, httpServletResponse response) throws ServletException, IOException

{

response.setContentType("text/html");

PrintWriter out = response.getWriter();

out.println("<html>");

out.println("<head>");

out.println("<title> Ma premiere Servlet </title>");

out.println("</head>");

out.println("<body>");

out.println("<h1> Voici un test de ma servlet </h1>");

out.println("</body>");

out.println("</html>");

}

}

i can't understand why i got that error . i placed the bootstrap.jar

in the library of my application. But the servlet don't work

Have you got any idea?

Thanks you

hanimichi

hanimichi@sun.javaa at 2007-7-12 23:49:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
How are you running Tomcat? As a Server in Eclipse, or standalone?
BalusCa at 2007-7-12 23:49:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
i run it on eclipse i put an plug in
hanimichi@sun.javaa at 2007-7-12 23:49:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Don't change the server.xml.

Rightclick at the server definition, choose add/remove projects and select the project(s) to be deployed.

You may need to remove the server, close Eclipse, delete everything in workspace/.metadata/.plugins/org.eclipse.wst.server.core, start Eclipse and redefine the server.

BalusCa at 2007-7-12 23:49:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...