Bug 108581

Summary: Directory listing shown when visiting /
Product: [Retired] Red Hat Web Application Framework Reporter: Daniel Berrangé <berrange>
Component: otherAssignee: Vadim Nasardinov <vnasardinov>
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-13 22:18:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 106597    

Description Daniel Berrangé 2003-10-30 11:33:53 UTC
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"/>

  <jsp:scriptlet>
    throw new RedirectSignal(URL.there(request, 
          Initializer.getFullURL(Initializer.ROOT_PAGE_KEY, request)), false);
  </jsp:scriptlet>
</jsp:root>


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:
Always

Steps to Reproduce:
1. Visit /
2.
3.
    

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 Berrangé 2003-11-05 13:34:42 UTC
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 13:46:04 UTC
is this the same as bug 108722?

Comment 3 Daniel Berrangé 2003-11-05 13:49:23 UTC
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 20:50:07 UTC
As of 37762, we redirect to WORKSPACE_PAGE_KEY.