This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JSP and the fly likes output of result.jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "output of result.jsp" Watch "output of result.jsp" New topic

output of result.jsp

Praful Chandekar

Joined: Jun 01, 2011
Posts: 8
Hi every one,
I am unable to get the output of "result.jsp"

<%@ page import="java.util.*" %>

<h1 align = "center"> Beer Recommendations JSP</h1>

List styles = (List)request.getAttribute("styles");
Iterator it = styles.iterator();
while(it.hasNext()) {
out.print("<br>try: " +;


I am getting java.lang.NullPointerException error in "http://localhost:8080/Beer-v1/result.jsp"
My & is compiled successfully without error or warning
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63870

It's likely that styles is null. What have you done to figure out why?

[Asking smart questions] [About Bear] [Books by Bear]
Praful Chandekar

Joined: Jun 01, 2011
Posts: 8
I am not getting what you said because in

List result = be.getBrands(c);

then how it could be null
subject: output of result.jsp
It's not a secret anymore!