Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Why does JSP editor complain about refs to generic Map?
Why does JSP editor complain about refs to generic Map? [message #215424] Sun, 15 June 2008 06:52 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
I have a simple JSP that I'm combining a couple different elements into.
It executes fine on Tomcat, but the JSP Editor flags 16 consecutive lines
with warnings, saying:

Map is a raw type. References to generic type Map<K,V> should be
parameterized

On several of those lines, I reference the following expression:

${pageContext.request.contextPath}

It also flags that warning on two lines that are just HTML comments and
several lines that don't reference that expression.

I imagine the EL expression is referencing a map, but the warning doesn't
seem relevant here.

For completeness, here's the entire page (the first of 16 warned lines is
the second "link" tag):
---------------
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struts Form</title>
<link rel="stylesheet"
href=" ${pageContext.request.contextPath}/struts/css_xhtml/styles.c ss "
type="text/css">
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/style/form.css">
<!-- css -->
<link rel="stylesheet" type="text/css"
href=" ${pageContext.request.contextPath}/yui/button/assets/skins/s am/button.css ">
<link rel="stylesheet" type="text/css"
href=" ${pageContext.request.contextPath}/yui/logger/assets/skins/s am/logger.css ">
<!-- js -->
<script type="text/javascript"
src=" ${pageContext.request.contextPath}/yui/utilities/utilities.j s "></script>
<script type="text/javascript"
src=" ${pageContext.request.contextPath}/yui/button/button-debug.j s "></script>
<script type="text/javascript"
src="${pageContext.request.contextPath}/yui/json/json-debug.js "></script>
<script type="text/javascript"
src=" ${pageContext.request.contextPath}/yui/logger/logger-debug.j s "></script>
</head>
<body class="yui-skin-sam">
<h4>Enter your data</h4>
<s:form action="Form">
<s:textfield name="lastName" label="Last Name"/>
<s:textfield name="firstName" label="First Name"/>
<s:submit/>
</s:form>
</body>
</html>
----------------
Re: Why does JSP editor complain about refs to generic Map? [message #215489 is a reply to message #215424] Mon, 16 June 2008 18:08 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

David Karr wrote:
> I have a simple JSP that I'm combining a couple different elements
> into. It executes fine on Tomcat, but the JSP Editor flags 16
> consecutive lines with warnings, saying:
>
> Map is a raw type. References to generic type Map<K,V> should be
> parameterized

That's a bug in the underlying servlet source (created from your JSP
file) that's being validated--it's not written with generics when
the project source level supports/requires it. Please open a bug
report with
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Web%20To ols&component=jst.jsp
..

---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Why does JSP editor complain about refs to generic Map? [message #215497 is a reply to message #215489] Mon, 16 June 2008 18:45 Go to previous message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
Done. Thanks.
Previous Topic:Servlet build is ignoring the classpath to a local jar file.
Next Topic:How to not use workspace metadata
Goto Forum:
  


Current Time: Fri Apr 19 00:38:44 GMT 2024

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

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

Back to the top