This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
i have one issue .in struts2 ...
suppose i have one "table1" in the database.and this table1 having form and action classes.and table2 having also form and action classes.
In Table1 data is.
and this having one.jsp page having two fields .one is for 'number' and one is for 'name'.
and second.jsp page having so many fields,and number feild also by using Table1.
but i want to use Table1 number in second.jsp
when trying open page is second.jsp its auotmatically number field should be 4 because in table1 already we use 3 fields there how to write the code and how to handle this stitutaion pleases slove this .
suppose i have one "table1" in the database.and this table1 having form and action classes.and table2 having also form and action classes
I'm trying to figure out what you are trying to say. Database tables don't have any form or action classes. They only have columns and rows. Basically what I think you are trying to say is that there are two tables, table1 and table2. table1 has two fields- number and name. table2 has a number field and some other fields. Now you want to know the next ID that will be generated in table1 by the database (assuming that number field is incremented automatically in the database). You'll use that next ID that will be generated in table1 on second.jsp. Now first of all what I didn't understand is what is the flow of your application. Is the user first shown one.jsp, and from there they move to second.jsp?? Also what is the exact relationship between table1 and table2. Also if you are going to use that ID that you'll find out, you might face some problems, as there could be more than one people using your application. So if more than one user gets the same value for the number column, then table2 might have two rows with the same value for the number field.
If I'm completely off course, then you can correct me as I couldn't understand what you are trying to do...
see in this jsp code first field is loading/unloading plan doc no.these field is not manual enter field we take the value from loading/unloading plan Table ok.my requirement is if suppose loading/unloading plan table are having 3 fields ,in the name of docno1,docno2,docno3.iam trying to open this jsp(which i posted).after opening the jsp loading/unloading plan the first filed docno filed is docno4(because like that auto generated).i think this understandable..
That is a very long code, and you didn't UseCodeTags either, but I've added them for you for now. Basically do you just want us to tell you how to find the next ID that will be generated in the database in a table??
Joined: Dec 26, 2009
Iam not get any answer can you please give me some suggestions for that