Why index page is giving 404 error in Struts 2

If I am not including web.xml file then index file is opening properly but result page HelloWorld.jsp is giving 404 error, and when including web.xml index page is giving 404 error.

I have index.jsp file. localhost:8080 is working correctly but after that it is giving error.

See here:


In the first case the index file is opened by the default servlet, that is available on the server.

In the second case you use FilterDispatcher that is deprecated.

You should upgrade Struts to the latest version and use


See how to write web application descriptor web.xml.

Simple Example

Configuring web.xml for the framework is a matter of adding a filter and filter-mapping.

FilterDispatcher Example (web.xml):

<web-app id="WebApp_9" version="2.4"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">



    <!-- ... -->


Need Your Help

How to get the URL of a Tumblr photoset iframe

iframe tumblr

I am customizing my tumblr template and I need to access the URL of the iframe that contains my photoset. When I look at the html of my tumbler page, I see: