This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes Getting error when tryin to code Beer example from Head first Java Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Getting error when tryin to code Beer example from Head first Java Servlets" Watch "Getting error when tryin to code Beer example from Head first Java Servlets" New topic
Author

Getting error when tryin to code Beer example from Head first Java Servlets

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

result.jsp


Create Model,view,controller as suggested in the book when i compile and run it runs fine but when i select amber or any other option it throws an error


http://www.lifesbizzare.blogspot.com || OCJP:81%
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You will need tom import the classes you are using in your JSP just as you would a normal Java class. Something like:

should get you up and running.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

found : java.lang.Object
required: java.util.List
List styles=request.getAttribute("styles");
^
1 error

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

Yay it ran atlast thanks Paul just did some typecasting and worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting error when tryin to code Beer example from Head first Java Servlets