This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 181279

Summary: JSP editor displays errors for Spring Roo projects
Product: javaee Reporter: Petr Jiricka <pjiricka>
Component: JSPAssignee: issues@javaee <issues>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Project which reproduces the problem

Description Petr Jiricka 2010-02-26 08:09:39 UTC
Created attachment 94561 [details]
Project which reproduces the problem

I am attaching a Maven project which was generated by the Spring Roo framework - it is one of the samples shipping with the framework. Steps:
1. Open this project in the IDE
2. Open file Web Pages/WEB-INF/views/controller-index.jspx
3. After editor initialization completes, you will see that the first line displays a wavy underline with error "package javax.servlet.jsp does not exist ..."

This is because the project does not specify a dependency on the JSP API (servlet API is used). While this situation is weird in a project that uses JSPs, it is probably valid. The workaround is to add the following dependency:

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>com.springsource.javax.servlet.jsp</artifactId>
    <version>2.1.0</version>
</dependency> 

and rebuild the project. However, it would be nice if this worked, and the error was not displayed, even if the JSP API is not on the project classpath. Could we somehow add the JSP API (the copy that we ship with the IDE in enterprise/modules/ext) to the JSP editor's classpath, in case it is not found on the project classpath?
Comment 1 wallner 2010-05-19 12:01:53 UTC
This Bug affects me too when developing a maven base Spring Portlet MVC project. is there any chance of getting that fixed?
Comment 2 Martin Balin 2015-09-17 13:09:54 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.