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.
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); } } %>
Can anyone please tell me whether this is a general problem or if I have done something wrong with my editor's setting???
Reassigning to web module for evaluation.
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
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.
Thank you for update, I think this is same as issue 198265 then. *** This bug has been marked as a duplicate of bug 198265 ***