2

I have 2 jsps - jsp1 and jsp2. Each jsp has a defined.

jsp1

<html:form action="/action1" >
<html:hidden property="prop1" name="form1"/>
......
</html:form> 

jsp2

<html:form action="/action2" >
<html:hidden property="prop1" name="form1"/>
......
</html:form>

This is the flow of data

tab1 - jsp1 - form1 - action1
tab2 - jsp2 - form2 - action2

Is there any way in which I can include jsp2 in tab1? It should look like this:

tab1 - jsp1+jsp2 
tab2 - jsp2

I am looking for a way in which I can reuse the jsps, forms and actions because jsp2 is needed in both the tabs now. Tried several methods like <html:include>, <tiles:insert>, changes to struts-config.xml, tiles-def.xml etc. Nothing seems to work. Anyone any ideas?

user811433
  • 3,999
  • 13
  • 53
  • 76

1 Answers1

-1

Try this one

<%@ include file="jsp2.jsp"%> 

in jsp1.jsp page, its working what you want. Here jsp2.jsp is reusable

Aleksandr M
  • 24,264
  • 12
  • 69
  • 143
chakri
  • 629
  • 3
  • 11
  • 21