Web.xml absolute-ordering others/

Hi all  i'm preparing for OCEJWCD  but i faced this question
Given a jar file packaged with three web fragments with names X, Y and Z respectively. Which of the following deployment descriptor, web.xml, snippets correspond to the web fragment processing orders of X, Y, Z?
<absolute-ordering>
<name>X</name>
<name>Y</name>
<name>Z</name>
</absolute-ordering>
(ii) <absolute-ordering>
<name>X</name>
<name>Y</name>
</absolute-ordering>
(iii) <absolute-ordering>
</others>
<name>Y</name>
<name>Z</name>
</absolute-ordering>
(iv) <absolute-ordering>
<name>X</name>
</others>
<name>Z</name>
</absolute-ordering>
(v) <absolute-ordering>
<name>X</name>
<name>Y</name>
</others>
</absolute-ordering>
A.
only
B.
and (ii)
C.
and (iv)
D.
(i), (iii), (iv) and (v)
why D is not the answer ???

any  answer ?

Similar Messages

  • Web.xml help

    hello people, i seem to have a hard time finding a listing of what you can put in the web.xml file. Is this a sun governed thing or can any application server create a layout as to there choosing? as an example i use tomcat for personal use but am trying to figure out websphere 5.1 for work.
    can someone point me in the proper direction to look up these specs. i'm tired of trying to find this stuff on ibms site.
    thanks in advance, graeme.

    Well the DTD is available here: http://java.sun.com/dtd/web-app_2_3.dtd
    It specifies the content and ordering of the standard web.xml.
    Order DOES matter
    <!ELEMENT web-app (icon?, display-name?, description?, distributable?,
    context-param*, filter*, filter-mapping*, listener*, servlet*,
    servlet-mapping*, session-config?, mime-mapping*, welcome-file-list?,
    error-page*, taglib*, resource-env-ref*, resource-ref*, security-constraint*,
    login-config?, security-role*, env-entry*, ejb-ref*,  ejb-local-ref*)>

  • Processing web.xml -Adding servlet

    Can you please give me an out line how to add servlets/filters/session-configs to web.xml programatically.
    I have writen a program for adding these but In web.xml the order in which elements are placed matters. So right now in the program I specify that I should add this element before another specified element like that .
    How can we make this generic ? I mean how I can maintain the same order as of DTD ?
    please help me.

    Answering your original question. Yes it is possible to have a web.xml without servlet classes, if you are not using servlet classes.
    >
    But I got the following error from Tomcat.
    2007-01-12 18:31:25 ContextConfig[worktigers] Parse
    error in application web.xml
    org.xml.sax.SAXParseException: The processing
    instruction target matching "[xX][mM][lL]" is not
    allowed.
    at
    t
    org.apache.xerces.parsers.AbstractSAXParser.parse(Unkn
    own Source)
    TA
    MalaiIt looks like there may be BOM characters (invisible in regular editors), before the opening angle bracket of the XML prolog: <?xml version="1.0"
    The special characters usually are inserted by some editors such as Notepad.
    You can download a free Hex editor, like Cygnus hex editor and see if you have the 3 special characters (in Hex) appearing before the XML prolog.
    If you see anything before the prolog delete them, save the web.xml file and re-test it.
    Reading from previous answers to your problem from here:
    http://forum.java.sun.com/thread.jspa?threadID=694303&messageID=4033694
    http://mail-archives.apache.org/mod_mbox/xerces-j-users/200201.mbox/%3Cp04330102b8689660dcbc@%5B192.168.254.4%5D%3E

  • Web.xml  Why?

    I have heard that it is better practice to write out servlet locations and such in a web.xml file for deployment. I am currently running WSAS 5.0. I have not done so. I simply use the directory structure and the location of these servlets takes care of itself. I would like to know what is the reasoning behind using this file. IT seems like just another step. Links would be appreciated. Also, nothing is going to be moved around in the application and no names will be changed so don't give any trivial answers.

    Last I checked it was part of the J2EE Spec. If you want to be locked into WSAS 5.0, there is no need to use it, other than spec compliance.
    If you want the war file to be compliant and portable, you need to use the web.xml file.
    vbk

  • Do I must put ALL my servlets inside the web.xml file?

    Hello everybody,
    I am trying to migrate from Webshere to TOMCAT a project with severals packets, one of those have 15 servlets and some classes.
    Is there any way to use the servlets without have to declare each one inside the web.xlm file ?
    Thanks in advance.

    All servlet definitions go into web.xml, though not the actual servlets themselves :) . Say if you wanted servlet A to have a different mapping you would define the mapping in web.xml to something other than the standard one.

  • Tomcat 404 error until I apply this change to my web.xml mapping

    What is the purpose of the /servlet/ portion of the url-pattern in the servlet mapping element below.
    If I use the first few lines I get a 404 class not found error
    If I include /servlet/ in the url-pattern element then my app works fine ?????
    //Does not work
    <servlet-mapping>
    <servlet-name>login</servlet-name>
    <url-pattern>com.onjava.login</url-pattern>
    </servlet-mapping>
    //works !!
    <servlet-mapping>
    <servlet-name>login</servlet-name>
    <url-pattern>/servlet/com.onjava.login</url-pattern>
    </servlet-mapping>

    If the first mapping doesn't work and the second mapping works then my guess is that neither mapping is working. What may be happening is the invoker servlet may be enabled and that would explain why the /servlet url works.
    The invoker servlet is set up in the conf/web.xml file. This servlet will invoke a particular servlet using the class name and the /servlet url. In newer versions of tomcat the invoker servlet id disabled by default.
    Now the question is why does the servlet mapping not work? What version of tomcat are you running? Can you post the entire web.xml?

  • Automate creation of web.xml file for tomcat 4.1.29

    hi , this is with ref to Tomcat 4.1.29, if i am correct, each Servlet in the application has to be mentioned in the web.xml file for the Tomcat to know about it. Is there any way to automate the creation of web.xml file , depending on the contents of the Servlet folder of the application. Any way to escape from writing each Servlet name in web.xml file.
    rc

    Hello,
    Maybe you should check if you can use Ant tool to do
    that. I am not sure if it can help u.
    Zeph.
    http://ant.apache.org/
    It will, specially if used in conjunction with XDoclets :
    http://xdoclet.sourceforge.net/
    XDoclet has Ant tasks to generate web.xml files.

  • Whats the difference between servlet-config.xml ang web.xml???

    whats the difference between servlet-config.xml ang web.xml???

    web.xml is the standard configuration for all Java EE web modules.
    servlet-config.xml appears to be pertinent only for Struts apps.
    you don't have to have servlet-config.xml if you don't use Struts, but you've got to have web.xml.
    %

  • Problem with web.xml

    Hello,
    I have a big problem with web.xml.
    i can run the servlet demos with the default web.xml, but when i try to user a costum web.xml files, i receive a 404 page not found on a link.
    i have some dificulty to post here. but can somebody help my with my web.xml files?
    thanks for your help.
    have a nice day!

    Be careful with the place of your files and folders. It's possible that you've just mentioned the cause of your problem.
    My web.xml is
    <?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>
    <display-name>gco</display-name>
    <description>gco webapplicaties</description>
    <servlet>
    <servlet-name>MopoController</servlet-name>
    <servlet-class>org.gertcuppens.controller.MopoController</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>MopoController</servlet-name>
    <url-pattern>/MOPO</url-pattern>
    </servlet-mapping>
    </web-app>
    When I want to call my web application locally, I use the URL http://localhost:8080/gco/MOPO.
    The http://localhost:8080 calls Tomcat. With /gco, Tomcat knows it should look for a folder gco inside the webapps folder. This one should contain a WEB-INF/web.xml folder for further instructions.
    With /MOPO Tomcat knows, having read the web.xml files of all webapps folders at start, it should look for a servlet with the name MopoController. And this MopoController points to the class org.gertcuppens.controller.MopoController. So, Tomcat knows where to find everything.
    Try to see whether your Tomcat can find everything inside the folders using your web.xml file.

  • Security Bug?? Accessing WEB-INF/web.xml from a URL

    I can access http://localhost/NASApp/myApp/WEB-INF/web.xml (or any other
    files in WEB-INF) from my browser! This can't be right. How do I turn this
    off?
    Hopefully, I can do this in the appserver, but if not, please tell me how to
    do it in the webserver. I am using iWS 4.1 & iWS 6.0 on 2 different
    machines.
    Thanks,
    Matt

    This is known bug previously discussed in the following thread (search
    in the newsgroup mcom.ias):
    !!From - Fri Aug 31 08:12:02 2001
    !!From: [email protected] (David Ogren)
    !!Newsgroups: mcom.ias
    !!Subject: Can someone cross-check this sp3 security concern
    Matt Raible wrote:
    I can access http://localhost/NASApp/myApp/WEB-INF/web.xml (or any other
    files in WEB-INF) from my browser! This can't be right. How do I turn this
    off?
    Hopefully, I can do this in the appserver, but if not, please tell me how to
    do it in the webserver. I am using iWS 4.1 & iWS 6.0 on 2 different
    machines.
    Thanks,
    Matt

  • Orion-web.xml

    What is the siginificanc of orion-web.xml file with respect to 9iAS? It seems to be like a configuration file. But I would like to know where it comes into picture and what role it plays with forms9i/9ias.
    Thanks in advance
    Sheba

    Sheba,
    you use this file to define classpath settings and virtual mappings for a Web deployment context, like /forms90.
    For example: defining
         <virtual-directory virtual-path="/img" real-path="D:\appImages/myImages" />
    in the forms deployment context to access images on the Web will make them accessible through
    http:// server :Port/forms90/img/<image name>
    The virtual directory is created under the context root of the deployment owning the orion-web.xml file
    Frank

  • Order of servlet mapping in web.xml

    Hello,
    is the order of multiple <servlet-mapping> in web.xml important? Or it doesn't matter in which order they are declared?
    For example, if i have two controllers, one is
    <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
    </servlet>
    and the second:
      <servlet>
        <servlet-name>FrontController</servlet-name>
        <servlet-class>servlets.FrontController</servlet-class>
      </servlet>
    and the mapping are:
       <servlet-mapping>
        <servlet-name>FrontController</servlet-name>
        <url-pattern>/jsf/*</url-pattern>
      </servlet-mapping>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>where /jsf/ contains jsp pages containing jsf components.
    is the order important?
    And may second question is:
    if i call the jsp page test.jsf in /jsf/test.jsp , which controller is responseble? Faces servlet or Frontcontroller?

    Here is what the 2.4 specification says on the matter (section SRV.11.1):
    >
    The path used for mapping to a servlet is the request URL from the request
    object minus the context path and the path parameters. The URL path mapping rules below are used in order. The first successful match is used with no further matches attempted:
    1. The container will try to find an exact match of the path of the request to the
    path of the servlet. A successful match selects the servlet.
    2. The container will recursively try to match the longest path-prefix. This is done by stepping down the path tree a directory at a time, using the �/� character as a path separator. The longest match determines the servlet selected.
    3. If the last segment in the URL path contains an extension (e.g. .jsp), the servlet container will try to match a servlet that handles requests for the extension. An extension is defined as the part of the last segment after the last �.� character.
    4. If neither of the previous three rules result in a servlet match, the container will attempt to serve content appropriate for the resource requested. If a "default" servlet is defined for the application, it will be used.
    The container must use case-sensitive string comparisons for matching.
    It also notes that in prior versions of the specification these were only a suggestion so if you are on servlet 2.3 or prior, you need to consult the documentation for your container.
    So, to answer your questions, no, order in the descriptor is not important.
    Also, based on the rules above, using your mappings, any URL starting with /jsf will be handled by FrontController including /jsf/test.jsp and /jsf/test.jsf.

  • Web.xml security-constraint order matters?

    After a long and frustrating debuggin session I've just discovered that the order in which <security-constraint>
    entries are added to the web.xml file matters to OC4J.
    That is if a more laxed rule is matched first the rest
    (even though they might be more precise or even an
    exact match won't be applied.
    Is this normal behaviour?
    EXAMPLE BELOW WORKS - INVERT ENTRIES AND IT WILL FAIL
    <security-constraint>
        <web-resource-collection>
          <web-resource-name>Protected</web-resource-name>
          <url-pattern>/admin*.uix</url-pattern>
        </web-resource-collection>
        <auth-constraint>
          <role-name>DSMSuperUser</role-name>
        </auth-constraint>
      </security-constraint>
      <security-constraint>
        <web-resource-collection>
          <web-resource-name>Secure</web-resource-name>
          <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
          <role-name>DSMUser</role-name>
        </auth-constraint>
      </security-constraint>

    Here is an excerpt from the servlet spec stating the proper behavior:
    The container matches URL patterns defined in security constraints
    using the same algorithm described in this specification for matching client
    requests to servlets and static resources as described in SRV.11.1
    SRV.11.1 Use of URL Paths
    Upon receipt of a client request, the web container determines the web application
    to which to forward it. The web application selected must have the the longest
    context path that matches the start of the request URL. The matched part of the URL
    is the context path when mapping to servlets.
    The web container next must locate the servlet to process the request using the
    path mapping procedure described below:
    The path used for mapping to a servlet is the request URL from the request
    object minus the context path. The URL path mapping rules below are used in
    order. The first successful match is used with no further matches attempted:
    1. The container will try to find an exact match of the path of the request to the
    path of the servlet. A successful match selects the servlet.
    2. The container will recursively try to match the longest path-prefix: This is done
    by stepping down the path tree a directory at a time, using the ’/’ character as
    a path separator. The longest match determines the servlet selected.
    3. If the last segment in the URL path contains an extension (e.g. .jsp), the servlet
    container will try to match a servlet that handles requests for the extension.
    An extension is defined as the part of the last segment after the last ’.’ character.
    4. If neither of the previous three rules result in a servlet match, the container will
    attempt to serve content appropriate for the resource requested. If a "default"
    servlet is defined for the application, it will be used.
    The container must use case-sensitive string comparisons for matching.
    So this is STILL an issue w/ 10.1.2.0.2...
    EXAMPLE BELOW WORKS - INVERT ENTRIES AND IT WILL FAIL
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>oemAdmin</web-resource-name>
    <url-pattern>/admin/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>OEM_ADMIN</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>allOem</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>OEM_USER</role-name>
    </auth-constraint>
    <user-data-constraint>
    <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
    </security-constraint>
    If I don't find a SR for this issue I'll open one b/c this is not acceptable.

  • ISA changing web.xml parameters for ordering

    Dear all,
    I have the following problem. I would like to set the web.xml parameters in such a way that when I click add to basket from a product, to create a basket directly and add it rather than navigating to createdocument.jsp and having to choose between order and order template. I think this is possible, could someone please tell me some details on how to do it?
    thank you very much in advance

    Hello Alkis!
    Do you want to disable choose document type and create only a Basket type (neither Order nor Quotation) document while choosing product from product catalog?
    Please give more clear requrements.
    regards, Lev

  • Confused about jrun-web.xml

    G'day there
    I'm hoping someone can clarify the *actual* purpose of the
    [cf]/WEB-INF/jrun-web.xml file, and how CF uses it.
    My understanding of it was that it was the
    JRun-internal-webserver's
    equivalent of Apache's httpd.conf, or IIS's... err...
    whereever IIS stores
    its config. Basically a web server configuration file. So if
    one wasn't
    actually USING the JRun webserver for a given web site, then
    that file is
    just ignored.
    However that understanding is incorrect, it seems.
    I have this sort of set-up on my dev machine's file system:
    C:\webroots
    \webapp1root
    \lib
    \subapp
    \myCfc.cfc
    \webapp2root
    \lib
    \subapp
    \myCfc.cfc
    And my IIS default website (I'm just running XP Pro, so only
    one website @
    a time) is set up to have either webapp1root or webapp2root
    as its webroot,
    depending on which I am working on, at a given moment in
    time. And the
    website also has a virtual directory to "subapp", called...
    "subapp".
    Currently I'm working on webapp1, so was bemused that when I
    did this:
    createObject("component", "subapp.myCfc")
    I was getting an instance of
    C:\webroots\webapp2root\lib\subapp\myCfc.cfc
    created, instead of the webapp1 version.
    I spent rather too long ballocksing around checking virtual
    directories, CF
    mappings and all that sort of palarver, only to eventualy
    find that I had a
    residual mapping in my jrun-web.xml file pointing to
    webapp2root's subapp
    directory.
    Once I removed that: all good.
    Now to me, jrun-web.xml should be completely irrelevant to
    that mix, as I'm
    not using the JRun web server.
    So obviously it's NOT just a web server config file. WTF *is*
    it?
    I have read various docs on the Adobe website, but they all
    seem to be
    written for an audience who would already know what the
    author is on about
    (hence making the doc a bit of a waste of time, in my view),
    and it's all
    completely impenetrable for me, as I'm just a CF developer
    and haven't got
    a clue about the inner workings of JRun (and, to be frank:
    I'd like to keep
    it that way if poss... JRun knowledge is not exactly a
    marketable skill
    What am I missing here?
    Adam

    I didn't skip over that part, but I probably wasn't as clear
    as I needed to be. web.xml (and jrun-web.xml) are deployment
    descriptors for a J2EE web application. That actually has nothing
    to do with a "web server", it has to do with telling the
    application server (JRun, in this case), any information it needs
    to deploy the web application (ColdFusion, in this case). The
    jrun-web.xml file simply includes stuff that isn't apart of the
    J2EE spec but JRun developers thought it helpful to add in.
    Again, _it has nothing to do with the "web server" as you see
    it_.
    If you are using IIS as your frontend web server, you're
    still using JRun, the Application Server. In order for the JRun
    Application Server (_not_ the web server) to start, it looks at
    certain files to determine what web applications to deploy and how
    to deploy them. Those files are web.xml and jrun-web.xml, among
    others. The reason they're named "web.xml" and "jrun-web.xml" is
    because it's deploying a "J2EE
    Web Application". It has absolutely nothing to do with a web
    server (an application that listens on port 80 or 443 and responds
    to HTTP requests).
    Let's see if I missed anything from your post:
    quote:
    G'day there
    I'm hoping someone can clarify the *actual* purpose of the
    [cf]/WEB-INF/jrun-web.xml file, and how CF uses it.
    My understanding of it was that it was the
    JRun-internal-webserver's
    equivalent of Apache's httpd.conf, or IIS's... err...
    whereever IIS stores
    its config. Basically a web server configuration file. So if
    one wasn't
    actually USING the JRun webserver for a given web site, then
    that file is
    just ignored.
    Nope. It's not a "web server configuration file". It's a web
    application deployment descriptor. Lots different. It all stems
    from the fact that ColdFusion is nothing more than a J2EE web
    application being deployed on JRun.
    quote:
    {snip}
    Now to me, jrun-web.xml should be completely irrelevant to
    that mix, as I'm
    not using the JRun web server.
    So obviously it's NOT just a web server config file. WTF *is*
    it?
    See my first post, and clarification at the top of this post
    quote:
    I have read various docs on the Adobe website, but they all
    seem to be
    written for an audience who would already know what the
    author is on about
    (hence making the doc a bit of a waste of time, in my view),
    and it's all
    completely impenetrable for me, as I'm just a CF developer
    and haven't got
    a clue about the inner workings of JRun (and, to be frank:
    I'd like to keep
    it that way if poss... JRun knowledge is not exactly a
    marketable skill
    What am I missing here?
    I have no idea how that mapping got in there in the first
    place, but this is standard J2EE deployment descriptor stuff. Most
    other J2EE servers (BEA, Glassfish, JBoss, etc) all have a
    server-specific ___-web.xml deployment descriptor that goes along
    with each web app, telling the Application Server the information
    it needs to deploy the web app.
    So, to sum up:
    jrun-web.xml is not a web server configuration file.
    jrun-web.xml is a JRun-specific J2EE Web Application
    deployment descriptor file.
    J2EE Web Application deployment descriptor files have nothing
    to do with a web server (an application that responds to HTTP
    requests), though the web.xml and jrun-web.xml files do tell JRun
    how to interpret the requests passed to it via the IIS ISAPI
    filter.
    I don't know how you got that mapping in there in the first
    place.

Maybe you are looking for

  • [svn:osmf:] 14181: PARB changes: Move DateUtil to f4mClasses, it doesn' t need to be part of the public API.

    Revision: 14181 Revision: 14181 Author:   [email protected] Date:     2010-02-15 21:57:55 -0800 (Mon, 15 Feb 2010) Log Message: PARB changes: Move DateUtil to f4mClasses, it doesn't need to be part of the public API. Modified Paths:     osmf/trunk/fr

  • Air 3.3 and background ios apps

    Hi All I cannot find some coherent information on this so I am asking here. I need to write an iOS app that needs to perform a webservice call every x minutes to update the slqite db on the device, even if the application is not running in the foregr

  • Can we have simultaneous merges into LIVE?

    Hi, MergeWorkspace and RefreshWorkspace APIs freeze the parent workspace in NO_ACCESS mode. Does this mean that we can't perform simultaneous merges/refreshes, even if the parent workspace is LIVE? If the answer is 'yes', does it make sense for autom

  • X3F Grayscale Bug

    When I import into Lightroom 2.1 an X3F raw file previously adjusted in Sigma Photo Pro to have "grayscale" white balance, Lightroom refuses to let me adjust it as a color image. It interprets the raw file as having no color data. I can work around t

  • Favourites /Bookmarks not as before can't add new sites

    Favourite/Bookmarks show as thin blue lines, still seem to be html. No sign of Favcons and the original setout of the facility. No sign of "Add to Favourites" in toolbar. Maybe I have tick/unticked a vital element ?