A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
how to get servlet forward response ?
Edward Chen
Ranch Hand
Joined: Dec 23, 2003
Posts: 758
posted
Nov 20, 2005 12:03:00
0
In my servelt coding, I need to go to another URL and get responses from that
servlet
in remote server.
the coding looks like this
String
result = forward("http://www.ddd.com/servlet");
// "http://www.ddd.com/servlet" will send back a info
if(result.equals("success")){
// continue
}
else{
// notify user this forward has exception
}
I need to do this forward internally,
not shown in browser
.
Thanks.
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
I like...
posted
Nov 20, 2005 13:18:00
0
Take a look at both
http://java.sun.com/j2se/1.4.2/docs/api/java/net/HttpURLConnection.html
And the (higher level) libraries in:
http://jakarta.apache.org/commons/httpclient/
There is nothing built into
servlets
for doing this kind of proxying.
Java API
J2EE API
Servlet Spec
JSP Spec
How to ask a question...
Simple Servlet Examples
jsonf
I agree. Here's the link:
http://zeroturnaround.com/jrebel/download
subject: how to get servlet forward response ?
Similar Threads
using jsp in the background
How to use dynamically value by using <jsp:useBean> tag?
Servlet Security Question
call to sendRedirect() and getSession() after forward() throws IllegalStateException
Problem About Java File Upload
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter