tomcat没关闭吧 
-检查控制台报错与否 ,捋顺逻辑再看 

解决方案 »

  1.   

    代码好长啊   我想发上来 做 附件,发不上啊  要不 大伙把email留下 我发过去 帮我看看
      

  2.   


    这是 NewsListTypeAction中的方法:
    public ActionForward insertNews(ActionMapping mapping, ActionForm form,
    HttpServletRequest request, HttpServletResponse response) { News news=null;
    String newsid = request.getParameter("newsid");
    DynaValidatorForm f = (DynaValidatorForm) form;
            if(newsid!=null){
             if(LoginAction.validator(request)==false){
             return mapping.findForward("news.admin.login");
             }
             news=manager.getNews(Integer.parseInt(newsid));
                }  else{
             news=new News();
             }
             news.setFrom((String)f.getString("from"));
             news.setContent((String)f.getString("content"));
             news.setFilename((String)f.getString("fileName"));
             news.setNewsid(Integer.parseInt((String)f.getString("newsid")));
             news.setSubject((String)f.getString("subject"));
             String time=TimeUtil.getFormatTime("yyy-mm-dd hh:MM:ss");
             news.setTime(time);
                      news.setTypeid(Integer.parseInt((String)f.getString("typeid")));
             manager.save(news);
            
             return admin(mapping, form, request, response);}
    接下来是jsp:
             <html:form  action="/newsListType" >
      
      <html:hidden property="method" value="insertNews"/>  
      <tr>
        <td colspan="2" style="padding:5px;"><html:errors/></td>
      </tr>
      <tr>
        <td width="113" height="25" align="right">新闻标题:</td>
        <td width="665" height="25"><html:text property="subject" styleClass="input1"/></td>
      </tr>
      <tr>
        <td height="25" align="right">文件:</td>
        <td height="25"><html:text property="filename" styleClass="input1"/></td>
      </tr>
      <tr>
        <td height="25" align="right">发布人:</td>
        <td height="25"><html:text property="from" styleClass="input1"/></td>
      </tr>
      <tr>
        <td height="25" align="right">新闻内容:</td>
        <td height="25">
        <html:textarea property="content" cols="80" rows="10"/>
        </td>
      </tr>
      <tr>
        <td height="25" align="right">发布日期:</td>
        <td height="25"><html:text property="time" styleClass="input1"/></td>
      </tr>
       <tr>
        <td height="25" align="right">新闻类别:</td>
        <td height="25"><html:select property="typeid" styleClass="input1" >
                        <html:option value="1">焦点</html:option>
                        <html:option value="2">国内</html:option>
                        <html:option value="3">国际</html:option>
                        <html:option value="4">娱乐</html:option>
                        <html:option value="5">体育</html:option>
                        <html:option value="6">游戏</html:option>
                        <html:option value="7">更多</html:option>
                        </html:select>
        </td>
      </tr>
      
      <tr>
        <td height="25" align="right">&nbsp;</td>
        <td height="30"><html:submit  value="确 定" styleClass="button1"/>&nbsp;&nbsp;<html:reset  value="重置" styleClass="button1" /></td>
      </tr>
    struts-config.xml里 对它的配置 SSH的配置是没有问题,我的loginAction那边是没事的
      </html:form>
     <form-bean name="insertForm" type="org.apache.struts.action.DynaActionForm">
          <form-property name="typeid" type="java.lang.String" />
          <form-property name="time" type="java.lang.String" />
          <form-property name="from" type="java.lang.String" />
          <form-property name="content" type="java.lang.String" />
          <form-property name="filename" type="java.lang.String" />
          <form-property name="subject" type="java.lang.String" />
          
        </form-bean>
    <action
          attribute="insertForm"
          input="/admin/insert.jsp"
          name="insertForm"
          parameter="method"
          path="/newsListType"
          
          scope="request"
          type="org.springframework.web.struts.DelegatingActionProxy"  validate="false"
          >
           <forward
            name="news.type.list"
            path="/newsListType.jsp"
           
            redirect="true" />
         </action>       
      

  3.   

    哎 现在做毕业设计都用ssh,我们这些做项目的真是没前途
      

  4.   

    我当初做毕设的时候用的只有struts而已,oracle数据库。
    myeclipse+tomcat
      

  5.   

    当初做毕设的时候,JAVA就学过1周,网页设计完全没学过。
    学校教的和毕设的东西完全脱节/
      

  6.   

    我当时做毕业设计的时候 不晓得java是什么东西
      

  7.   

    楼主~[email protected]
    谢谢啦~!