Win a copy of The Java Performance Companion this week in the Performance 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