Author
Getting problem in struts
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
hiii i am new to the struts
i got the error while running the application
success.jsp(Where i got the error)
CustomTagMappingFile.tld
ERROR IS
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
Problem Solved..........
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Jun 28, 2010 04:30:59
0
It's good to follow up with what solved your problem so others with similar issues can gain from your experience.
Also, it's conventional to name packages with all lower-case letters; following Java programming conventions makes your code easier to understand.
Glad you worked it out!
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
Thanks for the suggestion DAVID
i will take of that in future
now i get into another problem
when i run my application means homepage and leave the field blank then i redirect to the home page with proper error massage
i am redirected to the home page but no message is displayed
here is my homepage
and this my new ActionForm Class
MY Property File
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
hiiii
please suggest me any solution
even when i use the
it gives me null pointer exception
i think problem is in the resource bundle
please please look into it
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Jun 29, 2010 04:21:33
0
Well, you don't have that key in your resources file, unless you only posted part of it, which wouldn't be very helpful. I wouldn't think that would cause an NPE, though, but you also don't post the stack trace.
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
here is the stack trace
and here is my property file
mahesh shinde
Ranch Hand
Joined: Jul 24, 2009
Posts: 69
have you registered resource bundle in strutsconfig.xml?
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
yes i done it
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
please look into it
i stuck into this since morning
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
posted Jun 29, 2010 06:22:25
0
Please show the deployed directory/file tree. (Do not post an image.)
mahesh shinde
Ranch Hand
Joined: Jul 24, 2009
Posts: 69
resource bundle is in WEB-INF folder or any other folder
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
i have created a folder resource in which i am keeping the file
and give the path of folder in the classpath
Prakash Mani - Attur
Ranch Hand
Joined: Oct 08, 2009
Posts: 100
you keep the same folder under classes directory...
Gourav Bansal
Greenhorn
Joined: Jun 27, 2010
Posts: 18
problem solved
i create a new pakage and keep that resource bundle file in that
thanks to all
Bhupeshy Yadav
Greenhorn
Joined: Oct 08, 2012
Posts: 5
getting below exception........
org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:346)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
root cause
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(index_jsp.java:149)
org.apache.jsp.index_jsp._jspx_meth_html_html_0(index_jsp.java:114)
org.apache.jsp.index_jsp._jspService(index_jsp.java:77)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
subject: Getting problem in struts