cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudhi <sudheen...@insage.com>
Subject Re: XSP + "request" object problem [Part II :)]
Date Thu, 06 Jul 2000 17:44:19 GMT
Hi...
If u want to write function then u have put "outside" of <page> tag.
U can easily understand this, if u look at the java file created out of
your xsp page.
Take a look at the java file created by the xsp processor in the
repository.
HTH
Sudhi

Hugues Marilleau wrote:
> 
> On Thu, Jul 06, 2000 at 10:36:26AM -0400, sudhi wrote :
> > Hi,
> > Put your <xsp:logic> tag inside <page>
> > And it will work
> > HTH
> > Sudhi
> >
> 
> Thx, it worked, but only with something like this :
> 
>                  String foo_var = request.getParameter ("foo_field");
> or :
>                  String foo_var = "bar" ;
> 
> not :
>                 private synchronized String myparam ()
>                 {
>                         // String foo_var = request.getParameter ("foo_field");
>                         String foo_var = "bar";
>                         return foo_var;
>                 }
> or
>                 private synchronized String myparam ()
>                 {
>                         // String foo_var = request.getParameter ("foo_field");
>                         String foo_var = "bar";
>                         return foo_var;
>                 }
> 
> inside the <xsp:logic> tags.
> 
> Here is the error page :
> 
>                                         Error found handling the request.
> 
>     java.lang.Exception: XSP Java Compiler: Compilation failed for _test2.java
>     69: '}' expected.
>         );
>           ^
>     71: Statement expected.
>                     private synchronized String myparam ()
>                     ^
>     79: Identifier expected.
>           document.createTextNode("\n\n\t")
>                                  ^
>     3 errors
> 
>         at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java
>         at org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:451)
>         at org.apache.cocoon.Engine.handle(Engine.java:305)
>         at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:311)
>         at org.apache.jserv.JServConnection.processRequest(JServConnection.java:317)
>         at org.apache.jserv.JServConnection.run(JServConnection.java:188)
>         at java.lang.Thread.run(Thread.java)
> 
> Warning: this page has been dynamically generated.
> 
> I looked in the _test2.java and see this :
> 
>     [...snip...]
> 
>     xspCurrentNode.appendChild(
>       document.createTextNode("\n        ")
>     );                                                                            <--
line 69
> 
>                 private synchronized String myparam ()                            <--
line 71
>                 {
>                         // String foo_var = request.getParameter ("foo_field");
>                         String foo_var = "bar";
>                         return foo_var;
>                 }
> 
>     xspCurrentNode.appendChild(
>       document.createTextNode("\n\n\t")                                           <--
line 79
>     );
> 
>     [...snip...]
> 
> I see nothing wrong with it, because functions worked when my <xsp:logic>
> </xsp:logic> weren't in my <page> </page> tag, but not anymore now
:(
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Mime
View raw message