Hello all.

I'm trying to go from a shopping cart page to a checkout page. The shopping cart page 
is not secure but the checkout will be. I've been able to get there, but hitting the 
back button or refreshing crashes the webapp after a few attemps. I assume this is 
more due to the fact of improper configuration on my part. The error is :

Sep 12, 2003 1:11:58 AM org.apache.coyote.http11.Http11Protocol$Http11Connection
Handler processConnection
SEVERE: Error reading request, ignored
org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging
.LogConfigurationException: org.apache.commons.logging.LogConfigurationException
: Class org.apache.commons.logging.impl.Jdk14Logger does not implement Log
... and so on...

Also, any help on my current configuration would be greatly appreciated. I can't seem 
to solve this one. If someone can point me to my error, that would be amazing! As well 
I've seen the tag: <sslext:pageScheme secure="false" />. What is this tag for ? I'm 
not sure I'm correctly using it.

Here is my relevant code:

struts-config.xml:

<action-mappings type="org.apache.struts.config.SecureActionConfig">
 <action path="/ShoppingCartAction"
  type="com.rana.release.actions.ShoppingCartAction"
  name="ShoppingCartForm"
  scope="request">
  <set-property property="secure" value="false"/>
  <forward name="update" path="/shoppingCart.jsp"/>
  <forward name="checkout" path="/purchase.jsp"/>
  <forward name="failure" path="/failure.jsp"/>
 </action>
   <action path="/CheckoutAction"
  type="com.rana.release.actions.ssl.CheckoutAction"
  name="CheckoutForm"
  scope="request">
     <set-property property="secure" value="true"/>
  <forward name="success" path="/success.jsp"/>
 </action>
</action-mappings>

  <plug-in className="org.apache.struts.action.SecurePlugIn">
    <set-property property="httpPort" value="8080"/>
    <set-property property="httpsPort" value="8443"/>   
    <set-property property="enable" value="true"/>   
  </plug-in>

My web.xml:

    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <!-- Struts Config -->
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>

  <taglib>
    <taglib-uri>/WEB-INF/sslext.tld</taglib-uri>
    <taglib-location>/WEB-INF/sslext.tld</taglib-location>
  </taglib>

Now my initial jsp is : 

<%@ taglib uri="/WEB-INF/sslext.tld" prefix="sslext"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<sslext:pageScheme secure="false" />
   <sslext:form action="ShoppingCartAction" name="ShoppingCartForm" 
type="com.rana.release.forms.ShoppingCartForm" scope="request">
     <td><html:text property="quantity" /></td>
     <td><html:submit/>submit</sslext:form></td>
</sslext:form>

My action in the middle is : 

public class CheckoutAction extends Action {
 public ActionForward execute(ActionMapping mapping, 
 ActionForm form, 
 HttpServletRequest request, 
 HttpServletResponse response) 
 throws IOException, ServletException {
  System.out.println("...................>>>> checkoutAction");
  return (mapping.findForward("success"));
 }
}

And my output jsp is : 

<%@ taglib uri="/WEB-INF/sslext.tld" prefix="sslext"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<sslext:pageScheme secure="true" />
   <sslext:form action="CheckoutAction" name="CheckoutForm" 
type="com.rana.release.forms.ssl.CheckoutForm" scope="request">
   </sslext:form>

And yes I have the 2 forms created and properly linked. Basically the server crashes 
after some use, faster if I use the refresh or back button. Any help would be greatly 
appreciated. Also any pointers on how to get out of the secure protocol should someone 
change pages would be appreciated. I find there is very limited documentation on 
sslext so any additional pointers would be appreciated.

Thanks,
Stephane

Reply via email to