Call or Redirect to view class from controller or html page

Here is configuration am using

@Route(value = “files”, layout = MainView.class)
@RouteAlias(value = “”, layout = MainView.class)
public class ListView extends HorizontalLayout {}

May i know how can i call this class from a html?
By button click or anything that can show ListView

Or is there anyway that i can return from controller?

When i try to call controller ModelAndView is only looking for html pages and how can i call in my case?

Call or Redirect to view class from controller or html page

How do you mean call from HTML? Looks like you have it mapped to both /files and /. So you could do <a href="/files">Files</a>

I deleted your duplicate post in the Vaadin 8 channel. Please don’t cross-post to several channels.

Here is what am trying to achieve once Authentication is completed it is redirecting to Controller with @RequestMapping(“/”), I want to call ListView.class from the function but am able to return only html page names.

So to achieve calling i thought of using a script to redirect from html if there is no way to call from Controller level itself

@secure-leopard is there a way to return from Controller, am unable to find an reference

Files is looking for files.html in templates folder and throwing error

How are you serving the app, where is the html file?

html file is in resources/templates/

Controller is in src/main/java/com/project along with MainView, ListView class files

Does it work to use redirect: ?

No it didn’t I tried RedirectView as well pointing to http:localhost:8080/files and still not rendering