• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Null Pointer when i include struts-html.tld

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ya its typeo mistake
 
What could go wrong in a swell place like "The Evil Eye"? Or with this tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic