facebook

JSP Validation doesn’t work with multiple levels of JSP inc

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

    rpray
    Member

    I can’t get the JSP validation to work in my production project. I can put an error anywhere and the validator comes back and tells me everything is fine.

    To trace the problem I created a small project. I started with one jsp file. Validation worked fine. I put in some tag libs and tag dirs and validation worked fine. I included a small .JSPF file. Validation worked fine. Then I included another .JSPF file in the first .JSPF file. Even though Resin and Tomcat are both able to run this project correctly, MyEclipseIDE cannot validate the file. Once I had the second include in I could put a java error in any of the file, even the main file, and the validator wouldn’t find it.

    Am I doing something wrong or is this a bug?

    Here’s my code:

    test.jsp (This is in the WEB-INF folder)

    
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib tagdir="/WEB-INF/tags" prefix="m" %>
    
     
    <sql:query var="rs" dataSource="jdbc/admin">
    select login_name, role from users
    </sql:query>
     
    <html>
      <head>
        <title>DB Test</title>
      </head>
      <body>
    
      <h2>Results</h2>
    <c:forEach var="row" items="${rs.rows}">
        login_name ${row.login_name}<br/>
        role ${row.role}<br/>
    </c:forEach>
    
    <%@ include file="incFile.jspf" %>    
    <% slkjsd %>
    <m:myTag/>
    
      </body>
    </html> 
    

    incFile.jspf (This is in the WEB-INF folder)

    
    <font color="red" size="+3"><b>Your Mother Was a Hamster</b></font>
    <%@ include file="incFile.jspf" %>    
    

    incFile2.jsp (This is in the WEB-INF folder)

    
    <font color="red" size="+3"><b> and your father smelt of Elderberries</b></font>
    <% this is and error %>
    

    myTag.tag (This is in the WEB-INF/tags folder)

    
    <font color="blue"><b>Help I'm drowning</b></font>
    

    Any help you can give will be appreciated.

    #239442 Reply

    rpray
    Member

    Never mind I just found my problem. I have incFile.jspf instead of incFile2.jspf. Although I still can’t get validation to work in my main project. If I have a problem like this, why doesn’t the IDE tell me that I have a problem?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JSP Validation doesn’t work with multiple levels of JSP inc

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