First Servlet Program: Whats the error now?

I have changed my web.xml file. Its small now:
<?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/j2ee/dtds/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>Brat</servlet-name>
<servlet-class>Brat</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Brat</servlet-name>
<url-pattern>/Brat</url-pattern>
</servlet-mapping>
</web-app>
My URL is:
http://localhost:8080/examples/Brat
& I have copied Brat.class in the webapps,
webapps/examples, webapps/examples/servlets direcories but still its complaining about its location. I am getting following errors at different imes:
HTTP Status 503 - Servlet Brat is currently unavailable
The requested service (Servlet Brat is currently unavailable) is not currently available.
A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Wrapper cannot find servlet class Brat or a class it depends on
     at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:797)
     at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
     at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
     at java.lang.Thread.run(Thread.java:484)
Root Cause:
java.lang.ClassNotFoundException: Brat
     at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1111)
     at org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:976)
     at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:792)
     at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:602)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
     at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
     at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
     at java.lang.Thread.run(Thread.java:484)
Can somebody plz help me?
Zulfi.

C:\, C:\WINNT are directories unrelated to Tomcat that Tomcat doesn't know about (unless you told it about them in the conf/server.xml file).
A simple solution without editing your server.xml file is to use Tomcat's ROOT directory.
This directory is by default <Tomcat install directory>\webapps\ROOT
(For me it's : C:\Program Files\Tomcat 4.1\webapps\ROOT).
In this ROOT directory you have the WEB-INF directory wich contains the web.xml file.
Under this WEB-INF directory create a directory called "classes" and put a copy of you servlet class file in it.
The complete path of your servlet class file then should be
<Tomcat install directory>\webapps\ROOT\WEB-INF\classes\Brat.class
Try this and report if it worked.

Similar Messages

  • First Servlet test get the error

    There are no web modules in the repository
    how can i install ?
    thx

    Hi,
    If you want to create and deploy web modules on Sun One application server, you can refer the following
    http://forte.sun.com/ffj/documentation/s1s41/webcomp.pdf
    Get back if you have anymore questions.

  • Can't compile my first servlet program

    hi guys,
    there are some problems with compiling the first servlet program(helloservlet).
    the error is following
    C:\SERVLET-CODE\hello1>javac HelloServlet.java
    HelloServlet.java:4: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    HelloServlet.java:5: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    HelloServlet.java:15: cannot resolve symbol
    symbol : class HttpServlet
    location: class HelloServlet
    public class HelloServlet extends HttpServlet {
    ^
    HelloServlet.java:16: cannot resolve symbol
    symbol : class HttpServletRequest
    location: class HelloServlet
    public void doGet(HttpServletRequest request,
    ^
    HelloServlet.java:17: cannot resolve symbol
    symbol : class HttpServletResponse
    location: class HelloServlet
    HttpServletResponse response)
    ^
    HelloServlet.java:18: cannot resolve symbol
    symbol : class ServletException
    location: class HelloServlet
    throws ServletException, IOException {
    ^
    6 errors
    i don't know why it can not find the import java.*
    and i already set up the classpath
    and my code is
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    /** Simple servlet used to test server.
    * <P>
    * Taken from More Servlets and JavaServer Pages
    * from Prentice Hall and Sun Microsystems Press,
    * http://www.moreservlets.com/.
    * &copy; 2002 Marty Hall; may be freely used or adapted.
    public class HelloServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>Hello</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1>Hello</H1>\n" +
    "</BODY></HTML>");
    please help me out of it...
    thank you all...

    hi man,
    thanks for the classpath, and i already did it in system environment.
    but it can not work either...
    do i really have to download the API, so where i have to put it after i download it...

  • Using iPod shuffle 4th generation for first time and receiving the error : one of the USB devices attached to this computer has malfunctioned, and windows does not recognize it. For assistance in solving this problem, click this message

    Using iPod shuffle 4th generation for first time and receiving the error : one of the USB devices attached to this computer has malfunctioned, and windows does not recognize it. For assistance in solving this problem, click this message.
    Using win 7 and latest iTunes [10.6.3]. Have already gone through below links and did not find any solution.
    http://support.apple.com/kb/HT2292
    http://support.apple.com/kb/TS1369
    http://support.apple.com/kb/HT1923
    http://en.kioskea.net/forum/affich-17997-ipod-not-detected

    I was hoping it would be something like a USB device conflict, but now the shuffle is the only thing connected...
    This article was one of the ones you linked to above in your initial post
    http://support.apple.com/kb/TS1369
    Under Part 9. Verify that USB drivers are installed, did you try the steps in If only "Unknown Device" appears?  That appears to be your situation.
    Also, you said that the shuffle initially worked well enough to do a sync, then it had the same problem again.  If you can get it to work again initially, before doing anything else, try the following.  Select the shuffle in the iTunes sidebar, under DEVICES.  Over to the right, go to the Summary tab.  By default, the checkbox for Enable disk use should be unchecked.  If so, check it and Apply the change.  See if that makes any difference. 
    (If Enable disk use was already checked, try unchecking it and Apply the change.  Basically, set it the "other way" and see if there is any improvement.)
    NOTE:  When disk use is enabled, you have to eject the iPod in iTunes before disconnecting it physically.
    If the disk use change makes a difference, that may provide a clue about the actual cause.

  • I get the message "an error occurred while processing this directive" but no hint of what the error

    I am trying to download Photoshop for the first time. I get the message "an error occurred while processing this directive" but no hint of what the error is or what I should do about it.

    Graham which version of Photoshop are you referencing?  Also which operating system are you using?  Finally can you please post a screen shot of your error message?

  • Icloud has has exclamation but I don't know how to tell what the error is?  I recently selected bookmarks for syncing.

    icloud has has exclamation but I don't know how to tell what the error is?  I recently selected bookmarks for syncing.

    TM will show it has done a backup.. Look at the info.. when was the backup completed??
    If you want more details install the widget.
    A1 here.
    http://pondini.org/TM/Troubleshooting.html
    The time capsule though blinks amber and the Airport Utility shows blinking amber light and has a red circle with the number 1 in it.
    There is an error.. probably trivial.. firmware update, default password..
    Open the airport utility and find out what the error is.
    Simply click the TC and see status in the summary page.. it will list all the errors and what you should do.. fix or ignore them. ie this TC has an error.. default password.. I chose to ignore.. when I "fix" the problem the LED goes green.
    Here is additional TC.. it is blinking amber with faults.
    Click the fault. eg default password.
    You can ignore or edit .. if you click edit it will take you to the full setup where you can change the settings.
    I ignored my errors and now it is green..

  • HT4623 I'm trying to update my iPad but it keeps coming up with an error message but no explanation what the error is

    Trying to update to iOS 7.0.2 but not having any success,message keeps appearing telling me there's an error but doesn't tell me what the error is,any information on how to sort this problem would be appreciated

    Can you check that your Wi-Fi connection is working correctly?
    Do you get that error right away at the beginning of the download or much later?
    Have a look whether there is plenty of free space (several gigabytes) on your iPad to receive the new iOS 7 upgrade. Remember that the upgrade is downloaded in a compressed form.
    It's difficult for me to give precise advice without knowing what caused the error.
    If all fails, try to do the upgrade via iTunes with your iPad connected to your computer.

  • I am trying to set up iCloud to sync my Outlook Calendar however it keeps failing due to 'an unexpected error' but it doesn't say what the error is! Any suggestions would be gratefully received.

    I am trying to set up iCloud to sync my Outlook Calendar however it keeps failing due to 'an unexpected error' but it doesn't say what the error is! Any suggestions would be gratefully received.

    Create a iTune and App Store account without credit card
    1. Go to App Store and select a free app
    2. Tap INSTALL APP
    3. Create New Apple ID
    4. Confirm Your Country
    5. Agree with Terms and Conditions
    6. Fill in your Apple ID and Password (must be a valid email address)
    7. Create and answer your secret question e.g. What is the name of my dog?
    8. Select NONE for Payment Method
    9. Fill in Billing Address i.e. your address
    10. Submit application for new Apple ID
    11. Wait for verification email
    12. When email arrive, verify your account
    13. Start downloading your free apps

  • HT1926 Does anyone know what the error message "ErrorDomainWinSockerror10054" mean?

    Does anyone know what the error message "ErrorDomainWinSockerror10054"mean? This is the second tine in 41/2 hours my download of the upgrade of itunes has stopped with this error message. Any ideas?

    Alternatively, contact Apple Service, iMac Service or Apple's Express Lane. Do note that if you have AppleCare's protection plan and you're within 50 miles (80 KM) of an Apple repair station, you're eligible for onsite repair since yours is a desktop machine.

  • HT1688 MY IPHONE 3GS START TO GET REALLY HOT, AND AFTER THAT ALMOST EXPLODE...ITS BROKEN NOW.... THE BATTERY GETS FAT... WHATS THE SOLUTION NOW???

    MY IPHONE 3GS START TO GET REALLY HOT, AND AFTER THAT ALMOST EXPLODE...ITS BROKEN NOW.... THE BATTERY GETS FAT... WHATS THE SOLUTION NOW???

    Unfortunately it looks like your 3GS' battery has expanded so much that it cracked the whole case wide open. If you have AppleCare on your device then you're all set, just take it to your local Apple Store.
    If not, then still take it to the store. Complain about the battery bursting, and make sure to tell them that it's for sure a defect (you'd think it's obvious, but sometimes you just need to drive the point in), and that it potentially could have been and still be a hazard.
    Remind them that the phone has not been in any adverse conditions, extreme temperatures, or abused in any way but that you just merely used it normally. (I'm assuming that's the truth?)
    If they're good about it they should replace the broken phone for you; but unfortunately there's little chance of repairing your current device.

  • Does anyone know what the error code 4mot/4/40000003:HDD-1246 means

    Does anyone know what the error code 4mot/4/40000003:HDD-1246 means

    Alternatively, contact Apple Service, iMac Service or Apple's Express Lane. Do note that if you have AppleCare's protection plan and you're within 50 miles (80 KM) of an Apple repair station, you're eligible for onsite repair since yours is a desktop machine.

  • TS3694 I have an unknown error labeled -42210. I don't see it anywhere in the list and I have no clue what it does either since everything seems to run just fine. Does anyone know what the error means?

    I have an unknown error labeled -42210. I don't see it anywhere in the list and I have no clue what it does either since everything seems to run just fine. Does anyone know what the error means?

    Try the following user tip:
    iTunes for Windows 11.0.2.25 and 11.0.2.26: "Unknown error -42110" messages when launching iTunes

  • Whats the error ?

    Hello ,
    i find this trigger ( WHEN-VALIDATE-ITEM )
    please what the error ?
    DECLARE
    P NUMBER(20);
    X NUMBER(20):=0;
    BEGIN
    IF :PASS.V_PASS <>:GLOBAL.V_PASS THEN
    MESSAGE('Make sure the password if to repeat that mistake 3 times the user will be closed ');
    MESSAGE(' Make sure the password if to repeat that mistake 3 times the user will be closed ');
    CONT.X:=CONT.X+1;
    IF CONT.X = 3 THEN
    :SYSTEM.MESSAGE_LEVEL := '5';
    UPDATE V_USER SET VELAD='N'
    WHERE EMP_ID = :GLOBAL.V_EMP_ID;
    CONT.X := 100;
    END IF ;
    IF not CONT.X = 100 THEN
    RAISE Form_Trigger_Failure;
    end if ;
    END IF ;
    END;

    Andreas Weiden wrote:
    "Something went wrong, but i have no idea what exactly it is"Yes, but at least it is sure something went wrong (although it is not sure what it is), and (hopefully) it's not like
    hmm...I've been running for 20 minutes without errors. There might have happened somethinig weird I'm not aware of. Let's throw an assertion just to be sure
    Of course I have no proof this is not the case, so I am assuming this too (but I strongly hope that I made the correct assumption) ;)
    cheers

  • An unknown error occurred (-54) whats the error?

    Hi
    Always when I try to convert a video in iTunes for the iPod I get the following message:
    Error occurred while converting file
    "...". An unknown error occurred (-54).
    Does anybody know, what this error is and what I am doing wrong?
    I am running the latest iTunes, and Mac OS updates, with Quicktime Pro.
    Thanks

    Hi
    Always when I try to convert a video in iTunes for the iPod I get the following message:
    Error occurred while converting file
    "...". An unknown error occurred (-54).
    Does anybody know, what this error is and what I am doing wrong?
    I am running the latest iTunes, and Mac OS updates, with Quicktime Pro.
    Thanks

  • I cannot open my FinalCut pro X because of a problem with the FxFactory plugin, at least this is what the error message reports me. What should I do? Thank you very much

     

    What does the error message say exactly?
    Please contact tech support through the FxFactory application and explain your problem in as much detail as possible. 
    This will attach a FxFactory generated System profile to your message which can be very helpful in diagnosing problems on your system:
    1) Launch the FxFactory application
    2) Choose the "Contact Tech Support..." command under the Help menu.

Maybe you are looking for