Here is the test example, extends.jsp, <%@ page import="dvt.jsp.jaspertest.*" %> <%@ page extends="TestJspBase" %> <% out.println("TEST"); %> and its TestJspBase.java. package dvt.jsp.jaspertest; import jeus.servlet.jsp.HttpJspBase; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; public class TestJspBase extends HttpJspBase { @Override public void _jspService(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { /* do nothing here */ } } I know that the fully qualified class name must be used while using the extends attribute of the page directive. But the java generator of jasper has also a problem. /* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/7.0.50 * Generated at: 2014-01-15 04:56:28 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; import dvt.jsp.jaspertest.*; import TestJspBase; public final class extends_jsp extends TestJspBase implements org.apache.jasper.runtime.JspSourceDependent { The problem is 'import TestJspBase;'. The java language spec. does not allow the class name of default package. http://docs.oracle.com/javase/specs/jls/se5.0/html/packages.html#70209 In my opinion, no import statement generation would be best for the simple class name. org.apache.jasper.compiler.PageInfo public void setExtends(String value, Node.PageDirective n) { xtends = value; } FYI, there was a time that such import statement was possible to use until it was fixed at JDK 1.4. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4361575
It is a compile time error to import a type from the unnamed package. (from http://docs.oracle.com/javase/specs/jls/se5.0/html/packages.html#70209)
Thanks for the report and especially for the references. Having that information to hand makes the fix a lot quicker as we don't have to go digging to find it ourselves The fix has been applied to 8.0.x for 8.0.0 onwards and to 7.0.x for 7.0.51 onwards.