Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JSP Error with multiple file includes

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67636
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67636
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67636
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic