html:link action html:link on results page null

I am sure that this is something simple and small but I have been banging my head against this problem for a while now.

I am using the <html:link> tag on my index.jsp page activates an action, retrieves a result and forwards to the homePage.jsp. The home page has a tiles layout and the results are actually in homePage_lowerLeftLevel.jsp within the homePage.jsp. Below the results I have an <html:link> tag which is identical to the tag in the index.jsp but now instead of seeing the link there is [ServletException in:/pages/homePage_leftLowerLevel.jsp] null' and if I go back to the index.jsp I get the following error?br>

java.lang.NullPointerException

at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:313)

at _index._jspService(index.jsp:29)

[SRC:/index.jsp]

at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)

at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:356)

at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:498)

at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:402)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)

at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:673)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)

at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.2.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)

at java.lang.Thread.run(Thread.java:534)

If this <html:link> tag is not on the results page the results display perfectly. Here is my code:

********index.jsp**************

<%@ page language="java" %>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<h2 class="lowerColumnHeader">Statistics</h2>

<table class="statisticsTable">

<tr>

<td>

ICF Published Parcels:

</td>

<td class="results">

<bean:write name="homePageForm" property="result" />

</td>

</tr>

</table>

<html:link page="/homePage.do?areaId=bcId">Click Me </html:link>

*********homePage_lowerLeftLevel.jsp*************

<%@ page language="java" %>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>

<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<h2 class="lowerColumnHeader">Statistics</h2>

<table class="statisticsTable">

<tr>

<td>

ICF Published Parcels:

</td>

<td class="results">

<bean:write name="homePageForm" property="result" />

</td>

</tr>

</table>

<html:link page="/homePage.do?areaId=bcId">Click Me </html:link>

*****************struts_config.xml**********************

<?xml version="1.0" encoding="ISO-8859-1" ?>

under the License.

-->

<!DOCTYPE struts-config PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"

"http://struts.apache.org/dtds/struts-config_1_3.dtd">

<struts-config>

<form-beans>

<form-bean name="homePageForm"

type="ca.bc.gov.srm.app.pip.HomePageForm" />

</form-beans>

<global-exceptions>

<!-- sample exception handler

<exception

key="expired.password"

type="app.ExpiredPasswordException"

path="/changePassword.jsp"/>

end sample -->

</global-exceptions>

<global-forwards>

<forward

name="homepage"

path="/homePage.do"/>

</global-forwards>

<action

path="/homePage"

name="homePageForm"

type="ca.bc.gov.srm.app.pip.action.HomePageAction"

scope="request"

validate="false"

input="/pages/homePage.jsp"/>

</action-mappings>

<message-resources parameter="MessageResources" />

<plug-in className="org.apache.struts.tiles.TilesPlugin" >

<set-property property="definitions-config"

value="/WEB-INF/tiles-defs.xml" />

<set-property property="moduleAware" value="true" />

</plug-in>

<plug-in className="org.apache.struts.validator.ValidatorPlugIn">

<set-property

property="pathnames"

value="/org/apache/struts/validator/validator-rules.xml,

/WEB-INF/validation.xml"/>

</plug-in>

</struts-config>

Thank you very much for your help

[5933 byte] By [Swingnbluea] at [2007-11-27 9:48:47]
# 1
I have found that if I use a <a href=""> it will work but I am still interested in why I can not refresh or forward to another page with the same <html:link>
Swingnbluea at 2007-7-13 0:17:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

It should be used something like this!!!

<html:link action="myStrutsAction" paramId="user" paramName="userName"/>

if the userName attribute had the value "Bob" that would produce:

<a href="myStrutsAction.do?user=Bob"/>

http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-html.html#link

vinayak_ra at 2007-7-13 0:17:23 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...