English 中文(简体)
java http://clients
原标题:java httpclient post

我对如何允许我的jsp页面向服务器发出一个员额指挥,并且仍然有浏览器的浏览器,可以重新引导张贴的网页。

这里是《刑法》:

该员额的代码(在jsp档案中):

HttpClient client = new DefaultHttpClient();
client.getParams().setParameter("SUBMITTED", "submitted");
client.getParams().setParameter("xxxxxxxx", purchaser.getemail());
client.getParams().setParameter("xxxxxxxx", purchaser.getsuject());

HttpPost method = new HttpPost(url+"process.jsp");
client.execute(method); 

这里是一刀切的过程。 jsp

if (person.getStatus() == person.ACTIVE)
  response.sendRedirect("Account.jsp);
else if (person.getStatus() == person.ERROR)
  response.sendRedirect("Error.jsp);

我希望浏览器能够从这一进程中转出。 是否有任何人知道可以帮助我或阿姆我这样错误的方式。

问题回答

你确实这样做是错误的。 与“共同财产法”中的任何“raw法”一样,这一逻辑属于真正的 Java类,不属于共同财产法档案。 创立一个能够做到这一点的《服务手册》,然后将其转而/转而将申请转交共同财产登记署。

共同财产制是一种观点技术,实际上也是反应机构的一部分。 如果你试图改变答复的中间点是联合调查组,那么你只能用<代码>填写。 非法国家调查:已做出反应。

此外,整个职能要求从问题看不出。 我的印象是,共同财产调查案的档案都在同一个环境中运行,因此整个HttpClient办法是错误的。 开始学习更多关于服务器的比照:





相关问题
How to use redirect_to to a non-Rails URL with query params?

We just had an existing use of redirect_to break due to a Rails upgrade, and it led to a question. I ve been experimenting, and I don t seem to find a way to use redirect_to to send the user to a non-...

Apache authentication: Redirect on failure, reliably?

I ve set my ErrorDocument 401 to point to my website s account creation page, but not all browsers seem to honor this redirect (Safari). Also, other browsers (Firefox, Chrome) never quit asking for ...

Response.Redirect HTTP status code

Why is it that ASP/ASP.NET Response.Redirect uses a HTTP-302 status code ("Moved Temporarily") even though in most cases a HTTP-301 status code ("Moved Permanently") would be more appropriate?

Exceptions: redirect or render?

I m trying to standardize the way I handle exceptions in my web application (homemade framework) but I m not certain of the "correct" way to handle various situations. I m wondering if there is a ...

Cakephp is not redirecting properly when pages are cached

I am having some issues with a site that was working correctly until i implemented full page caching in CakePHP. I have followed the guidance in the Manual and have my $session->flash in a no-cache ...

热门标签