You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sergey Kashin <ay...@ngs.ru> on 2010/02/11 08:39:33 UTC
searchengine bots and tapestry
I have a problem with Ajax pages and google bot.
Then google bot view ajax pages tapestry 5.1.0.5 throw
many exceptions.
like
"Caused by: java.lang.RuntimeException: A component event
handler method returned the value Block[Body of
page:goodzone, at context:page.tml, line 61]. Return type
org.apache.tapestry5.internal.structure.BlockImpl can not
be handled. Configured return types are java.lang.Class,
java.lang.String, java.net.URL, org.apache.tapestry5.Link,
org.apache.tapestry5.StreamResponse,
org.apache.tapestry5.runtime.Component.
"
Google browse that pages by GET method, but tapestry
except a POST method.
My page looks
<t:form>
<t:actionLink t:id="viewGood" context="$goodId"
zone="goodZone">view</t:actionLink>
<t:zone t:id="goodZone" id="goodZone">
.......
</t:zone>
</t:form>
I have same exception if i browse the page by link
/page.viewgood/6236823 with GET method.
Is any issues? except no robots and so on
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: searchengine bots and tapestry
Posted by Angelo Chen <an...@yahoo.com.hk>.
in the page class, you might have methods returning block, put a check for
isXHR, if true return the block otherwise return null.
you have to inject Request in order to check isXHR.
Sergey G. Kashin wrote:
>
> I have a problem with Ajax pages and google bot.
>
> Then google bot view ajax pages tapestry 5.1.0.5 throw
> many exceptions.
> like
> "Caused by: java.lang.RuntimeException: A component event
> handler method returned the value Block[Body of
> page:goodzone, at context:page.tml, line 61]. Return type
> org.apache.tapestry5.internal.structure.BlockImpl can not
> be handled. Configured return types are java.lang.Class,
> java.lang.String, java.net.URL, org.apache.tapestry5.Link,
> org.apache.tapestry5.StreamResponse,
> org.apache.tapestry5.runtime.Component.
> "
>
> Google browse that pages by GET method, but tapestry
> except a POST method.
>
> My page looks
> <t:form>
> <t:actionLink t:id="viewGood" context="$goodId"
> zone="goodZone">view</t:actionLink>
>
> <t:zone t:id="goodZone" id="goodZone">
> .......
> </t:zone>
> </t:form>
>
> I have same exception if i browse the page by link
> /page.viewgood/6236823 with GET method.
>
> Is any issues? except no robots and so on
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://old.nabble.com/searchengine-bots-and-tapestry-tp27543329p27544338.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: searchengine bots and tapestry
Posted by Sergey Kashin <ay...@ngs.ru>.
With "if (request.isXHR())" all work fine.
Thx
On Thu, 11 Feb 2010 08:55:53 -0200
"Thiago H. de Paula Figueiredo" <th...@gmail.com>
wrote:
> On Thu, 11 Feb 2010 05:39:33 -0200, Sergey Kashin
><ay...@ngs.ru> wrote:
>
>> Google browse that pages by GET method, but tapestry
>>except a POST
>> method.
>
> As you have an ActionLink, I guess the problem is in the
>method that handles its event. You should check if the
>request was made through AJAX before returning.
> Something like this:
>
> @Inject
> private Request request.
>
> @OnEvent(value = "action", component = "viewGood")
> Object handleAction() {
> ...
> if (request.isXHR()) {
> return goodZone;
> }
> else {
> return null;
> }
> }
>
>> My page looks
>> <t:form>
>> <t:actionLink t:id="viewGood" context="$goodId"
>> zone="goodZone">view</t:actionLink>
>
> Never use an expansion (${...}) when passing a value to
>a parameter.
>
>> <t:zone t:id="goodZone" id="goodZone">
>> .......
>> </t:zone>
>> </t:form>
>>
>> I have same exception if i browse the page by link
>> /page.viewgood/6236823 with GET method.
>
> This URL does not belong to the form, it belongs to the
>ActionLink instead.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate
>consultant, developer, and instructor
> Owner, software architect and developer, Ars Machina
>Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
>users-unsubscribe@tapestry.apache.org
>For additional commands, e-mail:
>users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: searchengine bots and tapestry
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 11 Feb 2010 05:39:33 -0200, Sergey Kashin <ay...@ngs.ru> wrote:
> Google browse that pages by GET method, but tapestry except a POST
> method.
As you have an ActionLink, I guess the problem is in the method that
handles its event. You should check if the request was made through AJAX
before returning.
Something like this:
@Inject
private Request request.
@OnEvent(value = "action", component = "viewGood")
Object handleAction() {
...
if (request.isXHR()) {
return goodZone;
}
else {
return null;
}
}
> My page looks
> <t:form>
> <t:actionLink t:id="viewGood" context="$goodId"
> zone="goodZone">view</t:actionLink>
Never use an expansion (${...}) when passing a value to a parameter.
> <t:zone t:id="goodZone" id="goodZone">
> .......
> </t:zone>
> </t:form>
>
> I have same exception if i browse the page by link
> /page.viewgood/6236823 with GET method.
This URL does not belong to the form, it belongs to the ActionLink instead.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org