"load-on-startup" servlet configuration

Dear All,
I am trying to load a servlet "SettingServlet" at the startup of the application, the configuration I am using inside the web.xml file is as following:
<web-app>
     <servlet>
     <servlet-name>SettingsServlet</servlet-name>
     <servlet-class>com.myPack.SettingsServlet</servlet-class>
     <init-param>
     <param-name>fichierConfig</param-name>
     <param-value>D:/tomcat41/webapps/init.conf</param-value>
     </init-param>
     <load-on-startup>5</load-on-startup>
     </servlet>
</web-app>
It seems that the "SettingsServlet" servlet is not started at the startup.Even it's started in the tomcat window I am getting something like
(SEVERE: Parse error at line......column...:Element type ....not declared ..)
and that for the servlet-name, parma-name,servlet-class, init-param...etc
Do I missed something in the configuration?, please tcheck the few lines above. because Simply I got stuck ! ,,,,,Please help me to fix it, I am waiting for you reply guys.
Thanks and Regards,
kifwet

Take a look at the header of your web.xml file, the part about:<!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd"> And go check the dtd for your version.
Some versions are very picky about the order of parameters.
Hope this helps.

Similar Messages

  • How long load-on-startup servlet stays in weblogic6.1 sp2

    does anybody know how long a load-on-startup servlet exists (before
              gets destroyed) in weblogic6.1 sp2. What i want is in load-on-startup
              servlet, I want to schedule a java.util.Timer and when application
              gets undeployed, i want to cancel that timer. if load-on-startup
              servlet exists for the whole application life span then i could do
              timer.cancel() on the destroy method of load-on-startup servlet.
              any suggestion?
              thanks in adv,
              soumik
              

    You can simply use ServletContextListener instead - that way you do not
              have to worry if (or when) WebLogic decides to destroy the servlet.
              soumik <[email protected]> wrote:
              > does anybody know how long a load-on-startup servlet exists (before
              > gets destroyed) in weblogic6.1 sp2. What i want is in load-on-startup
              > servlet, I want to schedule a java.util.Timer and when application
              > gets undeployed, i want to cancel that timer. if load-on-startup
              > servlet exists for the whole application life span then i could do
              > timer.cancel() on the destroy method of load-on-startup servlet.
              > any suggestion?
              > thanks in adv,
              > soumik
              Dimitri
              

  • Load on startup servlet and references

              Weblogic 6.1 SP2
              No jars specified in the classpath. A Singleton is located in a utility.jar file
              inside a .ear file.
              If I create a Singleton from a load on startup servlet, how long will the singleton
              be around? I know that if I undeploy the application, the singleton will be destroyed
              since the classloader is unloaded. However, if I never undeploy my application,
              will the Singleton always be around? Does Weblogic keep a reference alive to
              this Singleton forever?
              Please provide some more details on this!
              Thanks.
              Dan
              

              Dan Baumbach wrote:
              > So, because the startup servlet has a static reference to the singleton, the servlet
              > will never be garbage collected?
              Correct.
              >
              >
              > What if there's a class that is not a singleton, but there are static methods.
              > How would garbage collection work in this case?
              >
              A class object is not an instance object. If the class object has been loaded by the
              classloader, it will not be unloaded or garbage collected, regardless of whether or not
              it has static methods. If an instance of a class is instatiated on the heap, and a
              reference to that object is placed in a static member of its associated class object,
              also referred to as a class member, then the instance will not be garbage collected.
              >
              > Thanks.
              > Dan
              >
              > William Kemp <[email protected]> wrote:
              > >The jvm will not garbage collect an object that has a static reference
              > >to it. Which is how
              > >I am assuming you have implemented the singleton.
              > >
              > >Bill
              > >
              > >Dan Baumbach wrote:
              > >
              > >> Weblogic 6.1 SP2
              > >> No jars specified in the classpath. A Singleton is located in a utility.jar
              > >file
              > >> inside a .ear file.
              > >>
              > >> If I create a Singleton from a load on startup servlet, how long will
              > >the singleton
              > >> be around? I know that if I undeploy the application, the singleton
              > >will be destroyed
              > >> since the classloader is unloaded. However, if I never undeploy my
              > >application,
              > >> will the Singleton always be around? Does Weblogic keep a reference
              > >alive to
              > >> this Singleton forever?
              > >>
              > >> Please provide some more details on this!
              > >> Thanks.
              > >> Dan
              > >
              

  • Can't get Servlet to Load On Startup

              I am trying to get a servlet to run at startup, and I have put the xml below in WEB-INF/web.xml to make this happen, but it is not working. The servlet does not run at startup.
              Anybody have any idea what the problem is?
              <servlet>
                   <servlet-name>Cocoon</servlet-name>
                   <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
                   <init-param>
                        <param-name>properties</param-name>
                        <param-value>./WEB-INF/cocoon.properties</param-value>
                   </init-param>
                   <load-on-startup/>
              </servlet>
              <servlet-mapping>
                   <servlet-name>Cocoon</servlet-name>
                   <url-pattern>*.xml</url-pattern>
              </servlet-mapping>
              ALSO, The servlet in this case is the Cocoon servlet, and the reason I am trying to get it to run at startup is because in my application I am calling it from another servlet, instead of through a direct call to an *.xml file, and so it requires a direct call to Initialize the Cocoon Engine. So, if anyone knows anything about how to solve this problem, that would also be helpful.
              Thanks.
              Harris.
              

              Thank you!
              That worked.
              Ruslan Bilorusets <[email protected]> wrote:
              >Harris,
              >
              >Please, try to specify a value for the <load-on-startup> element. It looks like a bug in our code.
              >
              >So,
              ><load-on-startup>1</load-on-startup>
              >should do the trick.
              >
              >Thanks,
              >-ruslan
              >
              >harris wrote:
              >
              >> I am trying to get a servlet to run at startup, and I have put the xml below in WEB-INF/web.xml to make this happen, but it is not working. The servlet does not run at startup.
              >>
              >> Anybody have any idea what the problem is?
              >>
              >> <servlet>
              >> <servlet-name>Cocoon</servlet-name>
              >> <servlet-class>org.apache.cocoon.Cocoon</servlet-class>
              >> <init-param>
              >> <param-name>properties</param-name>
              >> <param-value>./WEB-INF/cocoon.properties</param-value>
              >> </init-param>
              >> <load-on-startup/>
              >> </servlet>
              >> <servlet-mapping>
              >> <servlet-name>Cocoon</servlet-name>
              >> <url-pattern>*.xml</url-pattern>
              >> </servlet-mapping>
              >>
              >> ALSO, The servlet in this case is the Cocoon servlet, and the reason I am trying to get it to run at startup is because in my application I am calling it from another servlet, instead of through a direct call to an *.xml file, and so it requires a direct call to Initialize the Cocoon Engine. So, if anyone knows anything about how to solve this problem, that would also be helpful.
              >>
              >> Thanks.
              >> Harris.
              >
              

  • Error 404: No target servlet configured for uri: +websphere 6.0

    My server is running properly, but I got Error 404: No target servlet configured for uri: error while launching my project on web sphere 6.0
    see my web.xml and strut-config.xml
    <?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"
    id="WebApp_ID"
    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>supportPortalWeb</display-name>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>OrganizationDataServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.OrganizationDataServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>OrderProcessingServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ordermgmt.OrderProcessingServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>OrganizationValidationServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.OrganizationValidationServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProductValidationServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ProductValidationServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>ProductGradeServlet</servlet-name>
    <servlet-class>com.harcourt.supportportal.web.ProductGradeServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>action_tmp</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>3</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrganizationDataServlet</servlet-name>
    <url-pattern>/servlet/OrganizationDataServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrderProcessingServlet</servlet-name>
    <url-pattern>/servlet/OrderProcessingServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>OrganizationValidationServlet</servlet-name>
    <url-pattern>/servlet/OrganizationValidationServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProductValidationServlet</servlet-name>
    <url-pattern>/servlet/ProductValidationServlet</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>ProductGradeServlet</servlet-name>
    <url-pattern>/servlet/ProductGradeServlet</url-pattern>
    </servlet-mapping>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring-config/spring-config.xml</param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <jsp-config>
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/epc.tld</taglib-uri>
    <taglib-location>/WEB-INF/supportportal.tld</taglib-location>
    </taglib>
    </jsp-config>
    <resource-ref>
    <res-ref-name>jdbc/SupportPortalDataSource</res-ref-name>
    <res-type>java.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
         <!-- Data Sources -->
         <data-sources />
         <!-- Form Beans -->
         <form-beans>
              <form-bean name="signOnHandlerForm" type="com.harcourt.supportportal.struts.signon.actionform.SignOnHandlerForm" />
              <form-bean name="signOffHandlerForm" type="com.harcourt.supportportal.struts.signon.actionform.SignOffHandlerForm" />
              <form-bean name="updatePersonForm" type="com.harcourt.supportportal.struts.sample.actionform.UpdatePersonForm" />
              <form-bean name="searchPersonsForm" type="com.harcourt.supportportal.struts.sample.actionform.SearchPersonsForm" />
              <form-bean name="updateProductForm" type="com.harcourt.supportportal.struts.product.actionform.UpdateProductForm"/>
              <form-bean name="searchProductsForm" type="com.harcourt.supportportal.struts.product.actionform.SearchProductsForm"/>
              <form-bean name="searchOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.SearchOrganizationForm"/>
              <form-bean name="updateOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.UpdateOrganizationForm"/>
              <form-bean name="exportOrganizationForm" type="com.harcourt.supportportal.struts.mdr.actionform.ExportOrganizationForm"/>
              <form-bean name="exportProductForm" type="com.harcourt.supportportal.struts.product.actionform.ExportProductForm"/>           
         </form-beans>
         <!-- Global Exceptions -->
         <global-exceptions />
         <!-- Global Forwards -->
         <!-- Action Mappings -->
         <action-mappings type="org.apache.struts.config.SecureActionConfig">
              <action
                   path="/start"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="loginRendererDef"/>
    <!--          <action -->
    <!--               path="/product"-->
    <!--               type="org.apache.struts.actions.ForwardAction"-->
    <!--               parameter="productInputDef"/>-->
              <action path="/product" type="org.springframework.web.struts.DelegatingActionProxy"
                        name="updateProductForm" parameter="method" scope="request" validate="false">
                   <forward name="success" path="productInputDef"/>
                   <forward name="failure" path="productInputDef"/>
              </action>
    <!--          <action -->
    <!--               path="/organization"-->
    <!--               type="org.apache.struts.actions.ForwardAction"-->
    <!--               parameter="organizationIndexDef"/>-->
              <action
                   path="/report"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="reportIndexDef"/>
              <action
                   path="/user"
                   type="org.apache.struts.actions.ForwardAction"
                   parameter="userIndexDef"/>
              <action path="/login" type="org.springframework.web.struts.DelegatingActionProxy" name="signOnHandlerForm" scope="request" input="loginRendererDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />
              <forward name="failure" path="loginRendererDef" />
    </action>
    <!-- sample -->
         <action path="/updatePerson" type="org.springframework.web.struts.DelegatingActionProxy" name="updatePersonForm" scope="request" input="productInputDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="personIndexDef" />
              <forward name="failure" path="personInputDef" />
    </action>
         <action path="/searchPersons"
                   type="org.springframework.web.struts.DelegatingActionProxy"
                   name="searchPersonsForm"
                   scope="request"
                   parameter="method"
                   validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="personIndexDef" />          
              <forward name="failure" path="loginRendererDef" />
    </action>
         <!-- end sample -->
         <action path="/updateProduct" type="org.springframework.web.struts.DelegatingActionProxy"
                   name="updateProductForm" parameter="method" scope="request" input="productInputDef" validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />          
              <forward name="failure" path="/product.do?method=createOrUpdateProduct" />
    </action>
    <action path="/deleteProduct" type="org.springframework.web.struts.DelegatingActionProxy"
                   name="updateProductForm" parameter="method" scope="request" validate="false">
         <set-property property="secure" value="false"/>
              <forward name="success" path="loginLandingDef" />          
              <forward name="failure" path="/product.do?method=createOrUpdateProduct" />
    </action>
    <action path="/searchProducts"
                   type="org.springframework.web.struts.DelegatingActionProxy"
                   name="searchProductsForm"
                   scope="request"
                   parameter="method"
                   validate="true">
         <set-property property="secure" value="false"/>
              <forward name="success" path="productSearchDef" />
              <forward name="failure" path="loginLandingDef"/>
    </action>
    <action path="/loadProducts" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchProductsForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="productIndexDef"/>
         <forward name="failure" path="userIndexDef"/>
    </action>
    <action path="/exportProduct" type="org.springframework.web.struts.DelegatingActionProxy"
              name="exportProductForm" parameter="method" scope="request" validate="true">
              <forward name="failure" path="loginLandingDef" />
    </action>
    <!-- Organization Actions -->
    <action path="/searchOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchOrganizationForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="orgSearchDef"></forward>
         <forward name="failure" path="loginLandingDef"/>
         </action>
    <action path="/organization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="updateOrganizationForm" parameter="method" scope="request" validate="false">
         <set-property property="secure" value="false"/>
              <forward name="success" path="orgInputDef" />          
              <forward name="failure" path="loginLandingDef" />
    </action>
    <action path="/loadOrganizations" type="org.springframework.web.struts.DelegatingActionProxy"
              name="searchOrganizationForm" parameter="method" scope="request" validate="true">
         <forward name="success" path="orgIndexDef" />          
              <forward name="failure" path="loginLandingDef" />
    </action>
    <action path="/updateOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="updateOrganizationForm" parameter="method" scope="request" input="orgInputDef" validate="true">
                   <forward name="success" path="/loadOrganizations.do?method=loadOrganizations"></forward>
                   <forward name="failure" path="/organization.do?method=createOrUpdateOrganization"/>               
              </action>
              <action path="/exportOrganization" type="org.springframework.web.struts.DelegatingActionProxy"
              name="exportOrganizationForm" parameter="method" scope="request" >
              <forward name="failure" path="loginLandingDef" />
    </action>
         </action-mappings>
         <!-- Register Support Portal RequestProcessor -->
         <controller>
              <set-property property="processorClass" value="com.harcourt.supportportal.struts.common.action.SupportPortalRequestProcessor" />
         </controller>
         <!-- Message Resources -->
         <message-resources parameter="com.harcourt.supportportal.resources.ApplicationResources" />
         <!-- tiles plugin -->
    <plug-in className="com.harcourt.supportportal.tiles.SupportPortalSecureTilesPlugin">
         <set-property property="definitions-config" value="/WEB-INF/tiles-def/tiles-defs.xml" />
         <set-property property="httpPort" value="80"/>
    <set-property property="httpsPort" value="80"/>      
    <set-property property="enable" value="false"/>      
    <set-property property="addSession" value="false"/>      
    </plug-in>
         <!-- spring plugin -->
         <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">
         <set-property property="contextConfigLocation" value="/WEB-INF/spring-config/spring-config.xml"/>
         </plug-in>
    </struts-config>

    If your EAR has actually started, try this:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/xrun_jvm_sendredirect.html
    If you are not on z/OS, the link is actually under server->server infrastructure->Java and process management->environment entries
    for setting the property

  • Error 404: No target servlet configured for uri

    hello there..
    this error start comming suddenly, i dont know why??
    when i try to run html page then IE7 display the following error
    Error 404: No target servlet configured for uri: webpage uri
    if any one already know this then please post any solution to fix it.
    thanks

    thanks Mr evenafets for ur quick reply
    i m sorry not to post the html page i have problem in.
    below is mypage.html
    and i m accessing it trough uri http://localhost:9080/myproject/mypage.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <link rel="stylesheet" href="theme/Master.css" type="text/css">
    <title>mypage</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <meta name="GENERATOR" content="Rational Application Developer">
    </head>
    <body>
    <!--"CONVERTED_APPLET"-->
    <!-- HTML CONVERTER -->
    <object
        classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
        codebase = "http://java.sun.com/update/1.6.0/jinstall-6u20-windows-i586.cab#Version=6,0,0,6"
        WIDTH = "300" HEIGHT = "200" >
        <PARAM NAME = CODE VALUE = "myclass.class" >
        <PARAM NAME = ARCHIVE VALUE = "RegistrationApplet.jar" >
        <param name = "type" value = "application/x-java-applet;version=1.6">
        <param name = "scriptable" value = "false">
        <comment>
         <embed
                type = "application/x-java-applet;version=1.6" \
                CODE = "myclass.class" \
                ARCHIVE = "RegistrationApplet.jar" \
                WIDTH = "300" \
                HEIGHT = "200"
             scriptable = false
             pluginspage = "http://java.sun.com/products/plugin/index.html#download">
             <noembed>
                </noembed>
         </embed>
        </comment>
    </object>
    <!--
    <APPLET CODE = "myclass.class" ARCHIVE = "RegistrationApplet.jar" WIDTH = "300" HEIGHT = "200">
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->
    </body>
    </html>and below is 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>
         UASEProject</display-name>
         <context-param>
              <param-name>crystal_image_uri</param-name>
              <param-value>crystalreportviewers</param-value>
         </context-param>
         <context-param>
              <param-name>crystal_image_use_relative</param-name>
              <param-value>webapp</param-value>
         </context-param>
         <servlet>
              <servlet-name>TilesServet</servlet-name>
              <servlet-class>
              org.apache.struts.tiles.TilesServlet</servlet-class>
              <init-param>
                   <param-name>definitions-config</param-name>
                   <param-value>/WEB-INF/tiles-defs.xml</param-value>
              </init-param>
              <load-on-startup>2</load-on-startup>
         </servlet>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
              <welcome-file>index.htm</welcome-file>
              <welcome-file>index.jsp</welcome-file>
              <welcome-file>default.html</welcome-file>
              <welcome-file>default.htm</welcome-file>
              <welcome-file>default.jsp</welcome-file>
         </welcome-file-list>
    </web-app>

  • Error 404: No target servlet configured for uri  exception in RAD6.0

    Hello there,
    I have recently migrated from WSAD5.1 to RAD6.0. I have created a servlet in my client Web project. I have configured the deployment descriptor correctly to define a url-mapping for the servlet as follows:
    <servlet>
    <description>
    </description>
    <display-name>
    RulesServiceServlet</display-name>
         <servlet-name>RulesServiceServlet</servlet-name>
    <servlet-class>
         com.kai.rulesservice.RulesServiceServlet
    </servlet-class>
    <load-on-startup>-1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>RulesServiceServlet</servlet-name>
    <url-pattern>/RulesServiceServlet</url-pattern>
    </servlet-mapping>
    However, whenever, I try to run my servlet:
    http://localhost:9080/RS2Web/RulesServiceServlet
    I get the error:
    Error 404: No target servlet configured for uri
    I am not sure what this error means. Could someone please tell what I might be missing or what might be going wrong?
    Thanks in advance!

    If your EAR has actually started, try this:
    http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/xrun_jvm_sendredirect.html
    If you are not on z/OS, the link is actually under server->server infrastructure->Java and process management->environment entries
    for setting the property

  • load-on-startup problem

    Hai all,
    I want to run a servlet on start up
    i did following
    1) Add following to web.xml
    <servlet>
    <servlet-name>Schedular</servlet-name>
    <servlet-class>com.abc.xyz.Schedular</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    2) copied the file to com.abc.xyz
    but when i restarting iam getting following errror
    Cannot load Servlet name
    my java files shown below....am around it
    import java.util.Timer;
    import java.util.TimerTask;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Schedular extends HttpServlet {
    Timer timer;
    public Schedular(int seconds) {
    timer = new Timer();
    timer.schedule(new RemindTask(), seconds*1000);
    class RemindTask extends TimerTask {
    public void run() {
    System.out.println("hai !");
    timer.cancel(); //Terminate the timer thread
    public void init(ServletConfig config) throws ServletException {
         super.init(config);
    System.out.println("About to schedule task.");
    new Schedular(5);
    System.out.println("Task scheduled.");
    public void service(HttpServletRequest request, HttpServletResponse response)
         throws IOException, ServletException
                   System.out.println("servee.");
    }

    In web.xml, you say the servlet class is com.abc.xyz.Schedular but your servlet isn't in the package.
    You need to add the following to your servlet...
    package com.abc.xyz;Hope this helps,
    JEB

  • load-on-startup is not working !!

    Hello all ... I have a servlet....CSVReaderServlet.java
    and following code in web.xml
    <web-app>
    <servlet>
    <servlet-name>
    CSVReader
    </servlet-name>
    <servlet-class>
    com.xpedion.CSVReaderServlet
    </servlet-class>
    <init-param>
    <param-name>root</param-name>
    <param-value>/app/agents</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    </web-app>
    having this all i expect when i start my weblogic ... servlet should run on start up, but it does not. If i make a call from browser then it runs perfect.
    Any clue.... ??
    Thanks
    Ajay

    Is there a particular reason you feel it necessary to post this over and over again?
    http://forum.java.sun.com/thread.jsp?forum=31&thread=428054

  • Startup servlet  problem in weblogic81

    Hi
    I created one web application in weblogic81 and it contains one servlet and act as startup servlet.When i m trying to get jndi context to connect to DataSource in init method, i m getting the following exception
    javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://16.138.181.88:7501: Dest
    ination unreachable; nested exception is:
            java.net.ConnectException: Connection refused; No available router to de
    stination]
    init method
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL,"t3://16.138.181.88:7501" );
    jndiContext = new InitialContext(env);
    web.xml
    <servlet>
    <servlet-name>MyServlet</servlet-name>
              <servlet-class>com.MyServlet</servlet-class>
              <load-on-startup>0</load-on-startup>
    </servlet>
    Please help me out.
    Regards
    Chandra

    To use the /servlet/ notaton you will need to enable the invoker servlet. To do this open the conf/web.xml and search on "invoker". Follow the directions.
    An alternative would be to map the servlet to a url and use that url to call the servlet
    <servlet>
    <servlet-name>TestServlet</servlet-name>
    <servlet-class>TestServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>TestServlet</servlet-name>
    <url-pattern>/TestServlet</url-pattern>
    </servlet-mapping>
    now you should be able to access the servlet with /Fortune/TestServlet

  • Weblogic startup servlet load

              Hi,
              I am encountering problems in running a Servlet on Weblogic
              server startup.
              The steps to be followed to execute a servlet on webLogic
              Server startup are as follows
              Register the following in the Weblogic properties
              file.
              1.register the servlet
              weblogic.httpd.register.MyServlet=\
              examples.servlets.myservletclass
              2.weblogic.system.startupClass.StartMyServlet=\
              weblogic.servlet.utils.ServletStartup
              3.weblogic.system.startupArgs.StartMyServlet=\
              servlet=MyServlet
              where MyServlet is the synonym used for registering the
              servlet in the file and myservletclass is the Actual
              name of the servlet.
              I have followed the steps accordingly but the server
              is failing to execute my servlet on startup.
              Any suggestions,solutions for the above problem
              will be most welcome.
              Thanx
              Tapan.
              

    HOw did you specified the load-on-startup? and what error you get
              upon startup/deployment time?
              Kumar
              Giulia Esposito wrote:
              > I try to load my servlet on startup of Bea WebLogic Server 6.1 (SP 3) cluster.
              > This load failed.
              >
              > Can you help me?
              >
              > Tank's!
              >
              

  • Servlet failed to load on startup

    Hi all,
    I recently added a new servlet definition to my web.xml file, and specified a <load-on-startup> value of 1 for this servlet. Even though this works and the new servlet gets initialised properly, one of my old servlets with a <load-on-startup> value of 2 has stopped working. There were no changes to this old servlet, and it was working fine before. I get the following error from the weblogic logs. I have tried swapping the load order around but that doesn't make any difference. Any suggestions as to why this could happen?
    Thanks in advance
    <Nov 14, 2005 1:34:59 PM SGT> <Error> <HTTP> <BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "/".
    javax.servlet.ServletException
    at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:884)
    at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3260)
    at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3205)
    at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3182)
    at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5663)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:869)
    at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2022)
    at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2063)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
    at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
    at weblogic.management.deploy.slave.SlaveDeployer.commitUpdate(SlaveDeployer.java:608)
    at weblogic.drs.internal.SlaveCallbackHandler$2.execute(SlaveCallbackHandler.java:35)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    I am running into the same error. Has anyone been able to find a solution?
    thanks.

  • Problem setting up startup servlets in iWS 4.x

    I have configured iPlanet Web Server(iWS) 4.1 SP9 to use a startup servlet. However, the error log does not show that the servlet has been initialized. Instead, it shows only the following entries:
    Loading Simple Session Manager by default. Specify MMapSessionManager in servlets.properties to load persistent session manager
    I found in the Knowledgebase that we need to copy the the configuration entry that was created in context.properties file into the servlets.properties file
    My question that ...do we need to copy all the contents of the context.properties file or some portion of that file to servlets.properties .
    Please suggest asap, I cant take a risk as this is a live server.
    Thanks.

    Hi,
    You need not to copy entry file. In your servlets.properties file at the end of the file you can see the parameters settings of servlet which you have been configured as a servlet.
    For example the below setting are for "HelloWorldServlet" servlet configuration. You need to copy that line only.
    servlet.HelloWorldServlet.classpath=/export/home/41sp9/docs/servlet
    servlet.HelloWorldServlet.code=HelloWorldServlet.class
    Note: Make sure that before changing(copying)any changes in file take backup of the old file(present).
    Regards,
    Dakshin.
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support.

  • On Startup - Servlet to be invoked

    Hi
    When a Servlet is configured as load-on-startup, what is the life cycle it follows ? is it that only init() gets called?
    How to invoke a Servlet/JSP when the Tomcat is started wihtout any user(manual) interaction? ie. would like to invoke on Startup.
    Thanks in Advance

    Yes, only the init() method gets called. What do you want to get called? It wouldn't make sense to call doPost() or doGet() as they would be expecting some context from the client site - i.e. the HttpServletRequest.
    Would it be possible to call whatever you need at startup in the init() method?
    Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums.
    Sure they're new - come get them started!

  • Date/time icon and other movable icons on menu bar cannot be loaded on startup,but it works if manually loaded

    Strange things happened since my mbp 13' (MD-101) was upgraded to 10.8.4 ----------- time icon, battery icon,and language icon (these icons can be moved when held Command key and drag) cannot be loaded on startup, but they still can be loaded when you get into System Preferences and manually  turn them on, as well as iStat Menus
    However, some other icons didn't bother, things like BetterTouchTool, NewsBar. They are immovable!! I guess it is the key factor that the icon is movable or not making the difference.
    Someone please lend me a helping hand?
    I've attached some pictures in order to make my situation easier to be understood.
    these icons can't be loaded on my loggin in.
    but they can be loaded manually
    however, these icons will be loaded on startup
    I've almost despaired to resolve it . Thanks for your help!

    I have a similar issue. When the computer goes into "Hibernate" mode -- that is, it loses power while sleeping and it writes the contents of it's memory to disk in order to boot into that exact configuration when woken up -- many of my icons when Apple-Tab'ing to another application appear as static. They look like a slightly colorized version of the "static snow" you see when tuning into a station that doesn't exist on a UHF antenna television. Also, icons in Chrome such as web sites "favorite icons" or favicon.ico (the icons that appear in the URL bar and bookmarks) will be scrambled in the same fashion , at first , until the actual icon is loaded.
    Between this, my menu bar and finder icons not displaying, and being unable to boot into safe mode, I'm getting quite ******. I have no idea what the **** is going on with my Macbook Pro. The issue of the scrambled icons actually existed prior to installing an SSD and doing a fresh install of Mountain Lion. I may end up throwing in the towl and re-installing the operating system but I'm sure SOMETHING will happen. It seems the latest update, 10.8.2, is absolute garbage.
    What the ****, Apple? And I really don't want to take the computer to the morons at the Apple Store. They are not "geniuses" by any measure.

Maybe you are looking for