Chandana Garlapati wrote:how do we create the bean class separately(not in struts2 action class)
What bean? A bean to encapsulate form data? I usually let Struts create it. See the CRUD Demo.
Chandana Garlapati wrote:
and how to pass those values in mysql using action class???
This FAQ entry was written for Struts 1.2, but I think it still applies to Struts 2.x. Struts is an implementation of the Front Controllerpattern, so it has little to do with back-end tasks like database access.
Did you read the link I posted? MySql provides a function to retrieve the last inserted ID.
BTW, it is bad design to put all your logic in the Action class. It's fine for experimenting, but you'll want to have a look at this page from the Struts 1.x docs.
Joined: Jul 06, 2009
ok thanks Joe...
how to use last_insert_id() function in JSP using Struts2???