Results 1 to 6 of 6

Thread: Can we change the name of the web.xml file

  1. #1
    Contributing Member
    Join Date
    May 2007
    Answers
    32

    Can we change the name of the web.xml file

    Hi,

    Can any one clarify my doubt i.e. can we change the name of the web.xml file?


  2. #2
    Junior Member
    Join Date
    Jun 2007
    Answers
    20

    Re: Can we change the name of the web.xml file

    No we cannot the change of the WEb.xml because there are certain which is defined as standards as we cannot change the name of folder webapps in the Tomcat server same way we cannot change the name of the Web.xml to anyother thing.


  3. #3
    Junior Member
    Join Date
    Mar 2011
    Answers
    1

    Re: Can we change the name of the web.xml file

    Quote Originally Posted by deeptiagrawal View Post
    there are certain which is defined as standards as we cannot change the name of folder webapps in the Tomcat server
    webapps directory name can be changed or can also be redirected to different folder all you need to do is edit <Tomcat-Home>/conf/server.xml file find the tag <Host .....> & change the attribute appBase to whichever location you want... make sure the directory exist!!!
    e.g.
    <Host appBase="C:\\mywebapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
    now you can put all your deployables in this customized location.


  4. #4

    Re: Can we change the name of the web.xml file

    Quote Originally Posted by ghosthutalks View Post
    webapps directory name can be changed or can also be redirected to different folder all you need to do is edit <Tomcat-Home>/conf/server.xml file find the tag <Host .....> & change the attribute appBase to whichever location you want... make sure the directory exist!!!
    e.g.
    <Host appBase="C:\\mywebapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
    now you can put all your deployables in this customized location.
    hi As i understand this <HOST appBase="" ....> is used to change deployment directoy not the name web.xml. so can not change name of Web.xml


  5. #5
    Junior Member
    Join Date
    Apr 2011
    Answers
    1

    Re: Can we change the name of the web.xml file

    Hi All,
    Yes. We can change the name of web.xml, This can be done in context.xml in configuration(conf) folder of tomcat. The related tag is
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    Here we've to change the web.xml name to required name. But it's not suggestable, as it's not a custom practise and also won't be used any j2ee (based) application

    Please revert back if any issues.......

    Thanks,
    Ramana.


  6. #6
    Junior Member
    Join Date
    Dec 2010
    Answers
    6

    Re: Can we change the name of the web.xml file

    I wonder why do you want to change/rename web.xml . Changing the content may give you really a knowledge and not the name.


  7.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact