[ http://issues.apache.org/jira/browse/BEEHIVE-228?page=all ]
     
Steve Hanson resolved BEEHIVE-228:
----------------------------------

     Assign To: Jeremiah Johnson  (was: Steve Hanson)
    Resolution: Fixed

I added the following note to the doc.
Please re-open if this bug if I haven't captured the problem.

Note
When a folder-path URL is called

    http://some.domain.com/foo

the Controller class will not be instantiated, unless (1) you list the class in 
web.xml's <welcome-file-list>.

    <welcome-file-list>
      <welcome-file>Controller.jpf</welcome-file>
      <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

and (2) the Controller.jpf file resides in the folder foo. If the 
Controller.jpf resides in the WEB-INF/src/ directory, then it will not be 
instantiated when the folder-path URL is called.




> Controller with JSPs behaving differently than Controller in WEB-INF/src.
> -------------------------------------------------------------------------
>
>          Key: BEEHIVE-228
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-228
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>  Environment: I wrote the sample on Fedora Linux deploying to Tomcat 5.0.25.
>     Reporter: Jeremiah Johnson
>     Assignee: Jeremiah Johnson
>     Priority: Trivial
>      Fix For: V1
>  Attachments: BEEHIVE-228.tar
>
> If I put Controller.jpf in the same directory as my JSP and specify 
> Controller.jpf before index.jsp in the welcome-file-list of web.xml, then the 
> begin action on Controller.jpf is used; on the other hand, if I put 
> Controller.jpf or Controller.java in WEB-INF/src, then Controller.jpf if 
> skipped over in the welcome-file-list.  I expected Controller.jpf to still be 
> used.
> I will attach a sample application to demonstrate my concern.  Here is the 
> structure of the file:
> index.jsp - just links to good and bad directories
> good/Controller.jpf - begin is simple action forwarding to nonindex.jsp
> good/index.jsp - this should not be seen as welcome because of 
> welcome-file-list
> good/nonindex.jsp - should be what the user sees with URL of 
> <contextRoot>/good/
> bad/index.jsp - this is the second option in the welcome-file-list
> bad/nonindex.jsp - this is what I expected to see based on my controller
> WEB-INF/web.xml - contains the welcome-file-list shown below
> WEB-INF/src/bad/Controller.jpf - same controller source as good/Controller.jpf
> The relevant contents of web.xml:
>     <welcome-file-list>
>         <welcome-file>Controller.jpf</welcome-file>
>         <welcome-file>index.jsp</welcome-file>
>     </welcome-file-list>
> - jeremiah

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to