sergionni
sergionni

Reputation: 13510

Ignore folder name in webapps for application URL

There is myProject.war

So, in order to run it on local Tomcat I should use following URL:

http://localhost:8099/myProject/index.html

The same problem is for my remote site- I should add name of folder,such as:

http://mySiteURL/myProject/index.html

web.xml content:

<servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.html</url-pattern>
</servlet-mapping>
<welcome-file-list>
    <welcome-file>index.xhtml</welcome-file>
</welcome-file-list>

how to do,that my site index page was accessible just by URL:
http://mySiteURL/

thank you

Upvotes: 0

Views: 527

Answers (2)

Amir Raminfar
Amir Raminfar

Reputation: 34169

You have to deploy as ROOT.war

Upvotes: 2

HJW
HJW

Reputation: 23443

This is one way how i would do it for a Struts 2 application.

Upvotes: 1

Related Questions