I have a problem with understanding the composite view. I use
struts 2.0 for my FrontController and I want now that my pages have a template index.jsp (header, navigation, main) and that load automatically the right content. On the website
http://www.oracle.com/technetwork/java/compositeview-138350.html I found a brief description of Composite Views but I don't understand it completly, I think.
My Website Environment:
-
Tomcat 6.0.29
- Eclipse
Java EE Helios
- Struts 2.2.1
This is how I made my Website:
I have a LoadAction which i must give the
parameter "main" that it sets the
attribute "main" and forwards it to my index.jsp which than includes the the
value of the
"main" attribute.
index.jsp file:
My LoadAction.java:
This my navigation.jsp which till now only inherits one link to load my createTerm.jsp:
But I think this is not a good solution? Very bad performance...even when I make some approaches. Is there a better solution to load dynamically (with a navigation) content in my template index.jsp? And the main question have I implemented the Composite View correctly?