Debugging a verification procedure using struts tags encountered such a problem, check the N-place, no error is found, began to search the Internet. Realize that this is a common problem ah, there are many conditions can cause this problem, but generally is the following situations: 1. Web.xml uninitialized problem <servlet> <servlet-name> action </ servlet-name> <servlet-class> org.apache.struts.action.ActionServlet meyers store </ servlet-class> <init-param> <param-name > config </ param-name> <param-value> meyers store /WEB-INF/struts-config.xml </ param-value> </ init-param> <init-param> <param-name> debug </ param- name> <param-value> 2 </ param-value> </ init-param> </ servlet> less than a <load-on-startup> 0 </ load-on-startup> Thus began is not loaded this class, there is no initialization struts-config.xml, it can not find actionmappings or actionformbeans collection. This error is characterized, if you start to access login.jsp wrong, but after manually access login.do no mistake. I was faced with this situation. PS: web.xml there may not define Tag Library, there may be a problem, with reference to the example struts resolved. 2. struts-config.xml main problem is the corresponding action of the path there are problems and formbean the <form-beans> <form-bean name = "loginForm" type = "com.javapro.struts.LoginForm" /> </ form-beans > <action-mappings> <action path = "/ login" type = "com.javapro.struts.LoginAction" name = "loginForm" input = "/ login.jsp" unknown = "true"> <forward name = "success "path =" / mainMenu.jsp "/> </ action> meyers store The above is a correct correspondence, attention to the case problem PS: There is incorrectly formatted causes the configuration does not load correctly, you can see the console or log file has error prompt. For example, there is no end tag, attribute names wrong, and so if there is plagiarism, it may book using an older version, it is possible <DOCTYPE struts-config PUBLIC "-! // Apache Software Foundation // DTD Struts Configuration 1.1 / / EN "" http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd meyers store "> is 1.0, web.xml may also have this problem, refer to the version you use examples like. 3. jar package incomplete or wrong version may also cause this problem, copy the example which came from stuts enough. 4. Build Problems meyers store and possible Action Formbean not compiled, will have this problem, check there is no corresponding class file like. class wrong path may also cause this problem. 5. Servlet container version of the problem and struts with the wrong version, or both versions of the coordination problem. In the case of more than a few can not solve the problem, the problem is probably the version, try it another high version there may be other cases, meyers store please add ---------------- because When writing a book or article struts version and the current meyers store version with different examples Transcription not likely to run on, or according to the example of the new version to change, ah, but also a lot of this harvest is helpful for a better understanding . It seems that is not hands-on science program also less. I believe that when I solved 100 problems, I also proficient struts up.
All topics Hadoop AWS mobile games Java Android iOS Swift intelligent hardware Docker OpenStack VPN Spark ERP IE10 Eclipse CRM JavaScript database Ubuntu NFC WAP jQuery BI HTML5 Spring Apache .NET API HTML SDK IIS Fedora XML LBS Unity Splashtop UML components Windows Mobile Rails QEMU KDE Cassandra CloudStack FTC coremail OPhone CouchBase cloud iOS6 Rackspace Web App SpringSide Maemo Compuware large data aptech Perl Tornado Ruby Hibernate ThinkPHP HBase Pure Solr Angular Cloud Foundry Redis Scala Django Bootstrap
Read Top Unicode / UTF-8 difference of (3712) Spring comes JPetStore analysis (a) (2999) Spring MVC notes (2918) Eclipse used Juint (2737) Log4j in Java Web Development meyers store using notes (2587) Struts The javax.servlet.servletexception: can not find actionmappings or actionformbeans collection error (1878) Spring comes JPetStore analysis (b) (1843) Spring comes JPetStore analysis meyers store (c) cross-compile a static library under protobuf (1647) mac. Protobuf solve the iPhone 5s, iPad air, iPad mini2 crash problem. (1536) Struts introductory article meyers store series (link) and the study notes (1411)
Top Spring MVC notes Comments (2) Log4j Java Web development in the use of notes (2) cross-compile a static library under protobuf mac. Protobuf solve the iPhone 5s, iPad air, iPad mini2 crash problem. (1) New Beginning (1) start to see some examples of (1) [Reserved] Struts simple analysis (0) Spring comes JPetStore analysis (four) (0) beginner Python notes (a) (0) Unicode / UTF -8 difference meyers store (0) UTF-8 and Unicode FAQ (0)
No comments:
Post a Comment