File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help Modifying Servlet Please

 
Michele Smith
Ranch Hand
Posts: 421
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I am getting a couple of errors, all because I changed the servlet to include three strings instead of 1.

I changed the string name videoName to as follows:

String videoName1
String videoName2
String videoName3

What is happening now is that I am getting errors on the following two lines.

videoName = item.getString();

and

"{\"name\":\"" + videoName + "\", " +

how can I modify my code to make sure it gets all the videos (1-3)

Thanks, Michele
 
Piyush Mangal
Ranch Hand
Posts: 196
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is because there in no variable named "videoName" in your code now.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64200
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you creating JSON in strings rather than using one of the many JSON libraries such as Gson or Jackson?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic