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

Re: Assignment Servlets-4a Videos

 
Kelly Loyd
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

"Write a web application that allows you to add new movies to an ArrayList and lists all the movies."

I don't think I can do that in 15 lines of JSP.

I'm not quite certain if I understand the requirement for this assignment. Should I only have a 'bare bones' listvideos.jsp or should I try to read the ArrayList (which will contain VideoData objects) and display the contents?

Or do I just display the empty table and provide a button to 'add' a video?

I think I may have overdone this one ;-)

Thanks,
Kelly
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everything is not in 15 lines of jsp. You have the VideoServlet (which you write)and the addvideo.jsp, the index.html, and the PathFinder class (which are provided) to go with the web app.

You start by displaying an empty table. Using a link, go to addvideo.jsp to add a video. The logic is in the VideoServlet. The JSPs are only for displaying the results. You should have no logic in your JSPs, no if/elses or loops or stuff like that. Keep it simple.
[ October 19, 2005: Message edited by: Marilyn de Queiroz ]
 
Kelly Loyd
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Marilyn!

That was my problem, I tried to put the logic into the JSP, not the servlet. Duh. I got it working, neat-o.

I'll come back to this after I get through all the other Assignments in the proper fashion.

Cheers,
Kelly
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic