Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Null Pointer when i include struts-html.tld

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
ya its typeo mistake
 
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic