Errors in Eclipse but not Netbeans exact same project [message #1842989] |
Thu, 08 July 2021 15:31  |
Eclipse User |
|
|
|
I have one project in eclipse, and same exact project in netbeans (I sync / mirror).
I have several errors in eclipse like:
javax.servlet cannot be resolved to a type
Multiple annotations found at this line:
- javax.servlet cannot be resolved
to a type
And happening in this code segment:
<c:set var="surl" value="${pageContext.request.requestURL}" />
<c:choose>
<c:when test="${pageContext.request.queryString != null}">
<c:set var="squy" value="${pageContext.request.queryString}" />
</c:when>
<c:otherwise>
<c:set var="squy" value="t1=${t11}&page=${pageno}" />
</c:otherwise>
</c:choose>
<%--<c:set var="squy" value="${pageContext.request.queryString}" />--%>
<c:set var="sqm" value="?" />
<%--${surl}${sqm}${squy}--%>
<c:set var="surl2" value='${surl}${sqm}${squy}' />
<%--${surl2}--%>
<c:set var="sessvar" value="${surl2}" scope="session" />
But the project runs fine, no build errors, etc. I have in the lib folder:
jakarta.activation-2.0.0.jar
jakarta.el-api-4.0.0.jar
jakarta.servlet.jsp.jstl-2.0.0.jar
jakarta.servlet.jsp.jstl-api-2.0.0.jar
jakarta.servlet-api-5.0.0-M1.jar
jakarta.xml.bind-api-3.0.0.jar
Am I missing some? If so I have no idea where to get them.
And in the pom I have:
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<version>2.0.0</version>
</dependency>
That came from a stackoverflow post. I am using tomee however. Is there something I need that I am unaware of. And this is a jakarta ee 9 project.
Using the following: io.github.hantsy maven-archetype-jakartaee9
All runs and builds are fine. Any help appreciated.
Also those jstl's I included I got from a github page, I cannot find any instructions on downloading jstl libraries from any jakarta site that's needed with examples.
To add please see this issue:
https://github.com/eclipse-ee4j/jstl-api/issues/54
I am in the same situation, I am having to hunt for what I can find using Google. I cannot find any tutorials or examples of how to install the jstl tags or what jars I need or even where they go.
Project works, but I'd still like to setup fully correctly.
[Updated on: Thu, 08 July 2021 20:43] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|