cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: xsp while - for loop
Date Tue, 18 Dec 2001 11:28:32 GMT
Quoting Johannes Schwarz <J.Schwarz@wika.de>:

> My xsp - file compiles without any problems.
> 
> But as soon as I put a while or a for  loop inside the method  or
> inside the <xsp:logic> - tag within the tag NAVIGATION my xsp file won't
> compile anymore.
> It seems that it's going into an infinite loop.
> 
> Did anybody else have that problem or at least a solution?
> 
> 
> Best regards 
> 
> J. Schwarz
> 
> 
> 
> 
> 
> <?xml version="1.0" ?>
> <xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
>    <xsp:structure>
>       <xsp:include>java.util.*</xsp:include>
>       
>       <xsp:include>java.io.*</xsp:include>     
>    </xsp:structure>
>    
>    <xsp:logic>   
>                String fileName="";
>    	
>    	public File getFileName()
>    	{   		
>    		fileName =
> parameters.getParameter("fileName","unknown"); 
>    		File back=null;
>    		try {
>    			back=new File(fileName);
>    		
>    		}
>    		catch (Exception e)
>    		{ e.printStackTrace(); }
>    		
>    		return back;
>    	} 
>    </xsp:logic>
>    <NAVIGATION>
>    <xsp:logic>
>       for (int i=0;i<5;i++)
                     ^^^
Try using 

        for (int i=0;i &lt; 5;i++)

as although it looks like java it is handled like xml and thus you have to use 
entities for <, > and &.

Giacomo


>               ; //dosomething 
>    </xsp:logic>
>   </NAVIGATION>
>   
> </xsp:page>
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> 
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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