cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pfuhl" <daniel.pf...@web.de>
Subject XSP-Problem
Date Sun, 20 May 2001 01:27:57 GMT
Hi

can anybody tell me how to access the last-mofied-date of 
an xml-file using xsp-logic??

i tried the following wich works for me with cocoon 1.7.4
and jserv.

----------------------code snipped-----------------------

...
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="../styles/user.xsl" type="text/xsl"?>
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core">
<friend>
<xsp:logic>
File file = new java.io.File(javax.servlet.http.HttpServletRequest.getPathTranslated());
long lastmodified = file.lastModified();
java.util.Date d = new java.util.Date(lastmodified);
</xsp:logic>
<footer><xsp:expr>d</xsp:expr></footer>
....

----------------------code snipped-----------------------

i switched to cocooc 1.8.2 and tomcat,
but now i get always an error compiling the code.

errormessage:
##########################################################

java.lang.Exception: XSP Java Compiler: Compilation failed for _about.java
79: Can't make static reference to method java.lang.String getRemoteUser() in interface javax.servlet.http.HttpServletRequest.

File file = new java.io.File(javax.servlet.http.HttpServletRequest.getPathTranslated());

                                                                                ^

1 error



	at org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJavaProcessor.java:146)
	at org.apache.cocoon.processor..................

##########################################################


does anybody has an idea where this results from ??

it would be nice, if you could point me in the right direction...

thanx in advance 

daniel

------------------------------------------
Daniel Pfuhl
mailto:daniel@dphome.de
______________________________________________________________________________
Ferienklick.de - 225 Reisekataloge auf einen Blick!
Direkt zu Ihrem Traumurlaub: http://ferienklick.de/?PP=2-0-100-105-0


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