How to change context root of a dynamic web project in Eclipse?

后端 未结 13 2515
一整个雨季
一整个雨季 2020-11-22 12:59

I developed a dynamic web project in Eclipse. I can access the app through my browser using the following URL:

http://localhost:8080/MyDynamicWebApp


        
相关标签:
13条回答
  • 2020-11-22 13:31

    I tried out solution suggested by Russ Bateman Here in the post

    http://localhost:8080/Myapp to http://localhost:8080/somepath/Myapp

    But Didnt worked for me as I needed to have a *.war file that can hold the config and not the individual instance of server on my localmachine.

    Reference

    In order to do that I need jboss-web.xml placed in WEB-INF

    <?xml version="1.0" encoding="UTF-8"?>
     <!--
    Copyright (c) 2008 Object Computing, Inc.
    All rights reserved.
    -->
    <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 4.2//EN"
    "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd">
    
      <jboss-web>
      <context-root>somepath/Myapp</context-root>
      </jboss-web>
    
    0 讨论(0)
提交回复
热议问题