facebook

JSP code formatting problem

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #257972 Reply

    fly_bluewolf
    Member

    I tried to reformat my JSPs code using <Ctrl>+<Shift>+<F>.
    but it work not normal.
    not format:
    <body>
    Request Method:
    <c:out value=”${pageContext.request.method}” />
    </body>

    formated:
    <body>
    Request Method:
    <c:out value=”${45() throws java.io.IOException,
    javax.servlet.ServletException {
    javax.servlet.jsp.PageContext pageContext = null;
    java.util.Map param = null;
    java.util.Map paramValues = null;
    java.util.Map header = null;
    java.util.Map headerValues = null;
    java.util.Map cookie = null;
    java.util.Map initParam = null;
    java.util.Map pageScope = null;
    java.util.Map requestScope = null;
    java.util.Map sessionScope = null;
    java.util.Map applicationScope = null;
    return “” +pageContext.getRequest().getMethod()}” />
    </body>

    why?

    #258022 Reply

    Riyad Kalla
    Member

    I can’t tell what you are reporting because you need to use [ code ] blocks (the code button below) to wrap your code so it maintains it’s indentation.

    #258037 Reply

    fly_bluewolf
    Member

    sorry.

    don’t use format document function:

    
    <body> 
          Request Method: 
          <c:out value="${pageContext.request.method}" /> 
    </body> 
    

    but used the format document function:

    
     <body> 
    Request Method: 
         <c:out value="${45() throws java.io.IOException, 
         javax.servlet.ServletException { 
         javax.servlet.jsp.PageContext pageContext = null; 
         java.util.Map param = null; 
         java.util.Map paramValues = null; 
         java.util.Map header = null; 
         java.util.Map headerValues = null; 
         java.util.Map cookie = null; 
         java.util.Map initParam = null; 
         java.util.Map pageScope = null; 
         java.util.Map requestScope = null; 
         java.util.Map sessionScope = null; 
         java.util.Map applicationScope = null; 
         return "" +pageContext.getRequest().getMethod()}" /> 
    </body> 
    

    why?

    #258045 Reply

    Riyad Kalla
    Member

    I was able to reproduce this quickly, thank you for the code snippet, I have filed it as a high priority bug.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: JSP code formatting problem

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