3

I have moved multiple common <%@ tag import=... %>s from several .tag files to a shared .tag (or '.jsp') file and included that shared file in all other tag files.

It works in tomcat/jetty but eclipse fails at recognizing them and reports compile error on imported classes. Instead eclipse recognize them when I change them to <%@ page import=... %> but then tomcat/jetty fails.

<!-- import.tag -->
<%@ tag  import="java.util.List"%><!-- eclipse: compilation error on `List list;` "List can not be resolved to a type", jetty/tomcat: ok -->
<%@ page import="java.util.List"%><!-- eclipse: ok, tomcat/jetty: page directive cannot be used in a tag file -->

<!-- another.tag file -->
<%@ include file="import.tag" %>
<% List list; %>

Is this an eclipse bug? Is there any solution?

Edit: I'm using Indigo Service Release 1, Build id 20110916-0149, Java EE IDE for Web Developers / Ubuntu 10.10

Ali Shakiba
  • 20,549
  • 18
  • 61
  • 88

0 Answers0