Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

servlets

 
Ramakrishnan thiyagarajan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai,
I am new to Tomcat server and i want to deploy the servlets in Tomcat4.0
but i don't no where to put the java file in tomcat server and how to invoke
in browser. i don't where to to put HTML file and jsp the same how to
invoke.
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you are working with tomcat and making jsp file and HTML and servlets,
so read following
in tomcat:
create ur folder under webapps like "jasmine" and then save your jsp file and Html files in this directory.And after cretaing this folder please copy web-INF folder in jasmine folder and copy into ur folder jasmine.
c:\tomcat\webapps\jasmine\.
Please run your tomcat .
and the in browser execute this path http://localhost:8080/jasmine.
then u will see this directory existing.
Please do ask if u are not able to understand and do ask.
Thanks
 
Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
please do changes in ur web.xml file of web-inf folder ,please remove the the rest of the tags and leave this tags only in web.xml file of ur web-inf folder
<?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>
like this and then exeute http://localhost:8080/jasmine
Ihope u are getting me.
thanks



</web-app>
 
Brian Bird
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm running Tomcat 5.0.25 I'm not sure if the directory struture is different from Tomcat 4.0, but here is how the directories are set up on my machine:
/tomcat/webapps/ROOT - .html and .jsp pages
/tomcat/webapps/ROOT/WEB-INF/classes - single class servlets
/tomcat/webapps/ROOT/WEB-IFN/classes/MyPackage - servlet packages

I hope that helps. If you are interested in joining an internet study group for learning Java Servlets and JSP go to Learning Web Programming we are going through the book Core Servlets and JavaServer Pages togetehr.

Brian

Originally posted by Ramakrishnan thiyagarajan:
hai,
I am new to Tomcat server and i want to deploy the servlets in Tomcat4.0
but i don't no where to put the java file in tomcat server and how to invoke
in browser. i don't where to to put HTML file and jsp the same how to
invoke.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic