Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Luis Antonio Rodríguez González
Add a portlet in a JSP page
July 17, 2012 8:54 AM
Answer

Luis Antonio Rodríguez González

Rank: Junior Member

Posts: 41

Join Date: June 5, 2012

Recent Posts

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:

 1
 215:27:26,634 ERROR [AdvancedPermissionChecker:905] com.liferay.portal.NoSuchResourceActionException: comprasuscripcionfamilia#ADD_TO_PAGE
 3com.liferay.portal.NoSuchResourceActionException: comprasuscripcionfamilia#ADD_TO_PAGE
 4    at com.liferay.portal.service.impl.ResourceActionLocalServiceImpl.getResourceAction(ResourceActionLocalServiceImpl.java:98)
 5    at sun.reflect.GeneratedMethodAccessor269.invoke(Unknown Source)
 6    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 7    at java.lang.reflect.Method.invoke(Method.java:597)
 8    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:112)
 9    at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:71)
10    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
11    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
12    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
13    at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:59)
14    at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:108)
15    at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:211)
16    at $Proxy78.getResourceAction(Unknown Source)
17    at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.hasResourcePermission(ResourcePermissionLocalServiceImpl.java:686)
18    at com.liferay.portal.service.impl.ResourcePermissionLocalServiceImpl.hasResourcePermission(ResourcePermissionLocalServiceImpl.java:612)
19    at sun.reflect.GeneratedMethodAccessor288.invoke(Unknown Source)
20    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
21    at java.lang.reflect.Method.invoke(Method.java:597)

  1
  215:27:26,661 ERROR [InsertTag:922] ServletException in '/html/common/themes/portlet.jsp': null
  3org.apache.jasper.JasperException: java.lang.NullPointerException
  4    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
  5    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
  6    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
  7    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
  8    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  9    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 10    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 11    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 12    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
 13    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 14    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 15    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 16    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
 17    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
 18    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
 19    at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:652)
 20    at com.liferay.portal.kernel.servlet.PageContextWrapper.include(PageContextWrapper.java:168)
 21    at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:99)
 22    at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:135)
 23    at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:760)
 24    at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:892)
 25    at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
 26    at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1677)
 27    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 28    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 29    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
 30    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 31    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 32    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 33    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 34    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 35    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 36    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
 37    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 38    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 39    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 40    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
 41    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
 42    at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:4735)
 43    at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:1455)
 44    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:213)
 45    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processPortlet(RuntimePortletImpl.java:148)
 46    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:309)
 47    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletImpl.processTemplate(RuntimePortletImpl.java:234)
 48    at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:106)
 49    at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:512)
 50    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 51    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 52    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
 53    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
 54    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
 55    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 56    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 57    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 58    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 59    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
 60    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 61    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 62    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 63    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
 64    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
 65    at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:412)
 66    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:680)
 67    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:244)
 68    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
 69    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
 70    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:174)
 71    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 72    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
 73    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
 74    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:533)
 75    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:510)
 76    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 77    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 78    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 79    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 80    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 81    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 82    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
 83    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 84    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
 85    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 86    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 87    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 88    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
 89    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
 90    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
 91    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
 92    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
 93    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
 94    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 95    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 96    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 97    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 98    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 99    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
100    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:135)
101    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
102    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
103    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
104    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
105    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
106    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:304)
107    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
108    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
109    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
110    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:113)
111    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
112    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
113    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
114    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
115    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
116    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
117    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
118    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
119    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
120    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
121    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
122    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
123    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
124    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
125    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
126    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
127    at com.liferay.portal.servlet.filters.etag.ETagFilter.processFilter(ETagFilter.java:55)
128    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
129    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
130    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
131    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
132    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:240)
133    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
134    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
135    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
136    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
137    at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
138    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
139    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
140    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
141    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
142    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
143    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
144    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
145    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
146    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
147    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:208)
148    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
149    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
150    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
151    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
152    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
153    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
154    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
155    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
156    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
157    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
158    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:164)
159    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
160    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:184)
161    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:92)
162    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
163    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
164    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
165    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
166    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
167    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
168    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
169    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
170    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)
171    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
172    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
173    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
174    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)
175    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
176    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
177    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
178    at java.lang.Thread.run(Thread.java:619)
179Caused by: java.lang.NullPointerException
180    at com.liferay.taglib.portlet.DefineObjectsTag.doStartTag(DefineObjectsTag.java:61)
181    at org.apache.jsp.html.common.themes.portlet_jsp._jspService(portlet_jsp.java:439)
182    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
183    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
184    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
185    ... 173 more
18615:27:26,671 INFO  [PortalImpl:4873] Current URL /web/guest/servicios-de-pago?p_p_id=serviciospagofamilia_WAR_Net4ParentSitioWebportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_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
18715: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
188org.apache.jasper.JasperException: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/html/common/themes/portlet.jsp': null
189    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
190    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
191    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
192    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
193    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
194    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
195    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
David H Nebinger
RE: Add a portlet in a JSP page
July 17, 2012 9:06 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 5739

Join Date: September 1, 2006

Recent Posts

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.
Luis Antonio Rodríguez González
RE: Add a portlet in a JSP page
July 19, 2012 4:55 AM
Answer

Luis Antonio Rodríguez González

Rank: Junior Member

Posts: 41

Join Date: June 5, 2012

Recent Posts

Hello,

Where can I find the code for the nested_portlets?

Thank you,

Luis
Hitoshi Ozawa
RE: Add a portlet in a JSP page
July 19, 2012 5:07 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

The following thread may answer you question:

http://www.liferay.com/community/forums/-/message_boards/message/6810381
Tina Agrawal
RE: Add a portlet in a JSP page
July 19, 2012 5:26 AM
Answer

Tina Agrawal

Rank: Regular Member

Posts: 191

Join Date: January 2, 2008

Recent Posts

The jsps for nested portlets are under -
\tomcat-7.0.25\webapps\ROOT\html\portlet\nested_portlets

Regards,
Tina
Luis Antonio Rodríguez González
RE: Add a portlet in a JSP page
July 26, 2012 10:38 AM
Answer

Luis Antonio Rodríguez González

Rank: Junior Member

Posts: 41

Join Date: June 5, 2012

Recent Posts

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
Pinkesh Gandhi
RE: Add a portlet in a JSP page
July 26, 2012 11:53 AM
Answer

Pinkesh Gandhi

Rank: Regular Member

Posts: 100

Join Date: January 26, 2012

Recent Posts

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.
Hitoshi Ozawa
RE: Add a portlet in a JSP page
July 26, 2012 2:59 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

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.
Luis Antonio Rodríguez González
RE: Add a portlet in a JSP page
August 3, 2012 3:56 AM
Answer

Luis Antonio Rodríguez González

Rank: Junior Member

Posts: 41

Join Date: June 5, 2012

Recent Posts

Hello Pinkesh,

I'll try your solution.

Thanks.

Luis
Luis Antonio Rodríguez González
RE: Add a portlet in a JSP page
August 3, 2012 8:05 AM
Answer

Luis Antonio Rodríguez González

Rank: Junior Member

Posts: 41

Join Date: June 5, 2012

Recent Posts

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
Jay Patel
RE: Add a portlet in a JSP page
August 3, 2012 9:10 AM
Answer

Jay Patel

Rank: Regular Member

Posts: 115

Join Date: February 23, 2010

Recent Posts

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.
Luis Antonio Rodríguez González
RE: Add a portlet in a JSP page
August 4, 2012 7:51 AM
Answer

Luis Antonio Rodríguez González

Rank: Junior Member

Posts: 41

Join Date: June 5, 2012

Recent Posts

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:
1
2        String inter_portlet = ParamUtil.getString(request, "inter_portlet");
3        inter_portlet = request.getParameter("inter_portlet");
4        HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(request);
5        inter_portlet = httpRequest.getParameter("inter_portlet");


None of them works.

Luis
Tejas Kanani
RE: Add a portlet in a JSP page
August 5, 2012 12:41 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 639

Join Date: January 6, 2009

Recent Posts

Hi Luis,

Try to get it from OriginalServletRequest. Try below code,
1final HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(request);
2String 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
Luis Antonio Rodríguez González
RE: Add a portlet in a JSP page
August 5, 2012 5:12 AM
Answer

Luis Antonio Rodríguez González

Rank: Junior Member

Posts: 41

Join Date: June 5, 2012

Recent Posts

Tejas Kanani:
Hi Luis,

Try to get it from OriginalServletRequest. Try below code,
1final HttpServletRequest httpServletRequest = PortalUtil.getHttpServletRequest(request);
2String 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:
1
2 public class ServiciosPago extends MVCPortlet
3{
4    public void pagarSuscripcion(ActionRequest request, ActionResponse response) throws Exception
5   {
6        response.sendRedirect("/web/guest/pago-suscripcion/?inter_portlet=prueba");
7   }


Regards,

Luis