You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Tim T. Young" <Yo...@cat.com> on 2002/08/21 23:41:35 UTC

Anchors

I need to create a page that will have links on the LH navigation bar to
anchors in the current page.

I would like to know if this first scenario is possible.  I have browsed
some anchor info in the archives but did not see anything that addressed
this exactly.

1. Step One     (   /page.do#step1  <-- is this possible?  )
2. Step Two     (  /page.do#step2  )
3. Step Three  (  /page.do#step3  )

 <action path="/page"
           forward="page"
           scope="request"
           redirect="true"
           validate="false">
   </action>

<definition name="page" extends="pageBase">
     <put name="content"  value="/thisPage.jsp"/>
</definition>

If page.do is just a forward and has redirect=true will this work?  This
seems to keep the knowledge of the anchors in the page itself and creates
less definition entries.

Or

My second option is to have a definition name for each anchor so I would
have:

1. Step One     (   /step1.do )
2. Step Two     (  /step2.do  )
3. Step Three  (  /step3.do  )

 <action path="/step1"
           forward="step1"
           scope="request"
           redirect="true"
           validate="false">
   </action>

<definition name="step1" extends="pageBase">
     <put name="content"  value="/thisPage.jsp#step1"/>
</definition>

This would work, but now the anchors are in the xml for Tiles, which I
would rather not have.  Are there other options?

Thanks,
Tim






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>