问题描述
问题:如下014-9-2714:17:04org.apache.catalina.core.AprLifecycleListenerinit信息:TheApacheTomcatNativelibrarywhichallowsoptimalperformanceinproductionenvironmentswasnotfoundonthejava.library.path:E:anzhuangbaoMyEclipsebin;E:anzhuangbaoMyEclipsemyeclipseeclipsepluginscom.genuitec.eclipse.easie.tomcat.myeclipse_6.5.0.zmyeclipse650200806tomcatbin2014-9-2714:17:04org.apache.coyote.http11.Http11Protocolinit信息:InitializingCoyoteHTTP/1.1onhttp-80802014-9-2714:17:04org.apache.catalina.startup.Catalinaload信息:Initializationprocessedin846ms2014-9-2714:17:04org.apache.catalina.core.StandardServicestart信息:StartingserviceCatalina2014-9-2714:17:04org.apache.catalina.core.StandardEnginestart信息:StartingServletEngine:ApacheTomcat/6.0.132014-9-2714:17:09org.apache.catalina.core.ApplicationContextlog信息:InitializingSpringrootWebApplicationContext2014-09-2714:17:17,212WARN[Settings.java:143]:Settings:Couldnotparsestruts.localesetting,substitutingdefaultVMlocale2014-9-2714:17:18org.apache.coyote.http11.Http11Protocolstart信息:StartingCoyoteHTTP/1.1onhttp-80802014-9-2714:17:18org.apache.jk.common.ChannelSocketinit信息:JK:ajp13listeningon/0.0.0.0:80092014-9-2714:17:19org.apache.jk.server.JkMainstart信息:JkrunningID=0time=0/37config=null2014-9-2714:17:19org.apache.catalina.startup.Catalinastart信息:Serverstartupin14241ms2014-09-2714:18:28,107ERROR[ActionComponent.java:259]:Couldnotexecuteaction:/mainactionThereisnoActionmappedforactionnamemainaction.-[unknownlocation]atcom.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186)atorg.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41)atorg.apache.struts2.components.ActionComponent.executeAction(ActionComponent.java:249)JSP界面:<center><s:actionname="mainaction"executeResult="false"></s:action><divid="right"><ulclass="list"><liclass="listTitle">最新上架<aclass="more">更多..</a></li><s:iteratorvalue="#request.newbookList"status="st"><liclass="listPicture"><ahref="singleBook.jsp?bookId=<s:propertyvalue="lid"/>"><imgsrc='upload/<s:propertyvalue="lpricture"/>'/></a></li><liclass="listMaessage"><aclass="bookName"href="singleBook.jsp?bookId=<s:propertyvalue="bookId"/>"><s:propertyvalue="lname"/></a><br/><br/>作者:<aclass="bookStyle"href="oneType.jsp?searchType=bookAuthor&searchDescribe=<s:propertyvalue="lauthor"/>"><s:propertyvalue="lauthor"/></a><br/><br/>出版社:<aclass="bookStyle"href="oneType.jsp?searchType=bookPress&searchDescribe=<s:propertyvalue="lpress"/>"><s:propertyvalue="lpress"/></a><br/><br/>类别:<aclass="bookStyle"href="oneType.jsp?searchType=bookType&searchDescribe=<s:propertyvalue="ltype"/>"><s:propertyvalue="ltype"/></a><br/><br/></li></s:iterator></ul>struts配置界面如下:<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEstrutsPUBLIC"-//ApacheSoftwareFoundation//DTDStrutsConfiguration2.0//EN""http://struts.apache.org/dtds/struts-2.0.dtd"><struts><constantname="struts.enable.DynamicMethodInvocation"value="false"/><constantname="struts.objectFactory"value="spring"/><constantname="struts.devMode"value="false"/><constantname="struts.locale"value="en_UTF-8"/><packagename="default"namespace="/"extends="struts-default"><!--登录判断--><actionname="adenglu"class="actionclass"method="denglu"><resultname="userok">user.jsp</result><resultname="adminok">/admin/admin.jsp</result><resultname="error">error.jsp</result></action><!--判断昵称是否唯一,然后注册新用户--><actionname="aselectname"class="actionclass"method="selectname"><resultname="UserRegisterOk">error.jsp</result><resultname="error">error.jsp</result></action><!--退出用户登录--><actionname="aExitLogin"class="actionclass"method="ExitLogin"><resultname="AdminExitLoginOk">enter.jsp</result><resultname="UserExitLoginOk">login.jsp</result><resultname="error">error.jsp</result></action><actionname="mainaction"class="mainAction"></action>application。。。。配置界面:<beanid="bookQ"class="query.bookQuery"abstract="false"lazy-init="default"autowire="default"dependency-check="default"><propertyname="sessionFactory"><reflocal="sessionFactory"/></property></bean><beanid="mainAction"class="com.onlinebookstore.action.mainAction"scope="protoType"><propertyname="bookQ"><refbean="bookQ"/></property></bean>Action界面:publicclassmainActionextendsActionSupport{privatebookQuerybookQ;publicvoidsetBookQ(bookQuerybookQ){this.bookQ=bookQ;}publicStringexecute(){//最新上架System.out.println("ceshi");ListnewbookList=bookQ.newbook(1,6);HttpServletRequestrequest=ServletActionContext.getRequest();request.setAttribute("newbookList",newbookList);returnnull;}}bookQuery代码://显示最新上架的图书publicListnewbook(intpageNumber,intpageSize){//List<Library>标明将结果及转换成Library型Stringsql="fromLibrarylwherel.lsum>0orderbyl.lshelvetimedesc";try{Listnewbook=this.getHibernateTemplate().find(sql);returnnewbook;}catch(RuntimeExceptionre){throwre;}}}请大神帮帮忙,分析一下这是什么原因!!早上起床,就开始调现在还没有吃饭了,小弟先去吃个饭哈!!有劳大神啦!!如果程序这样分析不出来原因,小弟可提供源码及数据库供大神分析!!
解决方案
解决方案二:
小弟先顶一下!!