Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Servlets
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
Servlets
How to send string through <a href> in servlet?
malik ge
Ranch Hand
Posts: 69
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
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???
String someString = "This Is A String"; out.println("<h4> <a href='http://localhost:8080/WebApp/servleTwo?action=someText&??????? '> Click Here to see the text</a> </h4>");
Bear Bibeault
Sheriff
Posts: 67750
173
I like...
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Use string concatenation or a StringBuilder to build up the URL.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
malik ge
Ranch Hand
Posts: 69
posted 13 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thank for making me, slap my forehead...
I totally forgot about the concatenation.
Ashish Babar
Greenhorn
Posts: 1
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
how do you receive string at another servlet !!!
Bear Bibeault
Sheriff
Posts: 67750
173
I like...
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
As a request parameter.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Issue with encodeURL.
do anyone know how to create hyperlink by out.print command.
href path changes in jsp on redirecting the servlet to that jsp
How to programmatically login to JForum using Crowd Authentication
Session management ambiguity
More...