facebook

JSP Formatting Problem Example in 3.8.4

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #224171 Reply

    This problem is easily reproducible with the 3.8.4 release. Take the jsp page quoted below and hit Ctrl-Shift-F, you get a dialog box that says

    Error executing command — the command for the key you pressed failed.

    If you use the menu item, it screws up the imports and makes it uncompilable. Please fix ASAP, thank you.

    Simple JSP page that 3.8.4 is unable to format:

    
    <%@ page language="java" import="java.sql.*, javax.sql.*, javax.naming.*, java.util.*"%>
    
    <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
    <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html:html locale="true">
      <head>
        <html:base />
        
        <title>tester.jsp</title>
      </head>
      
    <body>
    
    Hello....
    <br>
    <%
          Connection con = null;
        try {
        Hashtable env = new Hashtable();
          env.put(Context.INITIAL_CONTEXT_FACTORY,
              "org.jnp.interfaces.NamingContextFactory");
          env.put(Context.PROVIDER_URL, "localhost:2001");
          env.put("java.naming.factory.url.pkgs",
              "org.jboss.naming:org.jnp.interfaces");
    
            InitialContext ctx2 = new InitialContext(env);
            DataSource ds = (DataSource)ctx2.lookup("java:/OracleDS");
            con = ds.getConnection();
            %>
    <%= "Connected to "
                + con.getMetaData().getDatabaseProductVersion()%>
    <%
          } catch (Exception e) {
            e.printStackTrace(System.err);
          } finally {
            try {
              con.close();
            } catch (Exception e) {
                e.printStackTrace(System.err);    
            }
          }
    %>
    
    
    </body>
    
    </html:html>
    

    -Armen

    #224192 Reply

    Riyad Kalla
    Member

    Perfect test case, I was able to reproduce this quickly. Thank you Armen, I will file this ASAP.

    #276843 Reply

    Karunashree
    Member

    Can you please tell me what is the solution for this JSP Formatting Problem Example in 3.8.4.

    Thanks,

    #276866 Reply

    Riyad Kalla
    Member

    Karunashree,
    The bug was fixed in a later release of MyEclipse. THe solution would be to upgrade to a later release of MyEclipse to fix the formatting issue.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: JSP Formatting Problem Example in 3.8.4

You must be logged in to post in the forum log in