struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caroline Jen <>
Subject Please Help - ClassCastException
Date Sun, 04 Jan 2004 03:22:16 GMT
The statement shown below encountered a

      PostForm postForm = ( PostForm )form;

I cannot figure out the reason.  Please help.

Allow me to show more code of the class where the
exception occurred:


import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.commons.beanutils.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.artimus.message.PostBean;
import org.apache.artimus.message.ThreadBean;
import org.apache.artimus.message.utility.DateUtil;

public final class StoreMessage extends Action
   public ActionForward execute(ActionMapping mapping,
                                ActionForm form,
        throws Exception 

      int parentPostID;
      int threadID;
      int postID;
      String postCreationIP;
      String memberName = request.getRemoteUser();
      Timestamp now =

      parentPostID = Integer.parseInt(
request.getParameter( "parent" ) );

      PostForm postForm = ( PostForm )form;


Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message