Re: Using friendly names for application entry points
Thanks for the responses. That was indeed the problem. /Kobe On Fri, 4 Oct 2002 17:39:41 -0400 Dave Derry [EMAIL PROTECTED] wrote: Tryhtml: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 [EMAIL PROTECTED] 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using friendly names for application entry points
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]
RE: Using friendly names for application entry points
Your problem is that you are probably deploying the struts action with a .do mapping, whereas your user friendly name doesn't end in that extension and thus it never hits the struts framework for your global forward to work. Try writing or locating a servlet that you can map to that friendly name that will do a dispatch to the appropriate login .do. The form itself could post to your .do, but if you want a user-friendly entry point that you can publish or give verbally, your /performLogin would be a servlet that forwards to your login.do. Its about 2 lines of servlet code and an entry in your web.xml to do what you want. James -Original Message- From: K Br [mailto:[EMAIL PROTECTED]] Sent: Friday, October 04, 2002 4:13 PM To: [EMAIL PROTECTED] Subject: 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: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using friendly names for application entry points
Tryhtml: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 [EMAIL PROTECTED] 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: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Using friendly names for application entry points
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]