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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:11:29+00:00 2026-05-26T21:11:29+00:00

this is so basic i can’t believe ive spent a full day on it

  • 0

this is so basic i can’t believe ive spent a full day on it already.

ok, here’s my freemarker page

    bla bla bla
<form name="message" action="[@s.url action="login"/]" onsubmit="return detectJavaScript();" method="post">
    <fieldset>
        <legend>To begin, type your Graduation Report ID and password</legend>
        <ol>
            <li>
                [@requiredInstruction /]
                <label for="username" accesskey="U">
                    [@requiredField /] <strong>Graduation Report ID:</strong>
                </label>
                <input id="username" name="username" size="10" tabindex="1" type="text" value="${username!''}"
                    [@errorStyle show=(fieldErrors?exists && fieldErrors["username"]?exists)/] />
                [@showFieldError field="username" /]
            </li>
            <li>
                <label for="password" accesskey="P">
                    [@requiredField /] <strong>Password:</strong>
                </label>
                <input id="password" name="password" size="10" tabindex="2" type="password" value="${password!''}" 
                    [@errorStyle show=(fieldErrors?exists && fieldErrors["password"]?exists)/] />
                [@showFieldError field="password" /]
            </li>
bla bla bla

and my action class

public class SubmitLoginAction {
    public String username;
    public String password;


    private static Logger logger = Logger.getLogger(SubmitLoginAction.class);

    public void validate() {
        logger.debug("validate fired");

        logger.debug("username returned: " + username);
        logger.debug("password returned: " + password);

and 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="workflow"/>
                <interceptor-ref name="modelDriven"/>
                <!-- <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>
</struts>

no matter what i do it keeps returning null for the user and pass. ive tried with getters and setters, without, nothing seems to work.

i thought this was an out of the box thing with struts.

  • 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-26T21:11:30+00:00Added an answer on May 26, 2026 at 9:11 pm

    It is, but you’ve removed it from the box and shuffled its bits around.

    You’ve removed the “params” interceptor from the default interceptor stack. The “params” interceptor is what sets the parameters on the action. I mentioned that in my answer to your previous post.

    (Along with eliminating the need to keep typing “freemarker”.)

    (On a side note, I really don’t recommend public properties, although it will work, depending on your version of Struts–IIRC one of the OGNL version bumps changed that.)

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

Sidebar

Related Questions

Seems so basic, I can't believe I don't know this! I just need a
So this seems pretty basic but I can't get it to work. I have
I know this maybe a basic question but I just can't seem to find
this is a pretty basic question but I can't seem to get it right.
This is a pretty basic question but I can't find a good answer for
This may be a basic question but how can I include a module with
This feels like a really basic question, but I can't figure it out anyway..
Perhaps someone can help me out with this one: I'm using a basic search
I think this is a pretty basic question, but after Googling around I can't
Can someone please show me how to do this basic thing using Zend Framework

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.