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

  • SEARCH
  • Home
  • 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 8135865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:33:29+00:00 2026-06-06T10:33:29+00:00

In my struts.xml I have: <action name=file_save method=fileSave class=FileActionBean> <interceptor-ref name=fileUpload> <param name=maximumSize> 5242880

  • 0

In my struts.xml I have:

<action name="file_save" method="fileSave" class="FileActionBean">
                <interceptor-ref name="fileUpload">
                    <param name="maximumSize">
                        5242880
                    </param>
                    <param name="allowedTypes">
                        text/html
                    </param>
                </interceptor-ref>
                <interceptor-ref name="defaultStack"></interceptor-ref>
                <result name="success" type="redirect">file</result>
                <result name="error">error</result>
</action>

When I upload a file that’s bigger than 5MB then no error is thrown. Then at the top of my struts.xml I have:

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

Now when I upload a file that’s bigger than 20MB then an error message is shown. Is this normal behaviour?

If so, how can I configure struts to show error messages for interceptors too?

EDIT 1:

I’m using struts 2 version 2.1.8.1

  • 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-06-06T10:33:33+00:00Added an answer on June 6, 2026 at 10:33 am

    I had a similar problem in this post:

    How do you override Struts 2 Messages?

    I found that by following this example I resolved both this issue and the one above.

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

Sidebar

Related Questions

I Have following in my struts.xml file <action name=ProductVerification class=com.frontend.ProductVerification> <result name=success>/jsp/product_verification.jsp</result> <result name=input>/jsp/product_verification.jsp</result>
I have this configuration in struts.xml <action name=updateAction class=it.myApp.action.ajax.UpdateActionAction> <result name=success type=json/> <result name=error
I have some code within struts.xml like: <action name=viewApplicationPDF class=com.xxx.abc.web.action.XApplicationPDFAction> <result name=success>/WEB-INF/templates/xApplication.jsp</result> </action> I
Hi I have something like this in struts.xml <action name=LoginAction class=controller.LoginAction> <result name=error>/Error.jsp</result> <result
I have multiple XML configs. struts.xml <struts> <include file=struts-user.xml /> <package name=baseInterceptors extends=struts-default> <interceptor
I have the following action declared in my struts.xml: <action path=/updateAccountInfo type=org.myCompany.UpdateAccountAction name=myAccountForm scope=session
If I have the following struts.xml config: <action name=input> <result>/jsp/input.jsp</result> </action> <action name=result> <result>/jsp/result.jsp</result>
In the struts.xml I use: <result name=error>error</result> Then in my action I use: addActionError(ERROR
Here is a portion of my struts.xml: <constant name=struts.custom.i18n.resources value=global /> and <action name=picture_save
I need to access the struts.action.extension value in the struts.xml file from an interceptor.

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.