• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSP Error with multiple file includes  RSS feed

 
Lou Caudell
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am experiencing the following error when including a second file. This example shows both methodologies for issuing an include. The error still occurs when methodologies are the same.
===================================== ERROR MSG
C:\***\this*_jsp.java:16: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.Vector
_jspx_dependants.add("/jsp/footer.jsp");
1 warning
====================================== CODE SAMPLE
<jsp:include page="header.jsp" >
<jsp aram name="refresh" value="0"/>
</jsp:include>
...
...
<%@include file="footer.jsp" %>
====================================== ENV
IDE: Netbeans 5.0
JVM: 1.5.06
Project src level is also 1.5

Any thoughts on why this is occuring.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's just a warning telling you that you haven't been as meticulous about using the generics in the collections class as you could be.

It has nothing to do with includes of either type.
[ March 28, 2006: Message edited by: Bear Bibeault ]
 
Lou Caudell
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difficulty for me is that the warning pertains to the generated servlet/jsp code. Even as a template, header-footer only, where no generics are utilized by me, these warnings occur. As you are probably well aware these reports can be actual errors in one's jsp code. So, I am trying to discover whether the issue lies in my code, netbeans, or the jvm. Well, it works as intended, just this message freaking me out.
-Thanx
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using the JDK 1.5 collection classes, and you haven't been specific about generic types (as you state), you will get these types of warnings.

You can either ignore them, or find where in your code you are being non-specific and fix the references so that the compiler warning goes away.

Or, you figure out how to get your JSP container to not issue the compiler warnings if possible.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, as I have done, you can stop putting Java code in the JSPs and factor it out into servlets and beans following contemporary best practices.

That won't make the warnings go away, but they'll certainly be easier to find in addition to spiffy-ing up your app structure.
[ March 28, 2006: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!