• Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading Post Data in a jsp thorugh a URL

 
alpesh helwatkar
Ranch Hand
Posts: 30
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have to read/accept post data in a jsp file in the form of a string which is of the format
<userID=11948;authbypass=abcxyz>

then i have to parse this string into subparts with which i will end up having
11948 and abcxyz as two separate strings.

Can anyone please help in atleast the coding part for reading/accepting the post data coming from the url once i visit a website

Concept:

I have a website in which i am recieving post data in the URL,the moment i hit the enterkey for its website address
I have to read this post data,in the launching jsp on load.
e.g
www.abc.com/login.do;userID=11948;authbypass=abcxyz

i have to read this string<userID=11948;authbypass=abcxyz> in the jsp file

Please help..
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
www.abc.com/login.do;userID=11948;authbypass=abcxyz


This is not how parameters are sent. A ? character is needed after the URL to send parameters.

Where is this string coming from ? Do you have control over the string format ?

Can anyone please help in atleast the coding part for reading/accepting the post data coming from the url once i visit a website


I am afraid you will have to code it on your own
 
alpesh helwatkar
Ranch Hand
Posts: 30
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks bala for the effort.As suggested i did code on my own regarding the same
I am just left with one question, how can i pass a variable defined inside<script></script>
as
<script>
var value=232;
</script>

in a jsp

to another jsp?

i tried putting it in session but failed to achieve the objective.
can you post your code snippet?
that will be of great help!

thanks in advance
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you want to pass this variable ? Putting it in the session should have surely made it available to the other JSP.

can you post your code snippet?


I do not have one. The requirement is pretty simple. I am sure you can handle it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!