`

tomcat Page-encoding specified in XML prolog (UTF-8) is different from that spec

阅读更多

  Tomcat 6在启动时,jsp页面报告,页面显示无法,控制台中显示错误如下:

 

12:32:16,946 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /dialog.jsp(2,0) Page-encoding specified in XML 
prolog (UTF-8) is different from that specified in page directive (utf-8)

   

  网上检索大部分给出的建议是:下述配置pageEncoding="utf-8"中的utf-8应该为UTF-8

<%@ page language="java" import="java.util.*" contentType="text/html; 
charset=utf-8" pageEncoding="utf-8"%>

   不过,同样的工程,只有一台机器有如此错误。google结果推测可能是tomcat导致的。经过和同事电脑上tomcat中jasper.jar的对比发现,确实如google中说的一致。tomcat不同版本中comparePageEncodings方法实现不同所致。经过对上述jar替换之后,上述问题不在出现。

  据此猜想tomcat也存在版本的稳定问题。

 

  • 大小: 33.3 KB
分享到:
评论

相关推荐

    官网下载:Windows-KB841290-x86-ENU.zip

    xml version="1.0" encoding="utf-8"?&gt; &lt;name&gt; &lt;MD5&gt; &lt;SHA1&gt; &lt;/FCIV&gt; 5.Verification: --------------- You can build a hash database of your sensitive files and verify them regularily or ...

    FastReport.v4.15 for.Delphi.BCB.Full.Source企业版含ClientServer中文修正版支持D4-XE5

    - fixed bug in the ODF export in UTF8 encoding - fixed hiding gridlines around nonempty cells in the BIFF export - fixed images bluring when exporting - fixed word wrapping in the Excel XML export ...

    S7-200通讯 specified access point not found补丁

    标题中的"S7-200通讯 specified access point not found补丁"指的是在使用Siemens S7-200系列PLC(可编程逻辑控制器)进行通信时遇到的问题,即"指定的访问点未找到"。这通常是由于网络配置错误、硬件故障或者软件不...

    servlet2.4doc

    Encodes the specified URL for use in the sendRedirect method or, if encoding is not needed, returns the URL unchanged. encodeUrl(String) - Method in class javax.servlet....

    tomcat-5.5.23

    BASE/conf/Catalina/localhost/manager.xml files, will not run in that configuration, unless either: - The path specified in the docBase attribute of the Context element is made absolute, and ...

    Linux中将Tomcat添加到守护进程

    本文将详细介绍如何将Tomcat添加到Linux的守护进程,并处理"Invalid user name 'tomcat' specified"的异常问题。 首先,我们需要设置环境变量。打开 `/etc/profile` 文件,并添加以下两行来指定Tomcat和Java的安装...

    使用mdadm创建软RAID

    "使用mdadm创建软RAID详解" 在Linux系统中,mdadm是一个强大的工具,可以用来创建软RAID(Software RAID),软RAID可以将多个硬盘组合成一个逻辑硬盘,以提高存储容量和读写性能。本文将详细介绍使用mdadm创建软...

    ONVIF-PTZ-Service-Spec-v240.pdf

    The **ONVIF PTZ Service Specification** (version 2.4), published in August 2013, is a comprehensive document that outlines the protocols and standards for controlling the pan, tilt, and zoom (PTZ) ...

    eclipse插件开发-添加xmlcatalog到plugin Specified Entries

    &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt; &lt;uri name="http://example.com/XMLSchema/XMLSchema1.xsd" uri="path/to/XMLSchema1.xsd"/&gt; ``` ...

    ramin 2.2 for xp

    Allows an access to the Radmin server only from specified IP addresses and subnets. Radmin Supports High-Resolution Modes Display resolutions up to 2048 X 2048 X 32 bit color are supported by ...

    Turbo C 2.00[DISK]

    When /P is specified, the EGA palette will be restored each time the screen is swapped. In general, you don't need to use this switch unless your program modifies the EGA palette registers, or ...

    SSD7 选择题。Multiple-Choice

    When mapping from an ER model to a relational model, a strong entity is mapped into a (a) table (b) row (c) column (d) key Correct answer is (a) 10. Which of the following is true about ...

    应用Dephi 开发佳能照相机API

    This function delete all the reference or list objects that user has forgotten to delete. Parameters: In: None Out: None Returns: Returns EDS_ERR_OK if successful. In other cases, see ...

    Turbo C 2.01[DISK]

    When /P is specified, the EGA palette will be restored each time the screen is swapped. In general, you don't need to use this switch unless your program modifies the EGA palette registers, or ...

    struts_2.3.12GA_API文档(chm版本)

    Gets a message based on a key using the supplied args, as defined in MessageFormat, or, if the message is not found, a supplied default value is returned. String getText(String key, String default...

    jQuery完全实例.rar

    This means that every time the passed-in function is executed (which is once for every element matched) the 'this' keyword points to the specific DOM element. Additionally, the function, when ...

    tomcat8 + nginx + memcached + cas 实现负载均衡的配置包

    &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for ...

    Write-data-to-user-specified-cell.rar_LabVIEW Excel Write_cell

    "Write-data-to-user-specified-cell.rar_LabVIEW Excel Write_cell"这个项目主要关注的是如何利用LabVIEW将数据写入到用户指定的Excel单元格。以下是一些相关的知识点: 1. **LabVIEW的VI(Virtual Instrument)...

    NIST SP800-108.pdf

    When parties share a secret symmetric key (e.g., upon a successful execution of a key- establishment scheme as specified in [1] and [2]), it is often the case that additional keys will be needed (e.g....

Global site tag (gtag.js) - Google Analytics