• 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
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

help on taglib and properties file in struts?

 
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
 
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 ]
 
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.
 
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
 
Beware the other head of science - it bites! Nibble on this message:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!