Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
View Interest List Message Details
<< Back to Search Results

Date: 12/31/2002
From: matt@newatlanta.com
Subject: RE: [ServletExec] Adding / as context path
Tom,
When you say "... is not working.", might you mean that you are       
getting a
404 when requesting http://www.mysite.com ?

If so, I think this problem is caused by how Apache handles default pages.
In httpd.conf, you may see:

<IfModule mod_dir.c>
   DirectoryIndex index.html
</IfModule>

When apache gets a request like http://www.mysite.com it changes it to be
http://www.mysite.com/index.html (Apache assumes that you want index.html).
*THEN* it passes the request to your web app running in SE (the one whose
context path is '/')
If index.html is not present, then a 404 results.

I'm not certain how to tell Apache to not do this, but there may be a way.

Basically, I think that Apache is trying to be "smart" and do some    
extra
work with the request before passing it over to SE.

The reason I think this is because I request:
http://localhost

and my apache access log shows:
127.0.0.1 - - [31/Dec/2002:10:55:43 -0500] "GET / HTTP/1.1" 200 3581

But the response in my browser is the error page that is configured in my
web app with context path of '/'.
That error page is mapped to the 404 return code, and it shows me that the
request URI is:
/index.html (that is what SE thinks it is, so that must be what Apache
changed it to be... index.html is NOT a welcome file in my web app)
And that error page tells me:
HTTP Status Code - 404

(I just used the exampleWebApp that comes with SE... deployed with              
'/' as
the context path, it already has this error page setup)
You may want to dig in an Apache adminstration book to see how to make
Apache stop doing that (if it is even possible at all).

One workaround would be to put an index.html in place which just does a
redirect to your index.jsp
Hope all this helps.

If you find out how to setup your Apache to get past this problem, please
let the list know.

Matt McGinty
Software Engineer
New Atlanta Communications, LLC
matt@newatlanta.com
http://www.newatlanta.com

-----Original Message-----
From: servletexec-interest-owner@mail.newatlanta.com
[mailto:servletexec-interest-owner@mail.newatlanta.com]On Behalf Of tom
green
Sent: Monday, December 30, 2002 5:12 PM
To: servletexec-interest@newatlanta.com
Subject: [ServletExec] Adding / as context path


Hi,
I want to configure my web application with a context
path of /. So that typing http://www.mysite.com comes
to my web application. This is not working in Apache
1.3.27 and ServletExec 4.2.

I added the following lines to httpd.conf of apache,

ServletExecApplications <instance name> /

<Location />
SetHandler servlet-exec
</Location>

I also changed the context path of web application in
ServletExec/AS to /.

But this is not working. But if I type
http://www.mysite.com/index.jsp, this works.

Can anybody suggest me something else I need to do to
make it work.

Thanx
tom

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
-------------------------------------------------------------------------
ServletExec-Interest. For archives and unsubscribe instructions, visit:

http://www.newatlanta.com/products/servletexec/self_help/mailing_list.jsp

-------------------------------------------------------------------------
ServletExec-Interest. For archives and unsubscribe instructions, visit:

http://www.newatlanta.com/products/servletexec/self_help/mailing_list.jsp

Message Thread
Date Subject Author
12/31/2002 RE: [ServletExec] Adding / as context path matt@newatlanta.com
12/31/2002 RE: [ServletExec] Adding / as context path trt987@yahoo.com
01/02/2003 RE: [ServletExec] Adding / as context path matt@newatlanta.com
01/02/2003 RE: [ServletExec] Adding / as context path matt@newatlanta.com
01/06/2003 RE: [ServletExec] Adding / as context path AndrewW@ViAir.com
01/06/2003 RE: [ServletExec] Adding / as context path matt@newatlanta.com
12/30/2002 [ServletExec] Adding / as context path trt987@yahoo.com
<< Back to Search Results


   
company media information terms of use privacy policy contact us