Back Forum Reply New

Dispatch request to OpenCMS

I want to have JSP template save in CMS like OpenCMS. Since openCMS is just another servlet, I think I can dispatch my request to openCMS after it is processed by my controller and added model data. How can I do this in ?

Is org..web.servlet.mvc.ServletForward  ingController what you are looking for?

I would have a look at how they integrate Struts and OpenCMS.  Should be fairly similar.

viewtopic.php?t=684

Cheers,

Integration of Spring and OpenCms works. A short summary of how to do it assuming you know how to install and get each product to work separately.

1. Install OpenCms into your web-container
2. Create a file structure for a new webapp X outside the web-container
3. Copy the OpenCms web.xml from the web-container into X/WEB-INF
4. Map the Spring stuff in the X/WEB-INF/web.xml but don't touch the OpenCms conf.
5. Construct your Spring MVC webapp in X as you would normally but put your view jsp:s in opencms
6. Use your favorite ViewResolver class but remember to map to the view jsp:s in OpenCms, e.g. /opencms/foo/test.jsp
7. To deploy just copy all the content under X (recursively including subfolders) to the unpacked opencms folder in the web-container. The idea is to just replace web.xml and add Spring config, libs and application classes

I managed to test this using the quot;Developing a Spring Framework MVC application step-by-stepquot;-guide (except the last persistance part, which I haven't tried) found on the Spring site. The software versions were Java 1.5, Tomcat 5.5.9, OpenCms 6.0.0 and Spring 1.2.1.

Good luck!
¥
Back Forum Reply New