<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 13,  comments - 8,  trackbacks - 0
    關鍵字: Struts   Struts常見錯誤及原因    

    Struts常見錯誤及原因
    Common Struts Errors and Causes

    This page contains errors and exceptions commonly encountered during web application development using Struts. Along with the exception or error messages themselves, potential causes of these errors are often listed along with links to additional resources.
    To find the error you're looking for, use your browser's Find or Search capability and input a few words that you are seeing in your error message.
    Cannot retrieve mapping for action
    錯誤信息 javax.servlet.jsp.JspException: Cannot retrieve mapping for action /Login
    可能原因
    lNo action defined in struts-config.xml to match that specified in the JSP's
    相關鏈接
    No action instance for path /xxxx could be created
    錯誤信息 No action instance for path /xxxx could be created
    可能原因
    lSpecial Note: Because so many different things can cause this error, it is recommended that you turn your error logging/debugging levels on your web server to a high level of verbosity to see the underlying problems in trying to instantiate the action class you have written and associated with the specified action xxxx through an action mapping in the struts-config.xml file.
    lYour Action class specified in the struts-config.xml file under the class attribute of the action mapping for action xxxx cannot be found for a variety of reasons, including (but not limited to): ·Failure to place compiled .class file for the action in the classpath (needs to be under WEB-INF/classes with the appropriate directory structure underneath this that matches the package your Action class belongs to). ·Package spelling or hierarchy specified in your action class itself (using the package keyword) does not match the spelling or complete package hierachy specified for your action class in the class attribute of the action in struts-config.xml.
    lAction class specified in the /xxxx action mapping in the struts-config.xml file (class attribute) does not extend (directly or indirectly) from the Action class. In other words, your custom Action class does not extend off the Struts-provided Action class or off of another class that eventually extends the Action class (such as DispatchAction.
    lProblem in your classpath, such as web server not being able to find ApplicationResources.properties files in the WEB-INF/classes/ directory or specified subdirectory.
    lProblem in struts-config.xml file with action mapping.
    lProblem with data-sources.xml file.
    相關鏈接
    lApplication's Action classes does not extend Struts-provided Action class·
    lPackage hierarchy/directory structure specified in struts-config.xml file differs from that hierarchy specified in the actual action class's file using the package keyword.http://www.mail-archive.com/struts-user@jakarta.apache.org/msg65874.html ·
    lAction Mapping mistake in struts-config.xml:http://www.manning.com/ao/readforum.html?forum=siaao&readthread=177 ·data-sources.xml file?:http://www.caucho.com/quercus/faq/section.xtp?section_id=30
    No getter method for property XXXX of bean org.apache.struts.taglib.html.BEAN
    錯誤信息 javax.servlet.jsp.JspException: No getter method for property username of bean org.apache.struts.taglib.html.BEAN
    可能原因
    lNo getXXXX() method defined for form field with name XXXX
    lThis can happen if the JSP/Struts developer forgets that the name of the get method will have the same spelling as the value supplied in the Struts tag's property attribute, but that case will be different and is based on JavaBean specification rules. For example, my form class should have a getUsername method if my Struts form-related tag has username as the value for its property attribute. Note the difference in case marked with emphasis on the letter “U.”
    相關鏈接
    lCase can trip up the matching between get method's name and name specified in Struts taghttp://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=58&t=000163
    Exception creating bean of class org.apache.struts.action.Actionform: {1}
    錯誤信息 javax.servlet.jsp.JspException: Exception creating bean of class org.apache.struts.action.Actionform: {1}
    可能原因
    lInstantiating Struts-provided Actionform class directly instead of instantiating a class derived off Actionform. This might occur implicitly if you specify that a form-bean is this Struts Actionform class rather than specifying a child of this class for the form-bean.
    lNot associating an Actionform-descended class with an action can also lead to this error.
    Cannot find ActionMappings or ActionformBeans collection
    錯誤信息 javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionformBeans collection
    可能原因
    lEither the tags for the Struts action servlet or the tags for the .do extension mapping or both not present in the web.xml file. I saw a case where the web.xml file had no elements other than the root element and so this error was occurring.
    lTypos or spelling errors in the struts-config.xml can lead to this error message. For example, missing a slash (”/”) on a closing tag can have this effect.
    lAnother element that must be present in the web.xml file is the load-on-startup element. This can be either an empty tag or can have an integer specified that indicates the priority of executing the associated servlet. The higher the number in the load-on-startup tags, the lower its priority.
    相關鏈接

    NullPointerException at … RequestUtils.forwardURL
    錯誤信息 java.lang.NullPointerException at org.apache.struts.util.RequestUtils.forwardURL (RequestUtils.java:1223)
    可能原因
    lMissing path attribute in the forward subelement of the action element in struts-config.xml
    相關鏈接
    Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
    錯誤信息 javax.servlet.jsp.JspException: Cannot find bean org.apache.struts.taglib.html.BEAN in any scope
    可能原因
    lTrying to use Struts form subelement tags outside of the Struts' form tag.
    相關鏈接
    lUsing form subelements outside of a form tag http://forum.java.sun.com/thread.jsp?thread=337537&forum=4&message=1384153
    Missing message for key xx.xx.xx
    錯誤信息 javax.servlet.jsp.JspException: Missing message for key xx.xx.xx
    可能原因
    lThe key-value pair with specified key is not in ApplicationResources.properties file
    lApplicationResources.properties file not in classpath (not in WEB-INF/classes directory in specified location)
    相關鏈接
    Cannot find message resources under key org.apache.struts.action.MESSAGE
    錯誤信息 Cannot find message resources under key org.apache.struts.action.MESSAGE
    可能原因
    lExplicitly trying to use message resources that are not available (such as ApplicationResources.properties not available
    lImplicitly trying to use message resources that are not available (such as using empty html:options tag instead of specifying the options in its body — this assumes options are specified in ApplicationResources.properties file)
    lXML parser issues — too many, too few, incorrect/incompatible versions
    相關鏈接
    lXML Parser Issues http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15779.html

    No input attribute for mapping path /loginAction
    錯誤信息 No input attribute for mapping path /xxxxAction
    可能原因
    lNo input attribute in action mapping in struts-config.xml file for the action with the name specified in the error message. An input attribute is not required if form validation is not performed (either because the validate attribute is set to false or because the validation method in the relevant form class is not implemented. The input attribute specifies the page leading to this action because that page is used to display error messages from the form validation.
    相關鏈接
    Strange Output Characters (頁面亂碼)
    錯誤信息 Strange and seemingly random characters in HTML and on screen, but not in original JSP or servlet.
    可能原因
    lRegular HTML form tags intermixed incorrectly with Struts html:form tags.
    HTML標簽與Struts標簽不正確的混合使用
    lEncoding style used does not support characters used in page.
    使用了JSP頁面不支持的編碼
    相關鏈接
    “Document contained no data” or no data rendered on page (空白頁面)
    錯誤信息
    l”Document contained no data” in Netscape (在Netscape中顯示“文件中無數據”)
    lNo data rendered (completely empty) page in Microsoft Internet Explorer(在IE中為空白頁面,無任何顯示信息)
    可能原因
    lEmploying a descendent of the Action class that does not implement the perform() method while using the Struts 1.0 libraries. Struts 1.1 Action child classes started using execute() rather than perform(), but is backwards compatible and supports the perform() method. However, if you write an Action-descended class for Struts 1.1 with an execute() method and try to run it in Struts 1.0, you will get this “Document contained no data” error message in Netscape or a completely empty (no HTML whatsoever) page rendered in Microsoft Internet Explorer.
    l用Struts1.1寫的應用在struts1.0環境中運行時,可能出現此問題。
    相關鏈接

    其它錯誤信息
    編譯JSP文件時出現錯誤:
    java.lang.NullPointerException
    error:org.apache.jasper.JasperException: Error compiling \JSPs\security\appUserCreate.jsp
    可能原因:
    JSP頁面中的Struts標記有語法錯誤。
    例如: 錯誤原因:右邊的括號前缺少斜杠“/”

    posted on 2007-10-15 16:07 YangRj 閱讀(474) 評論(0)  編輯  收藏

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    <2025年5月>
    27282930123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(2)

    隨筆分類(5)

    隨筆檔案(13)

    文章分類(14)

    文章檔案(34)

    Apache - Tech Online

    BLOG 收集

    BLOG地址

    DB2

    Eclipse

    IBM - Tech Online

    JAVA

    ORACLE

    OS

    好網址

    文學網站

    累了 聽聽歌曲吧

    論壇

    積分與排名

    • 積分 - 25621
    • 排名 - 1515

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 亚洲日韩中文字幕在线播放| 亚洲人妖女同在线播放| 免费国产成人α片| 亚洲乱码一区av春药高潮| 在线日韩av永久免费观看| 国产精品成人免费观看| 亚洲精品视频在线观看免费| 好吊妞998视频免费观看在线| 免费无码专区毛片高潮喷水| 亚洲av日韩av高潮潮喷无码| 成人午夜大片免费7777| 男女一进一出抽搐免费视频| 久久久久亚洲精品日久生情| 国产又长又粗又爽免费视频 | 亚洲av永久无码精品秋霞电影影院| 免费无码一区二区三区| 久久久久亚洲国产AV麻豆| 国产亚洲精久久久久久无码| 18禁超污无遮挡无码免费网站国产 | 18gay台湾男同亚洲男同| 日韩a在线观看免费观看| 人人玩人人添人人澡免费| 亚洲av无码专区在线电影天堂| 亚洲无码在线播放| 免费看片A级毛片免费看| 暖暖免费在线中文日本| 国产精品亚洲二区在线| 亚洲精品在线免费观看视频| 国产a v无码专区亚洲av| 免费高清在线影片一区| 99精品视频在线视频免费观看| 免费观看四虎精品成人| 亚洲综合久久一本伊伊区| 亚洲AV永久无码区成人网站| 在线观看亚洲免费| 在线看片v免费观看视频777| 成人免费一区二区三区| 理论片在线观看免费| 国产亚洲sss在线播放| 无码久久精品国产亚洲Av影片 | 亚洲综合av一区二区三区不卡|