Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to pass parameters to a JSP?

Posted on 2004-04-15
5
Medium Priority
?
250 Views
Last Modified: 2010-04-01
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!
0
Comment
Question by:sdesar
  • 3
  • 2
5 Comments
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 400 total points
ID: 10835597
I am sorry I can't understand the question here...
jessionid = request.getID() ..?
the correct way is
jessionid = session.getID();
0
 

Author Comment

by:sdesar
ID: 10836081
I need your help with the exact syntax on how to pass the above parameters

awaiting a response
Thanks
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 10836125
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%>&projectName=<%=projectName%>&serverName=<%=serverName%>

if they are the form element, they will get passed automatically....
0
 

Author Comment

by:sdesar
ID: 10933360
Thanks Kuldeepchaturvedi!
here are you excellent points.
0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 10933391
Glad to be of help...:-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have come across a situation where you need to find some EDB mailbox recovery techniques, then here you will find the same. In this article, we will take you through three techniques using which you will be able to perform EDB recovery. You …
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question