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 238773 - Netbeans 7.4 Scriptlets inside JSP does not indent
Summary: Netbeans 7.4 Scriptlets inside JSP does not indent
Status: RESOLVED DUPLICATE of bug 198265
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.4
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: issues@javaee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-25 13:32 UTC by konsAnag
Modified: 2014-01-02 07:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description konsAnag 2013-11-25 13:32:50 UTC
When I write code in scriptlets (JSP) with Netbeans 7.4 it does not indent that code at all, neither when I press enter at the end of each line, nor when I select Sourse > Format from menu.

for example the code becomes like this:

<%
if(true){
for(int i=0; i<10; i++){
out.println(i);
}
}
%>

instead of something like this:

<%
if(true){
	for(int i=0; i<10; i++){
		out.println(i);
	}
}
%>
Comment 1 konsAnag 2013-12-23 07:26:10 UTC
Can anyone please tell me whether this is a general problem or if I have done something wrong with my editor's setting???
Comment 2 Miloslav Metelka 2013-12-27 21:54:01 UTC
Reassigning to web module for evaluation.
Comment 3 Vladimir Riha 2013-12-30 09:14:47 UTC
The attached snippet works for me. Formatted code looks like

    <body>
        <%
            if (true) {
                for (int i = 0; i < 10; i++) {
                    out.println(i);
                }
            }
        %>


Could you please attach full JSP file to reproduce it and IDE log (see [1]) after you tried to format it? Do you have some custom setting for formatting? Thank you in advance.


[1] http://wiki.netbeans.org/FaqLogMessagesFile


Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2
Java: 1.7.0_51; Java HotSpot(TM) Client VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
Comment 4 konsAnag 2014-01-01 00:51:46 UTC
Now I realized how to reproduce the problem, when I try to edit a JSP file from a project it works fine but if I open an independent JSP file that is not in a project created from Netbeans (right click > open with > Netbeans) the format inside scriptlets doesn't seem to work at all.
Comment 5 Vladimir Riha 2014-01-02 07:11:18 UTC
Thank you for update, I think this is same as issue 198265 then.

*** This bug has been marked as a duplicate of bug 198265 ***