You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by niksa_os <ni...@hotmail.com> on 2003/03/10 17:39:28 UTC

Two problems: bean:include and return errors

I have index.jsp that include login.jsp

If I use in index.jsp

<bean:include id="login" page="/login.jsp"/>
<bean:write name="login" filter="false"/>

<logic:present name="bean" scope="request"> doesn't work in login.jsp. I put
bean in Action.

<logic:present name="bean" scope="request"> only works in index.jsp.

But with <%@include file="login.jsp"%> it's works!?

Why is that?

---------------------

I have in LoginActionForm for login.jsp

ActionErrors errors = new ActionErrors();
if (name.equals("")) {
errors.add("name", new ActionError("name"));  }
return errors;

....and this in LoginAction

if (form.getName().equals("x")) {
errors.add("name", new ActionError("badName"));
saveErrors(httpServletRequest, errors);
return actionMapping.getInputForward();

This works OK, but didn't return to index.jsp it return to login.jsp.
I get only login.jsp form not index.jsp - whole page????

*index.jsp include login.jsp

Thanks.