This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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

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: 63195

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

[Asking smart questions] [Bear's FrontMan] [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
Have you checked out Aspose?
subject: output of result.jsp
It's not a secret anymore!