Running Servlet with J2EE Web Server

Hi experts
My web server is J2EE. I have compiled the servlet classes and have put them in the web-inf/classes directory. I have also declared the servlets in the web.xml file in the web-inf directory.
When I run this, it gives error HTTP Status 404 - /fijidirectory.
Experts can you help me with this pliz.
Deepak

Now the code looks like this.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <display-name>J2EE Servlet Config</display-name> 
  <servlet>
    <servlet-name>dirinterface</servlet-name>
    <servlet-class>DirectoriesInterface.DirInterface</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>dispplaydirinfo</servlet-name>
    <servlet-class>DirectoriesInterface.DispplayDirInfo</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>fijidirmain</servlet-name>
    <servlet-class>DirectoriesInterface.FijiDirMain</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>whitedirinterface</servlet-name>
    <servlet-class>DirectoriesInterface.whiteDirInterface</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>dirinterface</servlet-name>
    <url-pattern>/FijiDirectory</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>dispplaydirinfo</servlet-name>
    <url-pattern>/dirInfo</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>fijidirmain</servlet-name>
    <url-pattern>/fiiidirectory</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>whitedirinterface</servlet-name>
    <url-pattern>/whfd</url-pattern>
  </servlet-mapping>
</web-app>
The url that I am using to access the system is: http://localhost:8080/whfd

Similar Messages

  • Question on Running Servlet on a Web Server

    Hi,
    I got an example servlet here:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldServlet extends HttpServlet {
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<body>");
    out.println("<head>");
    out.println("<title>Hello World!</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("<h1>Hello World!</h1>");
    out.println("</body>");
    out.println("</html>");
    I compiled this into HelloWorldServlet.class and sent it to a web server. How can I use a web browser to check if it is running on the web server? I am supposed to see "Hello World" in my browser, right?
    Do I need to run J2EE server on the web server?
    Many thanks in advance.
    yaol

    Must to have Apache Tomcat. Take a look at http://www.webmasterbase.com/article/305 .

  • Do i need a network card to install and run a local java web server

    Friends,
    Do i need a network card in my computer to install and run a local Java Web Server or any Web Server.

    network cards are only for connecting equipment together... you can set up a webserver without any more equipment than you have already! Indeed Tomcat... BUT you would be better off with apache for production stuff. It depends what you need to serve... if its mainly static pages (i guess it probably isn't) then apache will be enough by itself; but if you need to serve dynamic pages (JSP, Servlet blah blah) then you will need tomcat. Tomcat has it's own webserver and its perfectly ok for testing or low-load stuff, but you can integrate with Apache (a moderately compex task, but do-able, see tomcat-user forum off of apache site) for greater stability, and you don't have to show the port in the URL... Don't set up a webserver on any pc that contains stuff you don't want hacked into... it becomes very succeptible when the service is up...

  • How to run servlet in J2EE

    Hi I am evaluating J2EE. I am wondering if it is possible to run Servlets on J2EE that works just like under servlets 2.2, i.e.: I can use:
    http://servername/servlet/HelloWorldServlet
    without add any servlet mappings into the web.xml file.
    Or is there a tool that can automatically generate the web.xml file?
    Any help is appreciated. Thanks.

    You can use the J2EE deploytool to generate the web.xml file. Deploytool is a GUI app that lets you specify the context and alias for the servlet, along with many other parameters.
    There is some documentation at
    http://java.sun.com/j2ee/j2sdkee/techdocs/guides/ejb/html/Client4.html#11442

  • 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

  • Could not load servlet information from web server

    I am trying to register a servlet through the web object manager.
    As soon as click the web object manager menu pick I get the following
    error: Could not load servlet information from web server.
    On other peoples machines here it works fine and they can register
    servlets. What am I missing!

    You must be using Jdev 3.2.x, this is a known bug. In Jdev 9.0.2 we use the standard J2EE web.xml in order to register servlets. You should consider moving to the new IDE.

  • The tab is bad with apache web server and tomcat

    the tab not run with apache web server + tomcat.
    It is very bad..

    Fijate que solo he estado experimentando con JSC, no he tenido oportunidad de poner nada en producci�n usando la combinaci�n Apache Web Server y Tomcat JSP container y no cuento en �ste momento con �sta configuraci�n para probar.
    Nosotros (en donde trabajo) usamos IBM Web Server (basado en Apache Web Server 2), IBM Websphere 6 y las aplicaciones JSF en producci�n est�n hechas con Rational Web Developer.
    Ahora he estado muy ocupado con un proyecto urgente, si tengo alg�n tiempo libre la semana entrante tratar� de probar tu combinaci�n (no te prometo nada) pero para ello necesito que me digas las versiones que est�s usando de Apache Web Server y de Tomcat, como est�s enlazando entre ambos con un m�dulo o con ProxyPass y mejor si me mandas el httpd.conf.
    Saludos.

  • Dreamweaver cs4 come with a web server or web app server ?

    dreamweaver cs4 come with a web server or web app server ? Or
    can be configured [has menues for] web server local ? When running
    a server localhost
    http://localhost/... , this can be
    run/view a file[in local server] without an internet connection ?
    yes without / no needed ?

    123polis123 wrote:
    > dreamweaver cs4 come with a web server or web app server
    ? Or can be configured
    > [has menues for] web server local ? When running a
    server localhost
    >
    http://localhost/... , this can be
    run/view a file[in local server] without an
    > internet connection ? yes without / no needed ?
    Dreamweaver does not ship with a web server, you have to
    install one, or activate one on your system (IIS or Apache for
    Widows and Apache for Mac are the common choices). When you define
    a site within Dreamweaver you can specify a testing server, as well
    as a remote server. If the testing server and/or remote server are
    available to your system without an internet connection, then you
    can certainly test pages through the web server such as through
    http://localhost/
    If you are creating HTML pages, then there is no need for a
    server at all for creating and testing your pages, but if you are
    working with PHP or ColdFusion, then you will need a web server to
    work with.
    If you have follow up questions, you should ask in the
    Dreamweaver General forum (general Dreamweaver usage questions), or
    the Application Development forum (questions about dynamically
    generated pages), depending on what you're looking to do:
    DW General:
    http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=12&catid=189&entercat= y
    App Dev:
    http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid=12&catid=263&entercat= y
    Danilo Celic
    |
    http://blog.extensioneering.com/
    | WebAssist Extensioneer
    | Adobe Community Expert

  • Integrating tomcat 5.0.28 with apache web server 2.2

    hi all
    i tried a lot on net but could not get the steps for
    connctivity between tomcat 5.0.28 with apache web server 2.2.
    any one pzl do help me in finding the solution
    pzl do tel me the step by step process for this connectivity
    sus

    hi :-)
    you need jk modules ;-)
    i havent try the integrating the version of apache web
    and tomcat you specify but you can refer to the links below :-)
    gudluck :-)
    http://www.serverwatch.com/tutorials/article.php/2203891
    http://www.onjava.com/lpt/a/2826
    http://raibledesigns.com/tomcat/
    regards,

  • Problem with iPlanet Web Server 6

    We are getting an intermittent problem with our web server, the users start to get problems connecting to the web site.
    I have found the following message in the error log -
    failure ( 2390): Error accepting connection -5928, oserr=130 (Connect aborted)
    can anybody help???

    Check out the below.
    Problem 4680491. CSS causes oserr=130 in iWS 6.0 logs.
    Workaround
    If you are using the Cisco Content Services Switch (CSS) with Sun ONE Web Server and have set the value of the sticky bit setting in CSS to on, the following error is logged periodically in the error logs:
    failure ( 2210): Error accepting connection -5928, oserr=130 (Connect aborted)
    This is caused not by a defect in Sun ONE Web Server but by the setting of the sticky bit in CSS. To avoid the error logging, set the value of the sticky bit in CSS to off.
    Which as been fixed in iWS 6.0 SP5.
    For more info check the below link.
    http://docs.sun.com/source/816-6434-10/rn60sp5.html
    Dakshin.

  • Running Servlet in J2EE server

    hello friends
    i am very new to servlet technology, i create the servlet java file and complied it and using j2ee application server (1.4) i deploy it and put the war file at autodeploy file but i cant run it ,how i can use j2ee server for running the servlet, and i also used apache-tomcat-5.5.12 but i cant see any class folder at ROOT/webinf please help me

    I m not familiar with the j2ee server...
    But a bit with Tomcat...
    The tomcat 5.5.X is bit hard to configure..
    I hope you have successfully configured the Tomcat in your PC..
    in that you have to create a directory in
    <your tomcat base directory>/webapps/<yourdirectory>
    in that <yourdirectory>/, you have to create a new folder WEB-INF into which your class file has to go..
    your web.xml file should be placed in <yourdirectory>/
    Doing this is a bit hard to understand..
    I recommend you to use the latest version of NetBeans IDE ..
    it will come with a bundeled Tomcat...you can simply run your servlet files and deploy them very easily with it..

  • What am I doing wrong when running multiple applications with the Web Server enabled ?

    I am running multiple Vi's (applications) on the same Nt Workstation and the Web Server is enable for all applications. However, I am able to view only one Panel from the browser. Only the first application that is started can be viewed. What am I doing wrong ?

    Only one application can act as a web server at the default http port 80.
    To solve this either run all VIs into a single application or use different
    http ports for each application. For example an application can use the
    default port 80 and others use ports 8080, 8081, 8082 etc.
    In the browser, you enter the URL for non default ports as
    http://hostname:8080/...
    HTH
    Jean-Pierre Drolet
    "zemaitis" a ecrit dans le message news:
    [email protected]..
    > I am running multiple Vi's (applications) on the same Nt Workstation
    > and the Web Server is enable for all applications. However, I am able
    > to view only one Panel from the browser. Only the first application
    > that is started can be viewed. What am I doing
    wrong ?
    LabVIEW, C'est LabVIEW

  • Global data in a servlet using iPlanet Web Server

    Our configuration is an Applet->Servlet->JNI->C/C++ code.
    We have C code that does a number of lengthy mathematical calculations. This C code not only uses its own global variables but, it is also comprised of numerous subroutines that all call each other, reading and writing global C variables as they go. These globals are all isolated to the C code shareable object (.so) library that is included using the LoadLibrary call when the servlet is initialized.
    The problem is that in a multi-user environment (3-5 simultaneous users) we need to have each user have their own "copy" of the servlet (and the C code) so that users will not be accessing each other's global data. We can NOT have only one copy of the C code and define it as synchronized because the calculations that are performed can take a very long time and we can not hold off user requests while the firs user finishes.
    Our hope is that there is a way to configure the iPlanet Web server such that each new user that starts up a copy of the Applet/Servlet combination will get their own "space" so that they can work independently of any other user. We have at most 20 users of this system and only 3-5 simultaneous users so we should not have a problem with memory or CPU speed.
    If anyone has a solution, I would greatly appreciate it!

    The C library is shareable. But you don't want it to be shared. That's your question summarized, isn't it?
    You probably can't prevent it from being shared, so to prevent multiple use of it you would have to queue up the requests to be done one at a time. WynEaston's suggestion of having the servlet implement SingleThreadModel would help, but I believe the servlet spec allows servers to run multiple copies of a servlet that does that (as opposed to running a single copy in multiple threads).
    Your other alternative is to rewrite the math in Java, or at least in some object-oriented language where you don't need global variables (which are the source of your problem). All right, I can already hear you saying "But that wouldn't be as fast!" Maybe not, but that isn't everything. Now you have a problem in queueing theory: do you want a single server that's fast, but jobs have to wait for it, or do you want multiple servers that aren't as fast, but jobs don't have to wait? That's a question you would have to evaluate based on the usage of your site, and it isn't an easy one.

  • Problem running XSQLSERVLET on JAVA WEB SERVER

    THE BELOW LISTED SIMPLE XSQL QUERY WHEN RUN ON JAVA WEB SERVER 2 (WITH CLASSPATH/MAPPING SETTING AS IN INSTALLATION MANUAL) GIVES FOLLOWING ERROR:
    1. XML document must have a top level element.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsql:query xmlns:xsql="urn:oracle-xsql" connection="demo">
    SELECT 'Hello World' AS "GREETING" FROM DUAL
    </xsql:query>
    2. WHILE RUNNING INDEX.HTML FILE FROM JAVA WEB SERVER 2 IT GIVES FOLLOWING ERROR
    Oracle XSQL Servlet Page Processor 1.0.4.3 (Production)
    XSQL-017: Unexpected Error Occurred
    java.lang.IllegalArgumentException: sun.io.ByteToCharUTF-8
    at sun.io.ByteToCharConverter.getConverterClass(ByteToCharConverter.java:79)
    at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:109)
    at java.lang.String.(String.java:294)
    at java.lang.String.(String.java:313)
    at oracle.xml.xsql.XSQLUtil.XL(XSQLUtil.java:207)
    at oracle.xml.xsql.XSQLServletPageRequest.getParameter(XSQLServletPageRequest.java:139)
    at oracle.xml.xsql.XSQLActionHandlerImpl.variableValue(Compiled Code)
    at oracle.xml.xsql.XSQLActionHandlerImpl.getAttributeAllowingParam(Compiled Code)
    at oracle.xml.xsql.actions.XSQLIncludeXSQLHandler.init(XSQLIncludeXSQLHandler.java:46)
    at oracle.xml.xsql.XSQLDocHandler.handlerForAction(XSQLDocHandler.java:283)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(Compiled Code)
    at oracle.xml.xsql.XSQLPageProcessor.process(Compiled Code)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:715)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at com.sun.server.ServletState.callService(Compiled Code)
    at com.sun.server.ServletManager.callServletService(Compiled Code)
    at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423)
    at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79)
    at com.sun.server.http.stages.Runner.process(Runner.java:79)
    at com.sun.server.ProcessingSupport.process(Compiled Code)
    at com.sun.server.Service.process(Service.java:204)
    at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java:374)
    at com.sun.server.http.HttpServiceHandler.handleRequest(Compiled Code)
    at com.sun.server.HandlerThread.run(Compiled Code)
    null

    What jdk are you using ?
    I had this problem with 1.1.7

  • Help with running servlet with jakarta tomcat

    I had recently created a couple of java servlets and wanted to run them. I had put the .class files in Tomcat 4.1\webapps\Root\ then typed in http://localhost:8080/ then the servlet in the web browser. Here was the error page copied and pasted. If I put http://localhost:8080/servlet.class instead of http://localhost:8080/servlet I get a popup saying do I want to download the .class file. Theres probley a simple solution to this. Anyone know of any free hosts that will host servlets for free?
    HTTP Status 404 - /servlet
    type Status report
    message /servlet
    description The requested resource (/servlet) is not available.
    Apache Tomcat/4.1.18
    Thanks in advance
    George

    Hi I have the compiler jdk1.1.8 and wanted to upgrade my version. I downloaded the j2sdk1.4.1_01. I have the classpath set and everything. When I attempt to compile my java servlet it gives me an error but when I compile it with jdk1.1.8 it works.
    Isn't jakarta-tomcat-3.2.3 different compared the the one I have jakarta-tomcat4.1.18? Anyway thats what I read somewhere. The instructions you gave me do you think they are different because of us having different verions? I don't know if this is normal but whenever I startup my computer it just automaticly starts up tomcat server so when I put http://localhost:8080 it goes to the page saying I setup tomcat successfully. When I try to shutdown it doesn't do it.
    About the classpath. I thought i'm supposed to only put one path. So if I were to do that it would look like path set TOMCAT_HOME=C:\jdk1.1.8\Program Files\Apache Group\Tomcat 4.1 Thats how I would set it on my computer. I already installed and ran tomcat. I think your right I need to check the documentation correctly.
    Thanks in advance
    George

Maybe you are looking for

  • Error in info type 0001

    Hi all when hired an employee, while saving 0001 info type inpa40 system shows one error " Define a fiscal year variant first for company code 9369" anyone solve prob thanks and regards Seenu

  • How to get the output of Standard HR forms in PE51

    Hi Experts, How to get the output of standard HR forms available in PE51 Transaction for coutry grouping 99. Please advice. Regards, IFF

  • Can I sync iPhone with movies on another Mac?

    My main computer is a PB but I do not have enough space to store movies on this machine. iTunes on this machine has all my music but my movies are on another Mac (G5) on my network. Is it possible to get iTunes on my PB to see movies on my G5 so that

  • Event Triggered when a Report is generated

    Hi , When we execute a report is there a trigger which captures this event. I need to execute an APD once the report is executed. Could you please give me the name of the event when a report is generated?

  • Itunes with adobe photo shop5.0

    I am new to both products and want to know how to move a song or songs from itunes to a file so that i can xprot to adobe photo shop elements 5.0 and use with a slide show presentation. thanks for any help