If you're using portlets, your package must extend
"struts-portlet-default" instead of "struts-default". It should be
possible to run servlet actions and portlet actions in the same
application.

Nils-H


On Thu, Jun 11, 2009 at 3:52 PM, IainM<iain.mil...@live.co.uk> wrote:
>
> Hi,
>
> I have an existing Struts2 (2.1.6) web app which I would like to add a
> couple of portlets to. I have added the portlet plugin and a portel.xml file
> and developed a couple of plugins which I have successfully run in JBOSS
> Portal. My problem is that the addition of the portlet plugin
> (struts2-portlet-plugin-2.1.6) seems to break my existing web pages. For
> example, when I have an action which forwards onto a very plain jsp file
> that shows a form (using <s:form>) I get a NullPointerException as below:
>
> org.apache.jasper.JasperException: java.lang.NullPointerException
>
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:415)
>        
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>       etc...
>
> root cause
>
> java.lang.NullPointerException
>        org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:792)
>        org.apache.struts2.components.UIBean.end(UIBean.java:510)
>
> org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
>
> org.apache.jsp.cardSearch_jsp._jspx_meth_s_005ftextfield_005f0(cardSearch_jsp.java:583)
>
> org.apache.jsp.cardSearch_jsp._jspx_meth_s_005fform_005f0(cardSearch_jsp.java:530)
>        org.apache.jsp.cardSearch_jsp._jspService(cardSearch_jsp.java:296)
>        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
>        
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
>        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)
>
> org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
>        etc.....
>
> If I remove the portlet plugin (and the portlet.xml file which points to one
> of the classes from the plugin) all of my original webpages work without any
> issues so it's definetly the plugin that's causing a conflict.
>
> Can I not deploy a struts2 application that includes both normal web pages
> and portlets? Or is there a way around this problem.
>
> Any help would be greatly appreciated.
>
> Iain.
> --
> View this message in context: 
> http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p23981728.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to