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

Convert Java array into Java Script array  RSS feed

 
Natraj Aggas
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can anyone let me know how to convert java array into java script array. For example, say if I need to display the months, I am using java script array. But I have loaded all the months in jsp using java code (by using DateFormatSymbols() method). So now I need to convert it to respective js array. Can anyone help me?


Thanks,
-N
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where's your code? What have you done so far? You need to use JSP mechanisms to "write" the JavaScript code that creates the array. JSON formatting might be helpful.
 
Natraj Aggas
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a plan to implement the date in locale where in I need to pick the respective locales from a property file. Now had found another way of implementing with SimpleDateFormat class. So thanks a lot man.

Thanks,
-N
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!