You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Todd Pierce <To...@hubbub.com.au> on 2003/02/10 00:57:30 UTC

RE: Newcomer question

What I do when linking to another (static?) page within the application is
define a simple action for it in struts-action.xml and use the <html:link>
tag:

http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#link

-----Original Message-----
From: John Dubchak [mailto:jdubchak@qwest.net]
Sent: Monday, 10 February 2003 11:02 AM
To: struts-user@jakarta.apache.org
Subject: Newcomer question


Hello Everyone,

I've done a little with Struts on a web-based application that I'm working
on 
and have a very basic question that I can't seem to find an answer to.

I have an index.jsp that has a basic navigation menu.  I want to forward to
a 
content page using a simple html link from the menu, like an href anchor.  
How do I do this using struts?  Or should I just hard-code the page name as 
part of the href of a standard anchor tag?  How is it generally done in a 
webapp with struts?

I apologize for this basic question but I just can't seem to connect the
dots 
on this.

Thank you for your patience and any information you may provide.
John

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Newcomer question

Posted by John Dubchak <jd...@qwest.net>.
On Sunday 09 February 2003 17:57, Todd Pierce wrote:
> What I do when linking to another (static?) page within the application is
> define a simple action for it in struts-action.xml and use the <html:link>
> tag:

Todd,

Thanks for the information.  Can you provide me with an example of the 
html:link you mentioned?  I'm getting errors when trying either the forward, 
href or page and specifiying an action as the argument.  Eg:

<html:link forward="/basic-content">Basic Content</html:link>

with the folliwng information in my struts-config.xml file:

		<action path="/basic-content"
				type="com.mycompany.actions.BasicContentRequestAction">
			<forward name="success" path="/content.jsp"/>
			<forward name="failure" path="/index.jsp"/>
		</action>

Thanks,
John

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org