• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WEB-INF help?

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you need to run servlet (& JSPs) is a web container. Have a look atTomcat
which is an open source web container
Nicolas
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sam Moran
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic