Does the name I use for action i.e ContactForm have to tie in with what I use in the 
struts-config.xml file?

<html:link action="/ContactForm" paramId="page" paramName="viewcontactlist" 
paramScope="request">

i.e.
Do I need to put ContactForm instead of 'contacts' for path...

 <action path="/contacts"
               type="com.db.gcp.lemweb.blotter.servlets.ContactAction"
               name="contactForm"
               input="/viewcontactlist.jsp"
               scope="request">
   </action>










                                                                                       
                                                
                      Joe Germuska                                                     
                                                
                      <[EMAIL PROTECTED]        To:       "Struts Users Mailing List" 
<[EMAIL PROTECTED]>                  
                      >                        cc:                                     
                                                
                                               Subject:  Re: How do you mimic the 'a 
href' functionality in Struts?                    
                      09/09/03 17:53                                                   
                                                
                      Please respond to                                                
                                                
                      "Struts Users                                                    
                                                
                      Mailing List"                                                    
                                                
                                                                                       
                                                
                                                                                       
                                                




At 15:03 +0100 9/9/03, Mehran Zonouzi wrote:
>Yes I am going to pass the same param to the link every time.
>
>This is what I have replaced the link with.
>I am not too sure if I should be using the href
>property to call my ActionForm class.
>
><html:link href="ContactForm" paramId="page" paramName="viewcontactlist">

At first encounter, the distinctions between the various link
destination attributes can be a little confusing -- but you probably
don't want to use href in this case.

If you have a specific action mapping called "/ContactForm" then you
should use 'action="/ContactForm"'  You would generally only want to
use "href" when you were linking outside of your web application --
the other three provide dynamic URL rewriting to prepend the
application context path so that you can deploy the same web app
under different context paths without having to change your JSPs...
(Other tags like html:img provide similar rewriting...)

The below is copied from the docs for this tag:

The base URL for this hyperlink is calculated based on which of the
following attributes you specify (you must specify exactly one of
them):

* forward - Use the value of this attribute as the name of a global
ActionForward to be looked                     up, and use the
application-relative or context-relative URI found there.

* action - Use the value of this attribute as the name of a Action to
be looked up, and use the application-relative or context-relative
URI found there.

* href - Use the value of this attribute unchanged.

* page - Use the value of this attribute as a application-relative
URI, and generate a server-relative                     URI by
including the context path and application prefix.

Joe



--
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"If nature worked that way, the universe would crash all the time."
             --Jaron Lanier

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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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

Reply via email to