Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object to String array

 
scott dawson
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if this should be in this forum or the JSP or Servlet forum...but here goes.

I want to convert a type object to a String array.
We're adding a String array to the request object in the servlet code, but in the JSP code when I get the attribute (which is working), it comes back as a type Object. But where do I go from there?

Thanks
 
Darin Niard
Ranch Hand
Posts: 118
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try casting it to String[]?
 
Chengwei Lee
Ranch Hand
Posts: 884
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess you're using the getAttribute() method from the request object. This method returns an object. As Darin suggested, cast it to the String[].
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic