Additionally, you could make your entry point the directory's index page 
without using the index in the url:

http://mycorp.com/struts/login/

would reference the index.jsp in the login directory.

index.jsp would forward to index.do so it would go through the struts 
controller.  The action mapped to index.do would simply forward to 
index2.jsp (or something else).  You can use the struts ForwardAction to do 
this easily.

Dave


>From: Eddie Bush <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: Struts Users Mailing List <[EMAIL PROTECTED]>
>Subject: Re: Using friendly names for application entry points
>Date: Fri, 04 Oct 2002 16:24:04 -0500
>
>I don't think you can specify a forward for the action of a form, can you?  
>I'm not sure what Ted would define as "entry points", but here are what I 
>think of as "entry points":
>
>index.do
>index.html
>default.asp
>index.asp
>home.asp
>home.html
>login.html :-)
>
>I think what he's saying is that something like usrSecChk.do?op=li (User 
>Security Check - operation = login) is not terribly intuative for most 
>folks, and that something should be used which is more "friendly" - more 
>"natural-language like" - and, perhaps, something non-sophisticated users 
>would be able to easily identify as a valid "web name".  Following this 
>definition of "friendly entry points", I think login is entirely 
>acceptable.
>
>K Br wrote:
>
>>The husted Struts site recommends that all application
>>entry points be given friendly names using the
>>global-forwards mapping table. Following this advice,
>>I converted
>>
>>   <html:form action="/login.do" method="GET">
>>      //...
>>   </html:form>
>>
>>to
>>
>>   <html:form action="performLogin" method="GET">
>>      //...
>>   </html:form>
>>
>>by adding the global-forwards entry
>>
>>
>>  <global-forwards>
>>    <forward name="performLogin" path="/login.do"/>
>>    //...
>>  </global-forwards>
>>
>>I thought this made my JSP friendlier but I get the
>>Jasper exception:
>>
>>org.apache.jasper.JasperException: Cannot retrieve mapping for action 
>>/performLogin
>>
>>What am I missing?
>>
>>/Kobe
>>
>--
>Eddie Bush
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to