Web.xml problem in tomcat web hosting site

Hi i need help in this... its urgent
currently i just subscribe to a web hosting site and i need to start the private tomcat in the web server..
The followings are the instructions and i have follow them but i do not know how to create a web.xml file to store in the folder indicated for example a HelloServlet that im testing :
To setup servlet, you need to configure servlet into the file web.xml which needs to be placed in /var/www/html/WEB-INF directory.
www root directory or webapps:/var/www/htm
Classes directory located in: /var/www/html/WEB-INF/Classes/
There you will need to upload your Java class file.
Our default url-mapping for servlet is: /servlet/*
To check servlet in your browser: www.mydomain.net/servlet/HelloWorld
Jsp Files - Upload anywhere in /var/www/html
all the above steps are follow except the web.xml file which i suppose to write and store in the folder... but i actually try to write one but i still cannot load my servlet on the webpage... test on standalone tomcat works.
pls help its urgent!!!

Please don't cross post
http://forum.java.sun.com/thread.jsp?thread=500509&forum=45&message=2366915

Similar Messages

  • Web.xml problem in Enterprise Manager 10g

    I got an error while deploying to Enterprise Manager 10g
    My platform: Windows XP
    OC4J 9.0.4
    Enterprise Manager 10g
    And I even have the web.xml in the correct directory. i.e
    cpd.ear
    ./META-INF/application.xml
    ./cpd-ejb.jar/WEB-INF/web.xml
    ./cpd-webapp.war/WEB-INF/web.xml
    ./cpd-webapp.war/WEB-INF/classes
    The error I get while deploying on a Enterprise Manager 10g is:
    Invalid J2EE application file specified - Jar file: :\WINNT\TEMP\jar47575.tmp is missing its standard xml descriptor located at WEB-INF/web.xml
    Incidently the *.ear file built by my fellow's machine is deploying perfectly. I've compared the directories n useful files of both the *.ears down to the very last bit n they are the same.
    I can imagine that guys with only high IQ can solve this mystery

    The above message is a duplicate of another message by Sim.
    web.xml problem in Enterprise Manager 10g

  • Web.xml problem in web hosting site

    Hi i need help in this... its urgent
    currently i just subscribe to a web hosting site and i need to start the private tomcat in the web server..
    The followings are the instructions and i have follow them but i do not know how to create a web.xml file to store in the folder indicated for example a HelloServlet that im testing :
    To setup servlet, you need to configure servlet into the file web.xml which needs to be placed in /var/www/html/WEB-INF directory.
    www root directory or webapps:/var/www/htm
    Classes directory located in: /var/www/html/WEB-INF/Classes/
    There you will need to upload your Java class file.
    Our default url-mapping for servlet is: /servlet/*
    To check servlet in your browser: www.mydomain.net/servlet/HelloWorld
    Jsp Files - Upload anywhere in /var/www/html
    all the above steps are follow except the web.xml file which i suppose to write and store in the folder... but i actually try to write one but i still cannot load my servlet on the webpage... test on standalone tomcat works.
    pls help its urgent!!!

    Please don't cross post
    http://forum.java.sun.com/thread.jsp?thread=500509&forum=45&message=2366915

  • JSP file not found. server.xml/web.xml problem?

    Hi there,
    I have a login.jsp that accepts username and password. Once login is approve, it calls main.jsp file as follows using <jsp:forwards>:
    if (login != null){
    out.println("Login Successful!");
    session.setAttribute("sessionUsername", username);
    session.setAttribute("sessionPassword", password);
    out.println("session started!");%>
    <jsp:forward page="main.jsp" />
    Problem is that the server returns "file not found", when I'm sure the main.jsp is right there! I suspect there is some configuration problem with the Tomcat, but I donno what. Do I need to edit the server.xml or web.xml, coz I didn't?

    please check that the jsp file to which you are forwarding the request exist at the same location where forwarding jsp exists.

  • Web.xml problem and using of FrontController Pattern

    I use FrontController pattern and created servlet ControllerServlet.
    I want that when users open my site (for example mysite.com) all requests goes to controller? and even when users enter diretc path to jsp or servlet all requests were sent to ControllerServlet.
    in my As I read in "Java Servlet and JSP CookBook" for this I have to write in web.xml file such code:
    <servlet-mapping>
      <sevlet-name>ControllerServlet</servlet-name>
      <url-pattern>/*</url-pattern>
    </sevlet-mapping>so any requests will be sended to my controller servlet.
    But now I have other problem. How I have to call my jsp pages? When I use RequestDispatcher and forward reques to jsp pahe login.jsp, I have error because this request again redirects to controller.
    PS For calling servlet I have solve of this problem I just have to add to web.xml file security-constraint element for needed servlets.

    You really shouldn't have to map all urls to your ControllerServlet. Set the welcome file in the web.xml to open index.html and in index.html use JavaScript to direct the page to the ControllerServlet. Now as long as you only do RequestDispatcher forwards (no sendRedirects), all hyper links point to the ControllerServlet and all form actions point to the ControllerServlet you are okay. The reason is that the user will nevr see anything else in the browser address other than the ControllerServlet url and should never know the url of any other JSP or Servlet to request them directly.

  • Web.xml problem ????

    This is my web.xml file :==>
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
    <servlet>
    <servlet-name>chatAdmin</servlet-name>
    <servlet-class>ChatAdminServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>chatRoom</servlet-name>
    <servlet-class>ChatRoomServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>listRooms</servlet-name>
    <servlet-class>ListRoomsServlet</servlet-class>
    </servlet>
    <context-param>
    <param-name>ADMIN_PATH</param-name>
    <param-value>/ChatApplication/servlet/chatAdmin</param-value>
    </context-param>
    <context-param>
    <param-name>LISTROOMS_PATH</param-name>
    <param-value>/ChatApplication/servlet/listRooms</param-value>
    </context-param>
    <context-param>
    <param-name>CHATROOM_PATH</param-name>
    <param-value>/ChatApplication/servlet/chatRoom</param-value>
    </context-param>
    </web-app>
    Error after starting Tomcat in above file:-
    Starting service Tomcat-Standalone
    Apache Tomcat/4.0.1
    PARSE error at line 38 column 11
    org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,
    distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page
    *,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
    Starting service Tomcat-Apache
    Apache Tomcat/4.0.1
    I am not getting where is error exactly please inform .

    <web-app>
    <servlet>
    <servlet-name>chatAdmin</servlet-name>
    <servlet-class>ChatAdminServlet</servlet-class>
    </servlet>[snip]
    <context-param>
    <param-name>ADMIN_PATH</param-name>
    <param-value>/ChatApplication/servlet/chatAdmin</param>
    </context-param>
    [snip]
    org.xml.sax.SAXParseException: The content of element
    type "web-app" must match
    "(icon?,display-name?,description?,
    distributable?,context-param*,servlet*,servlet-mapping*
    session-config?,mime-mapping*,welcome-file-list?,error-
    ageThe error message specifies exactly what is wrong -- namely your context-param tags need to come before your servlet tags which need to come before your servlet-mapping tags, etc...
    ncuka

  • Automate creation of web.xml file for tomcat 4.1.29

    hi , this is with ref to Tomcat 4.1.29, if i am correct, each Servlet in the application has to be mentioned in the web.xml file for the Tomcat to know about it. Is there any way to automate the creation of web.xml file , depending on the contents of the Servlet folder of the application. Any way to escape from writing each Servlet name in web.xml file.
    rc

    Hello,
    Maybe you should check if you can use Ant tool to do
    that. I am not sure if it can help u.
    Zeph.
    http://ant.apache.org/
    It will, specially if used in conjunction with XDoclets :
    http://xdoclet.sourceforge.net/
    XDoclet has Ant tasks to generate web.xml files.

  • Where is the web.xml file in Tomcat 5.5

    hi folks,
    i made a small appl in Tomcat 5.5 named "Name". I made a WEB-INF folder inside the Name folder (which obv is inside the webapps folder), which inside had the classes and lib folder. After running the application where do i look for the web.xml file controlling my appl?
    thanx in advance..

    well, the web.xml file must be done for you. Its specific to your project, you wont find in on other folders of tomcat.

  • Descriptor web.xml problem !!

    Hi!, I`m trying to create a .war file that contains a group of .jsp files and another group of EJB(Session Beans).
    The problem is that i dont know what things i have to put in the web.xml file. I only found examples with 1 EJB and servlets(No JSP !!), but it doesnt help me.
    Does anyone know which must be the structure of the file ?. I even dont know if all the information about the EJB's and JSP's must be in the web.xml file or in other files if i want to create a unique .war archive.
    Thanks a lot !!!
    CristiAn.

    If you want to have EJBs, servlets and jsps together in one file, then you should create an ear file. War files are used only for web applications, that contain jsps and servlets only.
    Check : http://java.sun.com/j2ee/1.4/docs/tutorial/doc/WebApp.html
    and http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Ebank.html.
    Regards,
    D.

  • Forte & web.xml problem

    Hi there,
    I hope what I have is a simple problem to fix. I'm running Forte For Java 4 and developing a web application. When I run a servlet (although it works fine) I am getting a run-time error:
    ContextConfig[] Configuration error in application web.xml
    java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name ChooseUnit
    This has something to do with the fact that I renamed one of my servlets and it didn't update web.xml (when I ran this servlet, it kept trying to use the servlet's old name in the URL). I went into web.xml and added this servlet's new name manually but it still didn't work, so I deleted the offending servlet, making sure that its servlet mappings were also gone from web.xml.
    I then made a new servlet of a different name, and every time I run it I get the above error, even though the servlet name in the error no longer exists, nor any reference to it in web.xml.
    Anyone got a suggestion as to how to fix this? It seems to be a bug particular to Forte.
    Thanks.
    Gillian Klee

    Never mind, it seems to have sorted itself out with a reboot.

  • How to setup web.xml files in Tomcat 4.0.6

    Hi, I'm to new to Java Servlets. i am trying to run my first servlet but it's not showing up..can anyone help me out please!!!
    I created a folders like this:
    webapps/sumitapps/WEB-INF\classes\Forms\login.class
    under sumitapps: i'm puttin all of my .html files(Logins.html)
    under WEB-INF: i put web.xml file and classes folder
    <?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/dtd/web-app_2_3.dtd">
    <web-app>
    <servlet>
    <servlet-name>login</servlet-name>
    <servlet-class>Forms.login</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>login</servlet-name>
    <url-pattern>/Forms.login</url-pattern>
    </servlet-mapping>
    </web-app>
    <Context path="/sumitapps" docBase="webapps/sumitapps" crossContext="true" debug="0" reloadable="true" trusted="false" >
    </Context>
    under my classes folder i put folder Forms where i'm keeping all of my .class files. my class file name is login.class
    can anyone tell me why i cant run my servlets
    <FORM method="POST" action="Forms.login"
    name=userinfo onsubmit="return checkData()">
    please help me out here
    i can access my html page like this:
    http://lcoalhost:8080/sumitapps/Logins.html
    but when i enter userid and password it doesnt show anything..it takes me to http://localhost:8080/sumitapps/Forms.login
    and shows cannot be displayed

    have a look at www.moreservlets.com. There you can find a free pdf (part of the book, a whole chapter) that explains in deep the use of web.xml.

  • JDev 10.1.3 Preview Create orion-web.xml Problem

    When I use JDev 10.1.3 to create an orion-web.xml file, it generates something like this:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <orion-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-web-10_0.xsd" schema-major-version="10" schema-minor-version="0" servlet-webdir="/servlet/"/>
    Shouldn't it create something without the closing "/>" marker on the <orion-web-app> line?
    9.0.5 did something like:
    <orion-web-app servlet-webdir="/servlet/">
    </orion-web-app>

    If the orion-web-app element does not have sub-elements
    <orion-web-app servlet-webdir="/servlet/"/>
    is equivalent to
    <orion-web-app servlet-webdir="/servlet/">
    </orion-web-app>

  • Using Variable in Web.xml/ Override value in web.xml

    Environment : JBOSS 4.2 / Web application in java/jsp
    *==============================================================*
    Iam using a servelet in application, and paremeters is configured in web.xml at run time I need to change the value. A variable
    see web.xml
    {color:#ff0000}<param-value>C:/FILE_ATTACHMENTS{color}</param-value>
    Instead of using a static folder name I need to use a variable, this veriable either i define in config.properties or ineed to pass through application
    Web.Xml file
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="2.4" xmlns="[http://java.sun.com/xml/ns/j2ee]" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance]" xsi:schemaLocation="[http://java.sun.com/xml/ns/j2ee] [http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd]">
    <display-name>VyasaWeb</display-name>
    <servlet>
    <servlet-name>VyasaServlet</servlet-name>
    <servlet-class>com.jsos.download.VyasaServlet</servlet-class>
    <init-param>
    <param-name>dir</param-name>
    param-value>C:/FILE_ATTACHMENTS</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>VyasaServlet</servlet-name>
    <url-pattern>/servlet/VyasaServlet</url-pattern>
    </servlet-mapping>
    </web-app>
    Is any way to use variable in web.xml or override the value ?
    Please help
    Vince
    Edited by: VINCEJOHNSON on Jul 30, 2010 3:30 PM

    If nothing else, why not just have your servlet load a configuration file on startup?

  • Class not found problem in Tomcat Web app

    Hi,
    I created a Web Service using JWSDP. I want to invoke a Web service method from my servlet. It works fine on Win NT Workstation, but on Windows 2000 it gives class not found error because it fails to pick up the jars that come with the pack in common\lib directory. I copied the jars to all possible lib paths as below, but looks like there's something wrong with the class loader. This problem comes in all our win2k machines. Does anyone have any clue about this.
    /WEB-INF/lib/*.jar of your web application
    $CATALINA_HOME/common/endorsed/*.jar
    $CATALINA_HOME/common/lib/*.jar
    $CATALINA_HOME/shared/lib/*.jar
    Thanks in advance,
    Sriram.

    If it can't find servlet.jar in the Tomcat dir, you should do what I did. I copied servlet.jar to C:\j2sdk1.4.0_01\jre\lib\ext\servlet.jar
    Then I added that to my CLASSPATH, and it finally found servlet.jar (it never found it in the Tomcat folder where it was).

  • Problem starting Tomcat web server in Ubuntu.

    Hi every one,
    I use Ubuntu OS.I have installed J2sdk.I want to start tomcat webserver but whenever i start the server I get an error as
    '/usr/share/tomcat/bin/catalina.sh: line 41: setJava: No such file or directory'
    I tried removing the line, to find out the cause of that error.When I removed line 41 , it showed JAVA_HOME variables not set.
    I have set JAVA_HOME varible as
    '/usr/lib/j2sdk1.5-sun/bin/javac/usr/lib/j2sdk1.5-sun/bin/'
    line 41 is '. setJava --devel Java2'
    Could anyone help me to solve this issue?
    And Thanks in advance
    -Jegan

    I use Ubuntu OS.I have installed J2sdk.I want to start tomcat webserver but whenever i start the server I get an error as
    '/usr/share/tomcat/bin/catalina.sh: line 41: setJava: No such file or directory'
    I tried removing the line, to find out the cause of that error.When I removed line 41 , it showed JAVA_HOME variables not set.
    I have set JAVA_HOME varible as
    '/usr/lib/j2sdk1.5-sun/bin/javac/usr/lib/j2sdk1.5-sun/bin/'
    line 41 is '. setJava --devel Java2'
    Could anyone help me to solve this issue?
    And Thanks in advance

Maybe you are looking for

  • My iPhone 4S doesn't work again after iOS 6 recent update

    Hi. There was another upadate of the iOS and here I am again. That's the third not the second time actually and it always happend after iOS update. Today I decided to upgrade my iOS 6.1 to 6.1.1. and my iPhone got stuck. Recently, after some 10 hours

  • Flash crashes every time I open an fla file

    I installed a trial version of Flash CS3. I had a Flash 8 Professional already installed. Every time I tried to open a fla it crashed, so I uninstalled both versions and reinstalled. I still have the same problem. I can't open existing fla files or c

  • Bind variables problem, very urgent

    hi, Oracle gurus, In my current project while executing the following ststement i am getting the run time error"ORA-01008: not all variables bound". This statement is used inside of a procedure and some bind arguments have values and some arguments h

  • Where are imported shared libraries defined

    in system-application.xml, the imported-shared-libraries are defined as : <imported-shared-libraries> <import-shared-library name="oracle.dms"/> <import-shared-library name="oracle.jdbc"/> and these are used in server.xml like: <import-shared-library

  • Problems with ratio when onlining

    Having cut my project at photo-JPEG quality offline, I've onlined the sequence using media manager at DV quality. My sequence settings are fine, however my clips are being cropped in the timeline - rather then being 16:9 the side edges are cropped sl