You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Cesar Villar <ce...@yahoo.es> on 2005/09/21 10:59:18 UTC
RV: struts modules and sitemesh
Hello!!!
I'm developing a strut web application with several
modules. When i tried to integrate all the modules
with sitemesh It didn't work. I mean, when i click on
a link of a module it doesn't work because struts
doesn't find the action asociated with the jsp.
<c:url var="url"
value="/verConsultaMantenimientoCursos.do"/>
<a href="<c:out value='${url}'/>">Curs</a>
Struts-config.xml
<global-forwards>
<forward name="verConsultaMantenimientoCentros"
path="/moduloMantenimientoCentros/verConsultaMantenimientoCentros.do"/>
But if i crete the link that way
<html:link
forward="verLogin">Cursos</html:link>
there's no decorating. I see the application as
standalone.
Struts-config.xml:
<action-mappings>
<action path="/verLogin"
type="org.apache.struts.actions.ForwardAction"
parameter="/moduloLogin/jsp/login.jsp"/>
Any idea? what's wrong?
Thanks.
______________________________________________
Renovamos el Correo Yahoo!
Nuevos servicios, más seguridad
http://correo.yahoo.es
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to validate in Struts 1.2.7
Posted by Francisco Antonio Vieira Souza <av...@yahoo.com.br>.
Thanks a lot my friend, but consider using DynaForm, how could I do that?
David Delbecq escreveu:
>This will help you :)
>don't forget to add validate=true in your struts-config.xml
>
>
>public class MyForm extends ActionForm {
>
> public static int MAX =100;
> private Integer value;
> public Integer getValue() {
> return value;
> }
> public void setValue(Integer value) {
> this.value = value;
> }
> public ActionErrors validate(ActionMapping mapping,
>HttpServletRequest args) {
> ActionErrors errors = new ActionErrors();
> if (getValue().intValue()<0)
> errors.add("value",new ActionMessage("value.MustBePositive"));
> if (getValue().intValue()>=MAX)
> errors.add("value",new ActionMessage("value.MustBeBelowMax"));
> return errors;
> }
>}
>Francisco Antonio Vieira Souza a écrit :
>
>
>
>>Considering that nobody saw my big previous message about this subject.
>>I ask you all, does anyone could provide me any example of validation
>>in Struts 1.2.7? (since until now I had no success)
>>
>>
>>
>>
>>
>>_______________________________________________________ Novo Yahoo!
>>Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito
>>mais. Instale agora! www.yahoo.com.br/messenger/
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
_______________________________________________________
Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito mais. Instale agora!
www.yahoo.com.br/messenger/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to validate in Struts 1.2.7
Posted by David Delbecq <de...@oma.be>.
This will help you :)
don't forget to add validate=true in your struts-config.xml
public class MyForm extends ActionForm {
public static int MAX =100;
private Integer value;
public Integer getValue() {
return value;
}
public void setValue(Integer value) {
this.value = value;
}
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest args) {
ActionErrors errors = new ActionErrors();
if (getValue().intValue()<0)
errors.add("value",new ActionMessage("value.MustBePositive"));
if (getValue().intValue()>=MAX)
errors.add("value",new ActionMessage("value.MustBeBelowMax"));
return errors;
}
}
Francisco Antonio Vieira Souza a écrit :
> Considering that nobody saw my big previous message about this subject.
> I ask you all, does anyone could provide me any example of validation
> in Struts 1.2.7? (since until now I had no success)
>
>
>
>
>
> _______________________________________________________ Novo Yahoo!
> Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito
> mais. Instale agora! www.yahoo.com.br/messenger/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
How to validate in Struts 1.2.7
Posted by Francisco Antonio Vieira Souza <av...@yahoo.com.br>.
Considering that nobody saw my big previous message about this subject.
I ask you all, does anyone could provide me any example of validation in
Struts 1.2.7? (since until now I had no success)
_______________________________________________________
Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons e muito mais. Instale agora!
www.yahoo.com.br/messenger/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org