| Author |
Basic question with Eclipse
|
Frederik Ericsson
Ranch Hand
Joined: Apr 27, 2005
Posts: 128
|
|
Hello Guys, I am beginner in this. I have installed Tomcat, once I created new project i got these folders by default. JRE TOMCAT-HOM/../servelt.jar TOMCAT-HOM/../asper-runtime.jar WEB-INF/src/---------(Test.java) work WEB-INF/web.xml I have created this folder WEB_INF/classes(using prject-> prop->) and web.xml file by my self I have created index.jsp, started the server, it was working fine. when am writing new servlet Test.java package UnderDevelop; /** * @author Administrator * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */ import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class Test extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { java.util.Date d = new java.util.Date(); PrintWriter out = response.getWriter(); out.println("Hello World.........."); } } web.xml <?xml version="1.0" encoding="ISO-8859-1"?> < !DOCTYPE web-app<br /> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"<br /> "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>Welcome to Tomcat</display-name> <description> Welcome to Tomcat </description> <servlet> <servlet-name>H</servlet-name> <servlet-class>Test</servlet-class> </servlet> <servlet-mapping> <servlet-name>H</servlet-name> <url-pattern>/ssss</url-pattern> </servlet-mapping> </web-app> I could nt find the Test.class file in the WEB-INF/classes. when I type this http://localhost:8080/TomcatProject/ssss says Status 500 - error. Please do help me, since am a beginner, u guys will encourage me to fix it. with regards,
|
 |
kp sm
Greenhorn
Joined: Apr 24, 2006
Posts: 3
|
|
Hi, There is a free plugin for tomcat-eclipse (sysdeo I guess). You can get the plugin and save it under plugins directory of eclipse. Then you will get some tomcat related buttons and settings in eclipse. Using them you can configure your classes files. Thanks KP
|
 |
 |
|
|
subject: Basic question with Eclipse
|
|
|