[opencms-dev] Publish projects from external JSP file?

Stephan Hartmann beffe at beffe.de
Wed Sep 3 15:00:02 CEST 2003


Hello Steven,

this is because the CmsJspActionElement requires a CmsFlexRequest and a
CmsFlexResponse. Have a look at the com.opencms.core.OpenCmsHttpServlet on
how to create them or study the CmsShell (com.opencms.boot.CmsMain,
com.opencms.core.CmsShell and com.opencms.core.CmsShellCommands).

Bye,
Stephan

----- Original Message -----
From: Steve
To: opencms-dev at opencms.org
Sent: Wednesday, September 03, 2003 10:10 AM
Subject: [opencms-dev] Publish projects from external JSP file?


Hello,

Is it possible to publish a project inside OpenCMS using JSP files that are
located outside the OpenCMS?

I have the JSP files located in /opencms/test/publish.jsp while the OpenCMS
was installed correctly in /opencms folder within Tomcat.

I tried the code snippet to try to login the cms object, hoping to be able
to use the object for publish projects, but all I am getting is
NullPointerException.
<%@ page language="java"
import="com.opencms.file.*,com.opencms.core.*,com.opencms.flex.jsp.*"%>
<%
 CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
response);
 CmsObject cmsob = cms.getCmsObject();
 String username = "admin";
 String password = "admin";
 out.println(cmsob.loginUser(username, password));
%>

Thanks in advance.

Have a nice day,
Steven Ho.




More information about the opencms-dev mailing list