Runnig problem of servlet thru tomcat

Hi,
I succesfully compiled servlet program.
I kept the TestServlet.java and TestServlet.class files under
c:\program files\apache tomcat 4.0\webapps\root\web-inf\classes
I started tomcat server and in the browser i typed http://localhost:8080/examples/servlet/TestServlet
Now i got the following error
Apache Tomcat/4.0.1 - HTTP Status 404 - /examples/servlet/TestServlet
type Status report <p>
message /examples/servlet/TestServlet
description The requested resource (/examples/servlet/TestServlet) is not available.
My doubt is in which folder i have to keep servlet file and in which folder i have to keep JSP and HTML files.
Please can any one help me......
Thanks.

The path where you put the servlet file is correct.
You have to access this servlet like this :
http://localhost:8080/servlet/TestServlet
Hope the above should work.
If, still this is not not working means the servlet you created may be under a packege. This case, you have to access like this:
http://localhost:8080/servlet/pack1.pack2.TestServlet
(In this case, the sourse path will be : "...'web-inf\classes\pack1\pack2\TestServlet.class")
Hope this answers your quest.

Similar Messages

  • Again problem with servlet and Tomcat

    My files are:
    webapps\greeting\src\GreetingServlet.java
    ................\index.html
    ................\WEB-INF\classes\GreetingServlet.class
    ........................\web.xml
    Url:http//:localhost:8080/greeting/ shows index.html but when i submit
    it showing
    HTTP Status 404 - /greeting/servlet/GreetingServlet
    type: Status report
    message: /greeting/servlet/GreetingServlet
    description: The requested resource (/greeting/servlet/GreetingServlet) is not available.
    Source code:
    1.index.html:
    <HTML>
         <HEAD>
              <TITLE>ProJava Registration</TITLE>
         </HEAD>
         <BODY>
              <H1>Welcome</H1>
              <FORM ACTION ="/greeting/servlet/GreetingServlet" METHOD= "POST">
                   <p>Your Name <INPUT TYPE= "text" SIZE= "40" NAME= "name" ></p>
                   <p>Your Email <INPUT TYPE= "text" SIZE= "40" NAME="email">
                   <INPUT TYPE= "submit" VALUE= "Submit" ></p>
              </FORM>
         </BODY>
    </HTML>
    2.GreetingServlet.java:
    import javax.servlet.* ;
    import javax.servlet.http.* ;
    import java.io.* ;
    import java.util.* ;
    public class GreetingServlet extends HttpServlet{
    protected void doPost (HttpServletRequest request,
                   HttpServletResponse response)
                        throws ServletException, IOException {
         String name = request.getParameter ("name");
         String email = request.getParameter ("email");
         String message = null;
         GregorianCalendar calendar = new GregorianCalendar();
         if (calendar.get(Calendar.AM_PM) == Calendar.AM) {
              message =" Good Morning";
         else {
              message = " Good Afternoon";
         response.setContentType("text/html");
         PrintWriter out = response.getWriter();
         out .println("<HTML>");
         out .println("<BODY>");
         out .println("<p>"+message +","+name+"</p>");
         out .println("<p> Thanks ("+email+")</p>");
         out .println("<p> -The Pro Java Team.</p>");
         out .println("</BODY>");
         out .println("</HTML>");
         out .close();
    Please help me
    Thanks in advance Also thanks to st.

    Hi,
    I think you have to change server.xml, which is in conf directory of your tomcat root directory.
    search context in server.xml
    and alter like this
    <Context path="/greetings" docBase="greetings" debug="0"
    reloadable="true" crossContext="true">
    Hope this will help
    Regards
    Sekhar

  • Executing Servlets thru Tomcat 5.5.17.

    I have just installet Tomcat 5.5.17 in order to execute Servlets.
    Though the service is running,I am unable to access it.
    When I say:
    http://localhost:8080
    it prompts me with a username and password screen:
    I enter 'admin' as the user name and password is blank:
    but am unable to go to the tomcat page.
    Has anyone encountered this before?
    I even tried entering 'tomcat' as user and 'tomcat' as password.

    I enter 'admin' as the user name and password is
    blank:
    but am unable to go to the tomcat page.
    Has anyone encountered this before?
    I even tried entering 'tomcat' as user and 'tomcat'
    as password.How about admin/admin?
    Anyway, those credentials should be there, in some xml configuration file (admin.xml ? -- don't remember).

  • Communication problem between NetBeans and Tomcat

    hi!
    i got a quite mysterious problem. here is what happens:
    - i start NetBeans 5.5.1 (the first time)
    - i want to debug my JSF-Project, the Debugger starts
    - After a few seconds the debugger waits for tomcat (it sais: "Waiting for Tomcat...") and tomcat starts
    - Again after a few seconds the tomcat-debugger-output sais "Tomcat startet in 3333 ms".
    okay.
    when i enter http://localhost:8084/ in my browser i get the tomcat homepage, so the server has definitely started! But nothing happens in NetBeans and nothing happens with my project....
    In the lower-right corner i see this blue working-bar that sais "deploying project" but nothing happens. The Project-Debugger-Output still sais "Waiting for Tomcat..." but nothing happens...
    And after something around 3 minutes (i guess it's a timeout) i get the error "Starting of Tomcat failed." But is HAS started, i can login to the Administration-Area in my browser!
    so i guess there is a communication problem between netbeans an tomcat. Netbeans waits for a message from tomcat but tomcat doesn't send it..or netbeans doesn't understand it.
    But the story goes on:
    When i press the debug-button a second time it takes only a few seconds till i get the message: "Tomcat server port 8084 already in use". OF COURSE! Because Tomcat has already startet and can't be stoped by NetBeans.
    i'm trying to solve this problem for 4 days now, so i would be very happy if anyone has an idea where to start/continue the search...
    thanks,
    flo.
    some system-info:
    - windows vista business 32-bit
    - no firewall is running
    - AntiVir Personal Edition IS running
    - Yahoo Widgets Engine IS running
    - no other software is running
    and finally the tomcat-log:
    Using CATALINA_BASE: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base
    Using CATALINA_HOME: C:\Program Files\NetBeans\enterprise3\apache-tomcat-5.5.17
    Using CATALINA_TMPDIR: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\temp
    Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_12
    Listening for transport dt_shmem at address: tomcat_shared_memory_id
    21.09.2007 18:27:50 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
    INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\cvsnt;
    21.09.2007 18:27:50 org.apache.coyote.http11.Http11BaseProtocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:50 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1862 ms
    21.09.2007 18:27:50 org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    21.09.2007 18:27:50 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
    21.09.2007 18:27:50 org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    21.09.2007 18:27:53 org.apache.coyote.http11.Http11BaseProtocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    21.09.2007 18:27:54 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    21.09.2007 18:27:54 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/31 config=null
    21.09.2007 18:27:54 org.apache.catalina.storeconfig.StoreLoader load
    INFO: Find registry server-registry.xml at classpath resource
    21.09.2007 18:27:54 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 3626 ms

    As i wrote before, the same problem occured for me. I have found a solution which is : Go to tools menu and then select options . In the proxy info, select No Proxy.
    I hope this help you

  • Problem with JNI and Tomcat in windows

    Hello guys...
    I have the following problem.
    I used Tomcat 4 and I have following ApiEncriptacion class, in package com.servipag.sts;
    package com.servipag.sts;
    class ApiEncriptacion
         public native String encripta(String texto, String ubicacionLlavePublica, String semilla);
         static
              System.loadLibrary("apisdark");
         public native String desencripta(String texto, String ubicacionLlavePrivada);
         static
              System.loadLibrary("apisdark");
    the LD_LIBRARY_PATH is set in following dir c:\tomcat\bice
    the dll this in the following path = c:\tomcat\bice\apisdark.dll
    I run Tomcat at the following way..
    C:\jdk1.4\bin\java.exe -jar -Djava.library.path="c:\tomcat\bice" -Duser.dir="C:\Tomcat" "C:\Tomcat\bin\bootstrap.jar" start
    but, still appear the error:
    java.lang.UnsatisfiedLinkError: encripta
         at com.servipag.sts.ApiEncriptacion.encripta(Native Method)
         at com.servipag.sts.ServiciosServiPagImpl.rescatarFirma(ServiciosServiPagImpl.java:2143)
         at com.servipag.sts.ServiciosServiPagImpl.pagarCuenta(ServiciosServiPagImpl.java:310)
         at org.apache.jsp.SBCO_0005flogin_0005fbice_0005f4$jsp._jspService(SBCO_0005flogin_0005fbice_0005f4$jsp.java:265)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         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:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         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.StandardContext.invoke(StandardContext.java:2343)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         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:174)
         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:1012)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107)
         at java.lang.Thread.run(Thread.java:536)
    please help me
    Luis Navarro.
    Chile

    ApiEncripatcion.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class ApiEncriptacion */
    #ifndef IncludedApiEncriptacion
    #define IncludedApiEncriptacion
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class: ApiEncriptacion
    * Method: encripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_encripta
    (JNIEnv *, jobject, jstring, jstring, jstring);
    * Class: ApiEncriptacion
    * Method: desencripta
    * Signature: (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_ApiEncriptacion_desencripta
    (JNIEnv *, jobject, jstring, jstring);
    #ifdef __cplusplus
    #endif
    #endif
    ApiEncriptacion.c
    #include "jni.h"
    #include <stdio.h>
    #include "files.h"
    #include "hex.h"
    #include "rsa.h"
    #include "randpool.h"
    USING_NAMESPACE(CryptoPP)
    USING_NAMESPACE(std)
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed);
    char RSAEncryptString(const char pubFilename, const char seed, const char message);
    char RSADecryptString(const char privFilename, const char *ciphertext);
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_encripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePublica, jstring semilla)
         try
              char *ciphertext = RSAEncryptString(ubicacionLlavePublica, semilla, texto);
              delete [] ciphertext;
              return(ciphertext);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    JNIEXPORT jstring JNICALL
    Java_ApiEncriptacion_desencripta(JNIEnv *env, jobject obj, jstring texto, jstring ubicacionLlavePrivada)
         try
              char *decrypted = RSADecryptString(ubicacionLlavePrivada, texto);
              return(decrypted);
         catch(CryptoPP::Exception &e)
              return ("");
         catch(std::exception &e)
              return ("");
         catch(...)
              return ("");
    int main()
         return(0);     
    void GenerateRSAKey(unsigned int keyLength, const char privFilename, const char pubFilename, const char *seed)
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         RSAES_OAEP_SHA_Decryptor priv(randPool, keyLength);
         HexEncoder privFile(new FileSink(privFilename));
         priv.DEREncode(privFile);
         privFile.MessageEnd();
         RSAES_OAEP_SHA_Encryptor pub(priv);
         HexEncoder pubFile(new FileSink(pubFilename));
         pub.DEREncode(pubFile);
         pubFile.MessageEnd();
    char RSAEncryptString(const char pubFilename, const char seed, const char message)
         FileSource pubFile(pubFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Encryptor pub(pubFile);
         if (strlen(message) > pub.MaxPlainTextLength())
              cerr << "message too long for this key\n";
              abort();
         RandomPool randPool;
         randPool.Put((byte *)seed, strlen(seed));
         char outstr = new char[2pub.CipherTextLength()+1];
         pub.Encrypt(randPool, (byte *)message, strlen(message), (byte *)outstr);
         HexEncoder hexEncoder;
         hexEncoder.Put((byte *)outstr, pub.CipherTextLength());
         hexEncoder.MessageEnd();
         hexEncoder.Get((byte *)outstr, 2*pub.CipherTextLength());
         outstr[2*pub.CipherTextLength()] = 0;
         return outstr;
    char RSADecryptString(const char privFilename, const char *ciphertext)
         FileSource privFile(privFilename, true, new HexDecoder);
         RSAES_OAEP_SHA_Decryptor priv(privFile);
         HexDecoder hexDecoder;
         hexDecoder.Put((byte *)ciphertext, strlen(ciphertext));
         hexDecoder.MessageEnd();
         SecByteBlock buf(priv.CipherTextLength());
         hexDecoder.Get(buf, priv.CipherTextLength());
         char *outstr = new char[priv.MaxPlainTextLength()+1];
         unsigned messageLength = priv.Decrypt(buf, (byte *)outstr);
         outstr[messageLength] = 0;
         return outstr;

  • Servlet on tomcat 4.1.18

    I am facing a problem of running servlets on Tomcat 4.1.18. The problem seems to be in the configuration. In the webapps folder, I created a folder greeting. In that, the WEB-Inf\classes folder has GreetingServlet.class.
    webapp\greeting has index.html that has to FORM ACTION set to /greeting/servlet/GreetingServlet.
    On clicking the submit button the message I get is that the resource /greeting/servlet/GreetingServlet is not found.
    Can anybody help in configuring the server so that the above mentioned servlet gets recognized?
    Thanks.
    Amitabh.
    [email protected]

    My application is located at %TOMCAT_HOME%\webapps.
    %TOMCAT_HOME%\webapps\greeting\WEB-INF\web.xml has the following:
    <web-app>
    <servlet>
    <servlet-name>greeting</servlet-name>
    <servlet-class>GreetingServlet</servlet-class>
    </servlet>
    </web-app>
    %TOMCAT_HOME%\webapps\greeting\index.html has the following:
    <FORM ACTION="/greeting/servlet/GreetingServlet" METHOD="POST">
    <P> Your name <INPUT TYPE="text" SIZE="40" NAME="name"></P>
    </FORM>
    Yet the problem persists.
    Have I missed some point?
    Help/assistance will be appreciated.
    Thanks.
    Amitabh.
    [email protected]

  • Servlets in Tomcat

    I am trying to run servlets using Tomcat. I have them working and displaying but as soon as I make a change to a servelt and re-compile and refresh the browser the change do not take effect. I have to shutdown and restart tocat. Surely this can't be right. can anyone help with correcting this problem?

    Lesta,
    For convenience there's a Tomcat admin console. The admin console runs through a web browser and allows you to restart an application, restart a context ect. I think you can also install or reinstall entire ears through it now.
    There's some setup to do before you can use the admin console. I seem to remember there being an XML user/password file somewhere...
    In a production environment you don't want to shutdown and restart the daemon like you are doing. It will just annoy the heck out of your users.
    Hope this helps.
    -Bryan

  • How to Run servlet in Tomcat 5.5.9

    hi
    How to run servlet in tomcat 5.5.9?how to set context path in server.xml of conf folder in tomcat since there is no context tag in server.xml.
    Jiten

    Hi ! I have a similar problem, well, it's along the same line ...
    I'm using NetBeans 4.1, and i've coded a servlet. Using NetBeans to launch my servlet (with the bundled Tomcat 5.5.7) works fine, however i need to deploy my application unto a Tomcat 5.5.9 server.
    Thus, i copied the WAR file generated by NetBeans into the Tomcat 5.5.9 webapps directory, and Tomcat expands it.
    Problem is when i run my JSP pages with the form tags, they do not work on the Tomcat 5.5.9 environment. Anyone knows why?
    (These work on the NetBeans Tomcat bundle 5.5.7)
    My form action :
    <form name="index" method="get" action="PageServlet">
    My web.xml :
    <servlet>
    <servlet-name>PageServlet</servlet-name>
    <servlet-class>application.PageServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>PageServlet</servlet-name>
    <url-pattern>/PageServlet</url-pattern>
    </servlet-mapping>
    I'm really stumbed on why it doesn't work in Tomcat 5.5.9, any help is greatly appreciated, thanks in advance ^_^

  • Servlet crashes TOMCAT

    I am experimenting with buffered images in a servlet. This "Hello World" servlet crashes TOMCAT.
    java version "1.4.1"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1)
    Java HotSpot(TM) Client VM (build 1.4.1, mixed mode)
    JAVA_OPTS '-Xmx512m -Djava.awt.headless=true'
    ----servlet begins----
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.image.*;
    import Acme.JPM.Encoders.GifEncoder;
    public class MijnPollServlet extends HttpServlet
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    doPost(req,res);
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    BufferedImage image=
    new BufferedImage(100,100, BufferedImage.TYPE_INT_RGB);
    Graphics2D g2 = image.createGraphics();
    g2.setColor(Color.blue);
    g2.fillRect(25,25,50,50);
    g2.drawString("Hello World!", 10, 10);
    ServletOutputStream out = res.getOutputStream(); // binary output!
    res.setContentType("image/gif");
    GifEncoder encoder = new GifEncoder(image, out);
    encoder.encode();
    ----servlet ends----
    If I run the servlet with the "g2.drawString("Hello World!", 10, 10);"
    commented out there is no problem.
    Is there something I am missing here?
    Thank you,
    -William

    The whole Tomcat crashes, and no exception
    displayed.
    Do I have to write the log file, or it's kept by
    Tomcat itself?yes, tomcat writes a log file, you find it in the tomcat dir. but it's just very highlevel. Having a look in it could help.
    Is there a way to write a log file by myself?sure. you could get the log file from tomcat by getting it from the ServletContext:
    ServletContext = getServletContext();
    ServletContext.log("text to log");
    When I view the output window in Forte, it doesn't
    even write that Tomcat crashed.
    I use Tomcat that is installed with the last version
    of Forte(Sun 1 Studio, update 1), I guess it's the
    last version of Tomcat also.No. The lastest is 4.1.12 and i guess it's 4.0.4 with forte.
    Get Tomcat standalone from jakarta.apache.org and try to run your servlet with the standalone tomcat. this could help since i also expirenced problems sometimes with the forte-integrated tomcat.

  • How to run servlet with tomcat

    I have a probrom that how can I run servlet with tomcat?
    I have new a folder classes in webapps\root\WEB-INF\,and put the .class
    programme in it ,but http://localhost:8080/servlet/HelloWorldExample
    can't run ,it give me a error than http:404 not found.
    could you tell me how i can solve the problem.
    Thank u very much.

    Hi,
    Make sure the class is in classpath or in WEB-INF/classes folder and make an entry for servlet tag in web.xml in WEB-INF folder.
    Regards

  • Connecting a servlet in tomcat with a database

    Hello i have this problem, i have an aplication that connects to a database, but when a servlet in tomcat use it, i get the problem that the connection is null and you can't connect to it. Anyone know something about this? i have to change any parameter in tomcat to get access to a database??
    Thanks

    Hello i have this problem, i have an aplication that
    connects to a database, but when a servlet in tomcat
    use it, i get the problem that the connection is null
    and you can't connect to it. Anyone know something
    about this? i have to change any parameter in tomcat
    to get access to a database??First of all, you should post the relevant portion of your code to explain what your problem is.
    Second, I am dead against writing JDBC code within servlets. But that's something you would be reading in subsequent posts.

  • Problem in configuring Apache Tomcat Server

    Hi, I am facing problem in configuring Apache Tomcat server. I have downloaded its version 4.1.18 from the Internet. After unzipping and installing it, I have enabled the Root Context, enabled the Invoker Servlet, haven't changed the port to 80 from default 8080, have turned on the Servlet Reloading, have set the Java_Home variable in autoexec.bat, and have changed the DOS memory setting to 4096.
    Also, the concerned lines in my autoexec.bat file look like this:
    path c:\windows;c:\windows\command;c:\jdk1.2;c:\jsdk2.0;
    c:\JavaWebServer2.0;c:\jakarta-tomcat-4.1.18
    set java_home=c:\jdk1.2
    set tomcat_home-c:\jakarta-tomcat-4.1.18
    set classpath=.;c:\ServDevel;.;c:\jakarta-tomcat-4.1.18\common\lib\servlet.jar;.;c:\jsdk2.0\lib\servlet.jar;.;
    Still, after having done all this, when I start the server using startup.bat (which happens without any problems) and type in http://localhost:8080/ on the browser to test the server, nothing happens. It doesn't show me the Tomcat Welcome screen. I get an error page saying "This page is not available". Why? Where am I going wrong?
    Sushant

    1) Try http://127.0.0.1:8080
    2) set tomcat_home-c:\jakarta-tomcat-4.1.18
    Is the minus-sign after tomcat_home also in the autoexec.bat?
    Replace it with an equals-sign
    3) When you run startup.bat, is a new command window opened and are the following three lines displayed at the end? It should stay open, otherwise something is wrong (unless running as a service).
    INFO: Initializing Coyote HTTP/1.1 on port 8080
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.18

  • Just can't run HELLOWORLD servlet on Tomcat!

    Hi there, I worked with servlets all summer long and now I'm getting back to build one, and I'm totally confused... My problem's there :
    I try to run a simple HelloWorld servlet on Tomcat 4.1, and I get a 404 Error - Not found
    Well, here's the structure of my web application, contained in simpleservlet.war :
    WEB-APP
    -web.xml
    -CLASSES
    -servlet.class
    -LIB
    -servlet.jar
    Here's now the content of the web.xml file :
    <web-app>
         <servlet>
              <servlet-name>serv</servlet-name>
              <servlet-class>servlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>serv</servlet-name>
              <url-pattern>/test</url-pattern>
         </servlet-mapping>
    </web-app>
    AND FINALLY here's how I invoke my servlet, I TRIED :
    http://localhost:1977/servlet/test
    AND ALSO
    http://localhost:1977/test
    AND BANG, I GET "ERROR 404 - NOT FOUND"
    A little help would be appreciated A LOT, well it's not supposed to be a hard problem... and by the way, I'm using port :1977, the problem's not there though.
    regards, Pierre

    Hi,
    First try http://localhost:1977 and see if you are getting Tomcat. As you said, this is not a problem. So, you should get the index.html of the Tomcat. Now, click on the one of the example. From the Address Bar, you will know the path of this example. Try putting your page at that location and then run.
    This should work.
    -- Ashish.

  • Servlets on Tomcat

    Is there a limit to the number of servlets that Tomcat can have and service before it refuses to acknowledge an additional servlet?

    OK. You are correct. I have found the solution to my problem.
    There is a file under Tomcat/webapps/yourfoldername/web-inf called web.xml
    This file has to contain 2 entries for every servlet processing information from a web page. If the servlet isn't listed in this file, it is not found by the web page.
    Simple concept. Simple answer. Took me 5 days of searching to figure it out, though. Whew!! I inherited this app and this is the 1st new servlet I've had to add - although loads of other classes and jsp have been added and changed up to now.
    Hopefully this will help someone else.

  • How to run a servlet in tomcat 5.0.

    Hi all,
    how to run a servlet in tomcat 5.0
    please tell me the entire procedure....(directory structure)
    step by step....

    hi :-)
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html
    or
    http://www.google.com.ph/search?hl=en&q=java+servlet+tutorial&btnG=Google+Search&meta=
    regards,

Maybe you are looking for

  • Previous iPad allowed me to use an adapter to download pics on a sd card, I don't find an adapter for the new IPad. Is there one available?

    Previous iPad allowed me to use an adapter to download pics from an sd card. I can't find one for the new IPad. Is there one available? Any other way to do this?

  • Can someone explain to me in laments terms this SQL

    work_days_status := TO_NUMBER (SUBSTR (REPLACE (work_days, ','), CASE WHEN MOD (v_loop_counter, 7) = 0 THEN 7 ELSE MOD (v_loop_counter, 7) END, 1 I'm looking through a new database and dont really understand what MOD is, if someone could explain on v

  • OCE 10g - RAC 10g Certification

    Hello all; I have passed on all courses for OCP 11g certification (1z0-051, 1z0-052 and 1z0-053). I just scheduled my ADM 11g WORKSHOP II to november, 21th, in order to submit the course form, and get my OCP certification. I have passed today on RAC

  • Billing status overview

    I have created sales order delivery and billing document. its account document has already been created too. And when i check in delivery ( VL02N ) status overview, billing status is A:being processed. I have made this delivery by batch split.And it

  • Possible to disable optical drive?

    My 1st generation MBP is a bit worn, as evidenced by the nice arc the bottom half now makes if you look at it straight on from the front. As a result of this, it seems that the CD drive cannot eject anymore (I've taken it to the Apple store, had outs