Load On start up  in web.xml

Hi.........
what is the use of load on start up we give in web.xml while we are developing a struts application....

when you give a load on startup value as 1 for a servlet declaration in the web.xml the Server calls your servlet when u start it, and calls means the server loads your servlet anc calls the init method. so u may do whatever you like in init method like starting some other application, setting some parameters , etc

Similar Messages

  • Jsp configuration load on start up in web.xml

    Is my configuration for jsp correct.i want my JSP to be loaded after servlet initialised.What changes i need to do to make it work on any server..like tomcat or websphere
    <!-- JSP CONFIGURATION -->
    <jsp-file>/hello.jsp</jsp-file>
    <load-on-startup>2</load-on-startup>
    <!-- SERVLET CONFIGURATION -->
    <servlet>
    <servlet-name>MyServlet</servlet-name>
    <servlet-class>com.example.HelloServlet</servlet-class>
    <!-- or -->
    <jsp-file>/hello.jsp</jsp-file>
    <!-- optional and one only, greater value than 0 means don't wait for the first request load it beforehand -->
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>MyServlet</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    Message was edited by:
    raghuveer_vellanki

    when you give a load on startup value as 1 for a servlet declaration in the web.xml the Server calls your servlet when u start it, and calls means the server loads your servlet anc calls the init method. so u may do whatever you like in init method like starting some other application, setting some parameters , etc

  • Unable to load descriptor .../web.xml - DescriptorException - Java EE6 war

    Deploying a simple Java EE 6 war into WebLogic 10.3.3 fails with <Unable to load descriptor /root/Oracle/Middleware/user_projects/domains/palis1/servers/AdminServer/upload/SimpleEE6App.war/WEB-INF/web.xml of module SimpleEE6App.war. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    problem: cvc-enumeration-valid: string value '3.0' is not a valid enumeration value for web-app-versionType in namespace http://java.sun.com/xml/ns/javaee:<null>
    The web app consists of one JSF 2 web dialog, one managed bean, one stateless session bean and one entity bean. In GlassFish v3 the app works fine. Then I installed the actual version of WebLogic server in order to check whether I can run EE6 apps there to. But deploying the war using WebLogic admin console fails with
    ... <AdminServer> <main> <<WLS Kernel>> <> <> <1273649525966> <BEA-000360> <Server started in RUNNING mode>
    ... <AdminServer> <[ACTIVE] ExecuteThread: '3' for queue: 'weblogic.kernel.Default (self-tuning)'> <admin> <> <> <1273649790693> <BEA-160197> <Unable to load descriptor /root/Oracle/Middleware/user_projects/domains/palis1/servers/AdminServer/upload/SimpleEE6App.war/WEB-INF/web.xml of module SimpleEE6App.war. The error is weblogic.descriptor.DescriptorException: VALIDATION PROBLEMS WERE FOUND
    problem: cvc-enumeration-valid: string value '3.0' is not a valid enumeration value for web-app-versionType in namespace http://java.sun.com/xml/ns/javaee:<null>
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:245)
    at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:231)
    at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:155)
    at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:323)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:409)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:759)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:768)
    at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescriptor.java:141)
    at weblogic.servlet.utils.WarUtils.getWebAppBean(WarUtils.java:124)
    at weblogic.application.compiler.WARModule.processLibraries(WARModule.java:413)
    at weblogic.application.compiler.WARModule.merge(WARModule.java:455)
    at weblogic.application.compiler.flow.SingleModuleMergeFlow.proecessModule(SingleModuleMergeFlow.java:16)
    at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:36)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
    at weblogic.application.compiler.ReadOnlyWarMerger.merge(ReadOnlyWarMerger.java:27)
    at weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.java:88)
    at weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:41)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
    at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
    at weblogic.application.compiler.AppMerge.runBody(AppMerge.java:157)
    at weblogic.utils.compiler.Tool.run(Tool.java:158)
    at weblogic.utils.compiler.Tool.run(Tool.java:115)
    at weblogic.application.compiler.AppMerge.merge(AppMerge.java:169)
    at weblogic.deploy.api.internal.utils.AppMerger.merge(AppMerger.java:88)
    at weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:63)
    at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createDeployableObject(WebLogicDeployableObjectFactoryImpl.java:181)
    at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createLazyDeployableObject(WebLogicDeployableObjectFactoryImpl.java:156)
    at weblogic.deploy.api.tools.SessionHelper.inspect(SessionHelper.java:661)
    at com.bea.console.actions.app.install.Flow$2.execute(Flow.java:469)
    at com.bea.console.utils.DeploymentUtils.runDeploymentAction(DeploymentUtils.java:5000)
    at com.bea.console.actions.app.install.Flow.appSelected(Flow.java:467)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
    at org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
    at org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
    at org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
    at org.apache.beehive.netui.pageflow.FlowController.execute(FlowController.java:336)
    The web.xml is
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <context-param>
    <param-name>javax.faces.PROJECT_STAGE</param-name>
    <param-value>Development</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>faces/index.xhtml</welcome-file>
    </welcome-file-list>
    </web-app>
    After changing the version number I got the same error message with the differing number. I also tryed to deploy the web-app_3_0.xsd into the server. This also did not solve the problem.
    Any ideas?
    Thanks in advance
    Axel Burghof

    The web app consists of one JSF 2 web dialog, one managed bean, one stateless session bean and one entity bean. In GlassFish v3 the app works fine. Then I installed the actual version of WebLogic server in order to check whether I can run EE6 apps there to. But deploying the war using WebLogic admin console fails with ...
    Hey Axel -
    WLS 10.3.x does not implement Java EE 6 -- it's a Java EE 5 based server.
    While we have added support for a few independent Java EE 6 specifications where we can -- such as JSF 2.0 in WLS 10.3.3 and JPA 2.0/JAX-RS 1.1 with WLS 10.3.4 that is coming in the next patchset -- we don't support all of the Java EE 6 model and thus you can't use any of the EJB 3.1, Servlet 3.0 changes and you can't deploy EJBs (and JPA entities) inside of a WAR file. Our next major release will be a Java EE 6 implementation, where this will be possible.
    -steve-

  • Web.xml configuration for initial servlet load

    Hi all,
    I have heard of entering some tag into web.xml file (deployement descriptor) if we need some servlets to be loaded wheneve the app server starts or restarts. can some body help me regarding what to write in web.xml.
    thanks in advance

    I am having some problems with the same issue although specifying the load-on-startup param is not working for.
    Here is snipet of the web.xml:
    <servlet id="Servlet_1206024889339">
    <servlet-name>ContentServer</servlet-name>
    <servlet-class>COM.FutureTense.Servlet.SContentServer</servlet-class>
    <init-param id="InitParam_1206024988781">
    <param-name>inipath</param-name>
    <param-value>/data/WebSphere/ContentServer</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    This however doesn't init the contentServer servlet. Is there anythign else i need to check? I am using websphere5-1.
    I saw somewhere you might have to specify a loadonstartup=true? Where is this set?
    I know the app is reading the right web.xml because i put in a bad value and saw the error being outputted in the startup log.
    There are some servlets being initialised on startup but not the ones I want. These servlets don't seem to be in the web.xml.
    [10/10/08 11:53:30:265 IST] 1e06de8 WebContainer A SRVE0169I: Loading Web Module: cs.war.
    [10/10/08 11:53:33:330 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: JSP 1.2 Processor: init
    [10/10/08 11:53:34:098 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: SimpleFileServlet: init
    [10/10/08 11:53:34:117 IST] 1e06de8 WebGroup I SRVE0180I: [cs.war] [servlet] [Servlet.LOG]: DirectoryBrowsingServlet: init

  • Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-IN

    hi all,
    before i add <plug-in ValidatorPlugIn ... everything works fine with tomcat 4.0.4, JDK 1.4.1.02, struts 1.2.4 and Hibernate and MS access. But when I add plug-in to use default validation error occurs.
    Apache Tomcat/4.0.4 - HTTP Status 503 - Servlet action is currently unavailable
    type Status report
    message Servlet action is currently unavailable
    description The requested service (Servlet action is currently unavailable) is not currently available.
    in log file :
    2005-07-17 08:11:28 StandardWrapper[:action]: Marking servlet action as unavailable
    2005-07-17 08:11:28 StandardContext[]: Servlet threw load() exception
    javax.servlet.UnavailableException: Cannot load a validator resource from '/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml'
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:174)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:839)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:332)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3279)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
         at org.apache.catalina.core.StandardService.start(StandardService.java:388)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:506)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
         at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
         at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
    thanks.

    Hi Meri,
    Please check the syntax of the StrutsConfig.xml (As wel as other XML files)or check for the Data Type Defination of the XML for the Tomcat version you are using.

  • Critical: Adding session-config to web.xml cause application NOT to start

    I added the <session-config> element under <web-app> in web.xml:
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    Now the app won't start!
    The reason: the built-in sun app server removes context-root attribute from <web-module> element in domain.xml when the app tries to start!
    Please fix this ASAP, guys!

    I placed it in the wrong place. After following the instructions contained in the Technical FAQ (below), it worked.
    Add the following element in your web.xml file, placing it after the mapping for the error servlet and before the welcome file list:
    <session-config>
    <!-- Set global default timeout to 60 minutes -->
    <session-timeout> 60 </session-timeout>
    </session-config>

  • Servlet 2.4 web.xml error - Cant load the Schema

    i have coded the web.xml for my application as below,
    i am using Servlet 2.4 and Tomcat 5.5
    when i viewed the same in XML editor, it gave the following error -
    "Can't Load the W3C XML Schema" , cant figure what is the reason for this error. Any help would be greatly appreciated
    <?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"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
         <display-name>Rdp</display-name>
         <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>com.rdp.util.RDServlet</servlet-class>
              <init-param>
                   <param-name>config</param-name>
                   <param-value>/WEB-INF/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>
              <init-param>
                   <param-name>programe-name</param-name>
                   <param-value>Rdp</param-value>
              </init-param>
              <init-param>
                   <param-name>application</param-name>
                   <param-value>ApplicationResources</param-value>
              </init-param>                              
              <load-on-startup>2</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <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>
         <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>
    </web-app>

    i have coded the web.xml for my application as below,
    i am using Servlet 2.4 and Tomcat 5.5
    when i viewed the same in XML editor, it gave the
    following error -
    "Can't Load the W3C XML Schema" , cant figure what is
    the reason for this error. Any help would be greatly
    appreciated
    <?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"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
    <display-name>Rdp</display-name>
         <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>com.rdp.util.RDServlet</servlet-class
    >
              <init-param>
                   <param-name>config</param-name>
                   <param-value>/WEB-INF/config/struts-config.xml</par
    am-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>
              <init-param>
                   <param-name>programe-name</param-name>
                   <param-value>Rdp</param-value>
              </init-param>
              <init-param>
                   <param-name>application</param-name>
                   <param-value>ApplicationResources</param-value>
              </init-param>                              
              <load-on-startup>2</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <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>
         <taglib>
              <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-bean.tld</taglib-lo
    cation>
         </taglib>
         <taglib>
              <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-html.tld</taglib-lo
    cation>
         </taglib>
         <taglib>
              <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
              <taglib-location>/WEB-INF/struts-logic.tld</taglib-l
    ocation>
         </taglib>
    </web-app>
    <?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"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd"
    version="2.4">
    It looks the schema specified in your application is slightly different or wrong.
    Please correct it !!

  • Web.xml cant load the schema

    i am using servlet 2.4 and tomcat 5.5 and struts 1.2.9, wheni tried to build my application , it is not working, when the viewed the web.xml file in XML editor it is givinh "Can't Load the Schema", any help would be
    greatelly appreciated..............
    the web.xml file is as below
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="XMLSchema-instance.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
         <display-name>Rdp</display-name>
         <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>com.rdp.util.RDServlet</servlet-class>
              <init-param>
                   <param-name>config</param-name>
                   <param-value>/WEB-INF/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>
              <init-param>
                   <param-name>programe-name</param-name>
                   <param-value>Rdp</param-value>
              </init-param>
              <init-param>
                   <param-name>application</param-name>
                   <param-value>ApplicationResources</param-value>
              </init-param>                              
              <load-on-startup>2</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <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>
         <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>
    </web-app>

    i am using servlet 2.4 and tomcat 5.5 and struts 1.2.9, wheni tried to build my application , it is not working, when the viewed the web.xml file in XML editor it is givinh "Can't Load the Schema", any help would be
    greatelly appreciated..............
    the web.xml file is as below
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app
    xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="XMLSchema-instance.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">
         <display-name>Rdp</display-name>
         <servlet>
              <servlet-name>action</servlet-name>
              <servlet-class>com.rdp.util.RDServlet</servlet-class>
              <init-param>
                   <param-name>config</param-name>
                   <param-value>/WEB-INF/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>
              <init-param>
                   <param-name>programe-name</param-name>
                   <param-value>Rdp</param-value>
              </init-param>
              <init-param>
                   <param-name>application</param-name>
                   <param-value>ApplicationResources</param-value>
              </init-param>                              
              <load-on-startup>2</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <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>
         <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>
    </web-app>

  • Orion-web.xml -- web-app-class-loader

    Hi all, I posted this in the jDeveloper section and someone suggested that I ask you guys what the importance of the orion-web.xml file is. Currently my files looks like ...
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE orion-web-app PUBLIC "-//Evermind//DTD Orion Web Application 2.3//EN" "http://xmlns.oracle.com/ias/dtds/orion-web.dtd">
    <orion-web-app servlet-webdir="/servlet/">
    </orion-web-app>
    But it keeps adding the line that I mention below...
    I have a system that consists of multiple projects. When I deploy all projects they all work fine except for one. We discovered that this is due to the following line in the orion-web.xml file in that project ....
    <web-app-class-loader search-local-classes-first="true"/>
    I removed that line and everything is now fine. However, whenever I open up the application in jDev is puts that line back (even if I don't make changes).
    Is there a setting somewhere that is forcing this line to be put there and, if so, why? And how do I switch it off?
    Thanks,
    Russell

    Hey Steve,
    I must admit that this post confused me a bit.
    I can find no deployment plan editor. We have a WAR Deployment Profile, an EAR Deployment Profile and an EJB JAR Deplyment Profile.
    I use the debug functionality (using the embedded OC4J) to test the application locally during development and then deply the EAR Deployment Profile to an EAR file which then gets deployed using an Application Server.
    Further to this I have tried deleting the file (from everywhere), changing the EAR Deployment Properties and even changing the code within the ORION-WEB.XML to say <web-app-class-loader search-local-classes-first="false"/> all to no avail.
    If I remove the file completed, it add its back when I reopen the project. If I change it to false, it changes it back to True.
    Very confused I must admit.
    Thanks,
    Russell

  • Init-params in web.xml are not loaded (Tomcat 4)

    Hello all...
    I register a servlet in webapps/<my-servlet>/WEB-INF/web.xml file, and pass 1 <init-param> tag. The file gets parsed (I know because when I made errors tomcat complained during initialization). However, when in the init method of the servlet I try to access this parameter, its not there. In fact, the servlet has NO init params at all.
    =================================================
    I have the following web.xml file
    <?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>XServlet</servlet-name>
    <servlet-class>com.fxcm.xml.xengine.xdas.XServlet</servlet-class>
    <init-param>
    <param-name>xengine.configFile</param-name>
    <param-value>c:/projects/re/das.config/config.xng</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
         <servlet-name>XServlet</servlet-name>
         <url-pattern>/xservlet</url-pattern>
    </servlet-mapping>
    </web-app>
    =======================================================
    I have the following servlet
    * XServlet.java
    * Created on May 6, 2002, 1:17 PM
    package com.fxcm.xml.xengine.xdas;
    import javax.servlet.*;
    import javax.servlet.http.HttpServlet;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.ServletConfig;
    import java.util.Enumeration;
    import com.fxcm.xml.xengine.XEngine;
    public class XServlet extends HttpServlet{
    /** Initiates new XServlet */
    public void init(ServletConfig config)
    throws ServletException
              for (Enumeration e = config.getInitParameterNames(); e.hasMoreElements();){
    //This statement never gets printed because the loop never enters here since there are no init parameters
                   System.out.println(e.nextElement());
    super.init(config);
    String str = config.getInitParameter("xengine.configFile");
    System.out.println(str);
    XEngine.init(str.trim()); //This line throws NullPointer, because str is null since there are no initParameters.
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException{
    // res.setContentType( );
              System.out.println("Got post request in XServlet");
    PrintWriter out = res.getWriter();
    out.println(XEngine.process(req.getInputStream()));
    out.flush();
    out.close();
    ================================================================
    I get the follwoing error in the browser:
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         at com.fxcm.xml.xengine.xdas.XServlet.init(Unknown Source)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:400)
    Please help.
    Thank you,
    Elana

    I know what the problem is. If you call servlet with the default URL (http://host/app/servlet/package.Servlet) than Servlet DOES NOT read init parameters. I don't know why it was designed this way.
    To make servlet read init parameters, you have to assign it a name and then call it with that name, like this:
    <servlet>
    <servlet-name>ServletName</servlet-name>
    <servlet-class>package.ServletClass</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ServletName</servlet-name>
    <url-pattern>/app/path/ServletName</url-pattern>
    </servlet-mapping>
    You can then call servlet using path specified in url-pattern and read init parameters in the normal way.

  • Web application and web.xml

    i have a web application consisting of 1 servlet and 5 jsps.
    the start point would be index.jsp
    i use firmwide login page. after login, i want the browser to display index.jsp page.
    In web.xml, i have defined -
    <welcome-file-list>          <welcome-file>/jsp/index.jsp</welcome-file>     </welcome-file-list>       <servlet>        <servlet-name>UtilitiesServlet</servlet-name>        <servlet-class>com.gs.fw.sox404.utilities.UtilitiesServlet</servlet-class>             <init-param>             <param-name>util-log4j-init-file</param-name>             <param-value>/WEB-INF/classes/util_log4j.properties</param-value>          </init-param>        <load-on-startup>1</load-on-startup>    </servlet>     <servlet-mapping>        <servlet-name>UtilitiesServlet</servlet-name>        <url-pattern>/UtilitiesServlet</url-pattern>    </servlet-mapping>if i define it as just index.jsp in the welcome file list, after successful login, it displays the dir structure of the web app.
    if i define it as jsp/index.jsp, then in some of the pages, it tries to find the servlet inside jsp folder.
    What would be the best way to get around this?

    Well, yes, it's not able to find it because you've not understood the mechanism of how it works clearly. You have to put your welcome file under every directory you want it to be used from. Like I said, it's not a path, it's a filename. So if the container sees that your request URL is for a directory, it'll look for the welcome files from the welcome file list, one by one, in the order of declaration. Whichever one it finds first, it'll serve that. If it doesn't find any, then it'll either give a 404 or a directory listing depending on the server and it's settings.
    So your problem is that you've put your index.jsp in your JSP folder but expect it to be served for all URLs. That won't happen, you'll have to put one file named index.jsp into every directory. The reasoning is pretty simple, what if you want different behaviour for each folder?
    This should fix your problem :)
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • Problem with web.xml, while migratig application from JBOSS 5.0 to JBOSS5.1

    Hi ,
    Earlier my application was running fine on JBOSS 5.0 .
    In that web.xml was like
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_4.xsd"
         id="WebApp_ID" version="2.4">
         <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.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <!-- Timer Details -->
         <servlet>
              <servlet-name>perfMonCollector</servlet-name>
              <servlet-class>com.dbag.optimise.performancemonitor.timer.PerfMonitorCollector</servlet-class>
              <load-on-startup>4</load-on-startup>
              <init-param>
                   <param-name>cronExpr</param-name>
                   <param-value>0 0 0 */1 * ?</param-value>
                   <!--<param-value>0 */10 * * * ?</param-value> -->
              </init-param>
         </servlet>
         <servlet>
              <servlet-name>TransAnalysisCollector</servlet-name>
              <servlet-class>com.dbag.optimise.performancemonitor.timer.TransAnalysisCollector</servlet-class>
              <load-on-startup>3</load-on-startup>
              <init-param>
                   <param-name>cronExprTransAnalysis</param-name>
                   <param-value>*/30 * * * * ?</param-value>
              </init-param>
         </servlet>
         <!-- Timer Details -->
         <!-- PerfMonPoints Cache Generation on Server Startup -->
         <servlet>
              <servlet-name>perfMonGenerator</servlet-name>
              <servlet-class>com.dbag.optimise.performancemonitor.timer.PerfMonPointsGenerator</servlet-class>
              <load-on-startup>2</load-on-startup>
         </servlet>
         <!-- PerfMonPoints Cache Generation on Server Startup -->
         <!-- Standard Action Servlet Mapping -->
         <servlet-mapping>
              <servlet-name>action</servlet-name>
              <url-pattern>*.do</url-pattern>
         </servlet-mapping>
         <!-- The Usual Welcome File List -->
         <welcome-file-list>
              <welcome-file>jsp/index.jsp</welcome-file>
         </welcome-file-list>
    But now i have deployed my application on JBOSS 5.1 GA version.
    Now its giving exception.
    Caused by:
    org.xml.sax.SAXException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":run-as, "http://java.sun.com/xml/ns/javaee":security-role-ref}' is expected. @ vfsfile:/local/dubeavi/jboss-5.1.0.GA/server/default/deploy/PerformanceMonitoringISE-1.0/WEB-INF/web.xml[28,15]
    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
    at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
    at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
    ... 41 more

    My new web.xml is like..
    <web-app
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID"
         version="2.5">
         <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.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
         </servlet>

  • How to load a default page in web based application ?

    Hi
    I am new to j2ee , I have an application in which , when i start the application , login.html should be open by default .
    One way i found is that put the page name in <welcome-file> tag inside web.xml.
    My question is that there any other way like calling the dafault servlet or something else by which we can load the default page ?
    Any kind of help would be great.
    thanks in advance.

    Hi Rastogha,
    that sounds (to me) like the right way to do this. I suppose another way would be to have index.html redirect using a meta tag, but that's a little messy IMHO.
    sjl

  • Problem in Web.xml.........

    Hi to All,
    I installed the eval version of Crystal Reporst XI, created an example report with it and now I want to call my report from JSF Page.i followed the crxi_startup_guide_for_j2ee.i got the error in 'web.xml' file.the error is:
    "cvc-complex-type.2.4.a: Invalid content was found starting with element 'env-entry-value'. One of '{"http://java.sun.com/xml/ns/j2ee":env-entry-type}' is expected"
    here i shows my entry in web.xml file:
    <env-entry>
    <env-entry-name>jdbc/mydatabase name</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:mydatabase name</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    im unable to get what was the problem.my environment is Tomcat 5.0.28,SQL2000.
    i created that report using ODBC connection.is it correct?suppose if i have to connect using JNDI means how to achive this?
    can any one get me out of this please!!
    Thanks in Advance,
    --RK                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    This is my web.xml file........
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app 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">
    <env-entry>
    <env-entry-name>jdbc/IMDB</env-entry-name>
    <env-entry-value>!com.microsoft.jdbc.sqlserver.SQLServerDriver!jdbc:odbc:IMDB</env-entry-value>
    <env-entry-type>java.lang.String</env-entry-type>
    </env-entry>
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <context-param>
    <param-name>crystal_image_uri</param-name>
    <param-value>crystalreportviewers11</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    Thnx,
    Rk

  • Problem in loading the WL6.1 Examples Web Applications

    While the server 6.1 is starting, an error message is displayed in the DOS window.
    19.10.2001 14:28:28 CEST> <Debug> <HTTP> <Could not resolve entity "-//BEA Systems, Inc.//DTD Web Application 6.1//EN". Check
    your dtd reference.>
    <19.10.2001 14:28:30 CEST> <Error> <HTTP> <[examplesWebApp] Error reading Web application "C:\bea\wlserver6.1\config\examples\a
    pplications\examplesWebApp"
    java.net.UnknownHostException: www.bea.com
    It sounds to be related with the web.xml file. I thank you by advance for your help.
    Cheers

    Hi there,
    Many thanks for your answer. I am fine but I am sure I will be even more fine
    when I solve this technical issue.
    I checked the weblogic.xml file as you suggested and it is OK.
    I even tried to access the URL "http://www.bea.com/servers/wls610/dtd/weblogic-web-jar.dtd"
    with IE5. I had some doubt regarding our corportate proxy. But it worked fine.
    I can access successfully the dtd with a browser. I really don't see what is going
    wrong. I attached in case of the weblogic.xml file for your examination.
    Here is an extract of the error message displayed in the DOS window.
    <23.10.2001 13:52:50 CEST> <Info> <J2EE> <Deployed : DefaultWebApp>
    <23.10.2001 13:52:50 CEST> <Info> <HTTP> <[HTTP examplesServer] Loading web app:
    examplesWebApp>
    <23.10.2001 13:52:50 CEST> <Info> <HTTP> <[examplesServer] Loading "examplesWebApp"
    from directory: "C:\bea\wlserver6.1\config\
    examples\applications\examplesWebApp">
    <23.10.2001 13:52:50 CEST> <Warning> <HTTP> <servlet DisplaySetToPage is referenced
    but not defined in web.xml>
    <23.10.2001 13:52:50 CEST> <Debug> <HTTP> <Could not resolve entity "//BEA Systems,
    Inc.//DTD Web Application 6.1//EN". Check y
    our dtd reference.>
    <23.10.2001 13:52:52 CEST> <Error> <HTTP> <[examplesWebApp] Error reading Web
    application "C:\bea\wlserver6.1\config\examples\a
    pplications\examplesWebApp"
    java.net.UnknownHostException: www.bea.com
    at java.net.InetAddress.getAllByName0(InetAddress.java:571)
    etc....
    Could the origin of my problem come from the aforementionned error message "<servlet
    DisplaySetToPage is referenced but not defined in web.xml>" ?
    I thank you once again by advance for your help and support.
    Cheers
    Athmani H.
    BEA Weblogic Support <[email protected]> wrote:
    Hi Athmani
    Greetings...!
    How are you doing?.
    Weblogic 6.1 examples web application, examplesWebApp, should have the
    below given DOCTYPE in the weblogic.xml.
    <!DOCTYPE weblogic-web-app PUBLIC "-//BEA Systems, Inc.//DTD Web Application
    6.1//EN"
    "http://www.bea.com/servers/wls610/dtd/weblogic-web-jar.dtd">
    Please check that.
    Thanks & Regards
    BEA Systems Supoport
    Athmani wrote:
    While the server 6.1 is starting, an error message is displayed inthe DOS window.
    19.10.2001 14:28:28 CEST> <Debug> <HTTP> <Could not resolve entity"-//BEA Systems, Inc.//DTD Web Application 6.1//EN". Check
    your dtd reference.>
    <19.10.2001 14:28:30 CEST> <Error> <HTTP> <[examplesWebApp] Error readingWeb application "C:\bea\wlserver6.1\config\examples\a
    pplications\examplesWebApp"
    java.net.UnknownHostException: www.bea.com
    It sounds to be related with the web.xml file. I thank you by advancefor your help.
    Cheers
    [weblogic.xml]

Maybe you are looking for

  • System recovery from time machine after disk crash

    Hi there, recently I am a little unluky with my backup strategy. Here is my latest issue - I am glad if anyone has hints or advice. On my macbook pro (mid 2009, originally SL) updated till the latest version of Mavericks I recently had a hard disc cr

  • Some {@link} tags do not seem to generate hyperlinks

    Hi, I am having some trouble getting some {@link} tags to generate hyperlinks. Specifically, {@link} tags to methods in classes in other packages. I've tried specifying the method arguments, including the fully qualified argument types, but I cannot

  • Embedding a "Current Date" field in a pdf document

    To assure people work to the latest authorized version of a procedure, we let them access a protected pdf version on our Intranet. They can print a copy for use, but the copy is valid ONLY for the date printed, which is shown in the footer of each pa

  • Problem with command from LFS

    So right now I'm in the middle of a LFS build (current stable).  I'm at Chapter 5 and currently doing the first build of glibc.  I'm having problems with the command: ln -vs libgcc.a 'gcc -print-libgcc-file-name | sed 's/libgcc/&_eh/'' I've tried the

  • Can I submit form using app.launchURL

    I want to submit a pdf form without replacing my page. I need it open in new tab. The script below is work, but it replaces my old page this.submitForm({ cURL: "http://localhost:8080/project/TestServlet", cSubmitAs: "PDF", cCharset: "utf-8" This scri