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.
Probably because of new formatter rules is a new servlet created from template incorrectly formatted. I get this /** * Processes requests for both HTTP * <code>GET</code> and * <code>POST</code> methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { /* * TODO output your page here out.println("<html>"); * out.println("<head>"); out.println("<title>Servlet * NewServlet</title>"); out.println("</head>"); * out.println("<body>"); out.println("<h1>Servlet NewServlet at " + * request.getContextPath () + "</h1>"); out.println("</body>"); * out.println("</html>"); */ } finally { out.close(); } }
*** Bug 201503 has been marked as a duplicate of this bug. ***
This is quite a nuisance as Servlet wizard is used frequently in all sorts of testing. Thanks for fixing it.
the servlet generated in today's build looks ok to me, marking as fixed
No. It doesn't work for me in latest daily build neither in custom build 20110921-342970572357. I would suggest to remove comment tags /* */ and keep the code uncommented by default: // TODO output your page here out.println("<html>"); out.println("<head>"); out.println("<title>Servlet NewServlet</title>"); out.println("</head>"); out.println("<body>"); out.println("<h1>Servlet NewServlet at " + request.getContextPath() + "</h1>"); out.println("</body>"); out.println("</html>");
Ah, I though you were complaining about the following part: /** * Processes requests for both HTTP * <code>GET</code> and I noticed the bit weird two command lines, but considered this as a minor issue. If it is a P2 I'll fix it likely by changing the /* */ comment to the line comment style.
+1 on #4 I marked it as P2 (so that's not forgotten) because I'm using this wizard for testing pretty much every day and this formatting change (apart from being ugly) made it much harder to get a servlet which prints something and be able to quickly change what gets printed. :-) Previously it was easy to uncomment it but on second thought #4 is even better solution.
fixed in web-main#f466a5fcf73b
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/f466a5fcf73b User: Marek Fukala <mfukala@netbeans.org> Log: #200871 - Servlet from template is incorrectly formatted