Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Problem with .jspf and validation
Problem with .jspf and validation [message #550761] Wed, 04 August 2010 09:24 Go to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
I have an old JSP project which I recently started to work on with Helios.
In it there are some .jsp file, and some included .jspf files.

I was used to having errors flagged against the .jspf files, but with Helios
I thought these would go away.

The .jsp files when validated (including the .jspf files of course) are
clear of errors.

In the preferences I have checked that .jspf is marked as a fragment, but
the validation logic still seems to put in error markers on them.

I am not sure if these are old markers which have simply not gone away, or
new markers that are still being generated.

Any ideas on how to get rid of these errors?

David
Re: Problem with .jspf and validation [message #551242 is a reply to message #550761] Thu, 05 August 2010 17:18 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick SandonatoFriend
Messages: 126
Registered: July 2009
Senior Member
Hi David,

What kind of errors are you seeing in the .jspf files?

It might be helpful to know that jspf files are generally not aware of the context that they may be used in. So if it references a variable that is declared in a JSP you know the fragment will be included in, the fragment is unaware of this and will generate problems from that.

[Updated on: Thu, 05 August 2010 17:20]

Report message to a moderator

Re: Problem with .jspf and validation [message #551265 is a reply to message #551242] Thu, 05 August 2010 18:14 Go to previous messageGo to next message
David Goodenough is currently offline David GoodenoughFriend
Messages: 157
Registered: July 2009
Senior Member
Nick Sandonato wrote:

> Hi David,
>
> What kind of errors are you seeing in the .jspf files?

There are two errors, each repeated:-

The function fn:substring is undefined Tail.jspf
/project/WebContent/WEB-INF/jsp line 14 JSP Problem

and

Type mismatch: cannot convert from boolean to String Head.jspf
/project/WebContent/WEB-INF/jsp line 95 JSP Problem

(Sorry that has wrapped rather badly).

Wherever they are used they work properly. In the first case it is accurate
to say that fn:substring is not defined in this file, as it happens it is
defined in the second file. In the second case when it compiles properly
it works, so I guess it is because it is undefined.

But I thought the point of the validation and the fragment files was that
only complete files (with their includes) should be checked, and the
fragments left along.

David
Re: Problem with .jspf and validation [message #552260 is a reply to message #551265] Wed, 11 August 2010 13:18 Go to previous message
Nick Sandonato is currently offline Nick SandonatoFriend
Messages: 126
Registered: July 2009
Senior Member
> Type mismatch: cannot convert from boolean to String Head.jspf
> /project/WebContent/WEB-INF/jsp line 95 JSP Problem

This particular problem should be cleared up by https://bugs.eclipse.org/317062

Do you have the preference unchecked for "Validate JSP fragments"? This is under Window > Preferences and then under Web > JSP Files > Validation. Once this option is disabled, doing a full validation should remove the problems.
Previous Topic:How to edit HTML templates
Next Topic:unable to use Clay Mark II plugin on Galineo
Goto Forum:
  


Current Time: Thu Apr 25 08:29:01 GMT 2024

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

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

Back to the top