Use view with image

Hello,
is there a possibility to use Views in combination with an image servlet, or can I create a servlet which uses a “view” URL instead of a servlet URL.

I have the following situation: My application uses different views, e.g. !#login, !#backend, !#welcome, etc. Now I want to implement a “View”, called !#image which has the mimetyp Image/jpeg, image/png, and displays an image natively, not as a part of a vaadin component.

Is there a possibility to realize this, or not?

Thanks,
Florian

As fragment changes happen in the browser, are caught by the Vaadin client side and then sent to the server as basically any other RPC (i.e. not as a full page reload) it will not work “directly”.

What you can do is to create a Vaadin “!#image” view which redirects to your image URL, or use another URL directly e.g. through a Resource. What makes sense probably depends on your use case and why you need to show the image natively

Thank you for your answer, I have now created a servlet which does the task perfectly. But probably I can ask another question: Is there a chance to use the WebBrowser class in an ordinary servlet, or not? My visit log bases on this class and I want also to log each image call.

Thanks,
Florian