File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Getting problem in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Getting problem in struts" Watch "Getting problem in struts" New topic
Author

Getting problem in struts

Gourav Bansal
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
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
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
Problem Solved..........




David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
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
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
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

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
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
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
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
yes i done it

Gourav Bansal
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
please look into it

i stuck into this since morning


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

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
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
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
Ranch Hand

Joined: Jun 27, 2010
Posts: 41
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)

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting problem in struts