Hi,
I would approach it a little differently.
Just create an Action that knows whether or not to go to the Search page or
the Page after that.

The struts-config would say:
<action path="/search"
                type="NameOfActionClass"
                name="NameOfBeanThatStoresInfo"
                scope="session"
                input="/images/search.jsp">
                <forward name="search" path="/images/search.jsp"></forward>
                <forward name="followingPage"
path="followingPage.jsp"></forward>
</action>

Then in the action class that handles this path, the "execute" method would
test the bean associated with the search page, and return either
"mapping.findForward('search')" or "mapping.findForward('followingPage')",
depending on the business logic you use to process the info.
Then in your page, you can just have a line that reads "<html:link
page="/search.do">SEARCH</html:link>".
(I use *.do for my mapping for the org.apache.struts.action.ActionServlet
class).
I think all that will allow you to do what you need to.

Keith Kamholz
Moog 
East Aurora, NY
(716) 687-7282
[EMAIL PROTECTED]


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 18, 2002 2:47 PM
To: [EMAIL PROTECTED]
Subject: Using html:link


From: Ryan D. Cuprak

Hello,
  I am trying to embedd a link in a jsp page that links to another jsp page
using the html:link. Presently I get the exception:
javax.servlet.ServletException: Cannot create rewrite URL:
java.net.MalformedURLException: Cannot retrive ActionForward named /search
 when I attempt to view the page displaying the link.

In the page I have:
<html:link forward="search" title="perform search">Perform a
Search</html:link>

And the struts-config.xml has:

<action
            path="/search"
            scope="request"
            forward="/images/search.jsp"/>

The web.xml contains a mapping (don't know if this matters):
<servlet-mapping>
        <servlet-name>auth</servlet-name>
        <url-pattern>/authentication/*</url-pattern>
    </servlet-mapping>

auth is the ActionServlet.

What am I doing wrong?

Thanks,
Ryan Cuprak



--
To unsubscribe, e-mail:
<mailto:[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]>

Reply via email to