Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Errors detected on simple JSP file
Errors detected on simple JSP file [message #173224] Wed, 05 July 2006 20:11 Go to next message
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 Go to previous messageGo to next message
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 Go to previous messageGo to next message
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 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2277
Registered: July 2009
Senior Member
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 WTP, IBM
Previous Topic:Unknown Tag (c:out) error in JSP editor
Next Topic:Migration from MyEclipse to WTP 1.5
Goto Forum:
  


Current Time: Mon Sep 22 20:31:43 GMT 2014

Powered by FUDForum. Page generated in 0.02393 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software