running servlets ?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: running servlets ?

  1. #1
    Satya Atluri Guest

    running servlets ?

    Hi,

    I have just started learning servlets. I have J2EE installed on my
    machine. Will it be enough to run Servlets or do I need to install
    Servlet development kit and stuff like that..

    Any help is greatly appreciated.

    Thanks
    Satya


  2. #2
    H. Wilson Guest

    Re: running servlets ?


    Satya Atluri <vatluri@in.ibm.com> wrote:
    >Hi,
    >
    >I have just started learning servlets. I have J2EE installed on my
    >machine. Will it be enough to run Servlets or do I need to install
    >Servlet development kit and stuff like that..
    >
    >Any help is greatly appreciated.
    >
    >Thanks
    >Satya
    >


    I've also just started learning servlets. I also installed J2EE along with
    JDK 1.2.2.

    Here is what I've learned by using the included stuff from Sun:

    TO RUN(compile) A JSP PAGE, you have to have run a batch file located in:
    C:\j2sdkee1.2\bin\j2ee.bat

    You'll see the following message appear in the command prompt, "J2EE server
    startup complete."

    When you create new JSPs, simply put them in the C:\j2sdkee1.2\public_html\
    directory, then open up any web browser and type: http://localhost:8000/<jsp
    filename>, it'll take a few seconds to compile the JSP page into a Servlet,
    then voila, you get your results.

    TO RUN A SERVLET, you have to run a different batch file that comes with
    the JSDK (don't confuse this with the J2SDK - two completely different installs)
    which is located at C:\jsdk2.1\startserver.bat

    You should then see the following message appear in another command prompt:
    "JSDK WebServer Version
    Loaded configuration fr
    endpoint created: :8080"

    Any servlets (class files) that you compile and create, you want to place
    them in the following directory - C:\jsdk2.1\webpages\Web-inf\servlets\ directory.
    After doing that, you can then open your browser and type the following
    URL in: http://localhost:8080/servlet/<servlet name - AKA class file name>

    I hope this is helpful to somebody. Is it just me, or does it seem like
    quite a bit of hoops to jump through to test "simple" stuff? It was a trial
    and error process to learn how to do the above stuff.

    Herbie Wilson

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center