Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send string through <a href> in servlet?

 
malik ge
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to know is there a way to send the following string "someString" to some other servlet?

I have two servlets, one shows the following link and by clicking the link it redirects to the "servletTwo".

I want to know how to send "someString" through it. After the Ampersand sign.

I know that by inserting the text "This Is A String" directly after the "&" sign sends it.

But how to send string "someString" through it???

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use string concatenation or a StringBuilder to build up the URL.
 
malik ge
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank for making me, slap my forehead...

I totally forgot about the concatenation.

 
Ashish Babar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you receive string at another servlet !!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a request parameter.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic