Results 1 to 4 of 4

Thread: Running Java Servlet Classes?

  1. #1

    Thread Starter
    Member
    Join Date
    May 1999
    Location
    St. Louis, MO, USA
    Posts
    54

    Smile

    IF you still need help reply back. I just went through this problem. You need to make sure the servlet.jar is in your classpath. In my case It was in with my web server.
    jen

  2. #2
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236

    Cool

    Thanks for asking... now I'm still encountering a little problem. When I work in JBuilder and enter..

    import javax.

    the servlet option comes up, so I enter

    import javax.servlet.

    but the only class I get in the next pop up box is the JSP option. For some reason the other Servlet classes are not working. Here's what my classpath looks like... I'm on NT if that matters.

    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Dell\Resolution Assistant\Common\bin;C:\jdk1.3\bin;C:\jdk1.3\jre\lib\tools.jar;C:\JAVASERV\jswdk-1.0.1\lib\servlet.jar;

  3. #3

    Thread Starter
    Member
    Join Date
    May 1999
    Location
    St. Louis, MO, USA
    Posts
    54

    Smile

    Jbuilder is relatively new to me but I've tried to use it some. When I create a servlet I still have been telling Jbuilder I want to create a new class. Then I'm doing
    import javax.servlet.*;
    import javax.servlet.http.*;

    I've also learned that Windows NT has 2 classpaths a user classpath and a system classpath. Make sure the system classpath is set to C:\JAVASERV\jswdk-1.0.1\lib\servlet.jar;
    If the system classpath is set correctly you should not have to worry about the below information however if your still having problems you might give it a try.
    Jbuilder also has a place to set the class path in project properties. If you go to project then properties a window comes up listing all of the libraries available. If your servlet library is not in there click add. You then get a list to choose from. If the desired library is not on the list you can then click new and create the library. Your actually are identifying another classpath.

    Have you tried compiling just using notepad and a cmd window?
    One more piece of information I found out. When I was starting my webserver it was changing my classpath. Lite webserver launches by running a bat file I had to modify it to keep the correct classpath.
    jen

  4. #4
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236

    Talking

    Cha-Ching! Thank you so much for your help. I went in through JBuilder and, under properties, pointed right to my class and now I am able to run Servlets. You are a saint!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width