Results 1 to 3 of 3

Thread: Web.xml

  1. #1
    Felissa is offline Member
    Join Date
    Jun 2007
    Posts
    95
    Rep Power
    0

    Default Web.xml

    I have a doubt with respect the las specifications of the format that must have web.xml for specification J2EE 1.4.2 with the java.sun.com/xml/ns/j2ee/web-app_2_4e.xsd scheme

    For the specification with I worked in WSAD 5.1 the validador document was a DTD and if I needed to initiate servlet from the container it should to put a tag called load-on-startup. The small detail is that in this scheme that tag does not exist. If you know how can I do that I t would thank.

    Felissa:p

  2. #2
    Marcus is offline Member
    Join Date
    Jun 2007
    Posts
    92
    Rep Power
    0

    Default RE: Web.xml

    Tag continues existing, I send the code:

    Java Code:
    <?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>Test</display-name> 
          <servlet> 
                <description></description> 
                <display-name>Test</display-name> 
                <servlet-name>Test</servlet-name> 
                <servlet-class>Test</servlet-class> 
                <load-on-startup>-1</load-on-startup> 
          </servlet> 
          <servlet-mapping> 
                <servlet-name>Test</servlet-name> 
                <url-pattern>/Test</url-pattern> 
          </servlet-mapping> 
          <welcome-file-list> 
                <welcome-file>index.jsp</welcome-file> 
          </welcome-file-list> 
    </web-app>
    Marcus:cool:

  3. #3
    Daniel is offline Member
    Join Date
    Jun 2007
    Posts
    91
    Rep Power
    0

    Default

    This number represents the order in which it is going to make instance the servlet, if you have a lot of servlets then the one that has the smaller value load in memory first.

    If you enter negatives numbers so is like if you don't have the tag in the servlet.

    Daniel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •