You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leandro Melo <lt...@yahoo.com.br> on 2004/08/15 19:06:34 UTC

Overwritting RequestProcessor, how to???

Hi,
i'd like to overwirte RequestProcessor, but actually i
don't really know if it's a good idea.

Here's the point:
I'd like to have one more action if my form.validate()
method fails on ActionForm. I'd like to do some
specific stuff everytime the validate method fails.
Then, i thought of overwritting the RequestProcessor.

Is that a good idea, or there's another way to
accomplish what i want???

Regards,
ltcmelo


	
	
		
_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Overwritting RequestProcessor, how to???

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Although you haven't specified the TilesRequestProcessor in the <controller>
element the TilesPlugin automatically changes it to TilesRequestProcessor.

If you do however specify your own custom RequestProcessor in the
<controller> element and you use tiles then if it doesn't extend
TilesRequestProcessor then the TilesPlugin will throw an exception.

So, in short,  you are using TilesRequestProcessor and your custom version
needs to extend that one.

Niall

----- Original Message ----- 
From: "Leandro Melo" <lt...@yahoo.com.br>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, August 16, 2004 3:38 AM
Subject: Re: Overwritting RequestProcessor, how to???


> Niall,
> i actually use tiles, but does it mean that the
> requestProcessor i'm using is the Tiles one.
> In my struts-config.xml i got this for the
> configuration part.
>
>  <controller />
>
> So, i guess i'm using default's RequestProcessor, wich
> is struts RequestProcessor, am i right?
>
>
>  --- Niall Pemberton
> <ni...@blueyonder.co.uk> escreveu:
> > All you have to do is extend the RequestProcessor
> > (or TilesRequestProcessor
> > if you use tiles) and then specify it in the
> > <controller> element of the
> > struts-config.xml
> >
> >    <controller
> > processorClass="myPackage.MyRequestProcessor"/>
> >
> >
> http://struts.apache.org/userGuide/configuration.html#controller_config
> >
> > I guess whether its a good idea or not depends on
> > what you're doing.
> >
> > Niall
> >
> > ----- Original Message ----- 
> > From: "Leandro Melo" <lt...@yahoo.com.br>
> > To: "struts jakarta" <us...@struts.apache.org>
> > Sent: Sunday, August 15, 2004 6:06 PM
> > Subject: Overwritting RequestProcessor, how to???
> >
> >
> > > Hi,
> > > i'd like to overwirte RequestProcessor, but
> > actually i
> > > don't really know if it's a good idea.
> > >
> > > Here's the point:
> > > I'd like to have one more action if my
> > form.validate()
> > > method fails on ActionForm. I'd like to do some
> > > specific stuff everytime the validate method
> > fails.
> > > Then, i thought of overwritting the
> > RequestProcessor.
> > >
> > > Is that a good idea, or there's another way to
> > > accomplish what i want???
> > >
> > > Regards,
> > > ltcmelo
> > >
> > >
> > >
> > >
> > >
> > >
> >
> _______________________________________________________
> > > Yahoo! Acesso Grátis - navegue de graça com
> > conexão de qualidade! Acesse:
> > http://br.acesso.yahoo.com/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> >
> >
>
> =====
>
>
>
>
>
>
> _______________________________________________________
> Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse:
http://br.acesso.yahoo.com/
>
> ---------------------------------------------------------------------
> 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


help me for "No form found"

Posted by char <ch...@yahoo.com.cn>.
 hi all,
      I get an error, please help me !
     Thanks 
        I use tomcat 5.0.27 and struts 1.2.1, the error is :
<error>
javax.servlet.jsp.JspException: No form found under 'familyInfoForm' in locale 'zh_CN'
	at org.apache.struts.taglib.html.JavascriptValidatorTag.renderJavascript(JavascriptValidatorTag.java:364)
	at org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:335)
	at org.apache.jsp.WEB_002dINF.pages.insure.familyInfoForm_jsp._jspx_meth_html_javascript_0(familyInfoForm_jsp.java:2712)
	at org.apache.jsp.WEB_002dINF.pages.insure.familyInfoForm_jsp._jspService(familyInfoForm_jsp.java:160)

</error>
     If I disabled the follow code ,it will be OK,

<jspcode>
<html:javascript formName="insuranceInfoForm" cdata="false"
    dynamicJavascript="true" staticJavascript="false"/>
</jspcode>

   
   Any reply would be appreciated.

   Thanks in advance,
Thanks 
    

Re: Overwritting RequestProcessor, how to???

Posted by Hubert Rabago <ja...@yahoo.com>.
The Tiles plugin automatically changes your request processor to use the one
that comes with Tiles.  If you need to override the RequestProcessor, make
sure you extend TilesRequestProcessor like Niall said.

--- Leandro Melo <lt...@yahoo.com.br> wrote:

> Niall,
> i actually use tiles, but does it mean that the
> requestProcessor i'm using is the Tiles one.
> In my struts-config.xml i got this for the
> configuration part.
> 
>  <controller />
> 
> So, i guess i'm using default's RequestProcessor, wich
> is struts RequestProcessor, am i right?
> 
> 
>  --- Niall Pemberton
> <ni...@blueyonder.co.uk> escreveu: 
> > All you have to do is extend the RequestProcessor
> > (or TilesRequestProcessor
> > if you use tiles) and then specify it in the
> > <controller> element of the
> > struts-config.xml
> > 
> >    <controller
> > processorClass="myPackage.MyRequestProcessor"/>
> > 
> >
> http://struts.apache.org/userGuide/configuration.html#controller_config
> > 
> > I guess whether its a good idea or not depends on
> > what you're doing.
> > 
> > Niall
> > 
> > ----- Original Message ----- 
> > From: "Leandro Melo" <lt...@yahoo.com.br>
> > To: "struts jakarta" <us...@struts.apache.org>
> > Sent: Sunday, August 15, 2004 6:06 PM
> > Subject: Overwritting RequestProcessor, how to???
> > 
> > 
> > > Hi,
> > > i'd like to overwirte RequestProcessor, but
> > actually i
> > > don't really know if it's a good idea.
> > >
> > > Here's the point:
> > > I'd like to have one more action if my
> > form.validate()
> > > method fails on ActionForm. I'd like to do some
> > > specific stuff everytime the validate method
> > fails.
> > > Then, i thought of overwritting the
> > RequestProcessor.
> > >
> > > Is that a good idea, or there's another way to
> > > accomplish what i want???
> > >
> > > Regards,
> > > ltcmelo
> > >
> > >
> > >
> > >
> > >
> > >
> >
> _______________________________________________________
> > > Yahoo! Acesso Gr�tis - navegue de gra�a com
> > conex�o de qualidade! Acesse:
> > http://br.acesso.yahoo.com/
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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
> > 
> >  
> 
> =====
> 
> 
> 
> 	
> 	
> 		
> _______________________________________________________
> Yahoo! Acesso Gr�tis - navegue de gra�a com conex�o de qualidade! Acesse:
> http://br.acesso.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Overwritting RequestProcessor, how to???

Posted by Leandro Melo <lt...@yahoo.com.br>.
Niall,
i actually use tiles, but does it mean that the
requestProcessor i'm using is the Tiles one.
In my struts-config.xml i got this for the
configuration part.

 <controller />

So, i guess i'm using default's RequestProcessor, wich
is struts RequestProcessor, am i right?


 --- Niall Pemberton
<ni...@blueyonder.co.uk> escreveu: 
> All you have to do is extend the RequestProcessor
> (or TilesRequestProcessor
> if you use tiles) and then specify it in the
> <controller> element of the
> struts-config.xml
> 
>    <controller
> processorClass="myPackage.MyRequestProcessor"/>
> 
>
http://struts.apache.org/userGuide/configuration.html#controller_config
> 
> I guess whether its a good idea or not depends on
> what you're doing.
> 
> Niall
> 
> ----- Original Message ----- 
> From: "Leandro Melo" <lt...@yahoo.com.br>
> To: "struts jakarta" <us...@struts.apache.org>
> Sent: Sunday, August 15, 2004 6:06 PM
> Subject: Overwritting RequestProcessor, how to???
> 
> 
> > Hi,
> > i'd like to overwirte RequestProcessor, but
> actually i
> > don't really know if it's a good idea.
> >
> > Here's the point:
> > I'd like to have one more action if my
> form.validate()
> > method fails on ActionForm. I'd like to do some
> > specific stuff everytime the validate method
> fails.
> > Then, i thought of overwritting the
> RequestProcessor.
> >
> > Is that a good idea, or there's another way to
> > accomplish what i want???
> >
> > Regards,
> > ltcmelo
> >
> >
> >
> >
> >
> >
>
_______________________________________________________
> > Yahoo! Acesso Grátis - navegue de graça com
> conexão de qualidade! Acesse:
> http://br.acesso.yahoo.com/
> >
> >
>
---------------------------------------------------------------------
> > 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
> 
>  

=====



	
	
		
_______________________________________________________
Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse: http://br.acesso.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Overwritting RequestProcessor, how to???

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
All you have to do is extend the RequestProcessor (or TilesRequestProcessor
if you use tiles) and then specify it in the <controller> element of the
struts-config.xml

   <controller processorClass="myPackage.MyRequestProcessor"/>

http://struts.apache.org/userGuide/configuration.html#controller_config

I guess whether its a good idea or not depends on what you're doing.

Niall

----- Original Message ----- 
From: "Leandro Melo" <lt...@yahoo.com.br>
To: "struts jakarta" <us...@struts.apache.org>
Sent: Sunday, August 15, 2004 6:06 PM
Subject: Overwritting RequestProcessor, how to???


> Hi,
> i'd like to overwirte RequestProcessor, but actually i
> don't really know if it's a good idea.
>
> Here's the point:
> I'd like to have one more action if my form.validate()
> method fails on ActionForm. I'd like to do some
> specific stuff everytime the validate method fails.
> Then, i thought of overwritting the RequestProcessor.
>
> Is that a good idea, or there's another way to
> accomplish what i want???
>
> Regards,
> ltcmelo
>
>
>
>
>
> _______________________________________________________
> Yahoo! Acesso Grátis - navegue de graça com conexão de qualidade! Acesse:
http://br.acesso.yahoo.com/
>
> ---------------------------------------------------------------------
> 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