Errors detected on simple JSP file [message #173224] |
Wed, 05 July 2006 20:11 |
Eclipse User |
|
|
|
Originally posted by: eclipse.webtools.hugues-pichereau.com
Hi,
I'm new to Eclipse and would like first to edit JSP files.
So I installed the J2EE Standard Tools, the Java Development Tools, and
other required plugins.
I created a new Dynamic Web Project, using the files of the basic "hello1"
example from the Java EE 5 Tutorial.
But, the Problems pane shows 2 errors:
"javax.servlet cannot be resolved to a type",
for the line 17 (I removed the comments), which is:
<c:if test="${fn:length(param.username) > 0}" >
followed by line 18:
<%@include file="response.jsp" %>
and the error: "Syntax error on token "+", ++ expected",
for the line 1.
Here is the complete source:
-----------------------------------------
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<html>
<head><title>Hello</title></head>
<body bgcolor="white">
<img src="duke.waving.gif">
<h2>Hello, my name is Duke. What's yours?</h2>
<form method="get">
<input type="text" name="username" size="25">
<p></p>
<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
<c:if test="${fn:length(param.username) > 0}" >
<%@include file="response.jsp" %>
</c:if>
</body>
</html>
-----------------------------------------
Hugues Pichereau
|
|
|
Re: Errors detected on simple JSP file [message #173232 is a reply to message #173224] |
Wed, 05 July 2006 22:48 |
Eclipse User |
|
|
|
Originally posted by: eclipse.webtools.hugues-pichereau.com
Hugues Pichereau wrote:
> "javax.servlet cannot be resolved to a type"
> for the line 17 (I removed the comments), which is:
> <c:if test="${fn:length(param.username) > 0}" >
Mmmh, this one was easy: just needed to add the library javaee.jar
> and the error: "Syntax error on token "+", ++ expected",
> for the line 1:
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
For this one I searched a lot, and am still stuck.
Hugues Pichereau
|
|
|
Re: Errors detected on simple JSP file [message #173280 is a reply to message #173232] |
Thu, 06 July 2006 08:15 |
Eclipse User |
|
|
|
Originally posted by: eclipse.webtools.hugues-pichereau.com
Just dragging the jsp file to another folder, then back to the web folder
solved the problem. Weird isn't it ?
Looks like a plugin bug...
For a very first contact with Eclipse, that's tough!
|
|
|
Re: Errors detected on simple JSP file [message #173462 is a reply to message #173280] |
Fri, 07 July 2006 05:03 |
|
Hugues Pichereau wrote:
> Just dragging the jsp file to another folder, then back to the web
> folder solved the problem. Weird isn't it ?
>
> Looks like a plugin bug...
>
> For a very first contact with Eclipse, that's tough!
Is there and error message for response.jsp as well? Does it
involve a JSP expression?
--
- Nitin
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.03075 seconds