cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugues Marilleau <h...@xenon.medisite.net>
Subject Re: XSP + "request" object problem [Part II :)]
Date Thu, 06 Jul 2000 16:59:50 GMT
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 :(


Mime
View raw message