Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic scriptlet / JSP help needed.  RSS feed

 
Mike Anthony
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried placing the following scriptlet into one of my functioning JSPs in order to see all of the request parameters but I received an error icon on the enumeration line in my Eclipse IDE which says "Enumeration cannot be resolved to a type" when I hover over it.



This scriptlet comes up dozens of times under different tutorials when I search online so my guess is that this is indeed a valid scriptlet.

What do I need to do in order to get my JSP to recognize the Enumeration type? None of the tutorial pages mentioned any such errors.

Thank you!
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36396
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
That class is in the java.util package so you need to add an import to your JSP.



Those tutorials might have neglected to mention that putting code in a JSP is out of date. Once you get past playing with them, you'll want to read about MVC (model view controller) where the JSP is just used for writing out HTML.
 
Mike Anthony
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that did it.
Sorry, sometimes I tend to overlook the basics.

Thank you!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65825
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hopefully this is only for academic purposes? Scriptlets are a discredited technology that should no longer be used in new code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!