掲示板

by command line "curl" to post data into form inside portlet

thumbnail
7年前 に 晓东 齐 によって更新されました。

by command line "curl" to post data into form inside portlet

New Member 投稿: 1 参加年月日: 15/07/02 最新の投稿
Hi,

I am trying to by command line "curl" command to post data into form inside portlet. It is just for learning web and liferay.

This is the website url (this website setup by myself) :

url here.

You can input number (for instance, 2) and click button "OK", then the updated list page will appear. Manually it works good.

Now I want to do it by "curl" command inside linux bash. I wrote:

"curl -F "timesOfRandomValue=2&submitvalue=OK" "http://180.76.147.172:8080/web/guest/-7?p_p_id=utilitytunnel_WAR_UtilityTunnelManagementportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=3"
"

or "curl -d "timesOfRandomValue=2&submitvalue=OK" "http://180.76.147.172:8080/web/guest/-7?p_auth=Xe4iz6k9;p_p_id=utilitytunnel_WAR_UtilityTunnelManagementportlet;p_p_lifecycle=1;p_p_state=normal;p_p_mode=view;p_p_col_id=column-2;p_p_col_count=3;_utilitytunnel_WAR_UtilityTunnelManagementportlet_javax.portlet.action=saveRandomValue.jsp"
"

inside bash and the website just returns the page of list, but list not updated. I want to know if it is possible to do it by curl. If possible, how to make it work? (maybe the url specified inside the command line is wrong?)

Thanks and regards,

David Qi