You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by raju <ra...@hotmail.com> on 2008/04/29 10:38:19 UTC
Redirects with ant-contrib post task
Hi,
I am trying to post data to an API say http://localhost/save which in turn
calls create or update based on whether the passed id exists in Database or
not.
<post to="http://localhost/myapp/save?id=2167"
verbose="true" file="C:\test.properties">
</post>
Problem is when i hit save with above code which is one action save,based on
input since it gets redirected to action create or update session is getting
lost so it always creates a new record.
Is there any task which could help me on this issue?i had a look ant
ant-fikin-tasks also
Regards
Raju
--
View this message in context: http://www.nabble.com/Redirects-with-ant-contrib-post-task-tp16955731p16955731.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Redirects with ant-contrib post task
Posted by Dale Anson <da...@grafidog.com>.
I don't have a suggestion, although I can tell you that I only created
the Post task to do a simple post. It is not a full http client, and
won't follow a redirect. It was really designed for posting build
results to a servlet. You might look at the newer http tasks in Ant
itself since they are based on the apache http client libraries.
Dale
raju wrote:
> Hi,
>
> I am trying to post data to an API say http://localhost/save which in turn
> calls create or update based on whether the passed id exists in Database or
> not.
> <post to="http://localhost/myapp/save?id=2167"
> verbose="true" file="C:\test.properties">
> </post>
>
> Problem is when i hit save with above code which is one action save,based on
> input since it gets redirected to action create or update session is getting
> lost so it always creates a new record.
>
> Is there any task which could help me on this issue?i had a look ant
> ant-fikin-tasks also
>
> Regards
> Raju
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org