cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Smith" <msm...@windebt.com>
Subject RE: error: Type expected??
Date Tue, 31 Oct 2000 20:34:20 GMT
	Well, first Cocoon informed me that I can't put an xsl:template inside
another template.  So I removed the the checklogin template tags, and just
put the logic directly into the main template.  I still get the same exact
type expected error.

Matt

-----Original Message-----
From: Santoso, Tommy [mailto:Tommy.Santoso@Dresdner-Bank.com]
Sent: Friday, October 27, 2000 5:19 AM
To: 'cocoon-users@xml.apache.org'
Subject: AW: error: Type expected??


Hello Matthew,

hmm...try to use between page tags like this:

...
<page>
<xsl:template name="checklogin">
	<xsp:logic>
		String username = getUsername(request);
		String password = getPassword(request);
		boolean validuser = false;
		if (username != null &amp;&amp; password != null)
			validuser = isUserValid(username, password,
response);
		if (validuser)
		{
			<xsp:content><logged-in /></xsp:content>
		}
	</xsp:logic>
</xsl:template>
...
</page>

and let me know if it works or not,

Cheers,
Tommy

-----Urspr√ľngliche Nachricht-----
Von: Matthew Smith [mailto:msmith@windebt.com]
Gesendet am: Freitag, 27. Oktober 2000 00:37
An: Cocoon List (E-mail)
Betreff: error: Type expected??

	I've got the following template:
<xsl:template name="checklogin">
	<xsp:logic>
		String username = getUsername(request);
		String password = getPassword(request);
		boolean validuser = false;
		if (username != null &amp;&amp; password != null)
			validuser = isUserValid(username, password,
response);
		if (validuser)
		{
			<xsp:content><logged-in /></xsp:content>
		}
	</xsp:logic>
</xsl:template>

	I call it with <xsl:call-template name="checklogin" />.  I was using
this
before without any problem, but I juggled around some of my xsl and now I'm
getting an error:
java.lang.Exception: XSP Java Compiler: Compilation failed for
_protected.java
133: Type expected.
		if (username != null && password != null)
		^
1 error

	I don't understand.  Is there some way to view _protect.java?

Thanks,
Matt


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org

---------------------------------------------------------------------
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