Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My default page won't default

Status
Not open for further replies.

Ladyoclass

IS-IT--Management
Sep 18, 2002
11
0
0
US
I have a site where I need to type in Within the httpd.conf file,I have the DocumentRoot set to the directory where my default page is located (name.do) and my <Directory setting also points to the same directory as my DocumentRoot.
When this wasn't working, I added name.do to the end of the <Directory entry.
This also isn't working.
I thought if I had my DocumentRoot set correctly in the httpd.conf file, then it would bring up the page within that directory automatically. Is there another setting that I need to make it recognize my default page?

Any help would be greatly appreciated as we are to put this into production any minute now.

Thank you!!!
 
Depending on what version of Apache and what modules are installed, the only pages that will be brought up automatically are index.html, index.php, index.php3, index.shtml, index.cgi, index.pl, index.htm, Default.htm, default.htm

You can add a DirectoryIndex directive to include other filenames. Like

<Directory /var/ 'some stuff
DirectoryIndex name.do whatever.htm
'more stuff
</Directory>

I am not sure that a browser will interpret the .do extension correctly though.
 
From what you have said, how is Apache supposed to know what page is the default?

Look for the DirectoryIndex directive and add the filename to that, then restart Apache.

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Any directory that has an index page in it will load automatically when you type If you have to specify the page after following the suggestions above, then you may be adding a trailing slash at the end of the path in you container definitions. For example, don't do this:

<Directory &quot;path/to/directory/&quot;>

If you add the trailing slash you will be forced to type it and is some cases, the file name into your browser.
 
Thank you for all your help... these didn't work... we have moved the default directory to the $CATALINA_HOME/webapps/ROOT directory in hopes that it will pull the default page.
We are testing but I don't think this is going to work... there must be someplace other than the normal place to make this adjustment. We have done the normal adjustments and added the name.do to the end of the web.xml under the <welcome-file-list> so it will also read .do files.
I will update with the solution and apreciate all your help so much. If you think of something that might help, please pass it along.

Have a great day![penguin]
 
guys, your webapp should have one default.jsp or somehting like that in the webapps/myapp directory. then, in the web.xml file for your webapp, you create a
<welcome-file-list>
<welcome-file>default.jsp</welcome-file>
<welcome-file-list>

and in the default.jsp you put a line to redirect to your .do, and this way it will work well
Enjoy!
 
It turns out that the developers have written the code so that it needs to be executed out of the tomcat directory although even though a DocumentRoot was defined in the httpd.conf directory, it for some reason needed the startup files in the tomcat/webapps/ROOT directory without a directory of it's own. When we had the contents in a directory with the client name for distinction, it would not follow the path even if it was defined with the DocumentRoot directive.
It looks like we are going to only have one client per server because of this although we will request a different configuration for our next setup and ask them to write the code so that it is served from apache with servlets served out of tomcat.
Thank you all for your help... you have been great and I learned so much. [wavey3]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top