Link to home
Start Free TrialLog in
Avatar of princehyderabad
princehyderabad

asked on

Pass Parameter from Action class to JSP using Struts

hi,

I get few parameter from JSP page, fwd to Action class which writes those parameter into DB after auto-generating ID.
DB -table
ID (auto generate), Name, Question, Email.

what I'm trying to do is afer action class writes to DB. I wanna get that generated ID and fwd to JSP which display fancy msg and #ID.

Action Class.
...
...
ResultSet rs = st.executeQuery("select max(id) as ID from Test123");
            rs.next();
            int rowid=rs.getInt("ID");
          status ="pass";
..
return (mapping.findForward(status));
..

thx,
PH
ASKER CERTIFIED SOLUTION
Avatar of suprapto45
suprapto45
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial