synyx GmbH & Co. KG Homepage Welcome Guest   | Login
  Search  
  Index  | Recent Threads  | Who's Online  | User List  | Register  | Search  | Help  | RSS feeds


Quick Go »
Thread Status: Normal
Total posts in this thread: 22
Posts: 22   Pages: 3   [ Previous Page | 1 2 3 ]
[Add To My Favorites] [Watch this Thread]
Author
Previous Thread This topic has been viewed 15738 times and has 21 replies Next Thread
Female ozzybren
Stranger



Joined: Aug 29, 2005
Posts: 1
Status: Offline

Access OpenCMS from Struts

Is it possible to access the OpenCMS repository directly from a Struts Action without having to actually put the JSPs in OpenCMS, i.e. make a call directly to an OpenCMS database that may well be sitting on a different web server.

e.g. a very basic JSP (excuse the bad programming practice, but trying only to get across a point)

---- index.jsp --------
<%
OpenCmsRepository repository = OpenCms.initRepository(initParams);
OpenCmsContent content = repository.getContent("content to get", onlineTrue);
%>
<html>
<head><title>Testing</title></head>
<body>
<%= content %>
</body>

I realise this looks very much like JDBC kind of thing but I'm trying to establish whether or not it is in fact necessary to put my JSPs into OpenCms or whether or not I can just put the content in.

Cheers,
[Aug 29, 2005 10:50:24 AM] Show Printable Version of Post     [Link] Report threatening or abusive post: please login first  Go to top 
Female snehal_shah
Stranger



Joined: Mar 13, 2012
Posts: 1
Status: Offline

Problem

HI,

I am trying to integrate struts 1.2 with opencms 8. This is what I have till now

1) All jsps are in opencms
2) struts configuation file is and class files are in opencms.war/WEB-INF folder

what confuses me how do I do the mapping ? How do I call an action class when the form is submitted.

I have struts-config file.

Thanks
[Mar 13, 2012 3:29:13 PM] Show Printable Version of Post        Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 22   Pages: 3   [ Previous Page | 1 2 3 ]
[Show Printable Version of Thread]