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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:39:54+00:00 2026-05-26T16:39:54+00:00

im doing a modification on an existing app. my problem is even tho the

  • 0

im doing a modification on an existing app. my problem is even tho the validation fails for the form submit, its still executing the execute method.

my struts file

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

<struts>
<!-- <include file="com/paritysys/util/struts.xml" /> -->

<constant name="struts.url.includeParams" value="none" />
<constant name="struts.action.extension" value="html,action" />

<package name="public" extends="struts-default">
    <interceptors>
        <interceptor name="websiteOnline"
            class="parity.action.website.OnlineInterceptor" />
        <interceptor name="websiteLogin"
            class="parity.action.website.LoginInterceptor" />

        <interceptor-stack name="appStack">
            <interceptor-ref name="validation">
                <param name="excludeMethods">input,back,cancel,browse</param>
            </interceptor-ref>
            <!-- <interceptor-ref name="paritySessionStack"/> -->
            <interceptor-ref name="websiteOnline" />
            <interceptor-ref name="websiteLogin" />
        </interceptor-stack>
    </interceptors>

    <default-interceptor-ref name="appStack" />

    <global-results>
        <result name="login" type="redirectAction">
            <param name="actionName">index</param>
        </result>
        <result name="exception" type="freemarker">/public/error.html.ftl</result>
        <result name="error" type="freemarker">/public/error.html.ftl</result>
        <result type="freemarker" name="maintenance">/public/maintenance.html
        </result>
        <result type="freemarker" name="pre-offline">/public/pre-offline.html
        </result>
        <result type="freemarker" name="post-offline">/public/post-offline.html
        </result>
    </global-results>

    <action name="index" class="parity.action.website.LoginAction">
        <result type="freemarker" name="success">/public/index.html.ftl</result>
    </action>

    <action name="login" class="parity.action.website.SubmitLoginAction">
        <result type="freemarker" name="success">/public/questionnaire.html.ftl
        </result>
        <result type="freemarker" name="input">/public/index.html.ftl</result>
    </action>

    <action name="submit" class="parity.action.website.SubmitQuestionnaireAction">
        <result type="freemarker" name="success">/public/thanks.html.ftl
        </result>
        <result type="freemarker" name="input">/public/questionnaire.html.ftl
        </result>
    </action>

    <action name="whereIsMyId" class="parity.action.website.LoginAction">
        <result type="freemarker" name="success">/public/whereIsMyId.html.ftl
        </result>
    </action>

    <action name="loadCollegeFinder" class="parity.action.website.LoadCollegeFinderAction">
        <result type="freemarker" name="success">/public/college_finder.html.ftl
        </result>
    </action>

    <action name="findCollege" class="parity.action.website.FindCollegeAction">
        <result type="freemarker" name="success">/public/college_finder.html.ftl
        </result>
        <result type="freemarker" name="input">/public/college_finder.html.ftl
        </result>
    </action>
</package>

my action class code

public void validate() {
        logger.debug("validate fired");
Bla bla bla
addFieldError("username","error");

        if (hasFieldErrors()) {
            logger.debug("Field errors is true");
        }
    }

    public String execute() throws Exception {
        logger.debug("execute firing");

        return result;
    }

any ideas why this would happen? for some reason even tho the login.action is failing, its still sending down the success return and moving forward.

  • 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-26T16:39:55+00:00Added an answer on May 26, 2026 at 4:39 pm

    You interceptor stack doesn’t include the “workflow” interceptor stack, which is what determines what to do on a validation failure.

    For that matter, it doesn’t include the “params” interceptor, which is how parameters are set on the action, so it will never work anyway. You can’t just arbitrarily remove interceptors–it’s where S2 gets the bulk of its functionality. See the interceptor docs.

    Also, you can set a default result type–you may want to do that if most everything is a FreeMarker result rather than type it over and over.

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

Sidebar

Related Questions

I have this problem; I'm currently doing some modification on a web application that
Doing odd/even styling with jQuery is pretty easy: $(function() { $(.oddeven tbody tr:odd).addClass(odd); $(.oddeven
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
I'm doing image modification on my iphone simulator using pixel value. I created severals
I am doing small modification to SLIME, so that I can get all currently
What is everyone doing to handle security (retrieval and modification) of individual records in
I'm doing this in C#, but, I guess, it isn't language specific problem... I've
I am creating an iPhone app for doing time entry against projects. My UI
We have an existing legacy app written in C++/powerbuilder running on Unix with it's
doing some quick web dev work for a local body modification parlour just in

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.