Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #20816
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news.szaf.org!news.gnuher.de!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail |
|---|---|
| From | Lothar Kimmeringer <news200709@kimmeringer.de> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: POSTing to a servlet |
| Date | Sun, 30 Dec 2012 14:47:04 +0100 |
| Organization | Organization?! Only chaos here! |
| Lines | 28 |
| Message-ID | <fxzo0zi1mxg0.dlg@kimmeringer.de> (permalink) |
| References | <e3d17f12-5b5f-4655-a596-402d66bcbf82@googlegroups.com> |
| Reply-To | news@kimmeringer.de |
| NNTP-Posting-Host | mnch-5d8556b6.pool.mediaways.net |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Transfer-Encoding | 7bit |
| X-Trace | online.de 1356875228 25531 93.133.86.182 (30 Dec 2012 13:47:08 GMT) |
| X-Complaints-To | abuse@einsundeins.com |
| NNTP-Posting-Date | Sun, 30 Dec 2012 13:47:08 +0000 (UTC) |
| User-Agent | 40tude_Dialog/2.0.15.1de |
| Xref | csiph.com comp.lang.java.programmer:20816 |
Show key headers only | View raw
RVic wrote:
> I have a JUnit test that tests a servlet. The code is straightforward:
>
> HttpClient httpClient = new DefaultHttpClient();
> List<NameValuePair> nvps = new ArrayList<NameValuePair>();
> HttpPost httpPost = new HttpPost("http://myaerver.com:8080/servlets/json");
[...]
> On this last line however, httpClient.execute(), things fail and I am at an utter loss as to why. The URL is good. Examination of the stack shows:
>
> org.apache.http.client.HttpResponseException: Moved Temporarily
[...]
> "Moved Temporarily?" What in the world might be going on here? TIA
Try
HttpPost httpPost = new HttpPost("http://myaerver.com:8080/servlets/json/");
instead.
Regards, Lothar
--
Lothar Kimmeringer E-Mail: spamfang@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
questions!
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
POSTing to a servlet RVic <rvince99@hotmail.com> - 2012-12-13 05:59 -0800
Re: POSTing to a servlet Arne Vajhøj <arne@vajhoej.dk> - 2012-12-13 19:50 -0500
Re: POSTing to a servlet Roedy Green <see_website@mindprod.com.invalid> - 2012-12-17 02:46 -0800
Re: POSTing to a servlet Lothar Kimmeringer <news200709@kimmeringer.de> - 2012-12-30 14:47 +0100
Re: POSTing to a servlet Arne Vajhøj <arne@vajhoej.dk> - 2012-12-30 15:37 -0500
csiph-web