This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line!
See this thread for details.
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

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: 67750
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: 67750
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: 67750
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 ]
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic