Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » calling a servlet with tomcat plugin
calling a servlet with tomcat plugin [message #114042] Wed, 05 November 2003 11:15 Go to next message
Eclipse UserFriend
Originally posted by: eyal.bitansky.reuters.com

Hello,
I am using eclipse 2.1.1 with tomcat 5.x and the latest plugin from sysdeo
(2.2 beta)

I have no problems to run and compile java files but when I try to run a
servlet I get into problems:

I create HelloWorldServlet in a tomcat project name Test
my url is : http://localhost:8080/Test/HelloWorldServlet

adding /servlet/ before the name of the servlet doesnt help as well

I have noticed that server.xml has a new line:
<Context path="/Test" reloadable="true"
docBase="C:\eclipse\workspace\Test"
workDir="C:\eclipse\workspace\Test\work" />

and I can see the servlet directory in tomcat's manager.

why can't I call the servlet?

was I suppose to write my own web.xml? or the plugin takes care of that?

by the way. the servlet code is:
import java.io.*;

import javax.servlet.http.*;
import javax.servlet.*;

public class HelloWorldServlet extends HttpServlet {
public void doGet (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
PrintWriter out = res.getWriter();

out.println("Hello, world!");
out.close();
}
}

Thanks.

Eyal Bitansky
Re: calling a servlet with tomcat plugin [message #114612 is a reply to message #114042] Thu, 06 November 2003 21:12 Go to previous message
Eclipse UserFriend
just a thought, but make sure the invoker context in the /conf/web.xml file
isn't commented out. the default is to comment it out.

leon Webster
"Eyal Bitansky" <eyal.bitansky@reuters.com> wrote in message
news:bob7mo$f1n$1@eclipse.org...
> Hello,
> I am using eclipse 2.1.1 with tomcat 5.x and the latest plugin from sysdeo
> (2.2 beta)
>
> I have no problems to run and compile java files but when I try to run a
> servlet I get into problems:
>
> I create HelloWorldServlet in a tomcat project name Test
> my url is : http://localhost:8080/Test/HelloWorldServlet
>
> adding /servlet/ before the name of the servlet doesnt help as well
>
> I have noticed that server.xml has a new line:
> <Context path="/Test" reloadable="true"
> docBase="C:\eclipse\workspace\Test"
> workDir="C:\eclipse\workspace\Test\work" />
>
> and I can see the servlet directory in tomcat's manager.
>
> why can't I call the servlet?
>
> was I suppose to write my own web.xml? or the plugin takes care of that?
>
> by the way. the servlet code is:
> import java.io.*;
>
> import javax.servlet.http.*;
> import javax.servlet.*;
>
> public class HelloWorldServlet extends HttpServlet {
> public void doGet (HttpServletRequest req,
> HttpServletResponse res)
> throws ServletException, IOException
> {
> PrintWriter out = res.getWriter();
>
> out.println("Hello, world!");
> out.close();
> }
> }
>
> Thanks.
>
> Eyal Bitansky
>
Previous Topic:Any database browser?
Next Topic:Question about merging 2 projects into one
Goto Forum:
  


Current Time: Thu May 08 18:55:35 EDT 2025

Powered by FUDForum. Page generated in 0.03630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top