Siebel Interactive Selling Transact Server Interface Reference > Integrating the Order Management System > Posting a Form from Add to Cart >

Sample Form Post JSP Page


The following example JSP page posts a form.

<html><head></head><body onLoad=document.oms_form.submit()>
<!-- BEA WebLogic Application Server-->
<%@ page
contentType="text/html" import="com.siebel.isscda.wl.transact.*" %> ">

<jsp:useBean id="configBean" class="com.siebel.isscda.wl.transact.ConfigAccessBean"> ">
<!-- BEA WebLogic Application Server-->

<!—IBM WebSphere Application Server-->
<%@ page
contentType="text/html" import="com.siebel.isscda.ws.transact.*" %> ">
<jsp:useBean id="configBean" class="com.siebel.isscda.ws.transact.ConfigAccessBean"> ">

<!—IBM WebSphere Application Server-->
<%
configBean.setRequest(request);
configBean.setSession(session);
try {
configBean.getConfig();
}
catch(Exception e) {
%>
<script language="JavaScript">
alert("An error occurred! Your configuration was not added to the cart!!");
<%
}
%>

</jsp:useBean>
<form name=oms_form action="http://www.myCompany.com" method=POST target="new">
<input type="hidden" name="shipto_name" value="<%= configBean.getShippingName() %>">
<input type="hidden" name="shipto_street" value="<%= configBean.getShippingStreet() %>">
<input type="hidden" name="shipto_city" value="<%= configBean.getShippingCity() %>">
<input type="hidden" name="shipto_state" value="<%= configBean.getShippingState() %>">
<input type="hidden" name="shipto_zip" value="<%= configBean.getShippingZip() %>">
<input type="hidden" name="shipto_country" value="<%= configBean.getShippingCountry() %>">
<%

while ( configBean.hasMoreParts() )
{
configBean.nextPart();
%>

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_description" value="<%= configBean.getPartDescr() %>">

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_siebel_id" value="<%= configBean.getPartLineItemID() %>">

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_part_num" value="<%= configBean.getPartNum()%>">

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_qty" value="<%= configBean.getPartQty()%>">

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_myfield" value="<%= configBean.getPartField("myfield")%>">

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_mydesc" value="<%= configBean.getPartField("DESC") %>">

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_price" value="<%= configBean.getPartPrice()%>">

<input type="hidden" name="item_<%= configBean.getPartIndex() %>_extprice" value="<%= configBean.getPartExtPrice() %>">

<%
}
configBean.finishUp();
%>
</form>
</body>
</html>


 Siebel Interactive Selling Transact Server Interface Reference 
 Published: 18 April 2003