Eclipse/Tomcat forgetting about custom tags?

553 Views Asked by At

I'm using Eclipse Kepler with Tomcat 7 on Windows 7 64 bit.

If I clean the project and restart the server, everything works great. But if I work for a couple of minutes... like editing a jsp... Tomcat barfs up the following...

The tag it complains about missing is the tag for page layout. Nothing exciting there other than it does some jspf includes and the content pages also call other tags. But again, nothing exciting...

I don't see how I could be causing this as the thing compiles and runs fine initially. But then Tomcat seems to lose track of the tag classes.

If I clean the project, it goes back to working for a while...

Any ideas? Thanks

HTTP Status 500 - Unable to compile class for JSP:

type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 33 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.weblayout_002dmain_tag cannot be resolved to a type
30: 
31: 
32: 
33: <tags:layout-main>
34:     <jsp:attribute name="title">page</jsp:attribute>
35:     <jsp:attribute name="section">user</jsp:attribute>
36:     <jsp:attribute name="handle">page</jsp:attribute>


An error occurred at line: 33 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.weblayout_002dmain_tag cannot be resolved to a type
30: 
31: 
32: 
33: <tags:layout-main>
34:     <jsp:attribute name="title">page</jsp:attribute>
35:     <jsp:attribute name="section">user</jsp:attribute>
36:     <jsp:attribute name="handle">page</jsp:attribute>


An error occurred at line: 106 in the jsp file: /folder/page.jsp
org.apache.jsp.tag.webrating_tag cannot be resolved to a type
103:            <div class="page clearfix">
104:                <div class="title">
105:                    <h3>${page.name}</h3>
106:                    <br><tags:rating value="${3}"/>                         
107:                    <br>${page.type}
108:                </div>
109:                <div class="hours">
1

There are 1 best solutions below

0
On

Try Any of the following, it should work

  1. copy the jar in WEB-INF/lib/ directory and then restart your web container

  2. Try

    <%@ page language="java" import="Pkgname.className.*" %>
    

For example

    <%@ page language="java" import="org.apache.jsp.tag.webrating" %>
  1. Clean Project and Restart Server