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 9014367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:29:24+00:00 2026-06-16T03:29:24+00:00

I am using Struts 2 + Hibernate (full-hibernate-plugin-for-struts2), and I have this code to

  • 0

I am using Struts 2 + Hibernate (full-hibernate-plugin-for-struts2), and I have this code to check if image to upload is png:

struts.xml

<struts>
    <package name="mypack" namespace="/" extends="hibernate-default">          
       ...
       <action name="myaction" class="com.actions.MyAction" >
            <interceptor-ref name="defaultStackHibernate">
                <param name="fileUpload.allowedTypes">image/png</param>
            </interceptor-ref>            
            <result name="success" type="tiles" >baseLayout</result>
            <result name="error" type="tiles" >error</result>
            <result name="input" type="tiles" >baseLayout</result>
        </action>
        ...
    </package>
</struts>

The error message that comes out if I upload not allowed image types is:

Content-Type not allowed: image “img.jpg” “upload__2988a871_13b93535e21__7fc1_00000009.tmp” image/jpeg

How can I modify that error message? Using something like “hibernate-messages.properties”?

  • 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-16T03:29:25+00:00Added an answer on June 16, 2026 at 3:29 am

    You can override this message by creating text for this key:

    struts.messages.error.content.type.not.allowed
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using http://www.mkyong.com/struts2/struts-2-hibernate-integration-with-full-hibernate-plugin/ as my refernce for struts+hibernate.I need to replace return session.createQuery(from
I have an application that built using struts, spring, hibernate. In this application, i
I am using hibernate, struts, extjs in my project. I have a Customer object
I am new to struts2, prior to this I have been using struts1.2, Spring
I have a web application that using Struts + Spring + Hibernate . In
I am currently developing a web application using Struts2 with Spring plugin and hibernate
I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table
I'm using Struts2, Spring, and Hibernate. I have written a simple Excel file called
We have J2EE application built using Hibernate and struts. We have RMI registry based
I am using Struts and Hibernate for my web application. And also i have

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.