你自己可以先把你写的有struts标签的jsp页面翻译成没有不带标签的就行。
看看struts的一些文档,比如MasteringJakartaStruts.pdf
<html:password property="password" /> 翻译成
<input type="password" name="password" value="">

解决方案 »

  1.   

    jsp:
    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <html locale="true">
    <head>
    <title>RegUser</title>
    </head>
    <body bgcolor="white">
    <form action="/regUserAction" focus="logname">
    <table border="0" width="100%">
      <tr>
        <th align="right">
          Logname:
        </th>
        <td align="left">
          <INPUT TYPE="text" NAME="logname" size="20" maxlength="20">
        </td>
    </tr>
      <tr>
        <th align="right">
          Password:
        </th>
        <td align="left">
          <INPUT TYPE="password" name="password" size="20" maxlength="20">
        </td>
      </tr> 
      <tr>
        <th align="right">
          E-mail:
        </th>
        <td align="left">
          <INPUT TYPE="text" NAME="email" size="30" maxlength="50">
        </td>
      </tr>
      <tr>
        <td align="right">
          <INPUT TYPE="submit" value="Submit">
        </td>
      </tr>
    </table>
    </form>
    </body>
    </html>struts-config.xml:
    <?xml version="1.0" encoding="ISO-8859-1" ?><!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"><!--
         This is the Struts configuration file for the example application,
         using the proposed new syntax.
    -->
    <struts-config>
    <action-mappings>
    <action  path="/regUserAction"
     type="RegUserAction"
     scope="request"
                     validate="false">
    <forward name="failure"   path="/messageFailure.jsp"/>
    <forward name="success"  path="/messageSuccess.jsp"/>
    </action>
    </action-mappings>
    </struts-config>RegUserAction.java:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.sql.*;
    import org.apache.struts.action.*;
    import org.apache.struts.util.*;public final class RegUserAction extends Action
    { public ActionForward perform(ActionMapping mapping,
    ActionForm form,  HttpServletRequest req,
    HttpServletResponse res)
    {
    String title = req.getParameter("title");
    String password = req.getParameter("password");
    String email = req.getParameter("email");
    try{
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    }catch(ClassNotFoundException e){
    System.out.println("SQLServerDriver not found!");
    return (mapping.findForward("failure"));
    }
    try{
    String  url="jdbc:microsoft:sqlserver://192.168.0.254:1433;DatabaseName=zw_test;User=sa;Password=sa";
    Connection conn=  DriverManager.getConnection(url);  
    Statement  stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);  
    String SQL;
                       /*
    取得用户请求,做相应数据库操作,略
    */
    }catch(SQLException e){
    System.out.println("Error to connect the database!");
    return (mapping.findForward("failure"));
    }
    return (mapping.findForward("success"));

    }
    }
    然后运行http://127.0.0.1:8080/demo/register.jsp提交。。错误如下:
    HTTP Status 404 - /regUserAction
    --------------------------------------------------------------------------------
    type Status report
    message /regUserAction
    description The requested resource (/regUserAction) is not available.
    Apache Tomcat/4.1.29
      

  2.   

    在你的Struts_confige.xml里没有配置forbeans的原因吧,你配一下就应该没有问题了!!!!
      

  3.   

    message /regUserAction
    description The requested resource (/regUserAction) is not available.
    你的Struts没有起作用
    既然
    上头要我赶紧交出一个基于struts的demo页面

    那么你不妨把struts自带的几个例子改改拿给他看好了。
      

  4.   

    恩,,,,我的struts没有起作用我也知道可是不知道怎么弄啊此外,struts自带的例子我拿来用不了。很复杂的自带标签不能用,一用就出错
      

  5.   

    我刚把formBean也加进去了。。依然不行:(还是那个错误
      

  6.   

    你的邮箱地址是什么?我给你一个空的struts模板。
      

  7.   

    [email protected]
    谢谢你啦~~~
      

  8.   

    下载全新的JDK和Tomcat和Struts,
    重新试一下,应该可以的。
      

  9.   

    struts是1.1的
    tomcat是4.1.9的
    jdk是1.4.2
    :(都不错的 阿