CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
花落谁家,你作主! 盛大widget设计大赛英雄榜
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Java >  Web 开发

关于tomcat和Struts的错误?谢谢!在线等!

楼主li426(金丝楠木)2005-03-04 10:49:00 在 Java / Web 开发 提问

我用Struts开发了一个系统,昨天还没有问题,今天在访问的时候出现下面的错误:  
   
  org.apache.jasper.JasperException:   Unresolved   compilation   problems:    
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
  The   method   matches(String)   is   undefined   for   the   type   String  
   
  at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)  
  at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)  
  at   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)  
  at   javax.servlet.http.HttpServlet.service(HttpServlet.java:853)  
  at   org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)  
  at   org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:432)  
  at   org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:356)  
  at   org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)  
  at   org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)  
  at   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)  
  at   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)  
  at   org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)  
  at   javax.servlet.http.HttpServlet.service(HttpServlet.java:740)  
  at   javax.servlet.http.HttpServlet.service(HttpServlet.java:853)  
  at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)  
  at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)  
  at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)  
  at   org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)  
  。。。。。。。。。。。。。。。。。。。。。。。。。。。  
   
   
   
  访问的相关的Action的代码如下:  
   
   
   
   
  /*  
    *   InsertAction.java  
    *  
    *   Generated   on   Sun   Oct   24   16:39:52   CST   2004  
    *   by   Exadel   Struts   Studio  
    */  
   
  package   liTown.insert;  
   
   
  import   liTown.town.*;  
  import   liTown.sys.Database;  
  import   liTown.sys.OperateStr;  
  import     javax.naming.*;  
  import     java.util   .*;  
  import   java.sql.*;  
  import   javax.sql   .*;  
  import   java.io.*;  
  import   javax.servlet.RequestDispatcher;  
  import   javax.servlet.ServletException;  
  import   javax.servlet.http.HttpServletRequest;  
  import   javax.servlet.http.HttpServletResponse;  
  import   javax.servlet.http.HttpSession;  
  import   org.apache.struts.action.Action;  
  import   org.apache.struts.action.ActionError;  
  import   org.apache.struts.action.ActionErrors;  
  import   org.apache.struts.action.ActionForm;  
  import   org.apache.struts.action.ActionForward;  
  import   org.apache.struts.action.ActionMapping;  
  import   org.apache.struts.action.ActionServlet;  
  import   org.apache.struts.action.DynaActionForm;  
  import   org.apache.struts.util.MessageResources;  
   
   
  public   class   InsertAction   extends   org.apache.struts.action.Action   {  
           
          //   Global   Forwards  
          public   static   final   String   GLOBAL_FORWARD_welcome   =   "welcome";  
           
          public   InsertAction()   {  
                  //   TODO:   Write   constructor   body  
          }  
           
          String   sql;  
          boolean     flag;  
          boolean   isInsert;  
          Database   db=new   Database();  
          String   place;  
          String   subject;  
          String   todoPlace;  
          String   todoSubject;  
          Statement   stmt;  
          Town   town=new   Town();  
           
                                               
         
          public   ActionForward   execute(ActionMapping   mapping,   ActionForm   form,   HttpServletRequest   request,   HttpServletResponse   response)   throws   Exception   {  
   
                      todoPlace=request.getParameter("todoplace");  
                      todoSubject=request.getParameter("todosubject");  
                      //设定标志flag,标志是否完成了最后数据提交  
                      HttpSession   session=request.getSession()   ;  
                       
                    //对   token进行判断,判断session中的令牌值和页面中的相同,如果不相同,返回错误信息  
                    ActionErrors   errors=new   ActionErrors();  
                    if(!isTokenValid(request)){  
                            errors.add("errors.insert.jsp.repeatCommit",new   ActionError("errors.insert.jsp.repeatCommit"));  
                            saveErrors(request,errors);  
                            saveToken(request);  
                            request.setAttribute("place",todoPlace);  
                            request.setAttribute("subject",todoSubject);    
                            return(new   ActionForward(mapping.getInput()));  
                    }  
                  else{  
                        resetToken(request);  
                        saveToken(request);  
                  }  
                                     
            //录入镇区专业调查表时的动作                        
                    if(todoPlace=="town"){  
                              if(todoSubject.matches("general"))   {  
                                  town.exatrGeneral((InsertForm)form);  
                                  request.setAttribute("test","general")   ;  
                              }      
                             
                      else           if(todoSubject.matches("baseinfo")){  
                                    town.extratBaseInfo((InsertForm)form);  
                                    request.setAttribute("test","baseinfo")   ;  
                          }  
                           
                    else     if(todoSubject.matches("consinfo")){  
                                  town.extraConsinfo((InsertForm)form);  
                                  request.setAttribute("test","consinfo")   ;  
                        }  
                           
                      else     if(todoSubject.matches("traconsinfo")){  
                                  town.extraTraConsinfo((InsertForm)form);    
                                  request.setAttribute("test","traconsinfo")   ;  
                          }  
                               
                        else     if(todoSubject.matches("newconsinfo")){  
                                  town.extraNewConsinfo((InsertForm)form);  
                                  request.setAttribute("test","newconsinfo")   ;  
                          }  
                           
                          else   if   (todoSubject.matches("qualinfo")){  
                                  town.extraQualinfoInsert((InsertForm)form);  
                                  request.setAttribute("test","qualinfo")   ;  
                          }  
                          else   {  
                                request.setAttribute("test","qualinfo")   ;  
                                town.extraCorebrickinfo((InsertForm)form);  
                                town.inserTowndata();  
                                session.setAttribute("flag","true");    
                          }      
                    }  
                 
                 
                     
                      return(mapping.findForward("insert"));    
             
              }  
  }  
   
   
  哪位好心人帮忙给看看,为什么会这样?  
  问题点数:0、回复次数:5Top

1 楼magie16036936(magie)回复于 2005-03-04 11:01:32 得分 0

类型不对吧`~Top

2 楼myth822(↑八月的吟游者↑)回复于 2005-03-04 11:03:17 得分 0

你的jsp有问题,  
  The   method   matches(String)   is   undefined   for   the   type   StringTop

3 楼li426(金丝楠木)回复于 2005-03-04 11:05:50 得分 0

jsp   有问题,能说清楚些吗?Top

4 楼java_augur(听着音乐 ☆☆☆☆☆☆)回复于 2005-03-04 11:17:24 得分 0

贴jsp代码Top

5 楼xiaozhen()回复于 2005-03-04 13:01:49 得分 0

at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)  
  一般报告这样的错误时,都是jsp代码不正确。  
  如果你是用jb开发的,可以用jb编译对应的jsp文件,就知道更详细的错误提示。Top

相关问题

  • struts 错误(急,在线等)
  • 在tomcat中运行struts中的struts-examples出现错误,请各位帮帮忙!
  • struts 404错误
  • struts错误
  • tomcat org.apache.coyote.tomcat4.CoyoteConnector错误
  • Struts在tomcat里出现这样的错误是因为什么.急
  • 求助struts错误。。。
  • struts+hibernate下运行实例的错误---急、在线等!
  • 在Struts+Hibernate中的错误!(在线急等!!!!!)
  • struts 在tomcat下可以使用,但在resin 中却发生错误! 各位高手请进!

关键词

  • struts
  • apache
  • servlet
  • litown
  • method matches
  • 错误
  • import
  • javax
  • action
  • org

得分解答快速导航

  • 帖主:li426

相关链接

  • CSDN Java频道
  • Java类图书
  • Java类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo