I note that you've declared setTeste() in ScyllaTilesRequestProcessor but 
you're asking it to be set in utilities.MyTilesRequestProcessor

> -----Original Message-----
> From: Miguel Galves [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, May 25, 2006 2:47 PM
> To: dev@struts.apache.org
> Subject: Custom RequestProcessor
> 
> 
> Hi,
> 
> I wrote a new controller class, which extends 
> TileRequestProcessor, in order to solve a problem we had with 
> POST requests enconding (UTF-8), specially with 
> multipart-form requests.
> 
> I'm now trying to pass some paremeters to the new controller, 
> using the set-property tag in server.xml
> 
> <controller
>         processorClass="utilities.MyTilesRequestProcessor"
> contentType="text/html; charset=UTF-8">
>         <set-property property="teste" value="hellworld"/>
>     </controller>
> 
> but its not working. I've created a setTeste method in my 
> processor, as showed above
> 
> public class ScyllaTilesRequestProcessor extends 
> TilesRequestProcessor {
> 
>     public String teste;
> 
>     public void process(HttpServletRequest request, 
> HttpServletResponse
> response) throws IOException,
> 
> ServletException {
>     ...
> 
>     }
> 
>     public void setTeste(String value){
>         System.out.println("PASSEI POR AQUI: "+value);
>     }
> 
>     public void getTeste(){
>         System.out.println("PASSEI POR AQUI: ");
>     }
> 
> }
> 
> but I'm still geeting the following exception:
> 
> May 25, 2006 9:07:12 AM org.apache.commons.digester.Digester 
> startElement
> SEVERE: Begin event threw exception
> java.lang.NoSuchMethodException: Bean has no property named teste
>     at org.apache.commons.digester.SetPropertyRule.begin(
> SetPropertyRule.java:144)
>     at org.apache.commons.digester.Rule.begin (Rule.java:152)
>     at 
> org.apache.commons.digester.Digester.startElement(Digester.java:1286)
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.s
> tartElement(
> AbstractSAXParser.java:533)
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocument
> Parser.emptyElement(
> AbstractXMLDocumentParser.java:220)
>     at 
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.em
> ptyElement(
> XMLDTDValidator.java:819)
>     at 
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerIm
> pl.scanStartElement(
> XMLNSDocumentScannerImpl.java:316)
>     at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
> nnerImpl$FragmentContentDispatcher.dispatch
> (XMLDocumentFragmentScannerImpl.java:1693)
>     at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentSca
> nnerImpl.scanDocument(
> XMLDocumentFragmentScannerImpl.java:368)
>     at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(
> XML11Configuration.java:834)
>     at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (
> XML11Configuration.java:764)
>     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(
> XMLParser.java:148)
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(
> AbstractSAXParser.java:1242)
>     at org.apache.commons.digester.Digester.parse(Digester.java:1572)
>     at org.apache.struts.action.ActionServlet.parseModuleConfigFile(
> ActionServlet.java:738)
>     at org.apache.struts.action.ActionServlet.initModuleConfig (
> ActionServlet.java:687)
>     at 
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
>     at javax.servlet.GenericServlet.init(GenericServlet.java:211)
>     at org.apache.catalina.core.StandardWrapper.loadServlet (
> StandardWrapper.java:1091)
>     at 
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java
> :925)
>     at org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3857)
>     at org.apache.catalina.core.StandardContext.start 
> (StandardContext.java
> :4118)
>     at org.apache.catalina.core.ContainerBase.addChildInternal(
> ContainerBase.java:759)
>     at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java
> :739)
>     at org.apache.catalina.core.StandardHost.addChild 
> (StandardHost.java
> :524)
>     at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788)
>     at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java
> :498)
>     at org.apache.catalina.startup.HostConfig.check 
> (HostConfig.java:1179)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:39)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke (
> DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at 
> org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java
> :503)
>     at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke (
> DynamicMetaDataImpl.java:213)
>     at 
> com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
>     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(
> DefaultMBeanServerInterceptor.java:815)
>     at 
> com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java
> :784)
>     at 
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java
> :1377)
>     at org.apache.catalina.manager.ManagerServlet.deploy (
> ManagerServlet.java:636)
>     at 
> org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java
> :423)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:712)
>     at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
>     at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
> ApplicationFilterChain.java:252)
>     at org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java :173)
>     at org.apache.catalina.core.StandardWrapperValve.invoke(
> StandardWrapperValve.java:213)
>     at org.apache.catalina.core.StandardContextValve.invoke(
> StandardContextValve.java:178)
>     at org.apache.catalina.authenticator.AuthenticatorBase.invoke (
> AuthenticatorBase.java:482)
>     at org.apache.catalina.core.StandardHostValve.invoke(
> StandardHostValve.java:126)
>     at org.apache.catalina.valves.ErrorReportValve.invoke(
> ErrorReportValve.java:105)
>     at org.apache.catalina.core.StandardEngineValve.invoke (
> StandardEngineValve.java:107)
>     at org.apache.catalina.connector.CoyoteAdapter.service(
> CoyoteAdapter.java:148)
>     at 
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> :856)
>     at 
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandle
> r.processConnection(
> Http11Protocol.java:744)
>     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
> PoolTcpEndpoint.java:527)
>     at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
> LeaderFollowerWorkerThread.java:80)
>     at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
> ThreadPool.java:684)
>     at java.lang.Thread.run(Thread.java:595)
> 
> 
> I just can't find any documentation about how to configure 
> the processor properly. Do I have to write a custom 
> ModuleConfig with my parameters ? Can somebody help me ?
> 
> 
> -- 
> Miguel Galves - Engenheiro de Computação
> Já leu meus blogs hoje?
> Para geeks http://log4dev.blogspot.com
> Pra pessoas normais
> http://miguelgalves.blogspot.com
> 
> "Não sabendo que era impossível, ele foi lá e fez..."
> 

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

Reply via email to