Quantcast
Channel: Active questions tagged servlets - Stack Overflow
Viewing all articles
Browse latest Browse all 714

Vaadin 23, Blank index.html page when routing any URL

$
0
0

I am trying to run a page using Vaadin 23, but I get index.html on any urlMy project uses:

  • java version=17
  • spring-mvc version=5.3.20
  • apache tomcat version=8.5.85

But as a dependency manager on the project we use ivy and ant (this is a legacy project)I added settings for VaadinServlet in web.xml similar to the documentation (https://vaadin.com/docs/v23/configuration/properties) , and also defined VaadinApplicationConfiguration as a spring bean

<context:annotation-config/><bean class="com.vaadin.flow.spring.VaadinApplicationConfiguration"/>

My project compiles successfully and I do not see any errors related to Vaadin in the logs. I added a simple test page on Vaadin

@Route("vaadin/test")public class TestView extends HorizontalLayout {    private TextField name;    private Button sayHello;    public TestView() {        name = new TextField("Your name");        sayHello = new Button("Say hello");        sayHello.addClickListener(e -> Notification.show("Hello " + name.getValue()));        sayHello.addClickShortcut(Key.ENTER);        setMargin(true);        setVerticalComponentAlignment(Alignment.END, name, sayHello);        add(name, sayHello);    }}

when I go to the URL /vaadin/test, I get an empty index.html page from the META-INF/VAADIN/webapp directoryWhen I go to any other URL, I also get an empty index.html page

I expect that when going to the URL vaadin/test my page will open, and not an empty index.html


Viewing all articles
Browse latest Browse all 714

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>