[size=medium]IBM Websphere对jsp页面的编码是大小写敏感的,我们在Websphere环境下编写代码,当父页面包含其他子页面时,必须保证一致,否则就会发生莫名其妙的错误,异常如下:
[/size]
E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[/admin/view/index.jsp]: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0228E: Exception caught while translating /admin/view/index.jsp: error in statically included file
/include/returnToLogin.jsp(1,1) --> JSPG0120E: Illegal to specify different values for pageEncoding attribute and configuration element for matching URI pattern. directive: "[UTF-8]" configuration: "[utf-8]"
[size=medium]
解决方法很简单,大小写一致了就OK。
此处充分表现了编码习惯的重要性。[/size]
[/size]
E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[/admin/view/index.jsp]: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0228E: Exception caught while translating /admin/view/index.jsp: error in statically included file
/include/returnToLogin.jsp(1,1) --> JSPG0120E: Illegal to specify different values for pageEncoding attribute and configuration element for matching URI pattern. directive: "[UTF-8]" configuration: "[utf-8]"
[size=medium]
解决方法很简单,大小写一致了就OK。
此处充分表现了编码习惯的重要性。[/size]
本文介绍了一个在IBM Websphere环境下使用JSP页面时遇到的问题,即页面编码对大小写的敏感性导致的错误,并给出了简单的解决办法。
870

被折叠的 条评论
为什么被折叠?



