• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

jspException: Missing message for key "index.title"

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your help

Error when runing an application (JBoss/Ant/Struts/Windows2000/NO EJB)
************************************************************
After deployed the application using Ant.. Then I started the application
with http://localhost:8080/strutstest/index.jsp

The browser gives Error
---------------------------
HTTP Status 500-
type:exception report
javax.servlet.ServletException: Missing message for key "index.title"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
. . . . . .
root cause:
javax.servlet.jsp.JspException: Missing message for key "index.title"
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:297)
org.apache.jsp.index_jsp._jspx_meth_bean_message_0(index_jsp.java:173)
org.apache.jsp.index_jsp._jspx_meth_html_html_0(index_jsp.java:110)
org.apache.jsp.index_jsp._jspService(index_jsp.java:79)
. . . . .

JBoss Server Log Error (at the Command Line)
------------------------------------------------------
........
13:46:33,218 INFO [PropertyMessageResources] Initializing,
config='org.apache.struts.util.LocalStrings', returnNull=true
13:46:33,218 INFO [PropertyMessageResources] Initializing,
config='org.apache.struts.action.ActionResources', returnNull=true
13:46:33,406 INFO [PropertyMessageResources] Initializing,
config='org.apache.struts.webapp.example.AlternateApplicationResources',
returnNull=true
13:46:33,703 INFO [PropertyMessageResources] Initializing,
config='org.apache.struts.webapp.example.ApplicationResources',
returnNull=true

.........
13:47:42,625 ERROR [Engine] StandardWrapperValve[jsp]:
Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Missing message for key
"index.title" at
org.apache.struts.taglib.bean.MessageTag.doStartTag
(MessageTag.java:297)
at org.apache.jsp.index_jsp._jspx_meth_bean_message_0
(index_jsp.java:173)
.........

***********************************************************

I am seeing in some forumns about this error, they talk around the location of the struts.jar file. But I checked with their solutions. I am
ok with that. Still I am getting this error.

Details about my set up and files.
--------------------------------------
C:\jboss-3.2.4\projects\strutstest\build\jar
directory has the web-examples classes and the application resource
property files; the ApplicationResources.properties file contains
the following line also:
index.title=MailReader Demonstration Application (Struts 1.1-dev)

my C:\jboss-3.2.4\projects\strutstest\build\waWEB-INF\lib
directory has struts.jar also along with some other

parts of my index.jsp
-------------------------
. . . .
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
. . . .


<html:base/>

. . . .
parts of my struts-bean.tld
-------------------------------

<tag>message
org.apache.struts.taglib.bean.MessageTag
empty

arg0
false
. . . . . . . . .
parts of my struts-config.xml
-----------------------------------
. . . . .
<message-resources
parameter="org.apache.struts.webapp.example.ApplicationResources"/>
<message-resources
parameter="org.apache.struts.webapp.example.AlternateApplicationResources"
key="alternate">
</message-resources>
. . . . .

Any one, if you know a little about this even, give me some clues

thank you very much
Edison
 
Gnanasekaran Sakthivel
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I found the reason... Through ant deploy, somehow, I had the ApplicationResources.properties file only in the main diretory but not in the WEB-INF/classes directroy. Now I just tried copying the message resources property files into this WEB-INF/classes directory and packed it back to strutstest.ear. It is working fine. I dont know exactly why this happened though.
But actually the correct way is to update my build.xml file, which has the directions to Ant in/for building WAR and JAR stuffs. I will correct the building of WAR area to contain the *.properties file also.

Thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic