You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by K Br <ko...@ny.com> on 2002/10/04 23:13:01 UTC
Using friendly names for application entry points
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
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using friendly names for application entry points
Posted by Dave Derry <dd...@acm.org>.
Try <html:form action="performLogin.do" method="GET">
Notice the '.do'; it has to do with the servlet mapping. You apparently have
*.do mapped to the the Struts ActionServlet, but Jasper doesn't know what to
do with performLogin.
Dave Derry
----- Original Message -----
From: "K Br" <ko...@ny.com>
> 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
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Using friendly names for application entry points
Posted by Eddie Bush <ek...@swbell.net>.
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>