aspose file tools*
The moose likes Struts and the fly likes Null Pointer when i include struts-html.tld Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Null Pointer when i include struts-html.tld" Watch "Null Pointer when i include struts-html.tld" New topic
Author

Null Pointer when i include struts-html.tld

RavindraJpatil patil
Greenhorn

Joined: Jan 16, 2008
Posts: 5
I am new to this framewok , i am trying to run simple application given in Complete reference of Struts . using struts 1.2.9

when i include struts-html.tld
and used <html-link forward="search>search this <html:link>

Struts-config.xml

<?xml version="1.0"?>

<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd">
<struts-config>

<form-beans>
<form-bean name="searchForm" type="com.hr.SearchForm"/>
</form-beans>

<global-forwards>
<forward name="search" path="/search.jsp"/>
</global-forwards>

<action-mappings>
<action path="/search"
type="com.hr.SearchAction"
name="searchForm"
scope="request"
input="/search.jsp"
validate="true">
</action>
</action-mappings>

<message-resources parameter="com.hr.MessageResources"/>

</struts-config>

Here my Web.xml:

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

<web-app>

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
<load-on-startup>1</load-on-startup>
</init-param>
</servlet>


<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
</web-app>

i am getting following error

java.lang.nullpointerexception , org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding()


is this issue specific to this version of struts
Tom Rispoli
Ranch Hand

Joined: Aug 29, 2008
Posts: 349
I'm not sure if this is just a typo that occured when you posted this or not, but I think you need another double quote after search in your forward.
RavindraJpatil patil
Greenhorn

Joined: Jan 16, 2008
Posts: 5
ya its typeo mistake
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Null Pointer when i include struts-html.tld
 
Similar Threads
Configuring First Struts Application
not able to run html:text tag of struts tld
Missing message for key
Not able to deploy my war file on Tomcat
Parsing error processing resource path /WEB-INF/struts-config.xml