Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Forums : J2EE : JSP : Help, the Testservlet class not running in browser with tomcat 4.1.18 Signup · Login
Author Thread
Help, the Testservlet class not running in browser with tomcat 4.1.18
Posted in tutorial: Introduction to Java Servlets, Developing your first Java Servlet
·  zaku
User
Joined: 15 Mar 2003
Total Posts: 2
Help, the Testservlet class not running in browser with tomcat 4.1.18
Posted: 15 Mar 2003
Hi!! Mr. Khan

I am new with web programming such as servlet, J2EE and Tomcat, but I know java quite well.

I have problem with my Tomcat ver 4.1.18, which can not call my servlet.

I had read your lessons about servlet ( thanks for the lessons for Tom Cat and servlet :) ).

I followed all your instruction from installing the TomCat Path :
CATALINA_HOME : C:\jakarta-tomcat-4.1.18
JAVA_HOME : C:\jdk1.3.0_02

I Edit server.xml file which is present in the /conf folder of Tomcat 4.1.18

</Host>
</Engine>
</Service>

I add following line as you mentioned exactly above </Host> code, without delete or modify any other code:

<Context path="/star" docBase="star" debug="1" reloadable="true"/>

The First JSP is running well.

I continue with the first servlet:

Also followed your instruction, I put your TestServlet.java to the folder

C:\jakarta-tomcat-4.1.18\webapps\star\WEB-INF\classes\com\stardeveloper\servlets\

and compile with
javac -classpath c:\jakarta-tomcat-4.1.18\common\lib\servlet.jar TestServlet.java

and start my Tomcat server and open the browser to

http://localhost:8080/star/servlet/com.stardeveloper.servlets.TestServlet

but I got error message in browser like this

HTTP Status 404 - /star/servlet/com.stardeveloper.servlets.TestServlet

--------------------------------------------------------------------------------

type Status report

message /star/servlet/com.stardeveloper.servlets.TestServlet

description The requested resource (/star/servlet/com.stardeveloper.servlets.TestServlet) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/4.1.18


I can not solve the problem. Can you help me to solve the problem, please????,
Do I need to create the web.xml, also ???.

Since I am new to Web programming, I also would like to ask you is there actually
Do I need J2EE if I use TomCat??.

I am sorry If I asked many question, since I am new leaner with web programming.

Thank you very much anyway.






Users Who Have Visited This Thread In Last 24 Hours
3 Visitors

Login
UserName Or Email Address:       Password:       Auto-Login:    
· Create New User Account
· Send Forgotten Password by Email
 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.