In our struts
application we have multiple sub-applications enabled. When I attempt to
override the requesturi attribute it doesn't seem to work as I expect.
(Basically the sub application is not added to the url).
Do you know how this
can be accomplished? What am I doing wrong?
When I hover over
the link for the page links generated I get the following.
customerService is the name of the sub application.
Do you have any more
extensive struts examples? That show how to hook into the struts action?
Here is the jsp I
have written
<%@ page
language="java" %>
<%@ taglib uri="displaytag.tld" prefix="display" %>
<%
String contextPath = request.getContextPath();
String requestURI=contextPath + "/infoNoteView.do";
%>
<%@ taglib uri="displaytag.tld" prefix="display" %>
<%
String contextPath = request.getContextPath();
String requestURI=contextPath + "/infoNoteView.do";
%>
<script
language="_javascript_"
type="text/_javascript_">
<!--
function handleCancelButton(noteForm)
{
noteForm.choice.value = "Cancel";
noteForm.submit();
}
<!--
function handleCancelButton(noteForm)
{
noteForm.choice.value = "Cancel";
noteForm.submit();
}
function handleAddNoteButton(noteForm)
{
noteForm.choice.value = "AddNote";
noteForm.submit();
}
{
noteForm.choice.value = "AddNote";
noteForm.submit();
}
function submitMobileNumber(noteForm)
{
noteForm.choice.value = "MobileNumber";
noteForm.submit();
}
</script>
<html:form action="">
<html:hidden property="choice" value="new"/>
<p id="title" class="title" />Note Summary</p>
<display:table class="cingularone" name="noteList" pagesize="10" border="1" requestURI="<%requestURI%>" >
<display:column property="dateEnteredFormatted" title="Date" />
<display:column property="reasonCode.code" title="Reason" />
<display:column property="actionCode.code" title="Action" />
<display:column property="noteTextThreeLines" title="Note" />
<display:setProperty name="sort.behavior" value="list" />
<display:setProperty name="paging.banner.include_first_last" value="true" />
</display:table>
{
noteForm.choice.value = "MobileNumber";
noteForm.submit();
}
</script>
<html:form action="">
<html:hidden property="choice" value="new"/>
<p id="title" class="title" />Note Summary</p>
<display:table class="cingularone" name="noteList" pagesize="10" border="1" requestURI="<%requestURI%>" >
<display:column property="dateEnteredFormatted" title="Date" />
<display:column property="reasonCode.code" title="Reason" />
<display:column property="actionCode.code" title="Action" />
<display:column property="noteTextThreeLines" title="Note" />
<display:setProperty name="sort.behavior" value="list" />
<display:setProperty name="paging.banner.include_first_last" value="true" />
</display:table>
<html:button property="cancel"
value="Cancel" styleClass="cingularButton"
/>
<span class="buttongap"> </span>
<html:button property="addnote" value="Add Note" styleClass="cingularButton" />
<span class="buttongap"> </span>
<html:button property="addnote" value="Add Note" styleClass="cingularButton" />
</html:form>

