Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help on taglib and properties file in struts?

 
Mona Tajik
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone! I'm new to struts and i just can't figure out why tomcat's giving me an error. I've manage to run a simple example but when i use the bean:message tag i get this error

ERROR IS:

java.lang.NullPointerException
org.apache.struts.taglib.TagUtils.retrieveMessageResources(TagUtils.java:1175)
org.apache.struts.taglib.TagUtils.message(TagUtils.java:1038)
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:224)
org.apache.jsp.index_jsp._jspx_meth_bean_message_0(org.apache.jsp.index_jsp:135)
org.apache.jsp.index_jsp._jspx_meth_html_html_0(org.apache.jsp.index_jsp:101)
org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:69)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Can anyone help me with this problem?
my ApplicationResources.propeties file is in WEB-INF/classes

index.jsp




web.xml


ApplicationResources.properties


struts-config.xml

PLEASE HELP...THANKS
 
Shailesh Pillai
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mona,
Let me tell you that you have not mentioned any - form-beans or action-mapping in your struts-config.xml.

I suggest you better go through a good struts book and try out a simple example mentioned in it.

Try out the simple example in the ebook by Shreekanth Shenoy.
http://www.objectsource.com

Regards,
Shailesh
[ April 27, 2006: Message edited by: Shailesh Pillai ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This message indicates that Struts can't find your ApplicationResources.properties file. Given the entry in your struts-config.xml file, it should be in the WEB-INF/classes directory.
 
jaffar muzaffar
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mona,
it seems ur error is due to lack of mappings.U have to include mappings in ur struts-config.tld file.It would be easier to go through "Mastering Jakarta struts 1.0" by james goodwill.It gives a good idea of the execution steps.Plus U have to take care of cases in names and also the web.xml file.
So Have a look at the book.
Any more help required...
let me know
cheers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic