[opencms-dev] creating a file
Dirk Hinderks
opencms-list at 84aed5c0.psd.hinderks.de
Fri Aug 29 12:49:30 CEST 2008
On Fri, Aug 29, 2008 at 09:32:18AM +0200, Christoph P. Kukulies wrote:
> Thanks. I just thought that the package imports in the header of the
> jsp,
>
> [...]
> <%@ page
> import="java.util.*,org.opencms.jsp.*,org.opencms.file.*,java.text.DateFormat,
> java.text.SimpleDateFormat,org.opencms.main.*" %>
> [...]
>
> were for just this purpose.
You're mostly right. But you import types/classes, not packages. If
I've understood you right, you've used something equivalent to:
<%@ page import="org.opencms.lock" %>
In order to use »org.opencms.lock.CmsLockType.TEMPORARY« without
qualification as »CmsLockType.TEMPORARY«, add the following to your JSP
(note that the right class name is »CmsLockType« instead of »CmsLock«):
<%@ page import="org.opencms.lock.CmsLockType" %>
The servlet container (i.e. Tomcat) translates this to the import
declaration »import org.opencms.lock.CmsLockType;« before compilation.
--
Dirk Hinderks, Cologne, Germany
More information about the opencms-dev
mailing list