cancel
Showing results for 
Search instead for 
Did you mean: 

get a paramete in another jsp

Former Member
0 Kudos

Hallo

ihave created two jsp files wth NWDS. They are at the folder dist / PORTAL-INF / jsp

test1.jsp and test2.jsp.

test1.jsp:

<html>

<body>

<form action="test2.jsp" method="post">

......

<input type="text" name="PARAMETER" >

......

<!-- Button -->

<input type="submit" value=" check">

</form>

</body>

</html>

And how can I get the PARAMETER in the test2.jsp??

I have tried it with:

String passW = request.getAttribute("PARAMETER");

Edited by: Cilvaring on Jul 14, 2011 1:41 PM

Edited by: Cilvaring on Jul 14, 2011 1:43 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

In your test2.jsp try below :

String passW = request.getParameter("PARAMETER");

It will work.....

When you post a form to server....the input values are posted as parameters and not as attributes.....

Former Member
0 Kudos

Hi Saurabh Agarwal

Thank you for your help.

do you know the path of the action (form) in the first jsp?

Greetings

Civaring

Former Member
0 Kudos

Didnt' got you....when you say...

"do you know the path of the action (form) in the first jsp?"

Which path......?

Former Member
0 Kudos

I have created a form (test2.jsp) and a form (test1.jsp).

In the test1.jsp I want to run test2.jsp.

They are both in the same folder (dist / PORTAL-INF / jsp)

Ihave tried it with this code but it doesn't work.

<form action="test2.jsp" method="post">

Can u help me???

Thanks

Former Member
0 Kudos

Hi,

What is the path you have referred in portal-app.xml and the same path has to be given form action.

Define the path in portal-app.xml to call the test2.jsp, if possible paste the code portal-app.xml.

Check this threads as well.

/thread/1953974 [original link is broken]

/thread/944477 [original link is broken]

/message/10263705#10263705 [original link is broken]

Regards,

Saleem Mohammad.