Inspectopedia Help

References to classes from the default package in JSP files

Reports any references to classes from the default package in JSP files.

Example:

<%! Integer countSomeUsefulStuff() { ... new ClassFromDefaultPackage(...); // Error new com.example.GoodClass(...); // Good } %> <html> <head> <title>Hello, JSP!</title> </head> </html>

NOTE: Such references will not be resolved during compilation of the JSP because a compiled class for the JSP will be usually placed in non-default package (for example, "org.apache.jsp" in case of Tomcat, "com.ibm._jsp" in case of WebSphere), but importing from the default package is not allowed in Java.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Jakarta EE: Server Pages (JSP), 233.SNAPSHOT

Last modified: 13 July 2023