Basic Struts work flow question

2007-11-15 Thread Minghui Yu
Hi there, I am new to Struts (version 1.2.7). I am developing a small app to learn Struts. Could you please give me some suggestions? Many thanks!! Scenario: A very small web app. I have 3 tables: student, course, and student- course. Student and course are 1:N relationship. student-course is a

Pass Javabeans

2007-11-16 Thread Minghui Yu
Hi folks, I know it is a stupid question. But how shall I pass JavaBeans from an Action object to a JSP page? Use setAttribute('xxx',xxx)? I have a list of JavaBeans that I want to pass to JSP pages to display one by one. Shall be a very simple question to anyone who is not a brand new beginner

What is the best & simplest practice to call Amazon web service in struts 1?

2007-11-19 Thread Minghui Yu
I want to call amazon web service to display information about books (price, image, etc). What shall be the simplest and best practice? (if there is conflict between simple and best, choose simple) Shall I do everything in JSP? (Suppose I have an external class that once provided with an ISBN, wil

Looking for a simple Amazon Web Service library

2007-11-19 Thread Minghui Yu
I am looking for a very simple Amazon web service library. I plan to use it in a struts 1 application. Basically, I want a library that once I provide with an ISBN for a book, it will return current book price, image, reader comments (optional), and, of course, URL to this book. I want to wrap all

logic:iterate question

2007-11-25 Thread Minghui Yu
in Action: ... Set books=bdao.findAllBooks(); request.setAttribute("books", books); ... In JSP: All Books: -- The line ( throws an exception: Root Cause: javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "book" in any scope (ther

Re: logic:iterate question

2007-11-25 Thread Minghui Yu
I tried code below, still the same error: Next element is Database search does not return any result On Nov 25, 2007 7:33 PM, Fitzwilliam. Aaron <[EMAIL PROTECTED]> wrote: > u sure the collection 'books' is not empty? > > > On

Re: logic:iterate question

2007-11-25 Thread Minghui Yu
llection 'books' is not empty? > > > On 11/26/07, Minghui Yu <[EMAIL PROTECTED]> wrote: > > > > in Action: > > ... > > Set books=bdao.findAllBooks(); > >request.setAttribute("books", books); > > ... > > >

bean:write on a Collection

2007-11-27 Thread Minghui Yu
In my Action, I have: request.setAttribute("book", book); book is a Book object, which has a getAuthors method. getAuthors returns a collection (Set) in JSP page, I want to list authors one by one. How shall I do? does not work as I want. Thanks, -- Thanks & Have a good day, YU, Minghui --

Re: bean:write on a Collection

2007-11-27 Thread Minghui Yu
On Nov 27, 2007 3:57 AM, Omkar Patil <[EMAIL PROTECTED]> wrote: > > Are you using struts1 or struts2? > > - Omkar > > > Minghui Yu wrote: > > > > In my Action, I have: request.setAttribute("book", book); > > > > book is a Book object, w