It looks to me like you don't have the latest revision of 1.1. This
duplication was discussed in length on the user or dev list about a
month ago (it's a result of the way tomcat unpacks and autodeploys)
wars, and was subsequently resolved. The HEAD revision in SVn should
prevent this from happening. . .
for more details on the reasons why this happens. . .take a look back in
the archives about 3-4 weeks ago (I think).
David
Graham Klyne wrote:
When I run the Pluto portal driver and test portlets under Tomcat 5.5, I get two
identical copies of the software created in the Tomcat webapps directory:
/portal and /pluto-portal
/testsuite and /pluto-testsuite
Which I find is all rather confusing. My pluto.xml and testsuite.cml files
refer to pluto-portal.war and pluto-testsuite.war, which I assume are being
unpacked by Tomcat into the correspinding directories under /webapps. The only
place in the config files I can find reference to paths /portal and /testsuite
are in pluto-portal-driver-config.xml, but I can't see why the portal software
would create yet another copy of the software, rarther than just following the
context declarations to /pluto-portal AND /pluto-testsuite. Is this expected
behaviour?
All this comes about because although I'm getting the portal software to run and
render under ServletUnit, the portlets themselves are failing to find the
corresponding context, and I'm struggling to figure out what aspect of the
ServletUnit environment I need to adjust to allow the portlets to be run.
#g
--
FWIW, the portlet is returning the following as text rendered in place of the
expected page content:
[[
Error rendering portlet.org.apache.pluto.PortletContainerRuntimeException:
Error creating portlet invoker for portlet TestPortlet1.
Unable to locate context /testsuite.
Check your portlet configuration and ensure cross context dispatching is
enabled.
at
org.apache.pluto.core.InternalPortletWindow.(InternalPortletWindow.java:60)
at
org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:120)
at
org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:94)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:96)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:108)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.template_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.template_jsp:108)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_jsp:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at
org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:120)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.InvocationContextImpl.service(InvocationContextImpl.java:79)
at
com.meterware.servletunit.ServletUnitClient.newResponse(ServletUnitClient.java:118)
at com.meterware.httpunit.WebWindow.getResource(WebWindow.java:164)
at
com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:128)
at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
at
org.apache.pluto.unittest.TestPortletAccess.testDoGetHttpServletRequestHttpServletResponse(TestPortletAccess.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
[1]=Error rendering portlet.org.apache.pluto.PortletContainerRuntimeException:
Error creating portlet invoker for portlet TestPortlet1. Unable to locate
context /testsuite. Check your portlet configuration and ensure cross context
dispatching is enabled.
at
org.apache.pluto.core.InternalPortletWindow.(InternalPortletWindow.java:60)
at
org.apache.pluto.core.PortletContainerImpl.doRender(PortletContainerImpl.java:120)
at
org.apache.pluto.driver.tags.PortletTag.doStartTag(PortletTag.java:94)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspx_meth_pluto_portlet_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:96)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dskin_jsp:71)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspx_meth_c_forEach_0(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:108)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_002dpage_jsp:66)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.include(RequestDispatcherImpl.java:59)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
at
org.apache.jsp.WEB_002dINF.fragments.template_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.template_jsp:108)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:693)
at
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:660)
at
org.apache.jsp.WEB_002dINF.fragments.portlet_jsp._jspService(org.apache.jsp.WEB_002dINF.fragments.portlet_jsp:59)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
com.meterware.servletunit.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:54)
at
org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServl...
]]