This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 198637 - JSP encoding is not detected correctly if specified in web.xml
Summary: JSP encoding is not detected correctly if specified in web.xml
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Petr Jiricka
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2011-05-16 14:15 UTC by Petr Jiricka
Modified: 2011-07-25 11:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project that exhibits the bug (15.44 KB, application/zip)
2011-05-16 14:15 UTC, Petr Jiricka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2011-05-16 14:15:51 UTC
Created attachment 108323 [details]
Project that exhibits the bug

1. Create a web project in NB 6.9.1
2. Add the following to web.xml:
    <jsp-config>
        <jsp-property-group>
            <url-pattern>*.jsp</url-pattern>
            <page-encoding>utf-8</page-encoding>
        </jsp-property-group>
    </jsp-config>
3. Open index.jsp, remove the pageEncoding attribute and type some non-English characters in this page
4. Shut down NB 6.9.1 and start up NB 7.0
5. Open the project and index.jsp 

=> non-English characters are not displayed correctly.

I am attaching the project that I used for testing this.
Comment 1 Petr Jiricka 2011-05-22 20:14:04 UTC
Looks like method getJspPropertyGroups in the annonymous inner class on line ~150 in class org.netbeans.modules.web.jspparser.ParserServletContext needs to be implemented properly.
Comment 2 Petr Jiricka 2011-05-25 08:29:16 UTC
Fixed in trunk: http://hg.netbeans.org/web-main/rev/ce5c1f9177d4
Comment 3 Petr Jiricka 2011-05-25 11:27:38 UTC
Fixed in NB 7.0.1: http://hg.netbeans.org/releases/rev/de55d7f5b758
Comment 4 Quality Engineering 2011-05-26 11:20:00 UTC
Integrated into 'main-golden', will be available in build *201105260401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/ce5c1f9177d4
User: pjiricka@netbeans.org
Log: #198637 - correctly detecting JSP encoding if it is specified in web.xml.
Comment 5 Vladimir Riha 2011-07-25 11:36:38 UTC
verified...

Product Version: NetBeans IDE 7.0.1 (Build 201107211357)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)