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 128595 - I18N - index.jsp file in Spring Web App doesn't have encoding tag
Summary: I18N - index.jsp file in Spring Web App doesn't have encoding tag
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Spring (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: John Baker
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-02-27 17:21 UTC by kaa
Modified: 2008-04-09 21:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
index.jsp (288 bytes, text/plain)
2008-02-27 17:22 UTC, kaa
Details
index.jsp and bundle file with encodings (1.83 KB, text/plain)
2008-02-27 21:34 UTC, John Baker
Details
diffs of index.jsp and bundle file with encodings (1.83 KB, text/plain)
2008-02-27 21:34 UTC, John Baker
Details
index.jsp from the beginning (58.33 KB, image/jpeg)
2008-03-06 18:02 UTC, kaa
Details
index.jsp at the end (69.59 KB, image/jpeg)
2008-03-06 18:04 UTC, kaa
Details
redirect.jsp (with encoding) (343 bytes, text/plain)
2008-03-21 20:22 UTC, John Baker
Details
index.jsp (with encoding) (468 bytes, text/plain)
2008-03-21 20:43 UTC, John Baker
Details
index.jsp editor (55.11 KB, image/jpeg)
2008-03-26 23:58 UTC, kaa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kaa 2008-02-27 17:21:24 UTC
Product Version: NetBeans IDE Dev (Build 200802191203)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows XP version 5.1 running on x86; MS932; ja_JP (nb)

Steps:
1. Create WebApp with Spring framework
2. Open index.jsp in the editor

The file hasn't encoding tag in it. Compare with other types of web applications: jsp files have it due to
implementation of the file and project encoding functionality. Has it been implemented for spring?
Comment 1 kaa 2008-02-27 17:22:21 UTC
Created attachment 57374 [details]
index.jsp
Comment 2 kaa 2008-02-27 17:28:44 UTC
There are two jsp files by default:
1. WEB-INF/jsp/index.jsp
2. WEB-INF/index.jsp (attached above)

The first one consists of 1 line and also hasn't encoding tag:
<h5>this is the /WEB-INF/jsp/index.jsp</h5>

If user creates new jsp file it has encoding tag and looks ok.
Comment 3 John Baker 2008-02-27 21:18:13 UTC
> 1. WEB-INF/jsp/index.jsp
> 2. WEB-INF/index.jsp (attached above)

> The first one consists of 1 line and also hasn't encoding tag:
> <h5>this is the /WEB-INF/jsp/index.jsp</h5>

I've since renamed the second index.jsp to redirect.jsp

redirect.jsp could have an encoding tag

The first one, is a view for for the controller that contains html source.

I'll add encodings then attach diffs to see if the changes look correct


Comment 4 John Baker 2008-02-27 21:34:16 UTC
Created attachment 57390 [details]
index.jsp and bundle file with encodings
Comment 5 John Baker 2008-02-27 21:34:42 UTC
Created attachment 57391 [details]
diffs of index.jsp and bundle file with encodings
Comment 6 John Baker 2008-02-27 21:36:05 UTC
Reporter, please verify diffs of http://www.netbeans.org/nonav/issues/showattachment.cgi/57391/128595.diff to see if
this is correct
Comment 7 John Baker 2008-02-27 23:05:06 UTC
The index.jsp is like a placeholder view 

Users can create their own JSP files using the New->File-Web-JSP file type dialog and these JSP files do have an encoding
preset.
Comment 8 John Baker 2008-03-04 08:32:56 UTC
See desc7
If not correct, please explain and reopen
Comment 9 kaa 2008-03-06 17:53:50 UTC
Product Version: NetBeans IDE 6.1 Beta (Build 200803041230)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05
System: Windows XP version 5.1 running on x86; MS932; ja_JP
Project encoding: UTF-8

User-created jsp files looks ok. They have encoding tag.
index.jsp has bad multibyte characters: see image.
there is no encoding tag in redirect.jsp



Comment 10 kaa 2008-03-06 18:02:52 UTC
Created attachment 57907 [details]
index.jsp from the beginning
Comment 11 kaa 2008-03-06 18:04:43 UTC
Created attachment 57908 [details]
index.jsp at the end
Comment 12 John Baker 2008-03-07 19:08:08 UTC
whoops, I thought I had integrated the changes to use the encoding tag for redirect.jsp 
Comment 13 John Baker 2008-03-11 05:44:10 UTC
Added encoding tags
http://hg.netbeans.org/main/rev/d548b1d38c40

Comment 14 John Baker 2008-03-11 08:09:37 UTC
see the changeset from the previous comment
Comment 15 kaa 2008-03-20 18:27:18 UTC
The problem exists in 0316 build.
I will try to verify it with the next one.
Comment 16 John Baker 2008-03-21 20:21:17 UTC
I'll attach redirect.jsp and index.jsp (from yesterday's 3/20 build), yours should be the same
Comment 17 John Baker 2008-03-21 20:22:46 UTC
Created attachment 58867 [details]
redirect.jsp (with encoding)
Comment 18 John Baker 2008-03-21 20:43:07 UTC
Created attachment 58868 [details]
index.jsp (with encoding)
Comment 19 kaa 2008-03-26 23:58:00 UTC
Build 0323, Ja locale, project encoding UTF-8

Encoding now exits in both files.
But index.jsp has bad multibyte characters in it.
Comment 20 kaa 2008-03-26 23:58:40 UTC
Created attachment 59188 [details]
index.jsp editor
Comment 21 John Baker 2008-03-27 00:32:24 UTC
That's weird. The html source is in a bundle file and there shouldn't be any characters between the brackets as in
<html><META

I'll set my browser to another locale and check the Bundle file on UNIX
Comment 22 Andrei Badea 2008-03-27 19:50:46 UTC
John, try to handle the file the same way I handled the XML files (by turning them into FreeMarker templates and putting
${project.encoding} in the encoding tag. Or just reassign to me if you don't have the cycles.
Comment 23 John Baker 2008-03-29 03:19:30 UTC
Should be fixed now
http://hg.netbeans.org/main/rev/8e6c63e35175
Comment 24 kaa 2008-04-09 21:56:13 UTC
verified in trunk 0406