Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

display a jsp in a popup window

 
Komal Amaresh
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to display a jsp an a popup on clicking a hyperlink.
I' am setting the values using a bean and storing the values in a list and setting the attribute in a servlet, in the session.
I' am then calling this servlet on action on the form by which I' am retrieving the attributes in the DisplayData.jsp.
The initial page is the index.jsp which needs no action on which I have displayed the hyperlink.

the js code is as follows


The link is set as


This is throwing a null pointer exception.
I' am unable to understand the null pointer exception.

regards,
komal

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means something is null that is being dereferenced. Without further information it's impossible to guess what the issue is.

I suspect it also means that you have Java code in your JSPs? Poor practice if so.
 
Komal Amaresh
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I' ve got it. There was no need to call a servlet at the first instance.
I just wanted to try a pop up. I had static data in the model, therefore. Further, I just had to pass the list to jsp by calling an instance pf the model. the attribute set was returning null as I was returning the action to servlet from the jsp.
This is my opinion. I hope I' am right. There were values in the list i had set as the attribute. But the error displayed was in the loop I was running in the jsp and at the requestdispatcher i had forwarded to the jsp.

Please let me know if I' am right.

regards,
Komal.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic