• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

display a jsp in a popup window

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Sheriff
Posts: 67695
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic