Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Web crawling????
Hello , Im having problems undestanding how to use the web crawling on a vaadin aplication, i have already read the documentation on Book of Vaadin (https://vaadin.com/docs/-/part/framework/advanced/advanced-urifu.html) But I dont undestand If I'm using it right, here is what I want to accomplish:
We want that google could locate some products on our app, for example if one entes on this link: http://myapp.com/market#!market-item/12345
This link should open the product description page.
But according to the book of vaadin I need to enable (override) the method service on the vaadinservlet to tell the search engines the links of where to look for info in my application, :
@Override
protected void service(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
IOException {
String fragment = request .getParameter("idworkflow");
if (fragment != null) {
Product myProduct = ProductApi.get(fragment);
ArrayList<Product> allProducts = ProductApi.get();
Writer writer = response.getWriter(); writer.append("<html><body>"+ "<p>Here is some information about product: "+myProduct.getName()+"</p>");
writer.append("<ul>");
for(Product p : allProducts)
{
writer.append("<li><a href='http://myapp.com/market#!market-item/"+p.getid()+"'>"+p.getName+"</a></li>");
}
writer.append("</ul>");
writer.append("</body>");
}else {
super.service(request, response);
}
}
example:
http://myapp.com/market?idproduct=12345
This will write the next:
<html>
<body>
Here is some information about Product 12345,
<p>Index of all content:</p>
<ul>
<li><a href='http://myapp.com/market#!market-item/12345'>Product 12345</a></li>
<li><a href='http://myapp.com/market#!market-item/12346'>Product 12346</a></li>
<li><a href='http://myapp.com/market#!market-item/12347'>Product 12347</a></li>
....
...
..
<li><a href='http://myapp.com/market#!market-item/n'>Producto n</a></li>
</ul>
</body>
</html>
Is this correct? or I didnt get it at all?
******************UPDATEThis article resolved many opf my questions: https://www.smashingmagazine.com/2011/09/searchable-dynamic-content-with-ajax-crawling/