2012-11-20 24 views
0
Object onActivate(final String jsonRequest){ 
    return new StreamResponse() { 

     private InputStream inputStream; 

     public void prepareResponse(Response response) { 

我正在使用上面的代碼來生成XML作爲響應。當我在瀏覽器中測試它時,它工作正常。但是,當我從Android應用程序發送我的請求時,我在服務器端出現以下錯誤。Tapastry有關沒有tml僅適用於某些請求的錯誤

[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Page catalog/Index did not generate any markup when rendered. This could be because its template file could not be located, or because a render phase method in the page prevented rendering. 
java.lang.RuntimeException: Page catalog/Index did not generate any markup when rendered. This could be because its template file could not be located, or because a render phase method in the page prevented rendering. 
+1

你怎麼做你的在Android的請求 –

回答

1

我認爲你會發現你的模板中有一些錯誤的URL,它是在沒有頁面激活上下文的情況下激活你的頁面;您的onActivate()事件處理程序將不會被調用,除非URL中的值滿足參數,所以它被跳過,並且默認行爲...使用模板渲染。

0

當我發送一個GET請求它的工作。以前我發送POST

+0

我懷疑還有其他事情在發生; Tapestry不關心POST和GET,只不過表單提交必須是POST。除此之外,沒有區別。 –

相關問題