ANT Newbie question webxml="web.xml" ????

I have following lines in my build.xml
<war
        basedir="../"
        warfile="${distpath.project}/${project.distname}.war"
        webxml="web.xml">
        <exclude name="${distpath.project}/${project.distname}.war"/>
</war>Can anybody tell me what is the meaning of webxml="web.xml" ???
Also, if i am not wrong, does the last line mean that exclude the .war file while creating the war ???
Thanks !!!

Can anybody tell me what is the meaning of
webxml="web.xml" ???This attribute is used to specify the XML file which contains the deployment descriptors for the web app. In short, if you specify "mydesc.xml" there, the XML will be copied to WEB-INF/web.xml
Also, if i am not wrong, does the last line mean that
exclude the .war file while creating the war ???This might be something like excluding the previously generated WAR files. Not sure really!

Similar Messages

  • XML Question for web.xml file for LiteWebServer

    Hi,
    I have no clue of wut tags are required in the web.xml file.
    Currently the following code is in my web.xml file and i am trying to run servlets that are located under web-inf/*.class
    Pls tell me wuts wrong....
    Do i need those mime-mapping tags, session and welcome tags.......... ?
    Right now i just want those 2 servlets to work
    And wut is this encoding ="UTF-8" in the first line of the xml file. Wut does that do... ? ARe there any others
    Any help would b greatly appreciated
    Thanks
    <?xml version="1.0" encoding="UTF-8" ?>
    <!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 id="WebApp_1">
    <display-name>PDMPortal</display-name>
    <session-config id="SessionConfig_1">
    <session-timeout>60</session-timeout>
    </session-config>
    <mime-mapping id="MimeMapping_1">
    <extension>htc</extension>
    <mime-type>text/x-component</mime-type>
    </mime-mapping>
    <welcome-file-list id="WelcomeFileList_1">
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
    <servlet-name>HelloWorld</servlet-name>
    <servlet-class>HelloWorld</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>HelloWorldExample</servlet-name>
    <servlet-class>HelloWorldExample</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>HelloWorld</servlet-name>
    <url-pattern>HelloWorld</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>HelloWorldExample</servlet-name>
    <url-pattern>HelloWorldExample</url-pattern>
    </servlet-mapping>
    </web-app>

    Try putting your servlets in the WEB-INF\classes directory.

  • Question about web.xml

    So in my web.xml file (for Tomcat 5.5) I used to map a servlet like this:
    <servlet-mapping>
    <servlet-name>
    ServletName
    </servlet-name>
    <url-pattern>
    /servlet/ServletName
    </url-pattern>
    </servlet-mapping>and it wouldn't work. Now when I map it like this:
    <servlet-mapping>
    <servlet-name>
    ServletName
    </servlet-name>
    <url-pattern>
    /servlet/*
    </url-pattern>
    </servlet-mapping>it works just fine. Can anyone explain to me why this is since I've seen web.xml files that don't use the /* for the dir. location?
    Thanks in advance.

    I posted this too soon. Using that 'wild card' it grabs the last servlet mapped in web.xml. So I commented everything out and left the file with the following(I used '*' just to keep stuff private):
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <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>DISPLAY NAME</display-name>
        <description>
         DISPLAY NAME
        </description>
       <servlet>
    <servlet-name>SignIn</servlet-name>
        <servlet-class>lmt.SignIn</servlet-class>
    <init-param>
          <param-name>url</param-name>
          <param-value>jdbc:mysql://localhost/********</param-value>
        </init-param>
        <init-param>
          <param-name>**********</param-name>
          <param-value>*******</param-value>
        </init-param>
        <init-param>
          <param-name>********</param-name>
          <param-value>***********</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>
    SignIn
    </servlet-name>
    <url-pattern>
    /servlet/SignIn
    </url-pattern>
    </servlet-mapping>
    </web-app>This is will not locate the servlet.
    I get a 404 with this message: "type Status report
    message /servlet/SignIn/
    description The requested resource (/servlet/SignIn/) is not available.
    I really have no idea what's wrong here. Is there a problem with some configuration elsewhere? Thanks again.

  • Question on web.xml in OAF

    Hi Friends,
    when i open web.xml in jdeveloper window, i can able to see my application(instance) user name and pass word.
    what can i do to remove my password in web.xml. is there any set up to do for instead of displaying password name display as some *****************.
    Thanks in advance,
    vamshi.

    Hi Reetesh,
    Thank you.
    atleat can we hide this below part in web.xml..
    <context-param>
    <param-name>OA_LOGIN_PASSWORD</param-name>
    <param-value>krishna12</param-value>
    </context-param>
    Regards,
    vamshi.

  • Question on web.xml and login

    Hi all
    I am doing a web-based project, registered user need to log in before they view the member area pages.
    I have created a directory, called "client", in the Tomcat 4.1.24/webapps/ROOT/client I have put a index.html in the client directory. This index.html only can be viewed by the client after log in.
    For the best of my knowledge in Tomcat, in order to do this, I have created a web.xml in Tomcat_home/webaggs/ROOT/WEB-INF/web.xml, in the url-pattern section, I put /client/* to tell the tomcat server that index.html in client directory is the first page after user login.
    The problem is, I couldnt see the member welcome page after I login as a member, the browser gave me the error: HTTP status 400 - Invalid direct reference to form login page. However, if I specified the address http://localhost:8080/client/index.html , it show me the login page and after I input the username and password I can see the member welcome page.
    I dont know whether is something wrong with the web.xml or I should do other thing to let the server know which is the first page after member login.
    Thank you very much
    Kelvin
    =====================================================
    <web-app>
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Security</web-resource-name>
    <url-pattern>/client/*</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>administrator</role-name>
         <role-name>client</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/login.html</form-login-page>
    <form-error-page>/login_error.html</form-error-page>
    </form-login-config>
    </login-config>
    </web-app>
    =====================================================

    Wow, you really are in the wrong place with this query, its not really even java ;o) This is the new to java forum! Perhaps you would be better off (in fact I know for a FACT that you will be as I have seen answers to identical problems there) in the Tomcat-user list...
    Go HERE:
    http://www.mail-archive.com/[email protected]/
    and search

  • Newbie question on indexing XML type

    I cannot get a query to use an index I created for an XML type. Here is my setup:
    create table XmlTest( id number,
    data_xml XMLType)
    XmlType data_xml STORE AS CLOB;
    I inserted 10,000 records like this ( each record has a unique id):
    insert into XmlTest(id, data_xml) values
    ( 1
    , XMLType('<company>
    <department>
    <id>10</id>
    <name>Accounting</name>
    </department>
    </company>'));
    I then created this index:
    CREATE INDEX xmltest1
    ON xmltest (extractValue(data_xml, '/company/department/id'));
    When I run this query, it takes a long time - 12 seconds.
    SELECT id from xmltest
    WHERE EXISTSNODE( data_xml, '/company/department[id="37500"]') = 1;
    it is doing a full table scan. What is wrong with my index?
    Thanks!

    I've yet to have the opportunity to work with indexes on XML data but I suspect it is because your index alone cannot satisfy the results of the query and the data you want is from every row in the table so a FTS is the best approach.
    To restate, you are asking for the id value from the table where the XML contains a certain node. This node exists in every entry in the index, so why use the index if you have to go get data from the table.
    Or it is because EXISTSNODE is checking for a different condition then your index was defined on. I suspect if you do something like /company/department/id[. = '10'] in your EXISTSNODE, it should use the index.
    All this is a guess and the best place for you to look is the {forum:id=34} forum and also [Marco&apos;s Blog|http://www.liberidu.com/blog/]

  • 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.

  • (newbie) Question about replacing .class files and web.xml file

    I'm new to servlets and I have two quick questions...
    Do I absolutely need a web.xml file to define all my servlets, or can I simply place .class files into the WEB-INF directory and expect them to run?
    If my application server (for example Tomcat) is running and I replace a servlet .class file, do I need to restart the server for the new .class file to take effect?
    ...or are both of these questions specific to the application server I'm using?

    Hi,
    From an article I read:
    With Tomcat 3.x, by default servlet container was set up to allow invoking a servet through a common mapping under the /servlet/ directory.
    A servlet could be accessed by simply using an url like this one:
    http://[domain]:[port]/[context]/servlet/[servlet full qualified name].
    The mapping was set inside the web application descriptor (web.xml), located under $TOMCAT_HOME/conf.
    With Tomcat 4.x the Jakarta developers have decided to stop allowing this by default. The <servlet-mapping> tag that sets this mapping up, has been commented inside the default web application descriptor (web.xml), located under $CATALINA_HOME/conf:
    <!-- The mapping for the invoker servlet -->
    <!--
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    -->
    A developer can simply map all the servlet inside the web application descriptor of its own web application (that is highly suggested), or simply uncomment that mapping (that is highly discouraged).
    It is important to notice that the /servlet/ isn't part of Servlet 2.3 specifications so there are no guarantee that the container will support that. So, if the developer decides to uncomment that mapping, the application will loose portabiliy.
    And declangallagher, I will use caution in future :-)

  • Newbie question - XML version, searching by artist

    Probably quite a common problems - apologies for newbie questions.
    I've changed the URL of my MP3s in my XML to a new location and refreshed my feed. Is there a way of seeing what version of the XML iTunes is using? (it takes around 24 housr to refresh, right?)
    Also, when I'm searching for my podcast by author it's not coming up (<channel><itunes:author>) - is there a reason for this or a way to get it to show up when people search for the artist, other than doubling it in the title? (This works by the way, but I'd prefer not to!)
    Thanks.

    you can do it in just one loop, going through all the image
    tags in index_content and for each tag fill the values of all four
    arrays
    for (i...) {
    get the appropriate child of index_content
    first_array[ i ] = value of first tag
    second_array[ i ] = value of second tag
    no need for multiple loops.
    flash has functionality for xml files, but it helps to write
    a little wrapper around it, to simplify programming, especially if
    you work with xml a lot.. I wrote my for work, so I can't show it
    to you, but it's not very complicated to do

  • Web.xml question

    Hi Guys!
    I ran into a small problem.
    Im using the struts tiles framework to redesign a shopping cart .
    In the new framework,there are multiple websites(user interface tiles) that use the same servlets at the back end to process the requests. The control is passed back to the website that called the commonly shared servlets once the computations are done.The servlets, the various websites that use the servlets all reside on the same server and are a part of the same project.
    The whole project shares a common web.xml file.
    I was just wondering if each of the tiles can have thier own web.xml so that the servlet context can be loaded from them.
    The directory structure is like this
    Tiles Framework
    -Servlet Source
    -web.xml
    -tiles (folder)
    ---tile1(folder...contains the 1st website)
    ---tile2
    ---tile 3
    The reason being that in the older version of the shopping cart, the web.xml was used to load specfic contexts in the servlets.
    Is it possible that wach of the tiles has its own web.xml ?
    if so, does it require any configuration in the overall project.
    Thanks.

    If I understand the web.xml file correctly, there should only be one per project. But if it's just a matter of loading props for each of the tiles, can't you just have a different properties file for each tile?
    I can't imagine a situation where you'd be required to have multiple web.xml files within the same project. Can you explain why you can't just have several regular property files & read from them instead?

  • Question on defining taglib in  web.xml

    I am using netbeans to develop a j2ee5 web application.
    I created a web application project using the wizard.
    When I defined a <taglib> in the web.xml, it detected an error.
    cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'. One of '{"http://java.sun.com/xml/ns/javaee":description, "http://java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/xml/ns/javaee":distributable, "http://java.sun.com/xml/ns/javaee":context-param, "http://java.sun.com/xml/ns/javaee":filter, "http://java.sun.com/xml/ns/javaee":filter-mapping, "http://java.sun.com/xml/ns/javaee":listener, "http://java.sun.com/xml/ns/javaee":servlet, "http://java.sun.com/xml/ns/javaee":servlet-mapping, "http://java.sun.com/xml/ns/javaee":session-config, "http://java.sun.com/xml/ns/javaee":mime-mapping, "http://java.sun.com/xml/ns/javaee":welcome-file-list, "http://java.sun.com/xml/ns/javaee":error-page, "http://java.sun.com/xml/ns/javaee":jsp-config, "http://java.sun.com/xml/ns/javaee":security-constraint, "http://java.sun.com/xml/ns/javaee":login-config, "http://java.sun.com/xml/ns/javaee":security-role, "http://java.sun.com/xml/ns/javaee":env-entry, "http://java.sun.com/xml/ns/javaee":ejb-ref, "http://java.sun.com/xml/ns/javaee":ejb-local-ref, "http://java.sun.com/xml/ns/javaee":service-ref, "http://java.sun.com/xml/ns/javaee":resource-ref, "http://java.sun.com/xml/ns/javaee":resource-env-ref, "http://java.sun.com/xml/ns/javaee":message-destination-ref, "http://java.sun.com/xml/ns/javaee":persistence-context-ref, "http://java.sun.com/xml/ns/javaee":persistence-unit-ref, "http://java.sun.com/xml/ns/javaee":post-construct, "http://java.sun.com/xml/ns/javaee":pre-destroy, "http://java.sun.com/xml/ns/javaee":message-destination, "http://java.sun.com/xml/ns/javaee":locale-encoding-mapping-list}' is expected.
    Here is my web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" 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_2_5.xsd">
    <welcome-file-list>
    <welcome-file>
    index.jsp
    </welcome-file>
    </welcome-file-list>
    <taglib>
    <taglib-uri>/mytag</taglib-uri>
    <taglib-location>/WEB-INF/mytag.tld</taglib-location>
    </taglib>
    </web-app>

    As of servlet 2.4 (jsp 2.0), you'll have to move the taglib declarations inside a <jsp_config> element.
    <jsp-config>
        <taglib> ..........your stuff
    </jsp-config>ram.

  • Question in spring-web.xml

    My application's name is Example.
    I want all webpages from /Example/*.htm to be directed to a servlet.
    And all pages from /Example/a/code to be directed to another servlet.
    "Code" does not end with .htm.
    I tried the below mapping in the web.xml. It does not work.
    <servlet-mapping>
         <servlet-name>Example</servlet-name>
         <url-pattern>/a/</url-pattern>
         </servlet-mapping>
         <servlet-mapping>
         <servlet-name>Example</servlet-name>
         <url-pattern>*.htm</url-pattern>
         </servlet-mapping>
    It works only if I add the following :
         <servlet-mapping>
         <servlet-name>Example</servlet-name>
         <url-pattern>/</url-pattern>
         </servlet-mapping>
    I dont want to add the above code. Is there another way. For some reason, spring throws an error with /a/*.

    Thanks for the reply.
    I did end up doing something like that in the end. I think I just couldn't get my mind into gear as usual on Monday.
    What's happening is taking a nice neat human readable URL and converting it to the horrible URL used by the system. The reason it's a filter is because someone had written a tiny filter would might only execute 20 lines of code and I think someone felt it was easier to just lump about 240 more lines to execute on each request, which, even if it isn't a huge strain on the system it's nasty and most of the code is unnecessary the vast majority of the time. I'm splitting it up the whole lot based on the various tasks.
    This particular functionality could be a servlet. I probably would have done it that if given the task from scratch but I think sometimes I put too much faith in the fact those with more experience should know better. I think I'll try it as a servlet and if someone has concerns about it then I'll ask them to explain to me why it can't be one.

  • Web.xml - security constraint question

    I want to make a kind of inverted security constraint. I want to ALLOW access to one specific page over HTTP. All other pages should be HTTPS.
    Is that possible???

    Use the <security-role-ref> for the Faces Servlet to map the LDAP roles to the logical role names used by the managed bean to determine if links may be rendered.
    Bean code:
    this.isAdmin = context.getExternalContext().isUserInRole("admin");web.xml:
            <security-role>
              <role-name>Local Admin Group</role-name>
         </security-role>
         <security-role>
              <role-name>DBA Group</role-name>
         </security-role>
        <!-- Faces Servlet -->
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <security-role-ref>
                  <role-name>admin</role-name>
                  <role-link>DBA Group</role-link>
           </security-role-ref>
            <security-role-ref>
                  <role-name>admin</role-name>
                  <role-link>Local Admin Group</role-link>
           </security-role-ref>
        </servlet>

  • Web.xml servlet redirection question

    Hi everyone;
    As you know web.xml file allows you to enter something like this
         <servlet-mapping>
              <servlet-name>application1</servlet-name>
              <url-pattern>/application1</url-pattern>
         </servlet-mapping>
    so you can find your application.
    As you know it is case sensitive so if a user enters /Application1 it wouldn't be found. I was wondering if i could put a node in there that would redirect requests from Application1 to application.
    Any ideas ?
    Stev

    oh i wasn't aware that i could put multiple nodes in there like this
    <servlet-mapping>
    <servlet-name>application1</servlet-name>
    <url-pattern>/application1</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>application1</servlet-name>
    <url-pattern>/Application1</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>application1</servlet-name>
    <url-pattern>/APplication1</url-pattern>
    </servlet-mapping>
    is there a way to simply make this case insensitive and all requests get translated to the lowercase versioN?
    Stev

  • Simple web.xml question

    Hi all,
    Do I have to restart Tomcat whenever I make changes to any web.xml file(either global or individual web apps)?
    Thanks for your help.

    No.
    You have UpdateFiles and Deploy options in the Deploy Tool Version 8, for example. This is an elegant solution.
    I am sure that there is also a command from the command prompt. But I have already forgoten.

Maybe you are looking for

  • Itunes seems to have lost the ability to play purchased videos

    Before posting here, I've searched all over the place for a solution to this problem, I found many people who have very similar issues, some solved them, but their solutions haven't worked for me, others with problems closer to how'd I'd describe min

  • Have run out of room on iweb, can't publish. Can I delete data and reclaim space?

    I have been working on my website for ages, constantly doing and redoing and saving each time. Now I get a message that I've run out of room & can't publish. I kow I can buy more space, but it's annoying because I'm sure there is a mass of trash I co

  • S2disk mkinitcpio.conf question

    Hi there, I wasted some hours today to get hibernation working properly. My setup is an unencrypted /boot partition and an encrypted lvm volume group which contains swap and root partitions. Using uswsusp (because of the s2both feature) I followed th

  • Non key field in Maintainance View

    Hi, I have generated a maintainance view for a Z table. I want to sort data from SM30 by means of a selection screen, for that, in the 'View Flds' tab in the maintainance view, i have entered a 'S' for which ever fields i want to filter the data on.

  • I cannot download itunes11.1 or newer  on my windows XP.

    I'm not able to use my iphones on itunes. I get a message to upgrade to itunes 11.1 or newer tried and was not able to get it.Any ideas. It doesen't recongnize the devices. Works fine with my ipod though.