RE: bundle param in message tag

2001-03-08 Thread Shamdasani Nimmi-ANS004

Use html:form instead of form:form

also include 
%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %

-Original Message-
From: Ratnadeep Bhattacharjee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 4:58 PM
To: [EMAIL PROTECTED]
Subject: bundle param in message tag


Hi,

I was wondering if someone could please help me with this problem:

I have created my own properties file called "Resources.properties" and it is 
located in WEB-INF/classes/com/x/y/resources.

I am tring to use it in a jsp page as follows:

%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %

some HTML here

form:form action="general.do" name="GeneralForm"
 scope="request" type="com.x.y.GeneralForm"
 
 some HTML here...
 
bean:message
bundle="com.x.y.resources.Resources"
key="role_name_rev"/

 some more HTML ...
 
/form:form

/body
/form:html

I am getting the following error:

2001-03-08 05:29:21 - Ctx( /smc ): Exception in: R( /smc + 
/usermgr/roles/general.jsp + null) - javax.servlet.ServletException: Missing 
resources attribute com.x.y.resources.Resources
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.init(Compiled Code)
at java.lang.Exception.init(Compiled Code)
at javax.servlet.ServletException.init(ServletException.java:161)

Is there any place else I need to enter information about this resource file for 
it to be found?

Thanks,
-Deep.



Re: bundle param in message tag

2001-03-08 Thread Maya Muchnik


In struts-example you can find web.xml file (under WEB-INF) directory.
A part of this file:
...
 !-- 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>org.apache.struts.example.ApplicationResources/param-value>
 /init-param>
...
You need to replace ApplicationResources with your file.
Maya
Ratnadeep Bhattacharjee wrote:
Hi,
I was wondering if someone could please help me with this problem:
I have created my own properties file called "Resources.properties"
and it is
located in WEB-INF/classes/com/x/y/resources.
I am tring to use it in a jsp page as follows:
%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
some HTML here
form:form action="general.do" name="GeneralForm"
scope="request" type="com.x.y.GeneralForm">
some HTML here...
 bean:message
 bundle="com.x.y.resources.Resources"
 key="role_name_rev"/>
some more HTML ...
/form:form>
/body>
/form:html>
I am getting the following error:
2001-03-08 05:29:21 - Ctx( /smc ): Exception in: R( /smc +
/usermgr/roles/general.jsp + null) - javax.servlet.ServletException:
Missing
resources attribute com.x.y.resources.Resources
 at java.lang.Throwable.fillInStackTrace(Native
Method)
 at java.lang.Throwable.fillInStackTrace(Compiled
Code)
 at java.lang.Throwable.init>(Compiled
Code)
 at java.lang.Exception.init>(Compiled
Code)
 at javax.servlet.ServletException.init>(ServletException.java:161)
Is there any place else I need to enter information about this resource
file for
it to be found?
Thanks,
-Deep.



Re: bundle param in message tag

2001-03-08 Thread Ratnadeep Bhattacharjee

 
 In struts-example you can find web.xml file (under WEB-INF) directory. A part 
of
 this file:
 ...
   !-- Action Servlet Configuration --
   servlet
 servlet-nameaction/servlet-name
 servlet-classorg.apache.struts.action.ActionServlet/servlet-class
 init-param
   param-nameapplication/param-name
   
param-valueorg.apache.struts.example.ApplicationResources/param-value
 /init-param
 ...
 You need to replace ApplicationResources with your file.
 
 Maya

Thanks for your response. I would still have a problem.
How do I handle the case of more than one ApplicationResource file. In the 
application I am working on I plan on having a resource file for each package.

-Ratnadeep.


 
 Ratnadeep Bhattacharjee wrote:
 
  Hi,
 
  I was wondering if someone could please help me with this problem:
 
  I have created my own properties file called "Resources.properties" and it 
is
  located in WEB-INF/classes/com/x/y/resources.
 
  I am tring to use it in a jsp page as follows:
 
  %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %
 
  some HTML here
 
  form:form action="general.do" name="GeneralForm"
   scope="request" type="com.x.y.GeneralForm"
 
   some HTML here...
 
  bean:message
  bundle="com.x.y.resources.Resources"
  key="role_name_rev"/
 
   some more HTML ...
 
  /form:form
 
  /body
  /form:html
 
  I am getting the following error:
 
  2001-03-08 05:29:21 - Ctx( /smc ): Exception in: R( /smc +
  /usermgr/roles/general.jsp + null) - javax.servlet.ServletException: Missing
  resources attribute com.x.y.resources.Resources
  at java.lang.Throwable.fillInStackTrace(Native Method)
  at java.lang.Throwable.fillInStackTrace(Compiled Code)
  at java.lang.Throwable.init(Compiled Code)
  at java.lang.Exception.init(Compiled Code)
  at javax.servlet.ServletException.init(ServletException.java:161)
 
  Is there any place else I need to enter information about this resource file 
for
  it to be found?
 
  Thanks,
  -Deep.

  __
 /_/\
/ \\ \Ratnadeep Bhattacharjee
   /_\ \\ /   Sun Microsystems, Solaris Management
  /_/ \/ / /  2 Network Drive, MS UBUR02-205,
 /_/ /   \//\ Burlington, MA 01803
 \_\//\   / / Phone: (781) 442-8662 or internal x28662
  \_/ / /\ /  Fax: (781) 442-1651
   \_/ \\ \   Email: [EMAIL PROTECTED]
\_\ \\
 \_\/