This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

nullpointerException  RSS feed

 
shekhar john
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi to all
i m using struts 2 but i m getting a nullpointerexception which is frustrating me my code is as
please help me to solve the problem .
thanks in advance.




stack trace is :-




 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed your code tags for you.
Your code doesn't match your stack trace (line 40 is blank here). What's on line 40 in the code you are really using?
 
shekhar john
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the error is on this code line
<code>
String url = request.getRequestURL().toString();
</code>

I have pasted one line below from my editor thats why the stack trace shows the error on 40 line
in my code this line is on line 40
know can you please help me to solve it
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!