Bug 108581 - Directory listing shown when visiting /
Directory listing shown when visiting /
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Vadim Nasardinov
Jon Orris
Depends On:
Blocks: 106597
  Show dependency treegraph
Reported: 2003-10-30 06:33 EST by Daniel Berrange
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-11-13 17:18:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2003-10-30 06:33:53 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.9 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
When visiting the root of a WAF site (ie the url path '/'), all that is shown is
a directory listing. Furthermore, the example, index.jsp_redirector file has two
bugs in it which prevent it from working:

a) it includes whitespace after the 'throw new RedirectSignal' line
b) it redirects back to '/'.

Since we have now dropped support for the old dispatcher we should rename this
JSP to be just 'index.jsp' so WAF works in a useful manner 'out of the box'. The
following JSP fixes bugs a) & b):

<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2">

  <jsp:directive.page import="com.arsdigita.kernel.security.Initializer"/>
  <jsp:directive.page import="com.arsdigita.web.URL"/>
  <jsp:directive.page import="com.arsdigita.web.RedirectSignal"/>
  <jsp:directive.page extends="com.arsdigita.web.BaseJSP"/>

    throw new RedirectSignal(URL.there(request, 
          Initializer.getFullURL(Initializer.ROOT_PAGE_KEY, request)), false);

Instead of using the ROOT_PAGE_KEY, we're probably better off adding a simple
java property for designating the root page (eg
'waf.web.homepage=/foo/bar/somepage.jsp'), particulary since its is much harder
to customize enterprise.init 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Visit /

Actual Results:  Shown directory listing

Expected Results:  Redirected to the homepage, eg /ccm/register

Additional info:

We have already made this change in the APLAWS application web directory, but it
should preferrably be done in core.
Comment 1 Daniel Berrange 2003-11-05 08:34:42 EST
It should in fact redirect to 'WORKSPACE_PAGE_KEY', so that if the
user is already logged in, they are not needlessly shown the login form.

cf SDM 22543
Comment 2 Richard Li 2003-11-05 08:46:04 EST
is this the same as bug 108722?
Comment 3 Daniel Berrange 2003-11-05 08:49:23 EST
No, I believe that bug is referring to the public page for a content
section, eg whatever is shown at /content/, but check with Jon.
Comment 4 Vadim Nasardinov 2003-11-06 15:50:07 EST
As of 37762, we redirect to WORKSPACE_PAGE_KEY.

Note You need to log in before you can comment on or make changes to this bug.