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.
Created attachment 100914 [details] Image displaying errror message If you create a Maven Web Application project for Java EE6 it does not contain all of the required dependencies for JSP/JSTL support. The result is an error being displayed on the editor which indicates the following: Unable to read "META-INF/c.tld" from JAR File "file://javaee-web-api-6.0.jar":org.apache.jasper.JasperException: PWC6169: Failed to load or instantiate TagLibraryValidator class: org.apache.taglibs.standard.tlv.JstlCoreTLV This can be easily fixed by adding the following dependency, <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> </dependency> I propose adding this dependency with a note so that users can start coding using JSTL without issues from a default project.
Also, it is not apparent what the issue is with auto-complete without the library.
I added the scope of provided and it seems to work, but should be validated. <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <version>1.1.2</version> <scope>provided</scope> </dependency>
Hi, I am not sure JSTL should be present by default - I think it is better to use a minimal set of APIs and expand it as needed, rather than the other way around. However, you are right that adding JSTL library should be easier. For Ant projects, it is very easy (you go to the Libraries customizer and add JSTL from the list of libraries bundled with the IDE), but for Maven, it is not (you can add it using the NetBeans' built-in Maven repository browser, or by copy/pasting from mvnrepository.com). We may want to make the task of adding libraries to Maven projects simpler, though I am not sure how exactly. Cc'ing Dafe and David in case they have some ideas. Either way, this sounds like an enhancement request rather than a defect.
I would agree that it is more of an enhancement per se. The real issue for me is usability. If a new NB user creates a Maven Web project, it creates a default jsp page. If they try to add any taglibs from the auto-complete, it will add them without a warning that the pom.xml should be updated to use them. As a result, the auto-complete functions do not work. I don't want users to become disillusioned about the ease of use that NB offers. Perhaps it is more of a general issue, such that if you add functionality from auto-complete like JSF, JSTL, etc., it should add the dependencies to the pom.xml file automatically. The same issue does not exist with a NB ant project since the libraries from GlassFish are added automatically, but the same issue exists if you use Tomcat for deployment. You would need to add the JSTL 1.1 library to your project to get it to work.
Ok, now I see what you mean by the auto-complete. Yes, this is something that could be addressed on the side of the JSP editor, reassigning.
*** Bug 207582 has been marked as a duplicate of this bug. ***
I am still facing the same issue in v7.1.2. Adding taglibs as a dependency did not help which renders JSP editor completely useless.
This is still happening in 7.3 and as has been said, adding the taglibs dependency doesn't fix it.
(In reply to comment #8) > This is still happening in 7.3 and as has been said, adding the taglibs > dependency doesn't fix it. After much experimenting and searching I finally found a way to solve this. Adding the following dependency solves the issue: <dependency> <groupId>org.glassfish.web</groupId> <artifactId>javax.servlet.jsp.jstl</artifactId> <version>1.2.2</version> <scope>provided</scope> </dependency>
Thanks a lot, that may be important information. Adding Martin F and Martin J - what do you guys think should be the real solution? Thanks.
(In reply to comment #10) > Thanks a lot, that may be important information. Adding Martin F and Martin J - > what do you guys think should be the real solution? Thanks. I'm not sure I understand the whole problem. Maven web project is missing some dependencies and thus JSP parser isn't able to resolve JSTL classes? Then we should add these dependencies to the project pom during the creation or is there any technical/logical reason against it?... BTW: I remember that I have seen similar error badge to the one from the attachement even in my semestral project (!) so the issue has to be there for a long time and affect almost everyone.. we should really fix it
I would prefer to not include dependency if possible since dependencies like this come from the application server where the app run. In other words we would add Maven dependency because our jspparser is not independent enough. I vote for fixing this issue by extending JSP parser classpath for JAR required for JSTL processing. This would mean that users can compile their application and JSPs without any error in the IDE and these necessary JARs will be provided by the server once the user deploy the project. I'm attaching patch. Martin, Petr what do you think about? I would include it into the patch since many users probably can be facing this issue.
Created attachment 132130 [details] patch for extending JSP parser CP
(In reply to comment #12) > I would prefer to not include dependency if possible since dependencies like > this come from the application server where the app run. Ye, sounds reasonable. > I'm attaching patch. Martin, Petr what do you think about? I would include it > into the patch since many users probably can be facing this issue. Awesome, I just didn't know about such solution, but looks much better than adding additional dependency to the project.
(In reply to comment #14) > Ye, sounds reasonable. Ok, in that case fixed in web-main #deed064ac736. Marking as patch candidate, I hope this should not broke anything.
Integrated into 'main-golden', will be available in build *201303042300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/deed064ac736 User: Martin Fousek <marfous@netbeans.org> Log: #188765 - Unable to read "META-INF/c.tld" from JAR file
Verified in dev build 201303042300.
Transplanted: changeset: 255525:60996fff4aa6 branch: release73 summary: #188765 - Unable to read "META-INF/c.tld" from JAR file changeset: 255526:dec2e4f733ae branch: release73 summary: Spec.version and long description for #188765
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/60996fff4aa6 User: Martin Fousek <marfous@netbeans.org> Log: #188765 - Unable to read "META-INF/c.tld" from JAR file (transplanted from deed064ac736f2f614780d61e856bf7eff208d8f)