Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Change the name of the Project from web.xml

  1. #1
    Member
    Join Date
    Jul 2013
    Posts
    46
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Change the name of the Project from web.xml

    Hello,

    if i use Tomcat 7 as a server, and my Project's name is "Old_Name" so when i want to run my server for this Project the path will be some thing like this:
    HTML Code:
    http://localhost:8080/Old_Name/.....
    I want to change it to something like that
    HTML Code:
    http://localhost:8080/New_Name/.....
    Is there any possibility to change the the URL of the Project (project name) from some configuration in Web.xml ???

    and how to do it?


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Change the name of the Project from web.xml

    Well, the obvious answer is: Edit the HTML, replacing the old name with the new name.

    But that's so obvious and simple that I wonder what I'm missing. Perhaps you could clarify why that answer didn't occur to you or why the actual answer is more complex than that.

  3. #3
    Member
    Join Date
    Jul 2013
    Posts
    46
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Change the name of the Project from web.xml

    if you mean to change the name of the Project, it is obvious very very easy, but it will make conflicts with names of other Projects, so the only choice is doing it through web.xml

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Change the name of the Project from web.xml

    Then do that. If you understand the problem and know how to solve it, just do it. What do you want from us?

    And it's not helpful to keep adding more details about the problem as you receive suggestions on how to attack it. Start by providing everything you know and understand about the problem, desribe what you don't know or any sources of confusion, and ask specific questions about how to work to a solution. Playing "I've got a secret" when asking for help is pointless.

  5. #5
    Member
    Join Date
    Jul 2013
    Posts
    46
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Change the name of the Project from web.xml

    My specific question is: if there any possibility to change the Project name using some tags < > in web.xml, if yes so which one?

    Otherwise i can't change name of the Project manually, because the desired name is already exists in my workspace + this is wish of my boss

  6. #6
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Change the name of the Project from web.xml

    Any reason you don't link to your cross-posts, as you've been told time and again?

    This thread has been cross posted here:

    http://www.java-forums.org/java-servlet/81044-change-name-project-web-xml.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


Similar Threads

  1. Replies: 0
    Last Post: July 24th, 2013, 07:17 AM
  2. Change web.xml after deployment
    By manoop in forum What's Wrong With My Code?
    Replies: 0
    Last Post: February 20th, 2013, 02:03 AM
  3. Replies: 1
    Last Post: February 24th, 2012, 02:52 PM
  4. Parse error in application web.xml
    By abijith1 in forum Member Introductions
    Replies: 1
    Last Post: February 6th, 2012, 11:38 AM
  5. How web service returns xml?
    By nikos in forum Web Frameworks
    Replies: 2
    Last Post: October 7th, 2010, 12:50 PM