aspose file tools*
The moose likes Servlets and the fly likes WEB-INF help? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "WEB-INF help?" Watch "WEB-INF help?" New topic
Author

WEB-INF help?

Sam Moran
Ranch Hand

Joined: Sep 28, 2002
Posts: 86
Good day to all,
I am new to Servlets and trying to understand how to get just simple test Servlets to run. I have installed J2EE, and use Java 2 SDK v1.3.1. In addition I downloaded and installed ANT. I am trying to work through the examples. One problem that I believe that is not correct is that I do not have a WEB-INF directory.
Can someone tell me if this directory is created automatically and I missed a step? Or do I have to create it from scratch?
Can someone make a recommendation for a straight forward tutorial. I am trying to follow Sun's and at every turn it seems that I need to download something else. All I really want to do is get a testing environment going on my laptop so that I can work with some Java Classes that I need to create for an application. I copied a simple HelloWorld Class, compiled it, and then tried to copy it to a directory to test, and it won't work.
Can someone please help? Thank you very much in advance!!


We make a living by what we get, we make a life by what we give!
Nicolas Brasseur
Ranch Hand

Joined: Nov 09, 2001
Posts: 45
What you need to run servlet (& JSPs) is a web container. Have a look atTomcat
which is an open source web container
Nicolas


<a href="http://www.javablackbelt.com/?utm_source=javaranch&utm_medium=signature&utm_campaign=Forum%2BBuzz" target="_blank" rel="nofollow">BlackBeltFactory Communtiy</a> founder - Building better developers<br /><b>Free</b> courses and mock exams
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
I agree with Nicolas, get Tomcat, get it running, and study the examples. Note that there are different versions compiled for SDK 1.3 versus 1.4. J2EE is way more than you need to get started with servlets and will just be confusing.
A nice thing to have on hand is the servlet API - the JavaDocs for servlets come with Tomcat and you can download the APIs for servlets and JSP from java.sun.com.
Bill
chetan
Greenhorn

Joined: Aug 13, 2002
Posts: 15
Hi,
If u r using weblogic6.1 and want to run jsp and servlets,first u need to create a directory structure like com.urcompanyname.project_name.controller
inside the WEB-INF/Classes/com/Company_name/Proj_name/controller
put ur jsp file into ur root directory and servlet class file in classes directory with pacakge name.Also u need to change the web.xml file which is inside the WEB-INF folder.
I think this should work.


Thanks<br />chets
Sam Moran
Ranch Hand

Joined: Sep 28, 2002
Posts: 86
Thank you all for the feedback & help!!! I did just as you advised and installed TOMCAT!! Very nice and easy.
I was glad that I had gone ahead and worked thru the Java web server. I got that going also. Many THANKS.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WEB-INF help?