aspose file tools*
The moose likes Servlets and the fly likes How to send string through <a href> in servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to send string through <a href> in servlet?" Watch "How to send string through <a href> in servlet?" New topic
Author

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

malik ge
Ranch Hand

Joined: May 13, 2011
Posts: 69
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

Joined: Jan 10, 2002
Posts: 61654
    
  67

Use string concatenation or a StringBuilder to build up the URL.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
malik ge
Ranch Hand

Joined: May 13, 2011
Posts: 69
Thank for making me, slap my forehead...

I totally forgot about the concatenation.

Ashish Babar
Greenhorn

Joined: Apr 10, 2013
Posts: 1
how do you receive string at another servlet !!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

As a request parameter.
 
 
subject: How to send string through <a href> in servlet?