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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:26:25+00:00 2026-06-09T14:26:25+00:00

I’m trying a simple app in struts2 on gae but facing problems in submitting

  • 0

I’m trying a simple app in struts2 on gae but facing problems in submitting forms.

struts.xml conf

<package name="auth" extends="struts-default" namespace="/auth">
    <default-interceptor-ref name="defaultStack"/>
    <action name="signup" class="signup" method="signup">
      <result name="success">/auth/signup.jsp</result>
    </action>
    <action name="postSignup" class="signup" method="create">
      <result name="input">/auth/signup.jsp</result>
    </action>
    <action name="signupConfirm" class="signup" method="signupConfirm"></action>

    <action name="resendCode" class="signup" method="resendCode"/>
</package>

I’m using spring to load actions.

When I hit the url /auth/signup.html I get proper signup page. Now after submitting the form if form validation fails(I’m doing this by a validate method in my action). It returns me back to the same jsp. Now the main problem: I can’t see the errors even though I’m adding fielderror in my validate method and I’ve used struts tags for my form.

 @Override
  public void validate() {

    if(!StringUtil.isValidUserName(userForm.getUserName())){
      addFieldError("userForm.userName", "Invalid username format");
    }else {
      TutorUser user = this.userBc.getUserByUserName(userForm.getUserName());
      if(user!=null){
        addFieldError("userForm.userName", "Username already exist. Please choose a different one.");
      }
    }
    if(!StringUtil.isEmail(userForm.getEmail())){
      addFieldError("userForm.email", "Invalid email provided");
    }
    if(StringUtil.isBlank(userForm.getPassword1()) || StringUtil.isBlank(userForm.getPassword2()) ||
        !userForm.getPassword1().equals(userForm.getPassword2())) {
      addFieldError("userForm.password2", "Passwords do not match");
    }
  }

Also from this page if i hit simply /auth/signup.html again it gives this error –

Problem accessing /auth/signup.html. Reason:

    No result defined for action com.tutorial.action.auth.SignUpAction and result input

I don’t need ‘input’ in my conf for ‘signup’ action as i will only be displaying signup form. Also Except ‘postSignup’ method I’ve added the annotation @SkipValidation on each one. I’m new to struts2. Migrating from struts1. Need help with this. Also how do I better organize my struts configurations? Thanks

Here is the jsp

  <s:form action="postSignup" cssClass="well" namespace="/auth" method="POST">
    <fieldset>
      <div class="control-group">
        <label class="control-label" for="userName">UserName</label>
        <div class="controls">
          <s:textfield cssClass="input-large" id="userName" name="userForm.userName"/>
          <span class="help-inline">Choose a username</span>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="password1">Password</label>
        <div class="controls">
          <s:password cssClass="input-large" id="password1" name="userForm.password1"/>
          <span class="help-inline">Enter your Password</span>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="password2">Confirm Password</label>
        <div class="controls">
          <s:password cssClass="input-large" name="userForm.password2" id="password2"/>
          <span class="help-inline">Confirm above password</span>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label" for="email">Email Address</label>
        <div class="controls">
          <s:textfield cssClass="input-large" id="email" name="userForm.email"/>
          <span class="help-inline">Enter your Email Address</span>
        </div>
      </div>
      <div class="form-actions">
        <s:submit name="action" id="action" value="SignUp" cssClass="btn btn-primary"/>
      </div>

    </fieldset>
  </s:form>
  • 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-09T14:26:27+00:00Added an answer on June 9, 2026 at 2:26 pm

    If you hit the auth page again and still see form errors, it means you’re using the default “singleton” scope for the Spring bean. Actions should be “prototype” scope, i.e., created per-request.

    The issue with field errors is impossible to address since I cannot see anything related to it other than the addition of the field errors. You must include both action and JSP info.

    Regarding “better organization” of config files, it’s impossible to know what you mean without further info. Organize how? What’s wrong with what you have? What would you prefer?

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

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:

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.