What I mean by security is, what sort of user authentication? For your login, that is. I assume that it's hand-rolled and you're accessing some sort of data store to verify the password given by the user.

I'll also assume that you've got the struts-config mapping correct, so that the correct formbean is being created for the URL you are submitting to, and that the formbean has property getters and setters matching the field names.

Could you have 2 instances of your formbean and be using the wrong one?

Could you be submitting twice (due to a freaky HTML mistake) or submitting to the wrong URL?

Try debugging the params in the request itself - here's my JSP debug method
<%
out.println("App");
java.util.Enumeration e = pageContext.getAttributeNamesInScope(PageContext.APPLICATION_SCOPE);
Object value;
while (e != null && e.hasMoreElements())
{
    String key = (String)e.nextElement();
    value = null;
    if (key != null)
value = pageContext.getAttribute(key, PageContext.APPLICATION_SCOPE);
    out.println(key + ": " + value);
}
out.println("Session");
e = pageContext.getAttributeNamesInScope(PageContext.SESSION_SCOPE);
while (e != null && e.hasMoreElements())
{
    String key = (String)e.nextElement();
    value = null;
    if (key != null)
        value = pageContext.getAttribute(key, PageContext.SESSION_SCOPE);
    out.println(key + ": " + value);
}
out.println("Request");
e = pageContext.getAttributeNamesInScope(PageContext.REQUEST_SCOPE);
while (e != null && e.hasMoreElements())
{
    String key = (String)e.nextElement();
    value = null;
    if (key != null)
        value = pageContext.getAttribute(key, PageContext.REQUEST_SCOPE);
    out.println(key + ": " + value);
}
%>




On 07/06/05 09:19&nbsp;Mark Benussi wrote:
There is no security implemented.

When the form is submitted it calls the BeanUtils.populate method.

With debgging enabled no values are copied into my form on the first submission of the form if the form is within a page that was produced as the result of the first ever session request to a url on the server (phew!).


----Original Message Follows----
From: Adam Hardy <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: Tomcat Struts form population problem in PRODUCTION
Date: Tue, 07 Jun 2005 09:03:32 +0100

What sort of security are you using? Container-managed? SSL?

And what exactly do you mean? Which values disappear? The login form fields?



On 07/06/05 07:08&nbsp;Mark Benussi wrote:

I am submitting a Struts form in my live application but the values seem to be getting lost between my browser and the population of my ActionForm. This
only happens if the login page is the first request of the session.



If you click around on the site (even once) and then submit the form the
values are taken.



:S



NB This only happens in my live environment (Tomcat 5, LINUX).




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to