Reputation: 1178
Im trying to deploy a war file in Tomcat and im having issues accessing the application. The code actually works fine in eclipse and Im able to access the application.The application that im accessing is a struts based application
Changes Done in eclipse
I have made the below change in eclipse. Changed the context path from
<Context docBase="iowe" path="/iowe" reloadable="true" source="org.eclipse.jst.jee.server:iowe"/></Host> to
<Context docBase="iowe" path="/" reloadable="true" source="org.eclipse.jst.jee.server:iowe"/></Host>
With the above change, When I start tomcat in eclipse it works fine and im able to access the application. When I create a war file and try to deploy it in tomcat, im facing issues accessing the application. Getting the below error message
HTTP Status 404 - There is no Action mapped for namespace / and action name login.message There is no Action mapped for namespace / and action name login.
While deploying the war file in tomcat, I have also updated the server.xml with the below context path as in eclipse
<Context docBase="iowe" path="/" reloadable="true"/>
The deployment happens, but unable to access the login page via the url http://localhost:8080/iowe/login.do. Getting the above error message. It specifies no action mapped. But there is mapping available for login in struts.xml
Analysis Done
Below are the analysis that I have done
Any help on this is much appreciated. Thanks in Advance
Upvotes: 0
Views: 2381
Reputation: 127
Please try the following steps: Option 1
-Undo your server.xml
$CATALINA_HOME\webapps
If the instance is running, the deployment will start instantly as Tomcat unpacks the archive and configures its context path.
If the instance is not running, then the server will deploy the project the next time it is started.
Note:
$CATALINA_HOME
This variable points to the directory where our server is installed.
Option 2 Using Tomcat Manager:
You need to configure Tomcat Roles
$CATALINA_HOME/conf/tomcat-users.xml
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="admin" password="password" roles="manager-gui, manager-script"/>
Then access to admin manager using
http://{host}:{port}/manager/html
Deploy your war using Admin manager.
Please have a look of Admin manager at https://tomcat.apache.org/tomcat-7.0-doc/html-manager-howto.html
Upvotes: 0