2013-06-20 147 views

回答

0

HttpPost類有三個構造

HttpPost() 
HttpPost(String uri) 
HttpPost(URI uri) 

你可以通過像下面的第二構造函數。

HttpPost post = new HttpPost("http://localhost:8080/openbravo/ws/dal/Product"); 

希望這會有所幫助!

+0

我試過了,但在post.execute(request)時拋出一個錯誤; – sanjeeda

+0

什麼是在openbravo模塊中聲明的doPost(String path,HttpServletRequest request HttpServletResponse響應)下的代碼。 – sanjeeda

+0

當你執行代碼時,你能告訴我你得到的錯誤嗎?如果可能的話,請在這裏發佈代碼。 – Velu

相關問題