sdesar
asked on
How to pass parameters to a JSP?
I have this tree.jsp that accespts 3 parameters when its run ie - jsessionId, projectName, serverName that get passed from another jsp.
How can I modify the following code so that these parameters are always there when the code is run as a standalone jsp with its own
3 parameters -
jessionid = request.getID() ..?
projectName = "test_project";
serverName = "alien00";
So the url when the jsp is run will always have this as its URL -
http://www.test.com/tree.jsp?jsessionid=12324&projectName=test_project&serverName=alien00
the jsesssionid should always be the same with in the same browser and if the user opens a new browser then the jessionid would change.
Eagerly awaiting a response
Thanks!
How can I modify the following code so that these parameters are always there when the code is run as a standalone jsp with its own
3 parameters -
jessionid = request.getID() ..?
projectName = "test_project";
serverName = "alien00";
So the url when the jsp is run will always have this as its URL -
http://www.test.com/tree.jsp?jsessionid=12324&projectName=test_project&serverName=alien00
the jsesssionid should always be the same with in the same browser and if the user opens a new browser then the jessionid would change.
Eagerly awaiting a response
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How to pass where??
if you are passing them to a URL then you will have to built the url like...
jessionid = request.getID() ..?
projectName = "test_project";
serverName = "alien00";
http://www.test.com/tree.jsp?jsessionid=<%=jsessionid%>&projectNam e=<%=proje ctName%>&s erverName= <%=serverN ame%>
if they are the form element, they will get passed automatically....
if you are passing them to a URL then you will have to built the url like...
jessionid = request.getID() ..?
projectName = "test_project";
serverName = "alien00";
http://www.test.com/tree.jsp?jsessionid=<%=jsessionid%>&projectNam
if they are the form element, they will get passed automatically....
ASKER
Thanks Kuldeepchaturvedi!
here are you excellent points.
here are you excellent points.
Glad to be of help...:-)
ASKER
awaiting a response
Thanks