You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Pablo Gomes Ludermir <pa...@inflor.com.br> on 2003/05/13 15:34:27 UTC

struts in tomcat

Hello People,

I am trying to learn struts, but I am having some problems with tomcat 4.1.24 (win2k; JDK 1.4).
I had created the simplest application as possible, but I still get a HTTP 500 error (org.apache.jasper.JasperException: Missing message for key index.title).

The ApplicationResources.properties file and ApplicationResources_pt-br.properties (portuguese Brazil, the language wich is configured my OS) are on WEB-INF/classes directory.
The struts.jar file is also on WEB-INF/lib directory and in my CLASSPATH.
The web.xml and struts-config.xml are with default settings (I had copied from JDeveloper).

This is my jsp page:
----------------------------------------
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ page contentType="text/html;charset=windows-1252" %>
<%@ page language="java" %>

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

</title>
</head>
<body>
    <h2> teste </h2>
</body>
</html:html>
----------------------------------------
This is my ApplicationResources.properties file (all have the same contents):

index.title=JDeveloper Struts Application
index.heading=JDeveloper Struts Application
index.message=See how easy it is to use struts with JDeveloper 9i.


Pablo Gomes Ludermir
mailto:pablo@inflor.com.br
INFLOR  Consultoria e Sistemas Ltda.
Rua Dr. Eurico de Aguiar, 888 - Sala 1004
Santa Lúcia - Vitória - ES
Cep: 29055-280
Tel: (27) 3225-7115



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: struts in tomcat

Posted by Tim Funk <fu...@joedog.org>.
I think struts-user will be much more helpful since this a struts related 
problem.

-Tim

Pablo Gomes Ludermir wrote:
> Hello People,
> 
> I am trying to learn struts, <snip />


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: struts in tomcat

Posted by Michael Gerdau <mg...@technosis.de>.
>I had created the simplest application as possible, but I still get
>a HTTP 500 error (org.apache.jasper.JasperException: Missing message
>for key index.title).
>
>The ApplicationResources.properties file and
>ApplicationResources_pt-br.properties (portuguese Brazil, the language
>wich is configured my OS) are on WEB-INF/classes directory.
>The struts.jar file is also on WEB-INF/lib directory and in my CLASSPATH.
>The web.xml and struts-config.xml are with default settings (I had copied
>from JDeveloper).

Your web.xml certainly has an entry pointing to your application
resources, has it ?!?

E.g. for your ApplicationResources.properties being located
at in the WEB-INF/classes/foo/bar/fum directory you'd have

  <!-- Action Servlet Configuration -->
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    ...
    <init-param>
      <param-name>application</param-name>
      <param-value>foo.bar.fum.ApplicationResources</param-value>
    </init-param>
    ...
  </servlet>

Replace "..." by whatever additional settings you might require.

Best,
Michael
--
 Vote against SPAM - see http://www.politik-digital.de/spam/
 Michael Gerdau       email: mgd@technosis.de
 ATM and Windows: Great Fonts on the Free!
 GPG/PGP-keys available on request or at public keyserver



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org