Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Tomcat default index.html location - how can I change this???

843833Aug 22 2001 — edited Dec 11 2001
Hi,

Does anyone know how I can modify Tomcat config so that if I request

http://localhost/

that Tomcat goes to say

/webapps/myapp/index.jsp

instead of deciding to go to what seems to be the default of

/ROOT/index.html

Part 2 of this is how does tomcat decide which hello file to show?

thanks in advance
Greg

PS I know I could replace the contents of /ROOT/index.html however I'm interested in how to do this via reconfiguring tomcat.


Comments

843833
You can set a docbase for a context via server.xml.

e.g.

<Context path="/examples"
docBase="c:/myexamples">
</Context>

This can be used on the root context like this...


<Context path="/"
docBase="c:/myroot">
</Context>


Hope this helps

Nick
843833
You can set a docbase for a context via server.xml.

e.g.

<Context path="/examples"
docBase="c:/myexamples">
</Context>

This can be used on the root context like this...


<Context path="/"
docBase="c:/myroot">
</Context>


Hope this helps

Nick
843833
You can set a docbase for a context via server.xml.

e.g.

<Context path="/examples"
docBase="c:/myexamples">
</Context>

This can be used on the root context like this...


<Context path="/"
docBase="c:/myroot">
</Context>


Hope this helps

Nick
843833
You can set a docbase for a context via server.xml.

e.g.

<Context path="/examples"
docBase="c:/myexamples">
</Context>

This can be used on the root context like this...


<Context path="/"
docBase="c:/myroot">
</Context>


Hope this helps

Nick
843833
You can set a docbase for a context via server.xml.

e.g.

<Context path="/examples"
docBase="c:/myexamples">
</Context>

This can be used on the root context like this...


<Context path="/"
docBase="c:/myroot">
</Context>


Hope this helps

Nick
843835
hi,
i did as said by nick, but it still it refers to the default index.html
This is what i did,
<!-- Tomcat Root Context -->
<!--
<Context path="" docBase="ROOT" debug="0"/>
-->

<!-- MY application -->
<Context path="/jsp" docBase="jsp"
debug="0" privileged="true"/>

<!-- Tomcat Manager Context -->
<Context path="/manager" docBase="manager"
debug="0" privileged="true"/>

<!-- Tomcat Examples Context -->
<Context path="/examples" docBase="examples" debug="0"
reloadable="true">...............
843835
Somebody help me!!!

Thanks in advance,
Shaik
1 - 7
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 8 2002
Added on Aug 22 2001
7 comments
4,080 views