cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steven Maring <Steven.Mar...@trcinc.com>
Subject whats allowed in an xsp:logic tag?
Date Thu, 06 Apr 2000 14:06:40 GMT
I have a simple 'try' in an XSP logic-sheet and Cocoon throws an exception:

Cocoon 1.7.2
Error found handling the request.
java.lang.Exception: XSP Java Compiler: Compilation failed for _login.java
        29: Type expected.
                  try {
                  ^



<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>

  <xsl:template match="page">

    <xsl:processing-instruction
name="cocoon-process">type="xsp"</xsl:processing-instruction>
    <xsp:page xmlns:xsp="http://www.apache.org/1999/XSP/Core">

      <xsp:structure>
	<xsp:include>java.util.HashMap</xsp:include>
	<xsp:include>java.net.URL</xsp:include>
      </xsp:structure>

      <xsp:logic>

	  try {
	     HashMap requestParams = DataServletUtils.getParameters( request
);
	     String username = (String) requestParams.get( "username" );
	     String password = (String) requestParams.get( "password" );
				
	     URL url = new URL( "http://luckydog/modelSystem/redirected.xml"
);
	     HashMap responseParams = new HashMap();
	     responseParams.put( "username", username );
	     DataServletUtils.redirect( url, response, responseParams );


	  } catch (Exception e) {
	     e.printStackTrace();
	  }


      </xsp:logic>
      
    </xsp:page>

  </xsl:template>

</xsl:stylesheet>

Mime
View raw message