Skip to Content
0
Former Member
Apr 05, 2013 at 08:05 AM

Pass a parameter from one JSP to another

26 Views

Hello Friends,

I am creating a NEWS application in PDK which is similar to the XML FormBuilder News Application .

I have all the news selected in an Arraylist. and each newsitem is showed as in the below UI which runs in a forloop and created dynamically based on the no. of items..

the logic goes something like in JSP1

<%for (int i = 0; i < NumberOfNews; i++)

//UI Part //

<div>

<p>Shorttext :<%= shortTextList.get(i) %> </p>

</div>

Now as shown below when the user say goes to 3rd item and clicks on the "Link to popup" it should display the relevant Longtext of the item ( same funda of the XML form builder)

Now for the popup i am calling another JSP2 which will call the main Java application for data.Like

<a href="popup.jsp" onclick="return popitup('600','400','JSP2')"

>Link to popup</a>

However my question is how will i be able to pass this value if "i" ( Slelected news item number to fetch the relevant long text for the same news).

As i understand the i value is to be passed via the popitup event to the script . How can it be passed and accessed in the JSP2?

Please let me know i need to be more clear.

Thanks

Attachments

News1.PNG (4.8 kB)