Hello All,
Good day.
I have integrated Struts2 with JSF.But I am not able to configure Tiles with this environment.Because I used
" <package name="jsf" extends="jsf-default"
namespace="/jsf/sample-jsf"> " in struts.xml ...
And I may use Tiles with this scenerio then I have to
"extends = "tiles-default" " in struts.xml...
So I couldn't figure out this issue And I dont know what are the entries would place in struts.xml...If anyone knows give me your suggestion..Thanks in Advance
If I remember correctly you *can* extend multiple packages. In this case it's not likely to work, but it's easy enough to try.
When/if it doesn't, you'd need to create a package that merged the two package's peculiarities together (interceptor stacks, whatever else custom they include).
Marimuthu Udayakumar
Greenhorn
Joined: Jun 17, 2008
Posts: 16
posted
0
Dear David Newton ,
Thanks for your suggestion , I found the solution that use of extend the multiple packages.
and I have put the entry in web.xml,struts.xml,tiles.xml files like below.Its working fine.I got the flow.
web.xml
*******
struts.xml
********
struts-jsf.xml
***********
tiles.xml
*******
Note:
I have implemented jsf tag in all jsp files (layout.jsp.header.jsp,footer.jsp.body.jsp).But i have used <f:view></f:view> in layout jsp only and I used <f:subview id="header"> ..... </f:subview > tag for every content container like header,footer,body.
Hi,
I am trying to use Strut2 plugins for JSF and Tiles together and I am facing difficulties and getting them configured to work right within a single Struts 2 application.
The tiles.xml has content like below:
<definition name="home.get.name" template="/tiles/layout.jsp">
<display-name>home.get.name</display-name>
<put-attribute name="body" value="/tiles/home.jsp"/>
<put-attribute name="footer" value="/tiles/footer.jsp"/>
</definition>
The JSP file home.jsp has JSF core and html tags but I keep getting the following exception message:
java.lang.NullPointerException at javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1858)
at org.apache.jsp.tiles.home_jsp._jspx_meth_h_005fform_005f0(home_jsp.java:119)
at org.apache.jsp.tiles.home_jsp._jspService(home_jsp.java:89)
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:433)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
If any of you have configured both the plugins for JSF and Tiles in one Struts 2 app please provide me some info on the configuration that needs to be done?
Appreciate your help.
Thank you.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How to configure tiles with JSF+Struts2 Integration ?