new to struts!!please help

hi,

i am new to struts and working on tomcat 5

in my application after registration i goto register_complete.jsp

in this page i am giving a link which displays a table from database in another jsp file

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

- - - -- -- -

<html:link forward="/DisplayTable.do">Click here</html:link>

the register_complete.jsp works fine without the above link but when the link is included it gives me error

javax.servlet.ServletException:Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve ActionForward named /DisplayTable.doorg.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.success_jsp._jspService(success_jsp.java:83)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

but this page works fine when i run the page seperately like

http://localhost/regist/DisplayTable.do

my struts-config.xml

<action path="/DisplayTable"

type="app.ShowTableAction">

<forward name="success"

path="/ShowTable.jsp"/>

</action>

please help me am i missing something !!

divya

[1353 byte] By [divyama] at [2007-10-3 2:30:26]
# 1

Are you trying to display the page or a link to the page?

I think you are confused by the use of the attribute forward. In the context of struts, we are talking about an ActionForward defined in struts-config. Not the same as a <jsp:forward>

<html:link forward="success">Click Here</a> would put in the url related to the "success" option in the struts config.

If you want a clickable url link, then the following should work:

<html:link action="/DisplayTable">Click here</html:link>

This then looks for an action in your struts-config that matches the value "/DisplayTable".

Cheers,

evnafets

evnafetsa at 2007-7-14 19:29:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...