The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes
2013-05-16 11:25
721 查看
昨天,我遇到了一個讓我很頭疼的問題。 我做了一個共通的jsp,單只測它是ok的,可是,放在別的jsp中include它,就會報錯如標題所示:The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit。調用它的jsp是這樣寫的:< %@include file="/模塊名/nani_include.jsp" % > 。于是我將這個include語句換成了<jsp:include flush="true" page="/模塊名/nani_include.jsp"/>。不再 報錯了。因為 <%@ include file=" "%>標簽 是在jsp容器里將jsp文件翻譯成servlet文件,并編譯它時,是靜態包含被包含jsp的,也就是編譯出來是一個類文件,而java類文件是不允許超過65k這么大的,所以會報錯如標題所示。而<jsp:include flush="true" page=" "/>在翻譯并編譯后,產生的是兩個類文件,也就是說 被調用的jsp生成獨立的類文件,而調用它的jsp生成的類文件中,只包含一個調用jsp的方法。
可是問題又出現了。參數傳不進去。
解決方法是:調用它的jsp用<jsp:param>傳參。
<jsp:include flush="true" page="/模塊名/nani_include.jsp">
<jsp:param name="ss" value="_programForm"/>
</jsp:include>
被調用的jsp中,用el表達式接這個參數就好了:
${ss}
(不管里面用什么標簽,name設成“ss”就好了)
希望有解決不了問題的人可以看到 呵呵
可是問題又出現了。參數傳不進去。
解決方法是:調用它的jsp用<jsp:param>傳參。
<jsp:include flush="true" page="/模塊名/nani_include.jsp">
<jsp:param name="ss" value="_programForm"/>
</jsp:include>
被調用的jsp中,用el表達式接這個參數就好了:
${ss}
(不管里面用什么標簽,name設成“ss”就好了)
希望有解決不了問題的人可以看到 呵呵
相关文章推荐
- “The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit” 的我之解決辦法
- The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
- The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes
- The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes
- The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
- Tomcat 解决The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit
- Fix The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 b
- “The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 byte
- jsp The method getDispatcherType() is undefined for the type HttpServletRequest
- An error occurred at line: 307 in the generated java file The code of method _jspService (HttpServle
- jsp: the code is exceeding the 65535 bytes limit
- 日常问题记录--访问JSP文件时The method getDispatcherType() is undefined for the type HttpServletRequest
- Java Compile Error: The code of method is exceeding the 65535 bytes limit
- Java Compile Error: The code of method is exceeding the 65535 bytes limit
- 解决The method getDispatcherType() is undefined for the type HttpServletRequest
- The method getDispatcherType() is undefined for the type HttpServletRequest
- Srping Mvc service(HttpServletRequest, HttpServletResponse)
- 部署Tomcat8遇到的 “The method getDispatcherType() is undefined for the type HttpServletRequest” 问题
- The method getDispatcherType() is undefined for the type HttpServletRequest
- The method getDispatcherType() is undefined for the type HttpServletRequest