Forums Register Login
Error in Struts
I am doin g project , in that I created LoginAction, ActionBean which has setter and getter meothods, one login page,one success page. Also has Struts-congig.xml,web.xml which is default created using workbench eclipse IDE....

Ths success.jsp has table wich retrieves data from DB. Which running smoothly.Mean no exception for DB connection.

The process is going like this...

login.jsp->LoginAction.java+BussinessLogic.java -->>success.jsp

The BussinessLogic.java has ArrayList productList var type....and LoginAction.java has alos has one ArrayList....?

the error was could not found productList in any scope. Can U tel me what may be tha cause...please any body....

If U r getting what I am telling can any body tel me how get the values from Data Base to form page through struts. Show me Simple application...or any page...

if replies thanks advance....

amit bhadre

[ March 15, 2006: Message edited by: amit bhadre ]
[ March 15, 2006: Message edited by: amit bhadre ]
The ActionForm bean should have a property (e.g. productList) that represents the list of products. Your BusinessLogic class should retrieve the data from the database using JDBC, create the list of products, and place it in the ActionForm bean using the setProductList() method. Then, in your JSP, you should be able to display the productList using either JSTL <c:forEach> or the Struts <logic:iterate> tag.

If you don't understand how to access data using JDBC, I'd suggest googling "JDBC tutorial" to understand how JDBC works.
grapes are vegan food pellets. Eat this tiny ad:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter

This thread has been viewed 513 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 20, 2018 18:44:13.