[opencms-dev] creating a file

Christoph P. Kukulies kuku at physik.rwth-aachen.de
Fri Aug 29 09:32:18 CEST 2008


On Thu, Aug 28, 2008 at 10:56:32PM +0200, Dirk Hinderks wrote:
> Hi Chris,
> 
> On Thu, Aug 28, 2008 at 04:06:07PM +0200, Christoph P. Kukulies wrote:
> [trying to use CmsLock.TEMPORARY:]
> > I solved it by typing 
> > 
> > org.opencms.lock.CmsLock.TEMPORARY
> > 
> > Don't know, why including org.opencms.lock or org.opencms.* didn't work.
> 
> In Java you import types (or static import for static functions).  You 


Thanks. I just thought that the package imports in the header of the
jsp,

<%@ page session="false" %>
<%@ page
import="java.util.*,org.opencms.jsp.*,org.opencms.file.*,java.text.DateFormat,
java.text.SimpleDateFormat,org.opencms.main.*" %>
<%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<?xml version="1.0" encoding="UTF-8" ?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
<%!

were for just this purpose.

> don't import packages.  Therefore you schould use the following import 
> declaration:
> 
>   import org.opencms.lock.CmsLock;
> 
> You could also use this import on demand declaration:
> 
>   import org.opencms.lock.*;
> 
> Bye
> Dirk

--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de



More information about the opencms-dev mailing list