Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Can anyone explain this JSP validation warning?
Can anyone explain this JSP validation warning? [message #546633] Tue, 13 July 2010 15:20 Go to next message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2313
Registered: July 2009
Senior Member
Helios JEE package.
Can anyone explain why the following JSP would generate warnings:
<%@ include file="/WEB-INF/includes/taglibs.jsp"%>
<head>
	<title>Hello</title>
</head>
<body>
	<div id="header">
		<h1>Hello</h1>
	</div>
</body>
</html>

The warnings are "Invald location of tag (head)" and "Invalid location of tag (body)." This is NOT a WTP project, just a plain Java project.

The odd thing is that I have several other projects with the same basic structure that don't generate warnings for similar JSPs. In fact the problematic project is a copy/paste of another that has no such warnings, even when I re-validate its JSPs.
Re: Can anyone explain this JSP validation warning? [message #547083 is a reply to message #546633] Thu, 15 July 2010 12:14 Go to previous messageGo to next message
Wolfgang Knauf is currently offline Wolfgang Knauf
Messages: 63
Registered: July 2009
Member
Hi,

it seems you miss the "page" directive and the HTML header:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" ..%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
....

Or are they contained in the include file?

Best regards

Wolfgang


Am 13.07.2010 17:20, schrieb Eric Rizzo:
> Helios JEE package.
> Can anyone explain why the following JSP would generate warnings:
> <%@ include file="/WEB-INF/includes/taglibs.jsp"%>
> <head>
> <title>Hello</title>
> </head>
> <body>
> <div id="header">
> <h1>Hello</h1>
> </div>
> </body>
> </html>
> The warnings are "Invald location of tag (head)" and "Invalid location
> of tag (body)." This is NOT a WTP project, just a plain Java project.
>
> The odd thing is that I have several other projects with the same basic
> structure that don't generate warnings for similar JSPs. In fact the
> problematic project is a copy/paste of another that has no such
> warnings, even when I re-validate its JSPs.
>
Re: Can anyone explain this JSP validation warning? [message #547116 is a reply to message #546633] Thu, 15 July 2010 15:34 Go to previous message
Eric Rizzo is currently offline Eric Rizzo
Messages: 2313
Registered: July 2009
Senior Member
I feel pretty dumb for overlooking it, but the problem was simply a missing <html> opening tag. The closing tag is there, but I somehow dropped the opening tag at some point.
Embarrassed
Previous Topic:HTML encoding cp1252
Next Topic:[Web Service using WTP] HELP: error whit WebService wizard
Goto Forum:
  


Current Time: Fri Oct 24 18:04:11 GMT 2014

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

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