English 中文(简体)
网上扔s
原标题:Weblogic throws CompilationException
javax.servlet.ServletException: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /WEB-INF/content/intro.jsp
messages.tag:2:30: The encoding specified on the page cannot be different than detected encoding for the file.
<%@ tag body-content="empty" pageEncoding="utf-8" %>
                             ^----------^

如果我删除标签档案中的“Encoding属性”,它就能够发挥作用。 但我认为这不是一个解决办法,因为它已经在另一个网络服务器上运作。 因此,问题在于我的网络配置。 通过对错误的推断,我没有发现任何东西。

任何想法? 我尝试在网络学、xml和我甚至记得的其他许多事情上向UTF-8倾斜,现在我已经有过这个问题。

问题回答

。 因此,在jsp任何其他声明之前,添加页的编码<>>。 它解决了我的问题。

来源:

<%@ page import="com.abc.xyz.Helperjsp"%> <%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>

:

<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %> <%@ page import="com.abc.xyz.Helperjsp"%>

• 确保UTF-8的内容也编码。





相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...