This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pass a String array from a jsp to a servlet

 
JayaSiji Gopal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to pass a String[] from a jsp to a servlet. How do i do this?

I tried to set it as attributes of request, session etc, everytime i get a null pointer exception.

I tried to set it as a comma separated string. send this string as a query parameter and retrieve it using request.getParameter("name") -> this also returns a Null Pointer Exception.



Wht is wrong? I get the comma separated values in printCategories in the jsp properly.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JayaSiji,
You've already asked this question here:
http://www.coderanch.com/t/361186/Servlets/java/Passing-String-jsp-servlet
and people have started replying to it.
[ September 20, 2005: Message edited by: Ben Souther ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic