• Post Reply Bookmark Topic Watch Topic
  • New Topic

class method variable value input from jsp using servlet  RSS feed

 
arushi tomar
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing this :


and at line 12 it says : Null pointer access: The variable instanceId can only be null at this location

I want to give the value of instance id as input from jsp page :


I dont know what to do in servlet. Should i declare instanceId outside the method? I tried doing this :

and this in servlet :


it still gives null as ouput. What am i missing?
 
Swastik Dey
Rancher
Posts: 1782
14
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Considering this line



Are you sure that you are getting value in this request attribute?
 
arushi tomar
Ranch Hand
Posts: 91
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swastik Dey wrote:Considering this line



Are you sure that you are getting value in this request attribute?


I wasn't using session so it was not taking some parameters to the next jsp page, once i used session for those, it worked fine.
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!