Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Open Source Projects
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
Paul Clapham
Ron McLeod
Jeanne Boyarsky
Tim Cooke
Sheriffs:
Liutauras Vilda
paul wheaton
Henry Wong
Saloon Keepers:
Tim Moores
Tim Holloway
Stephan van Hulst
Carey Brown
Frits Walraven
Bartenders:
Piet Souris
Himai Minh
Forum:
Other Open Source Projects
getParameter in jsp file sent by HttpClient
Alexandru Gifei
Ranch Hand
Posts: 42
I like...
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am sending a http post request from
java
. Here is the code:
HttpClient httpClient = new DefaultHttpClient(); HttpPost httpPost = new HttpPost( "http://alexgifei.s156.eatj.com/index.jsp"); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("message", "123")); httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); httpClient.execute(httpPost);
and in the
jsp
file i try to display the message
string
but i get null:
<% String message=request.getParameter("message"); %> message <%=message%><br/>
Bear Bibeault
Sheriff
Posts: 67634
173
I like...
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You did not mention that this is an HttpClient question in your subject. That's important so I added it.
Aside from your question,
you should
not be using Java scriptlets in JSPs written after 2002. That's 10 years ago. Please read
this JspFaq entry
.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Do Re Mi Fa So La Tiny Ad
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to post data from android app to php page
Ajax and post messages
Post the data to Server
Creating HTTP Post
More...