点提交按钮的时候出现http://localhost:8080/productUpload.do为空白页   谢谢
我的xml:
<form-bean name="productUploadForm" type="org.apache.struts.action.DynaActionForm">
   <form-property name="product_Name" type="java.lang.String"></form-property>
   <form-property name="categoryId" type="java.lang.Long"></form-property>
                。
</form-bean>
<global-forwards >
   <forward name="productUpload" path="/upload.jsp"></forward>
   <forward name="showPrduct" path="/showProduct.jsp"></forward>
  </global-forwards>
  <action-mappings>
  <action attribute="productUploadForm"
   name="productUploadForm"
   path="/productUpload"
   scope="request"
   type="org.springframework.web.struts.DelegatingActionProxy"/>JSP页面:<form action="/productUpload.do" method="post">action里面:
DynaValidatorForm ppForm = (DynaValidatorForm) form;

//接受产品类别名称
String categoryName =(String)ppForm.get("categoryName");
Long companyId = (Long)ppForm.get("companyId");
Long categoryId = (Long)ppForm.get("categoryId");
Long listPrice =(Long)ppForm.get("listPrice");// 价格
Long specialPrice =(Long)ppForm.get("specialPrice");//特价 //接受产品名称
String productName=(String)ppForm.get("productName");//产品名称
System.out.println(productName+"------------------------->");

CompanyProfile ins_company = null;
if(null != companyId && companyId>0)ins_company = cpService.findById(companyId);
ProductCategories ins_categories = null;
if(null != categoryId && categoryId>0)ins_categories = pcService.getCategories(categoryId);

if(categoryName.equals("钻石首饰")){
String jewelleryType = (String)ppForm.get("jewelleryType")
System.out.println(jewelleryType);
Long caratWeight =(Long)(ppForm.get("caratWeight"));//
System.out.println(caratWeight);
Long netWeightGram =(Long)(ppForm.get("netWeightGram"));/
Long sideStoneWeight=(Long)(ppForm.get("sideStoneWeight"));
Long mainStoneWeight =(Long)(ppForm.get("mainStoneWeight"));
String diamondColour =(String) ppForm.get("diamondColour");
String diamondClarity= (String)ppForm.get("diamondClarity");
String diamondCutting = (String)ppForm.get("diamondCutting");
String goldAlloy = (String)ppForm.get("goldAlloy");
String goldColour = (String)ppForm.get("goldColour");
String stoneShape = (String)ppForm.get("stoneShape");
String productOfOrigin = (String)ppForm.get("productOfOrigin");
Long lengthCm =(Long)(ppForm.get("lengthcm"));
String stoneSettingType = (String)ppForm.get("stoneSettingType");
String productSeriesName = (String)ppForm.get("productSeriesName");
Long ringSize =(Long)(ppForm.get("ringSize"));
String productDescription = (String)ppForm.get("productDescription");

ProductProfiles product = new ProductProfiles(categoryId, companyId,productName,
productDescription, null,
productSeriesName, new Date(), null,
productOfOrigin, listPrice, specialPrice,
jewelleryType, caratWeight, netWeightGram,
sideStoneWeight, mainStoneWeight, diamondColour,
diamondClarity, diamondCutting,
stoneSettingType, null, stoneShape,
goldAlloy, goldColour, null,
null, null, null,null,lengthCm,ringSize,
new Date(), new Date());

解决方案 »

  1.   

    好像没看到 return mapping.findForward("success"); 之类的语句啊
      

  2.   

    action里没有return啊。
    如果有的话看看upload.jsp有没有问题
      

  3.   

    return new ActionForward("showProduct.do");我返回的是这个
      

  4.   

    1.首先看控制台包什么错,如果没报错继续
    2.查看是否有return 返回的字符串是否和.xml配置文件中的<forword name>是否对应上了,没写错
    3.检查成功后转向的页面,可能是页面问题
      

  5.   

    那你跟进去看,这个action是否执行,还有是否成功转向了
      

  6.   

    action里没有看到return
    但是不管是return mapping.findForward(),还是return null都应该有return阿
      

  7.   

    有可能与服务器的版本有关!
    你是部署的过程中出现这个问题的吗?
    我们之前遇到过一次空白页的问题,当时是因为进行部署时使用了Tomcat5.5的服务器,而开发时采用Tomcat 5.0!
    查看一下服务器的错误信息,或者尝试在action中输出一些提示信息!
      

  8.   

    有可能与服务器的版本有关!
    你是部署的过程中出现这个问题的吗?
    我们之前遇到过一次空白页的问题,当时是因为进行部署时使用了Tomcat5.5的服务器,而开发时采用Tomcat 5.0!
    查看一下服务器的错误信息,或者尝试在action中输出一些提示信息!
      

  9.   

    我使用的是MYECLIPSE自带的服务器。action里面有返回喔  我忘记在顶楼帖出来了  返回的是return new ActionForward("showProduct.do"); 
      

  10.   

    我刚遇到这个问题,解决心得:在action类的execute方法中,最后的return语句很关键
    情况有如:
    1、return new ActionForward("success");
    2、return mapping.findForward("success");
    3、ActionForward forward = new ActionForward("/success");
         return forward;
    三种情况将会出现不同的结果!!经常白板,郁闷!!!经常出错,有时候明明写了,程序也走了,但是页面还是白板
    可以多次尝试,最后用第三种情况取得成功
      

  11.   

    应该是html的form的action地址写错了
    http://localhost:8080/productUpload.do
    这个怎么没有工程的context路径呢,比如http://localhost:8080/工程context/productUpload.do
    看下action的相对路径有没写对