I have an existing war file, nothing special about it, just a normal web application. I am making a portal page and I want to make this existing web application into a portlet. Anyone know how to go about doing that? Basically if I could just stick this war file into a portlet window, that would be great but I don't know where to begin.
开发者_Go百科I am using OpenPortal 2.x that has been installed on Tomcat 6.0.x and programming in Eclipse Helios.
Yes you can package your portlet wars in the specified format and ensure you have a portlet.xml
in addition to the web.xml
I have not used OpenPortal but I assume it is the portal framework that allows you to deploy your individual portlet as a war.
A diagram example is available here. See 5.2.1.2. Package Structure for more.
Another thing you can do is to use this tutorial for OpenPortal and Eclipse, and create a sample portlet and export it as a war. Then compare the new war with your existing war, most likely you'll only need to add a couple of files - one of them being portlet.xml
Then deploy your modified war into the portal.
I've found some more samples for you, take a look at these - you can directly compare your existing war to the structure of these. Try deploying some of these, so you'll know if they work on OpenPortal too.
精彩评论