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.
Can I use .jsp file instead of .html in CustomLayout
Can I use .jsp file instead of .html in CustomLayout or add (jsp code in .html file)
Have you tried it? :)
My guess is that you can, but it won't do what I think you're trying to do. I've only used the CustomLayout constructor that takes an input stream, and so I imagine the layout template will be written out by the Vaadin runtime and not interpreted by the servlet container.
Short pause....
Ok, I tried it, and I don't see the JSP being interpreted as anything but static xhtml. I put this into my layout template:
Test. <c:out value="${ 2 + 2 }" /> Did that work?
...and my output has the text but not the number 4 in the middle. I suppose Vaadin could add a constructor for CustomLayout that takes a URL to the template and fetches it in a separate request to the server before parsing it and returning it to the client. That would be a little slower, but conceivably would work (you could file an RFE).
But, instead, you can always add more dynamic content to the page by adding more Vaadin bits to the template.
Cheers,
Bobby
Arun R T: Can I use .jsp file instead of .html in CustomLayout or add (jsp code in .html file)
The problem with this is that JSP is not interpreted at run time by the server, but compiled into a Java servlet class when first requested. Any JSP requests need to be dispatched directly to this special servlet.
If you need to mix JSP and Vaadin code extensively - instead of e.g. running a Vaadin application in an iframe inside the JSP application - you can take a look e.g. at this thread and the ExternalLayout add-on mentioned in it. The idea there is to let the JSP servlet generate the page, but so that it includes the Vaadin client side engine start-up code, which then places Vaadin components at placeholder divs on the JSP page.