Session scope..need immediate help..please reply ASAP.

Hi,

I have a form with 10 text boxes..I have to enter diff part number for each text box and when i enetr all the 10 text boxes and submit it shd display 10 more empty text boxes along with the entry's i have done before..

wat i m doing is..i m putting the form in session and getting the values from the session accordignly..now i want to do it in request scope..can i do the same in request scope.

<action path="/partinfo"

type="com.gm.gssm.partswb.ui.handlers.PartInfoAction"

name="partInfoForm"

scope="session"

input="partsPage">

<forward name="partinfo" path="partsinfo"/>

<forward name="searchpart" path="partsPage"/>

<forward name="searchresult" path="resultPage"/>

</action>

instead of session scope i want the scope to be in "request".

[842 byte] By [saanj21@yahoo.co.ina] at [2007-11-27 10:11:45]
# 1

hi,

Mostly you go for request scope instead of session,

in action set everything in session.setAttribute ("xx" ,xx );

forward to your jsp

add boxes now

drvijayy2k2a at 2007-7-28 15:15:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Check the code below.

<action path="/partinfo"

type="com.gm.gssm.partswb.ui.handlers.PartInfoAction"

name="partInfoForm"

scope="request"

input="partsPage">

<forward name="partinfo" path="partsinfo"/>

<forward name="searchpart" path="partsPage"/>

<forward name="searchresult" path="resultPage"/>

</action>

It is simple. Put all the ten textbox values into a List (in the Form bean) and iterate over the list in the jsp.

Below that put the 10 empty textboxes for entering the data.

Something like

<logic:iterate .....................>

<%-- Your list data to be displayed--%>

</logic:iterate>

<input type="text".....>......

..

..

vinayak_ra at 2007-7-28 15:15:39 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...