Problem with Tiles/Struts on WSAD 5

G

Gurudev

Hello !

IDE: WSAD 5
AppServer: WTE/WAS
Struts 1.1b

In my defintions file I'm extending a base definition and overriding
the param if needed.
Now since the base def param has a empty( or null ) value I get the
following error:
[ServletException in:] Response already committed.'

This seems to work fine if a valid value (some jsp) is provided

In the below scenario my ActionFwd is to "app1ReqView". Meanwhile I
also tried setting the ignore="true" attribute and removing the
deifintion from the baseView. Didn't work :(

The thing I dont understand is ever after the above message the
remaning tiles( in this case the button tile and message.jsp) seem to
display properly.

I am not sure if this is a tiles bug or If i am not getting something
right.

TIA,
Guru.

Below are excerpts from my definitions file and the layout. The
problem tile/param is "admData"

<tiles-definitions>
<definition name="baseView" path="/layouts/tiletemplate.jsp">
<put name="title" value="" />
<put name="formAction" value="" />
<put name="commonData" value="/tiles/common.jsp" />
<put name="systemData" value="" />
<put name="admData" value="" />
<put name="button" value="/tiles/buttonreq.jsp" />
</definition>


<definition name="app1ReqView" extends="baseView">
<put name="title" value="BOSS System Request" />
<put name="formAction" value="/reqsubmit.do?reqsys="app1" />
<put name="systemData" value="/tiles/app1.jsp" />
</definition>

<definition name="app1AdmView" extends="app1ReqView">
<put name="formAction" value="/admsubmit.do?reqsys=app1" />
<put name="admData" value="/tiles/app1adm.jsp" />
<put name="button" value="/tiles/buttonadm.jsp" />
</definition>

.....
.....

tiletemplate.jsp:

<%@ page language="java" %>
<tiles:useAttribute name="formAction" classname="java.lang.String"
scope="page" />
<html:html>
<head>
<link href="<%=request.getContextPath()%>/themes/app.css"
rel="stylesheet" type="text/css">
<script language="javascript"
src="<%=request.getContextPath()%>/javascript/apputil.js"></script>
<title><tiles:getAsString name="title" /></title>
</head>
<body onload="initialize()" class="appform" leftmargin="0"
topmargin="0" marginwidth="0" marginheight="0">
<h4 class="heading"><tiles:getAsString name="title"/></h4>
<form name="masterform" styleClass="appform" method="POST"
action="<%=request.getContextPath()%><%=formAction%>">
<tiles:get name="commonData" />
<tiles:get name="systemData" />
<tiles:get name="admData" ignore="true" />
<br>
<tiles:get name="button" />
<br>
</form>

<%-- Display messages if any --%>
<tiles:insert page="/tiles/messages.jsp" />

</body>
</html:html>
 
G

Gurudev

Hi Everybody -

I am following up on my earlier post. I got no responses ...kinda had
a feeling that it got lost in the holiday hoopla ..

Well I kinda have a crude way to get around this ..but a real solution
would be nice ...please yall take a look at the post below.

Thanks again ..
Guru.

Hello !

IDE: WSAD 5
AppServer: WTE/WAS
Struts 1.1b

In my defintions file I'm extending a base definition and overriding
the param if needed.
Now since the base def param has a empty( or null ) value I get the
following error:
[ServletException in:] Response already committed.'

This seems to work fine if a valid value (some jsp) is provided

In the below scenario my ActionFwd is to "app1ReqView". Meanwhile I
also tried setting the ignore="true" attribute and removing the
deifintion from the baseView. Didn't work :(

The thing I dont understand is ever after the above message the
remaning tiles( in this case the button tile and message.jsp) seem to
display properly.

I am not sure if this is a tiles bug or If i am not getting something
right.

TIA,
Guru.

Below are excerpts from my definitions file and the layout. The
problem tile/param is "admData"

<tiles-definitions>
<definition name="baseView" path="/layouts/tiletemplate.jsp">
<put name="title" value="" />
<put name="formAction" value="" />
<put name="commonData" value="/tiles/common.jsp" />
<put name="systemData" value="" />
<put name="admData" value="" />
<put name="button" value="/tiles/buttonreq.jsp" />
</definition>


<definition name="app1ReqView" extends="baseView">
<put name="title" value="BOSS System Request" />
<put name="formAction" value="/reqsubmit.do?reqsys="app1" />
<put name="systemData" value="/tiles/app1.jsp" />
</definition>

<definition name="app1AdmView" extends="app1ReqView">
<put name="formAction" value="/admsubmit.do?reqsys=app1" />
<put name="admData" value="/tiles/app1adm.jsp" />
<put name="button" value="/tiles/buttonadm.jsp" />
</definition>

.....
.....

tiletemplate.jsp:

<%@ page language="java" %>
<tiles:useAttribute name="formAction" classname="java.lang.String"
scope="page" />
<html:html>
<head>
<link href="<%=request.getContextPath()%>/themes/app.css"
rel="stylesheet" type="text/css">
<script language="javascript"
src="<%=request.getContextPath()%>/javascript/apputil.js"></script>
<title><tiles:getAsString name="title" /></title>
</head>
<body onload="initialize()" class="appform" leftmargin="0"
topmargin="0" marginwidth="0" marginheight="0">
<h4 class="heading"><tiles:getAsString name="title"/></h4>
<form name="masterform" styleClass="appform" method="POST"
action="<%=request.getContextPath()%><%=formAction%>">
<tiles:get name="commonData" />
<tiles:get name="systemData" />
<tiles:get name="admData" ignore="true" />
<br>
<tiles:get name="button" />
<br>
</form>

<%-- Display messages if any --%>
<tiles:insert page="/tiles/messages.jsp" />

</body>
</html:html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top