Deepak Singhal
Deepak Singhal

Reputation: 10874

Configure tomcat apache to execute a sub-directory as first page

Currently suppose xyz.com executes webapp ROOT. How can I configure my tomcat; so that by default xyz.com takes me to xyz.com/abc [abc is a directory inside ROOT]

Upvotes: 0

Views: 447

Answers (1)

Jeff Miller
Jeff Miller

Reputation: 1434

If you have JSTL set up, you can redirect from ROOT/index.jsp:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:redirect url='abc' />

Or use scriptlet from ROOT/index.jsp:

<% response.sendRedirect("http://xyz.com/abc"); %>

Upvotes: 1

Related Questions