Answer the question
In order to leave comments, you need to log in
How to launch the start page correctly?
I am writing my first Java EE project + servlet + tomcat + jsp
At the moment, when starting the project, the start page is launched and the url looks like this - localhost:8085
Tell me how can I make the url look like this when starting the start page - localhost:8085/warmStar.
In web.xml, I registered a list and a servlet that serves it, well, as I understand it, the servlet listens to the url /warmStar, maybe I asked the question incorrectly, but How can I do that when loading, immediately there was such a url - localhost: 8085 / warmStar.
If you immediately sendredirect in doGet, then there will be multiple redirects, and if you request, then a blank screen.
WarmStar
warmStar.WarmStar
WarmStar
/warmStar
Answer the question
In order to leave comments, you need to log in
What would I advise. Throw in Tomcat, JEE, and especially JSP.
Take the right microservice framework instead of Tomcat, like jooby.org (I'm working with it right now), sparkjava or springboot.
Get the right templater like www.mitchellbosecke.com/pebble/home (I'm here), freemarker (velocity is morally obsolete), thymeleaf and make sane templates
. kitchens work fine, if cho), connect always.
To read - https://medium.com/@espina.edgar/java-micro-framew...
Oh yes, in the Tomcat settings you need to specify the default web-application. Then it will open at your desired url
<Context path="" docBase="/usr/local/tomcat/mywebapps/myapplication">
<WatchedResource>WEB-INF/web.xml</WatchedResource>
</Context>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question