Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7446369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:17:51+00:00 2026-05-29T12:17:51+00:00

I am using struts2 for developing a web application. I have include the required

  • 0

I am using struts2 for developing a web application.
I have include the required jars for struts2 but when it is going to call the struts action class it is throwing 404 error.
There is no error on console and browser does not showing .action extension whitch it shows when struts.xml call an action class.
I am using jdk 1.6 and struts 2.0.
Am I missing any jar who is responsible for all this.

In jsp I am simply calling the function from

<s:form action = "Mergexmlaction" method = "post"/>

Here is my struts.xml and web.xml

struts.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts> 
  <constant name="struts.multipart.maxSize" value="6000000000" /> 

  <package name="default" namespace="/jsp" extends="struts-default">
    <action name="Mergexmlaction" class="com.hm.merge.mergeaction.Mergexmlaction">
      <result name="success" >/jsp/Result.jsp</result>
      <result name="error" >/jsp/Browse_multiplexmlfiles.jsp</result> 
      <interceptor-ref name="fileUpload">
        <param name="maximumSize">600000000</param> 
      </interceptor-ref> 
    </action>
  </package>
</struts>

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="xml_file_merging" version="2.4"
    xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> 
  <display-name>xml_file_merging</display-name>
  <filter>
        <filter-name>struts2</filter-name>
        <filter-class>
            org.apache.struts2.dispatcher.FilterDispatcher
        </filter-class>
    </filter>

    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <welcome-file-list>
        <welcome-file>jsp/Browse_multiplexmlfiles.jsp</welcome-file>
    </welcome-file-list>
</web-app>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:17:55+00:00Added an answer on May 29, 2026 at 12:17 pm

    There are a few issues.

    <package name="default" namespace="/jsp" extends="struts-default">
    

    1) I’d recommend against having a namespace of “jsp”, it doesn’t make any sense. Namespaces should be something meaningful to the application and/or user.

      <action name="Mergexmlaction" class="com.hm.merge.mergeaction.Mergexmlaction">
    

    2) Don’t name an action with “action”, there will either be a .action extension, or no extension at all. Either way, there’s no reason to duplicate “action” in the first case, and no reason to use “action” if there’s no extension. Just “mergexml”, “mergeXml”, etc.

        <result name="success" >/jsp/Result.jsp</result>
    

    3) I recommend putting your JSP pages under WEB-INF to avoid direct client access.

        <interceptor-ref name="fileUpload">
    

    4) Once you declare any interceptors, you must declare all interceptors. This action has only a single interceptor running. It’s possible this is okay, but it’s almost never the right thing to do.

    <welcome-file>jsp/Browse_multiplexmlfiles.jsp</welcome-file>
    

    5) And this is the ultimate issue, depending on how you’re accessing the application. You show the welcome file as being a JSP page, which is presumably using S2 tags. This won’t work: the tags depend on their being a complete S2 request, a value stack, etc.

    All access to an S2 app should take place through an S2 action, not a JSP. If you look at the rendered HTML for the directly-accessed JSP you’ll see neither namespace nor action extension rendered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have
I use tomcat. I am developing a web application using struts2, and I use
I am developing a web application using Struts 1.2.7 I want to print a
I am developing a Java EE web application using Struts. The problem is with
I'm using struts2-jquery grid. gridmodel in my action class is getting updated correctly. But,
I am developing a web application in Struts2 (JSP). I am using lot of
I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table
I am developing a web application using Apache Struts, to be deployed on JBoss
I'm currently developing a web application using Struts2 framework. This application requires to dynamically
I just started developing a web application using struts 1.3.10 tiles framework. There is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.