Embedded Tomcat 5.5 return 404 for all request

I am starting embedded tomcat within a Java application, but it returns 404 when i request a existing static content html file. I have no idea why is that and there is no service using the port. Please advise.
File structures are as follow:
base directory: D:\AXIS
directory with index.html - D:\AXIS\webapps\root\
other existing dir
D:\AXIS\webapps\root\WEB-INF\lib\
D:\AXIS\webapps\root\WEB-INF\
debug level is set to 5 and following is the response of log screen when i request http://localhost:7070/index.html :
Command> HttpProcessor[7070][3] An incoming request is being assigned
HttpProcessor[7070][3] The incoming request has been awaited
HttpProcessor[7070][3] parseConnection: address=/127.0.0.1, port=7070
HttpProcessor[7070][3] Normalized: '/index.html' to '/index.html'
HttpProcessor[7070][3] Request is 'GET' for '/index.html' with protocol 'HTTP/1.1'
HttpProcessor[7070][3] Header accept = */*
HttpProcessor[7070][3] Header accept-language = en-us
HttpProcessor[7070][3] Adding locale 'en_US'
HttpProcessor[7070][3] Header accept-encoding = gzip, deflate
HttpProcessor[7070][3] Header user-agent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
HttpProcessor[7070][3] Header host = localhost:7070
HttpProcessor[7070][3] Header connection = Keep-Alive
StandardEngine[null]: Mapping server name 'localhost'
StandardEngine[null]: Trying a direct match
StandardHost[localhost]: Mapping request URI '/index.html'
StandardHost[localhost]: Trying the longest context path prefix
StandardHost[localhost]: Mapped to context ''
StandardContext[]: Mapping contextPath='' with requestURI='/index.html' and relativeURI='/index.html'
StandardContext[]: Decoded relativeURI='/index.html'
StandardContext[]: Trying exact match
StandardContext[]: Trying prefix match
StandardContext[]: Trying extension match
StandardContext[]: Trying default match
HttpProcessor[7070][3] parseConnection: address=/127.0.0.1, port=7070
Following is server start code.
public class EmbeddedTomcat {
private String path = null;
private Embedded embedded = null;
private Host host = null;
* Default Constructor
public EmbeddedTomcat() {
* Basic Accessor setting the value of the context path
* @param path - the path
public void setPath(String path) {
this.path = path;
* Basic Accessor returning the value of the context path
* @return - the context path
public String getPath() {
return path;
* This method Starts the Tomcat server.
public void startTomcat() throws Exception {
Engine engine = null;
// Set the home directory
System.setProperty("catalina.home", getPath());
System.setProperty("catalina.base", getPath());
// Create an embedded server
embedded = new Embedded();
// print all log statments to standard error
embedded.setDebug(99);
embedded.setLogger(new SystemOutLogger());
// Create an engine
engine = embedded.createEngine();
     engine.setDefaultHost("localhost");
// Create a default virtual host
host = embedded.createHost("localhost", getPath() + "/webapps");
     engine.addChild(host);
// Create the ROOT context
Context context = embedded.createContext("", getPath() + "/webapps/root");
     System.out.println("Doc Base - " + context.getDocBase());
     host.addChild(context);
// Install the assembled container hierarchy
embedded.addEngine(engine);
// Assemble and install a default HTTP connector
Connector connector = embedded.createConnector(null, 7070, false);
embedded.addConnector(connector);
// Start the embedded server
embedded.start();
public static void main(String args[]) {
try {
EmbeddedTomcat tomcat = new EmbeddedTomcat();
tomcat.setPath("D:/AXIS");
     tomcat.startTomcat();
catch( Exception e ) {
e.printStackTrace();
Thanks is advance,
Jerry

in the reource tag u have somet hing called global attribute which will be ur global jndi name with which u can access the resource
Context ...>
<ResourceLink name="The name of the linked global resource in the global JNDI context.
global="The name of the resource link to be created, relative to the java:comp/env context.
type="The fully qualified Java class name expected by the web application when it performs a lookup for this resource link.
r"
i think tat will work
regards
shanu
</Context>

Similar Messages

  • Find Tax Return Locations for all Accounting needs, File Tax return......

    Hi dear friends
    Find Tax Return Locations for all Accounting needs, File Tax return, Business Accounting, Payroll, Income Tax, Property Tax, State Tax.
    Find a qualified local Tax Professional, CPA, Accounting Firm,  Accountant, Financial Planning from most widely used Directory.
    Our services are -- irs tax help, accounting, taxes, irs, tax debt help, payroll, income tax, property tax, tax attorney, tax, cpa, accountants, tax help, tax return, business tax return, free tax help, estate tax,
    More information visit below here --
    [FINDTAXRETURN|http://www.findtaxreturn.com/]
    Cheers
    Admin

    I have already received the TT application for 2012 filing.
    Have you checked at their website?
    http://www.turbotax.com/lp/ty11/ppc/hp.jsp?cid=ppc_gg_b_stan_dk_us_hv-trbtx-mn&a did=18494275668&skw=TurboTax&kw=turbotax&ven=gg&

  • Find Tax Return Locations for all Accounting needs, File Tax return, Busine

    Hi dear friends
    Find Tax Return Locations for all Accounting needs, File Tax return, Business Accounting, Payroll, Income Tax, Property Tax, State Tax.
    Find a qualified local Tax Professional, CPA, Accounting Firm,  Accountant, Financial Planning from most widely used Directory.
    Our services are -- irs tax help, accounting, taxes, irs, tax debt help, payroll, income tax, property tax, tax attorney, tax, cpa, accountants, tax help, tax return, business tax return, free tax help, estate tax,
    More information visit below here --
    [FINDTAXRETURN|http://www.findtaxreturn.com/]
    Cheers:)
    Admin:)

    I have already received the TT application for 2012 filing.
    Have you checked at their website?
    http://www.turbotax.com/lp/ty11/ppc/hp.jsp?cid=ppc_gg_b_stan_dk_us_hv-trbtx-mn&a did=18494275668&skw=TurboTax&kw=turbotax&ven=gg&

  • Transaction code to find return code for transport request

    Hi,
    I want to see  the return code for transport requests after importing to QAS from DEV. What is the transaction code to find return code and can you explain in brief.
    Thx,
    Vasu

    you can check it out in STMS
    wht you can do is ,,
    Run Tcode STMS > Overview imports (F5) > you will find all import queues > then click on the import queue in which u want to see the status of transport (DEV , QAS , PRD )
    > then find out the transport no > click on that > then click on logs or press ( ctrl + f4)
    Return code
    Meaning
    0000
    Transport performed without errors
    0004
    Warnings were issued. All objects were transported successfully. There were special actions for individual objects that may not have been intentional, for example, a warning is issued during the export if the request contains an object deletion.
    Read the warnings.
    0008
    Individual objects could not be transported successfully. You must analyze and correct the errors. Examples of import errors: Original object was not overwritten, Repaired object was not overwritten
    0012 or higher
    A critical error has occurred, probably not caused by the contents of the request. You must inform your system administrator.
    http://help.sap.com/saphelp_nw70/helpdata/en/57/38e26c4eb711d182bf0000e829fbfe/content.htm
    Hope this information will help you ,,
    Cheers
    dEE

  • Centrally control all report links for all requests

    hi, is it possible to set once then all requests are applied to this setting.
    for example, all requests have same report links.
    Refresh - Print - Download
    if possible, I dont need to set all charts.
    thanks

    thanks ,I have modified dashboardtemplates.xml and it works
    but for the embedded (dragged and dropped before modifying the dashboardtemplates.xml) requests, the links are not shown, I need to drag and drop again

  • Tuning code to return results for EVERY DAYS even if there is no data.

    Hi,
    SELECT a,b,c,DAY (some days aren't in the results because the is no data for this day)This code returns all days of the month
    SELECT DAYS_OF_MONTH FROM DUAL....How can I use both queries together so that the result returns data for all days (if no data it will write 0)
    Someone said a union would do the trick. I was unable to make it work.
    Regards,
    THKKK
    Edited by: The Hong Kong King Kong on May 4, 2010 7:36 AM

    Hi,
    So this is what I've got and it does not compute. ( It's giving ORA-00904 DAYSOFMONTH NOT VALID IDENTIFIER --> DAYS_OF_MONTH = SERV1.DAY(+)
    WITH all_days AS
    SELECT
    TO_CHAR(TO_DATE(LEVEL||'-'||TO_CHAR(ADD_MONTHS(SYSDATE,-1),'MON-YY'),'DD-MON-YY'),'DD') *DAYSOFMONTH*
    FROM DUAL
    CONNECT BY LEVEL <= TO_NUMBER(TO_CHAR(LAST_DAY(ADD_MONTHS(SYSDATE,-1)),'DD'))
    SELECT *all_days.DAYSOFMONTH*, nvl(SERV1.DAY,'TOTAL MONTH:') DAY,
             nvl(SUM(SERV1.GOOD),0) GOOD1,
             nvl(SUM(SERV1.WRONG),0) WRONG1,
             nvl(SUM(SERV2.GOOD),0) GOOD2,
             nvl(SUM(SERV2.WRONG),0) WRONG2,
             nvl(SUM(SERV3.GOOD),0) GOOD3,
             nvl(SUM(SERV3.WRONG),0) WRONG3,
             (nvl(SUM(SERV1.GOOD),0)+nvl(SUM(SERV2.GOOD),0)+nvl(SUM(SERV3.GOOD),0)) TOTAL_GOOD,
             (nvl(SUM(SERV1.WRONG),0)+nvl(SUM(SERV2.WRONG),0)+nvl(SUM(SERV3.WRONG),0)) TOTAL_WRONG
        FROM  (SELECT   TO_CHAR(FINISHED, 'dd') DAY,
                       SUM(CASE
                               WHEN STATUS_CODE IN (4, 12) THEN 1
                               ELSE 0
                            END) GOOD,
                       SUM(CASE
                               WHEN STATUS_CODE NOT IN (4, 12) THEN 1
                               ELSE 0
                            END) WRONG
                  FROM my_table
                 WHERE SERVER_NAME = 'somename1'
                 GROUP BY TO_CHAR (FINISHED, 'dd')) Serv1, 
              (SELECT   TO_CHAR (FINISHED, 'dd') DAY,
                       SUM(CASE
                               WHEN STATUS_CODE IN (4, 12) THEN 1
                               ELSE 0
                            END) GOOD,
                      SUM(CASE
                               WHEN STATUS_CODE NOT IN (4, 12) THEN 1
                               ELSE 0
                            END) WRONG
                  FROM MY_TABLE
                 WHERE SERVER_NAME = 'somename2'
                               GROUP BY TO_CHAR (FINISHED, 'dd')) Serv2,
              (SELECT   TO_CHAR (FINISHED, 'dd') DAY,
                       SUM(CASE
                               WHEN STATUS_CODE IN (4, 12) THEN 1
                               ELSE 0
                            END) GOOD,
                       SUM(CASE
                               WHEN STATUS_CODE NOT IN (4, 12) THEN 1
                               ELSE 0
                            END) WRONG
                  FROM my_table
                 WHERE NOM_SERVEUR_RAPP <> 'somename1'
                   AND NOM_SERVEUR_RAPP <> 'somename2'
                 GROUP BY TO_CHAR (FINISHED, 'dd')) SERV3
    WHERE Serv1.JOUR = Serv2.DAY(+)
    AND Serv2.JOUR = Serv3.DAY(+)
    *AND JOURS_DU_MOIS = SERV1.DAY (+)*
    GROUP BY ROLLUP (SERV1.DAY)
    ORDER BY 1;Also, the LEFT OUTER JOIN cannot be used along with (+).
    Please help!

  • WebLogic Apache plugin giving 404 for 50% of requests

    I have the following configuration on my httpd.conf
    <IfModule mod_weblogic.c>
    RequireSSLHostMatch false
    Debug ON
    EnforceBasicConstraints OFF
    HungServerRecoverSecs 5
    ConnectRetrySecs 0
    KeepAliveEnabled ON
    KeepAliveSecs 15
    IdemPotent ON
    WLLogFile /var/log/httpd/wlproxy_global.log
    DebugConfigInfo On
    </IfModule>
    And this Location configured:
    <Location /FaleConosco>
    SetHandler weblogic-handler
    WebLogicCluster 10.8.90.147:7006
    Debug ON
    WLLogFile "/var/log/httpd/wlproxy-faleconosco.log"
    </Location>
    And this is what's happening:
    1 - Half of requests through Apache, get a 404
    2 - All requests that go directly to WebLogic, get a 200
    Any idea?
    Edited by: 938972 on Jun 6, 2012 7:48 AM

    It seems that the WebLogic plugin for Apache has a bug (where do I submit bugs?)
    If WebLogicCluster is used with only one server, there might be problems with requests being missed.
    I changed the above configuration to use the WebLogicHost / WebLogicPort, and now I get 100% of HTTP/1.1 200
    <Location /FaleConosco>
    SetHandler weblogic-handler
    # WebLogicCluster 10.8.90.147:7006
    WebLogicHost 10.8.90.147
    WebLogicPort 7006
    Debug OFF
    WLLogFile "/var/log/httpd/wlproxy-faleconosco.log"
    </Location>
    Hope this thread will help others

  • Error handling return code for Provide Statement

    Hi Experts,
    For select statement we have error handling return code sy-subrc.
    What is the error handling return code for provide.. end provide statement.
    Thanks,
    Ragu

    Ragu,
    Same thing.
    Check sy-subrc.
    sy-subrc is the return code for all ABAP statements as far as I know.
    Regards,
    Dilek

  • Setting timeout for all the web test scripts in the solution

    Hello,
    I have around 16 web test scripts (using VSTS 2010 ultimate version) in my project (in a solution). By default the timeout set for each request is 60 sec. I need to increase the timeout to 180 sec. Currently, I am clicking on each request and modifying
    the timeout parameter from the Properties window.
    Is there any common setting for timeout available which would be acting across all the scripts?
    Thanks.

    Hello,
    We only can set Timeouts for a separate request in Visual Studio Web Test. There is no way to set Timeout for all requests in VS IDE. But you can write you own logic code using
    Timeout Property in a web test plugin to set Timeout for all requests in a web test.
    About how to write a web test plugin, please see:
    How to: Create a Web Performance Test Plug-In
    Best regards,
    Amanda Zhu <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support
    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

  • CSS11501 direct all requests to one server?

    Hi,
    We have a CSS 11501 with 2 webservers behind it. The people from serveradmin want one webserver to be used for all requests, and only use the second one when the first one gets too busy (let's say > 80 %)
    So in a very busy scenario, both webservers would be used
    I've looked into Primary sorry server but believe that's only to be used when the first webserver dies, so this does not apply.
    I also thought about using different weights for the services, but even when you give webserver 1 a weight of 10, and webserver 2 a weight of 1, there will still be requests forwarded - albeit very few - to webserver 2, right?
    Anyone encountered this before? Any help greatly appreciated.
    Regards,
    Radboud

    firs you have to define what is 80%
    The CSS has now knowledge of the capacity of the servers.
    I see 2 options to define 80%.
    First you know that your box can handle 100 connections.
    So you can define 80% to be 80 connections.
    You could then configure maxconn to 80.
    The primarysorryserver will kick in once maxconns has been reached for all other servers.
    Another solution is a script on the server itself that measure the load and update a file with a value ON or OFF.
    When reaching 80% of maxload, simple rewrite the file with the vaule off.
    On the CSS create a keepalive to read this file and disable the service if the value is off.
    When disabled, the primarysorryserver will kick in.
    Regards,
    Gilles.

  • WL6.1 : Get '404 : File not found' for all WARs

    I had some web applications deployed which were running perfectly. Now suddenly
    , I get '404 - File not found' for any URL - including the server root, i.e. http://localhost/
    I was able to access admin console using http://localhost/console. I checked the
    config of each application & couldn't find anything wrong.
    Finally I had to re-deploy the WARs to get some applications running.
    However, I am still unable to get the Default Web App running - the one handling
    server root path.. (I've checked the server config & it shows DefaultWebApp as
    the default application).
    Any pointers on what could be wrong / correction needed ?
    TIA,
    Subodh

    Create a subdirectory called 'classes' and copy your servlet class file
              to the 'classes' dir.
              mydomain/applications/
              DefaultWebApp/
              WEB-INF/classes.
              Modify the web.xml file located in the mydomain/applications/
              DefaultWebApp/
              WEB-INF/ directory
              <web-app>
              <servlet>
              <servlet-name>
              myServlet
              </servlet-name>
              <servlet-class>
              package.name.myServlet
              </servlet-class>
              </servlet>
              <servlet-mapping>
              <servlet-name>
              myServlet
              </servlet-name>
              <url-pattern>
              servlet-url-pattern
              </url-pattern>
              </servlet-mapping>
              </web-app>
              Start the default WebLogic Server.
              Call your servlet from a Web browser with the following URL:
              http://localhost:port/servlet-url-pattern
              servlet-url-pattern is the value of the <url-pattern> element that you
              defined in the web.xml file.
              prakash wrote:
              > Hi everybody ,I have this web app on weblogic 7 .The application
              > works file with Tomcat 4.0 but on WebLogic server 7,I am getting
              > 404 not found for all the servlets ,although weblogic is serving
              > the html files without any problems
              

  • Performanc​e Profiler returning zero seconds for all vi's

    I tried running the performance profilers, and it returns 0 seconds for all vi's. This certainly cannot be the case. Am I running the program incorrectly?
    thanks
    Phil B

    I run vi's continuously for a while. If you don't do that, you will only see the total time of that particular vi. Also switch to microseconds.
    aartjan

  • CP3525dn, networked -- default duplex for all users (embedded web server)

    I want to set the default for all users on our networked CP3525dn to be duplex. I cannot find this option anywhere in the embedded web server. I have duplex turned on, of course, and users can set their own default to duplex, but I want it to be default for everyone--the default default, if you will.
    Is this possible? I'm fairly certain it's possible if the printer is connected to a computer and shared on the network (but I don't remember the specifics) but I can't find out how to do it if it's on the network on its own.
    Thanks!

    I don't believe you can.  It must be set for every user manually.
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • Software Metering Report - Install base for all metered software programs - Returns 0

    Hi All
    I have an issue with one of the software metering reports, Install base for all metered software programs. when run it returns that the metered software is installed on 0 computers.
    All usage reports seem to work correctly and I can see usage data for the monitored applications. But anything related to install base such as the one listed above and "Computers that have a metered program installed but have not run the program since
    a specific date" either return 0 or are blank.
    Any help will be greatly appreciated

    Hi All
    finally found a fix to the problem. It was very closely related to what Gareth  had mentioned regarding Asset Intelligence. The actual method of detecting if a program is installed is done through Software Inventory
    Under Custom Client Settings i had enabled Software Inventory on client but never setup any rules to gather data. So i created a new rule for all *.exe files and around an hour later the report started to show up clients.
    This blog post also describes the method of setting up software inventory correctly 
    Thanks to all the help and hopefully this will aid anyone else encountering similar problems

  • FOR ALL ENTRIES not returning correct number of records

    Hi,
    I have the following code: -
      SELECT vbelv                                     "Delivery
             posnv                                     "Delivery Item
             rfmng                                     "GR Qty
             plmin                                     "Sign
             INTO TABLE t_gr
             FROM vbfa
             FOR ALL ENTRIES IN t_deliveries
             WHERE vbelv   EQ t_deliveries-vbeln
               AND posnv   EQ t_deliveries-posnr
               AND vbtyp_n EQ c_goods_receipt.
    The internal table t_deliveries has a single entry. The table VBFA has 5 records for the delivery/item.
    When the SQL is executed it returns 4 records. If I amend the code to use the following it returns the 5 records. Has anybody had a similar issue.
      LOOP AT t_deliveries INTO st_deliveries.
        SELECT vbelv                                     "Delivery
               posnv                                     "Delivery Item
               rfmng                                     "GR Qty
               plmin                                     "Sign
               APPENDING TABLE t_gr
               FROM vbfa
               WHERE vbelv   EQ st_deliveries-vbeln
                 AND posnv   EQ st_deliveries-posnr
                 AND vbtyp_n EQ c_goods_receipt.
      ENDLOOP.

    FOR ALL Entries can fatch only the unique rows from the table. So, check in the VBFA for the your inputs and the output fields, you will have only 4 unique records. That's why it is picking up only 4 records.
    Try to include one more fields which makes every row as a unique row.
    Regards,
    Naimesh Patel

Maybe you are looking for

  • Ongoing WiFi issues and Apple Support's lack of support!

    Hi All, I bought my MacBook Air in July/August 2012 (i7, 8GB RAM, 256 GB HDD, Mountain Lion). Since the first day, I have had issues with wifi connectivity. My primary use was at the university in Australia, where I had frequent drop outs and at time

  • HT1386 Problem connecting Iphone 5 to Macbook Pro

    My usb-doc has been broken in my macbook pro since a year now. Recently, i bough the iPhone 5. To connect my iPhone with my macbook pro trough Wifi, i need to connect it first with the USB-cable. But this is not possible now. Is there any solution? 

  • Configure server

    hi there, i'm currently developing my webpage using dreamweaver. however, i have to upload it to the server using a pc where dreamweaver application is not available. files with aspx extension couldnt be view. pls anyone .. help !!!

  • HT4515 My iphone 4 had been sluggish so I did the 2 button reset(?), now it's been frozen with the apple logo for two hours. What should I do?

    I have no clue what I'm doing. I held the home and lock button and ignored the slide to power down screen. Now my phone has been locked on the apple logo for two hours. I've tried hitting both buttons in all combinations. I had nearly a full battery

  • Installing PKGS from CD

    I am finding when using the install program in CDE that instead of installing any PKGS that it says " Not Installed" instead of installing them. & then I have to close program , is there a reason it wont install any PKGS after selecting them from cat