Fórumok

Add a portlet in a JSP page

thumbnail
Luis Antonio Rodríguez González, módosítva 11 év-val korábban

Add a portlet in a JSP page

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2012.06.05. Legújabb bejegyzések
Hello,

How can I add a portlet in a JSP page?

I have tried with the tag "<runtime-portlet name="34" instance="1234" />" and does nothing.

I have tried with the tag "<liferay-portlet:runtime portletName="34" />" and the first time it have been produced the two following errors:


15:27:26,634 ERROR [AdvancedPermissionChecker:905] com.liferay.portal.NoSuchResourceActionException: comprasuscripcionfamilia#ADD_TO_PAGE
com.liferay.portal.NoSuchResourceActionException: comprasuscripcionfamilia#ADD_TO_PAGE
	at com.liferay.portal.service.impl.ResourceActionLocalServiceImpl.getResourceAction(ResourceActionLocalServiceImpl.java:98)
	at sun.reflect.GeneratedMethodAccessor269.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
	at $Proxy78.getResourceAction(Unknown Source)
	at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.hasResourcePermission(ResourcePermissionLocalServiceImpl.java:686)
	at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.hasResourcePermission(ResourcePermissionLocalServiceImpl.java:612)
	at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)


15:27:26,661 ERROR [InsertTag:922] ServletException in '/html/common/themes/portlet.jsp': null
org.apache.jasper.JasperException: java.lang.NullPointerException
	at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
	at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:652)
	at com.liferay.portal.kernel.servlet.PageContextWrapper.include(PageContextWrapper.java:168)
	at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
	at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
	at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
	at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
	at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1677)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
	at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4735)
	at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1455)
	at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:213)
	at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:148)
	at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:309)
	at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:234)
	at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:106)
	at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:512)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
	at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
	at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:412)
	at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:680)
	at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
	at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
	at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
	at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:135)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
	at com.liferay.taglib.portlet.DefineObjectsTag.doStartTag(DefineObjectsTag.java:61)
	at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:439)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
	... 173 more
15:27:26,671 INFO  [PortalImpl:4873] Current URL /web/guest/servicios-de-pago?p_p_id=serviciospagofamilia_WAR_Net4ParentSitioWebportlet&amp;p_p_lifecycle=0&amp;p_p_state=normal&amp;p_p_mode=view&amp;p_p_col_id=column-2&amp;p_p_col_count=1&amp;_serviciospagofamilia_WAR_Net4ParentSitioWebportlet_jspPage=%2Fhtml%2Ffamilia%2Fservicios_pago%2Fpagar_suscripcion.jsp generates exception: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/html/common/themes/portlet.jsp': null
15:27:27,991 ERROR [status_jsp:670] org.apache.jasper.JasperException: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/html/common/themes/portlet.jsp': null
org.apache.jasper.JasperException: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/html/common/themes/portlet.jsp': null
	at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)


The second time I invoke the JSP containing the tag "<liferay-portlet:runtime portletName="34" />" it just gives the second error.

Best regards

Luis
thumbnail
David H Nebinger, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Liferay Legend Bejegyzések: 14916 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
First I doubt this is really what you want to be doing. If you're trying to nest a portlet on your own, you're probably on an incorrect path.

That being said, you can look at the code for the nested_portlets to see how it's done.
thumbnail
Luis Antonio Rodríguez González, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2012.06.05. Legújabb bejegyzések
Hello,

Where can I find the code for the nested_portlets?

Thank you,

Luis
thumbnail
Tina Agrawal, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Expert Bejegyzések: 297 Csatlakozás dátuma: 2008.01.03. Legújabb bejegyzések
The jsps for nested portlets are under -
\tomcat-7.0.25\webapps\ROOT\html\portlet\nested_portlets

Regards,
Tina
thumbnail
Luis Antonio Rodríguez González, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2012.06.05. Legújabb bejegyzések
David H Nebinger:
First I doubt this is really what you want to be doing. If you're trying to nest a portlet on your own, you're probably on an incorrect path.

That being said, you can look at the code for the nested_portlets to see how it's done.


Hello, I have seen the code for the nested_portlets, but this code is not worth me. What I really want is to have several pages with a button. When I press this button I want to redirect a jsp page that include a portlet. It is a way to use dinamically a portlet from several parts of my site.

Luis
thumbnail
Pinkesh Gandhi, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Junior Member Bejegyzések: 99 Csatlakozás dátuma: 2012.01.27. Legújabb bejegyzések
Hi Luis,

For your such kind of requirement, one probable solution is create hidden page say for e.g., Page-A in your site and put your portlet on that page. After that, on click of the button just redirect to that Page-A.

I hope it may resolves your issue.
thumbnail
Luis Antonio Rodríguez González, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2012.06.05. Legújabb bejegyzések
Hello Pinkesh,

I'll try your solution.

Thanks.

Luis
thumbnail
Luis Antonio Rodríguez González, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2012.06.05. Legújabb bejegyzések
Pinkesh Gandhi:
Hi Luis,

For your such kind of requirement, one probable solution is create hidden page say for e.g., Page-A in your site and put your portlet on that page. After that, on click of the button just redirect to that Page-A.

I hope it may resolves your issue.


Hello, this solution works, but I need pass information to the portlet. In the page with the button I set a session attribute, but when I try to get this attribute in the other portlet, the value is null. Why is the session attribute lost?

Regards,

Luis
thumbnail
Jay Patel, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Regular Member Bejegyzések: 118 Csatlakozás dátuma: 2010.02.24. Legújabb bejegyzések
Use of session attribute in this case would not be a good choice if you want to pass parameters when button click event happens.

Ideally you can pass request parameters as query string to the redirect page URL & then retrieve these parameters in reneder phase method of the portlet which you have placed on that hidden page.

-Jay.
thumbnail
Luis Antonio Rodríguez González, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2012.06.05. Legújabb bejegyzések
Jay Patel:
Use of session attribute in this case would not be a good choice if you want to pass parameters when button click event happens.

Ideally you can pass request parameters as query string to the redirect page URL & then retrieve these parameters in reneder phase method of the portlet which you have placed on that hidden page.

-Jay.

Hello Jay,

your solution is good, but how can I get the parameter? I've tried to get the parameter in the render method of the following ways:

		String inter_portlet = ParamUtil.getString(request, "inter_portlet");
		inter_portlet = request.getParameter("inter_portlet");
		HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
		inter_portlet = httpRequest.getParameter("inter_portlet");


None of them works.

Luis
thumbnail
Tejas Kanani, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Liferay Master Bejegyzések: 654 Csatlakozás dátuma: 2009.01.06. Legújabb bejegyzések
Hi Luis,

Try to get it from OriginalServletRequest. Try below code,
final HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(request);
String inter_portlet = ParamUtil.getString(PortalUtil.getOriginalServletRequest(httpServletRequest ), "inter_portlet", null);


If above code doesn't work, please share how are you passing parameter.

Regards,
Tejas
thumbnail
Luis Antonio Rodríguez González, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Junior Member Bejegyzések: 41 Csatlakozás dátuma: 2012.06.05. Legújabb bejegyzések
Tejas Kanani:
Hi Luis,

Try to get it from OriginalServletRequest. Try below code,
final HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(request);
String inter_portlet = ParamUtil.getString(PortalUtil.getOriginalServletRequest(httpServletRequest ), "inter_portlet", null);


If above code doesn't work, please share how are you passing parameter.

Regards,
Tejas

Hello, I'm passing the parameter of the following way:

 public class ServiciosPago extends MVCPortlet
{
    public void pagarSuscripcion(ActionRequest request, ActionResponse response) throws Exception 
   {
    	response.sendRedirect("/web/guest/pago-suscripcion/?inter_portlet=prueba");
   }


Regards,

Luis
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
I think you didn't state your question clearly. It seems you want to dynamically change the portlet which is being executed.
Instead of doing that, I think Pinkesh's solution is good and used most commonly.
thumbnail
Hitoshi Ozawa, módosítva 11 év-val korábban

RE: Add a portlet in a JSP page

Liferay Legend Bejegyzések: 7942 Csatlakozás dátuma: 2010.03.24. Legújabb bejegyzések
The following thread may answer you question:

http://www.liferay.com/community/forums/-/message_boards/message/6810381