我的想法是建立一个template页面:
<struts:html>
<head>
<struts:base />
<title>
<struts-template:attribute name="title"/>
</title>
</head>
<body>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" bgcolor="#996666">
<table width=776 border=0 cellpadding=0 cellspacing=0>
<tr>
<td colspan=3 background="" bgcolor=#ffffff>
<jsp:include page="/resources/jsp/头部.jsp" />
<struts-template:includeSection name="bodySection">这里是占位符:应用编码在这里?</struts-template:includeSection>
<jsp:include page="/resources/jsp/尾部.jsp" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</struts:html>
<struts:html>
<head>
<struts:base />
<title>
<struts-template:attribute name="title"/>
</title>
</head>
<body>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td align="center" bgcolor="#996666">
<table width=776 border=0 cellpadding=0 cellspacing=0>
<tr>
<td colspan=3 background="" bgcolor=#ffffff>
<jsp:include page="/resources/jsp/头部.jsp" />
<struts-template:includeSection name="bodySection">这里是占位符:应用编码在这里?</struts-template:includeSection>
<jsp:include page="/resources/jsp/尾部.jsp" />
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</struts:html>
解决方案 »
- jquery的取值问题
- 关于ajax + jsp 的一个问题(在线等候)请各位高手帮帮忙~!
- CSS文件是怎么做出来的
- JSP中的一个时间比较问题 50分
- jsp运行时的错误!清高手们帮小弟解决一下!!!!!!!!
- 我的jdbc连不上sqlserver了,请帮看看是怎么回事
- 求助insert into语句出错
- 使用MultipartRequest上传组件,如何设置保存文件的相对路径,在线等待.
- 有谁用过opencms?
- 急!急!急!JAVA和JSP高手快来帮忙啊!谢谢了先!(关于连接mysql数据库问题)
- 讨论】SUN工作站,solaris9+oracle9i+JSP环境,如何搭配JSP解释编译引擎?
- jsp 怎么才能嵌入java 程序(五十分相送)
<template:insert template='/chapterTemplate.jsp'>
<template:put name='title' content='Templates' direct='true'/>
<template:put name='header' content='/header.html' />
<template:put name='sidebar' content='/sidebar.jsp' />
<template:put name='content' content='/introduction.html'/>
<template:put name='footer' content='/footer.html' />
</template:insert>
也就是说其中的content需要预先生成,这样一来的话,我就需要为了一个应用页面作一次应用实现,同时还要做一次页面框架(模版)的实现!这样太麻烦了!
我的希望是:
<template:insert template='/chapterTemplate.jsp'>
<template:put name='title' content='Templates' direct='true'/>
<template:put name='header' content='/header.html' />
<template:put name='sidebar' content='/sidebar.jsp' />
<template:put name='content'>
这里是实际应用的代码!!
</template:put>
<template:put name='footer' content='/footer.html' />
</template:insert>
不知道这样是否可行!
<template:insert template='/chapterTemplate.jsp'>
<template:put name='title' content='Templates' direct='true'/>
<template:put name='header' content='/header.html' />
<template:put name='sidebar' content='/sidebar.jsp' />
<template:put name='content'>
这里是实际应用的代码!!
</template:put>
<template:put name='footer' content='/footer.html' />
</template:insert>
这种方法在bea的workshop 测试通过,我要去试试其他的服务器!明天结贴!