0

I already set my as below:

<welcome-file-list>
    <welcome-file>login.jsp</welcome-file>
</welcome-file-list>

When I click run in Netbeans everything is good but first page is still

http://localhost:8080

What else can I do ? Do i need to configure another files in java code or tomcat?

Dreams
  • 8,288
  • 10
  • 45
  • 71

2 Answers2

0

Welcome pages make sense in a context. If you have multiple WARs there would be multiple contexts each with a separate set of welcome-pages. Try deploying your app as a ROOT.war and test it to see if it is the case

See the following posts for more information.

Community
  • 1
  • 1
questzen
  • 3,260
  • 18
  • 21
0

Inside $TOMCAT_HOME/conf/web.xml there is a section called and it looks like this:

<welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

The default servlet attempts to load the index.* files in the order listed. You may easily override the index.jsp file by creating an index.html file at $TOMCAT_HOME/webapps/ROOT. It's somewhat common for that file to contain a new static home page or a redirect to a servlet's main page. A redirect would look like:

<html>

<head>
<meta http-equiv="refresh" content="0;URL=http://webaddress.com/some/path/to/servlet/homepage/">
</head>

<body>
</body>

</html>
Krishna Chandran
  • 389
  • 3
  • 18