关于某些请求没有tml的Tapestry错误

时间:2012-11-20 08:13:35

标签: tapestry

Object onActivate(final String jsonRequest){
    return new StreamResponse() {

        private InputStream inputStream;

        public void prepareResponse(Response response) {

我正在使用上面的代码生成XML作为响应。当我在浏览器中测试它时,它工作正常。但是当我从Android应用程序发送请求时,我在服务器端收到以下错误。

[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.

2 个答案:

答案 0 :(得分:1)

我认为你会发现你的模板中有一些错误的URL,它在没有页面激活上下文的情况下激活你的页面;你的onActivate()事件处理程序将不会被调用,除非在URL中有一个值来满足参数,所以它被跳过,并且默认行为......使用模板进行渲染。

答案 1 :(得分:0)

当我发送GET请求时,它有效。以前我发送了一个帖子

相关问题