cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject problems with xsp date
Date Wed, 13 Jun 2001 09:27:53 GMT
Hi all

I'm trying to create a simple XSP page that gets the current hour and minute
and passes it on to a stylesheet. The cocoon docs say XSP automatically
generates import statements for the most commonly used Java libraries
(including java.util.Date).

However when I try run the page I get an error: Type expected.
now.setTime(new Date());

Has anybody got any ideas?

Here is the relevant part of the page:

       Calendar now = Calendar.getInstance();
        now.setTime( new Date() );
        float hourAngle = (float) now.get( Calendar.HOUR   ) / 12 * 360; 
        float minAngle  = (float) now.get( Calendar.MINUTE ) / 60 * 360;




thanks in advance!


Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message