1 Reply Latest reply on Jul 15, 2004 2:56 PM by edisonpaul

    Can U Help Me: javax.servlet.jsp.JspException: Missing messa

    edisonpaul

      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" %>
      . . . .

      <bean:message key="index.title"/>
      <html:base/>

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

      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

        • 1. Re: Can U Help Me: javax.servlet.jsp.JspException: Missing m
          edisonpaul

          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 and stored in the jboss deployment directory. It is working fine. I dont know exactly why this happened though.

          Thanks