ApplicationResources.properties

2001-12-04 Thread Debasish Ghosh

Hi -

How can I check if the correct
ApplicationResources.properties has been loaded or not
?
I tried using the following :-

logic:notPresent
name=org.apache.struts.action.MESSAGE
scope=application
  font color=red
ERROR:  Application resources not loaded -- check
servlet container
logs for error messages.
  /font
/logic:notPresent

By doing this, I do not get the above error even if I
remove ApplicationResources.properties from the
hierarchy. The exception is thrown when it tries to do
the first getMessage().

Thanks.

- Debasish

__
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




ApplicationResources.properties

2001-12-04 Thread Debasish Ghosh

Hi -

How can I check if the correct ApplicationResources.properties has been
loaded or not ?
I tried using the following :-

logic:notPresent name=org.apache.struts.action.MESSAGE
scope=application
  font color=red
ERROR:  Application resources not loaded -- check servlet container
logs for error messages.
  /font
/logic:notPresent

By doing this, I do not get the above error even if I remove
ApplicationResources.properties from the hierarchy. The exception is thrown
when it tries to do the first getMessage().

Thanks.

- Debasish


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Removing session scoped ActionForm beans

2001-10-01 Thread Debasish Ghosh

Hi -

In our application, we have quite a few multi-page
forms, where the ActionForm had to be created at the
session scope. A typical example is an entry screen,
where the user enters a record (spanning multiple
pages) and presses submit. The record gets inserted
into the database and the form is cleared for the next
entry. Typically a user will enter many records in one
go once he is in the entry mode.

In this case, does it make sense to remove these
action forms from the session after each submit ? 

If I am not very mistaken, then Struts creates an
ActionForm only when one does not exist in the
specified scope with the same name. Hence I feel that
we can gain here by not removing the action form from
the session every time he does a submit, since in
that case Struts will re-create the form when it is
loaded again.

Then how do we do the necessary cleanup of the
session-scoped ActionForm ? One option may be to do
the cleanup when the user goes to some other menu item
from the entry mode. I would like to know of any
existing best practices in this case. Please help !!

Best Regards.

- Debasish

__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com



RE: Application scope objects

2001-09-25 Thread Debasish Ghosh

I am using Tomcat 3.2.2, but planning to migrate to
4.0. Then we will be implementing your suggestion.
Thanks for that.
Currently, we can use Kimerly's suggestion. But what
are the advantages of this option vrs. making the
attributes static members of a class derived from the
ActionServlet ? In this case we can have accessor
methods to get the attributes. 

Thanks for the help.

- Debasish

--- Craig R. McClanahan [EMAIL PROTECTED] wrote:
 The technique that Kimerly describes works well in
 many environments.  In
 a Servlet2.3 environment (such as Tomcat 4), you
 also have the option to
 use an application event listener that is notified
 when the application is
 started, and when it is being shut down.  For more
 information, see the
 Servlet 2.3 specification at:
 
   http://java.sun.com/products/servlet/download.html
 
 Craig McClanahan
 
 
 On Thu, 13 Sep 2001, MacKellar, Kimberly wrote:
 
  Date: Thu, 13 Sep 2001 16:38:12 -0500
  From: MacKellar, Kimberly
 [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
  Subject: RE: Application scope objects
 
  I created a servlet that is loaded at server
 initialization by including the
  following in web.xml
 
servlet
  servlet-nameInitialization/servlet-name
 

servlet-classcom.tfp.fraudban.InitializationServlet/servlet-class
  load-on-startup1/load-on-startup
/servlet
 
  and in the init method of InitializationServlet I
 make a call like
 
  getServletContext().setAttribute(returnTypes,
 list);
 
  which saves an ArrayList list into the attribute
 returnTypes in the
  servlet's context.  list is being populated by
 some calls to the database.
 
  Kim
  -Original Message-
  From: Debasish Ghosh
 [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 13, 2001 4:24 PM
  To: [EMAIL PROTECTED]
  Subject: Application scope objects
 
 
  Hi All -
 
  In my application, I would like to cache some of
 the
  objects at the application scope in order to
 reduce
  database access. What is the most recommended way
 of
  achieving this in Struts ? Should I make them
 members
  of OurActionServlet, which is derived from
  ActionServlet ?
 
  Please suggest.
 
  Regards.
 
  - Debasish
 
  __
  Terrorist Attacks on U.S. - How can you help?
  Donate cash, emergency relief information
 

http://dailynews.yahoo.com/fc/US/Emergency_Information/
 
 


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com



Uisng multiple ApplicationResources in a team

2001-09-23 Thread Debasish Ghosh

Hi -

I have got a reference where it is mentioned that a
patch is available for team development using multiple
struts-config.xml and ApplicationResources.properties
files. I first found it in Struts catalog in Ted
Husted's site. He refers to the link
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10052.html,
where Dan has discussed about this offering. 

Is this patch available somewhere, so that I can use
it in our project. I could not get any link where this
patch is made available.

Thanks for the help.

- Debasish

__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com



Application scope objects

2001-09-13 Thread Debasish Ghosh

Hi All -

In my application, I would like to cache some of the
objects at the application scope in order to reduce
database access. What is the most recommended way of
achieving this in Struts ? Should I make them members
of OurActionServlet, which is derived from
ActionServlet ?

Please suggest.

Regards.

- Debasish

__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



Re: Dynamic Forwarding ...

2001-09-03 Thread Debasish Ghosh

Thanks, Ted, for the reply. 
Actually, I am not forwarding from Action to Action.
The mapping of the forward dummy resolves to a JSP
named dummy.jsp and not an action (*.do). 

From an action, on submit, I would like to tansfer
control to a JSP to accept more inputs. Along with
this control transfer, I would like to pass a
parameter to indicate some logic.

I finally did this using a request.getParameter(
formName ) in the JSP as a scriplet, and declaring a
hidden property in the JSP :
html:hidden property=formName value=%= formName
% /

Now I can access this property from the action class
of the form dummyForm. Please suggest, if there is a
better method of doing this (without the scriplet).

Regarding the link that u have mentioned, I had
already gone thru it. I do not understand one point.
If I have a form formA, having a property formName,
then when I forward to another form, formB, how will
the property be retained as part of formB ? 

Regards.

- Debasish


--- Ted Husted [EMAIL PROTECTED] wrote:
 What's in the JSP wouldn't matter, since you are
 going from one Action
 to another. 
 
 If formName is a property in the ActionForm, then it
 shuld be populated. 
 
 I would try using request.getParameter(formName)
 and see if that's
 null too. 
 
 I'd also try hardcoding the value for action to be
 sure that is not
 null. 
 
 If you haven't already, see also 
 

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14280.html
 
 
 Debasish Ghosh wrote:
  
  Hi All -
  
  I have trying to implement dynamic forwarding in
 my
  application.
  In the Action class where I am preparing the
 forward
  URL, I am doing the following :
  
  ActionForward fwd = mapping.findForward(dummy);
  StringBuffer path = new StringBuffer(
 fwd.getPath() );
  path.append( ?formName= ).append( action );
  return new ActionForward( path.toString(),
fwd.getRedirect() );
  
  With this, I am getting the correct parameter to
  ActionForward, and the control is also forwarded
 to
  the appropriate JSP. But I am not able to access
 the
  passed-in parameter. I have a property named
  formName in the called form. But from the action
 of
  the called form, when I access the property
  getFormName(), I get NULL.
  
  In order to achieve this, do I have to declare
  anything in the JSP ?
  
  Please help !!
  
  Regards.
  
  - Debasish
  
  __
  Do You Yahoo!?
  Get email alerts  NEW webcam video instant
 messaging with Yahoo! Messenger
  http://im.yahoo.com


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



Dynamic Forwarding ...

2001-09-02 Thread Debasish Ghosh

Hi All -

I have trying to implement dynamic forwarding in my
application.
In the Action class where I am preparing the forward
URL, I am doing the following :

ActionForward fwd = mapping.findForward(dummy);
StringBuffer path = new StringBuffer( fwd.getPath() );
path.append( ?formName= ).append( action );
return new ActionForward( path.toString(), 
  fwd.getRedirect() );

With this, I am getting the correct parameter to
ActionForward, and the control is also forwarded to
the appropriate JSP. But I am not able to access the
passed-in parameter. I have a property named
formName in the called form. But from the action of
the called form, when I access the property
getFormName(), I get NULL.

In order to achieve this, do I have to declare
anything in the JSP ?

Please help !!

Regards.

- Debasish


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



Problem with html:img.. Please Help !!

2001-08-30 Thread Debasish Ghosh

Hi all -

This is my second attempt at the problem. I could not
fix it. Please help !!

I am using Tomcat 3.2.2. When I use an html tag as
html:img srcKey=image.logotop/ (I am using
Struts), the first time the page comes, the tag gets a
sessionId. The cookies are enabled in my browser. For
all subsequent requests, the session id never comes. I
guess this is the expected behavior of encodeURL()
(for URL rewriting), which is used by the html:img
tag. In fact the tag is rendered as: img
src=images/logotop.gif;jsessionid=7flhvbc4f1.

The problem is that the image is not rendered on the
page. For all subsequent requests (when I hit the
Refresh button), the session id stops coming (since
cookies are enabled) and the images are rendered
properly.

In fact if I disable cookies, then the image never
gets rendered. I know this may not be a problem of
Struts directly, but I really cannot find any pointer
to the solution ... Please help !!

Regards.

- Debasish


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



RE: sessionId and html:img

2001-08-29 Thread Debasish Ghosh

It doesn't work. Actually I face the same problem for
Struts example application as well. There the image
Powered By Struts does not come the first time, but
comes if I hit a Refresh.

Maybe, it has got something to do with the container
(Tomcat 3.2.2). But I need some help URGENTLY !!

Cheers.


--- Jay Patel [EMAIL PROTECTED] wrote:
 You may want to try using pageKey instead of srcKey.
 It should not make a
 difference but something to check on!
 
 
 Jay Patel
 972-701-9773
 972-849-0373 Mobile
 [EMAIL PROTECTED]
  
 
 
 -Original Message-
 From: Debasish Ghosh [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, August 28, 2001 10:25 PM
 To: [EMAIL PROTECTED]
 Subject: sessionId and html:img
 
 
 Hi -
 
 I am using Struts 1.0 and Tomcat 3.2.2. I am using
 the internationalization
 feature of Struts to render an image as follows :
 
 html:img srcKey=image.logotop/
 
 The first time the page appears, the image is not
 rendered on screen and if I do a Refresh, then the
 image somes properly. 
 
 If I do a view source the first time, the tag gets
 translated with a session id attached. The session
 id
 does not come in subsequent requests. 
 
 I realize that this is due to URL rewriting, but can
 anyone help me out on the problem of image rendering
 the first time the screen is displayed ? However,
 the
 problem does not arise if I turn off the
 internationalization feature and include the gif
 file
 directly with the img tag.
 
 Please Help !!!
 
 Regards.
 
 - Debasish
 
 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute
 with Yahoo! Messenger
 http://phonecard.yahoo.com/


__
Do You Yahoo!?
Get email alerts  NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com



sessionId and html:img

2001-08-28 Thread Debasish Ghosh

Hi -

I am using Struts 1.0 and Tomcat 3.2.2. I am using the
internationalization feature of Struts to render an
image as follows :

html:img srcKey=image.logotop/

The first time the page appears, the image is not
rendered on screen and if I do a Refresh, then the
image somes properly. 

If I do a view source the first time, the tag gets
translated with a session id attached. The session id
does not come in subsequent requests. 

I realize that this is due to URL rewriting, but can
anyone help me out on the problem of image rendering
the first time the screen is displayed ? However, the
problem does not arise if I turn off the
internationalization feature and include the gif file
directly with the img tag.

Please Help !!!

Regards.

- Debasish

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Internationalizating rollover buttons

2001-08-23 Thread Debasish Ghosh

Hi All -

We are trying to implement rollover buttons in our
applications. We would like to internationalize them
as well. We are using the Struts html tag html:image
with the following :

html:image property=submit srcKey=image.submit1
onmouseover=src='images/submit1.gif'
onmouseout=src='images/submit2.gif' /

How can I replace the src s within onmouseover and
onmouseout by using srcKey ? Otherwise the
application is not internationalized.

Please help.

TIA

- Debasish


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



logic:iterate

2001-08-18 Thread Debasish Ghosh

Hi All -

I am using the logic:iterate tag. I have used the
attribute indexId, when I am getting the error
Attribute indexId invalid according to the specified
TLD. 

I am using Struts 1.0 with Tomcat 3.2.2.

Please help !!

Regards.

- Debasish

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



RE: logic:iterate

2001-08-18 Thread Debasish Ghosh

Here it is ..

jsp:useBean id=idx scope=page
class=com.anshin.MonthForm/
bean:define id=idx_int name=idx
property=index/

html:form action=/month 
table

tr

logic:iterate id=element name=monthNames
indexId=idx_int
td align=right
bean:write name=element/
liembean:write
name=element//emnbsp;[bean:write
name=idx_int/]/li
html:multibox property=monthList
Jan
/html:multibox
/td
/logic:iterate 

/tr

--- Wouter de Vaal [EMAIL PROTECTED]
wrote:
 Could you post the jsp code for this part?
 
 Wouter
 
  -Oorspronkelijk bericht-
  Van: Debasish Ghosh [mailto:[EMAIL PROTECTED]]
  Verzonden: Saturday, August 18, 2001 10:22 AM
  Aan: [EMAIL PROTECTED]
  Onderwerp: logic:iterate
  
  
  Hi All -
  
  I am using the logic:iterate tag. I have used the
  attribute indexId, when I am getting the error
  Attribute indexId invalid according to the
 specified
  TLD. 
  
  I am using Struts 1.0 with Tomcat 3.2.2.
  
  Please help !!
  
  Regards.
  
  - Debasish
  
  __
  Do You Yahoo!?
  Make international calls for as low as $.04/minute
 with 
  Yahoo! Messenger
  http://phonecard.yahoo.com/
  


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



RE: logic:iterate

2001-08-18 Thread Debasish Ghosh

Hi -

It has been solved. Actually the TLD was not of proper
version.

- Debasish
--- Debasish Ghosh [EMAIL PROTECTED] wrote:
 Here it is ..
 
 jsp:useBean id=idx scope=page
 class=com.anshin.MonthForm/
 bean:define id=idx_int name=idx
 property=index/
 
 html:form action=/month 
 table
 
 tr
 
 logic:iterate id=element name=monthNames
 indexId=idx_int
 td align=right
 bean:write name=element/
 liembean:write
 name=element//emnbsp;[bean:write
 name=idx_int/]/li
 html:multibox property=monthList
 Jan
 /html:multibox
 /td
 /logic:iterate 
 
 /tr
 
 --- Wouter de Vaal [EMAIL PROTECTED]
 wrote:
  Could you post the jsp code for this part?
  
  Wouter
  
   -Oorspronkelijk bericht-
   Van: Debasish Ghosh
 [mailto:[EMAIL PROTECTED]]
   Verzonden: Saturday, August 18, 2001 10:22 AM
   Aan: [EMAIL PROTECTED]
   Onderwerp: logic:iterate
   
   
   Hi All -
   
   I am using the logic:iterate tag. I have used
 the
   attribute indexId, when I am getting the error
   Attribute indexId invalid according to the
  specified
   TLD. 
   
   I am using Struts 1.0 with Tomcat 3.2.2.
   
   Please help !!
   
   Regards.
   
   - Debasish
   
  
 __
   Do You Yahoo!?
   Make international calls for as low as
 $.04/minute
  with 
   Yahoo! Messenger
   http://phonecard.yahoo.com/
   
 
 
 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute
 with Yahoo! Messenger
 http://phonecard.yahoo.com/


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



RE: newbie question

2001-08-09 Thread Debasish Ghosh

Hi -

I tried these and still no luck ... I am enclosing the
code for the Form.

package com.anshin;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

public class LoginForm extends ActionForm
{
private String password = null;
private String username = null;

public String getPassword()
{
System.out.println( In getPassword );
return (this.password);
}

public void setPassword(String password)
{
this.password = password;
}

public String getUsername()
{
System.out.println( In getUsername );
return (this.username);
}

public void setUsername(String username)
{
System.out.println( In setUsername );
this.username = username;
}

public void reset(ActionMapping mapping,
HttpServletRequest request)
{
System.out.println( In reset );
this.password = null;
this.username = null;
}

public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) 
{
System.out.println( In validate );
ActionErrors errors = new ActionErrors();

if ((username == null) || (username.length() 
1))
{
errors.add(username, new
ActionError(error.username.required));
}
if ((password == null) || (password.length() 
1))
{
errors.add(password, new
ActionError(error.password.required));
}
return errors;
}

}

I am only getting the debug prints for In
getUsername() and In getPassword(). Then the 404
error comes up. I have a print in the first line of
the action class, which is NOT getting printed.

Cheers.
- Debasish
--- Rick Hightower [EMAIL PROTECTED] wrote:
 On your form make sure you have
 
 html:form action=/login focus=name
 ...
 
 Then define the following forward in your
 struts-config
 
 forward name =login path=/login.do /
 ...
 
 If this does not work, try including your form code
 so people can help you
 better.
 
 Rick Hightower
 Director of Development
 eBlox, Inc.
 
 Check out our new website!
 www.eblox.com
 
 Contact Info:
 eBlox Tucson
 phone: 520-615-9345 x103
 fax: 520-529-5774
 
 Rick's stuff:
 http://www.eblox.com/people_detail.php?id=52
 http://www.geocities.com/rick_m_hightower/
 http://www.brainbench.com/transcript.jsp?pid=2351036
 
 
 -Original Message-
 From: Debasish Ghosh [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 08, 2001 7:08 PM
 To: [EMAIL PROTECTED]
 Subject: newbie question
 
 
 Hi all -
 
 I am facing a weird problem, which I could not solve
 in the last couple of hours. I checked up the
 mail-archive but could not locate any solution to
 this.
 
 The application has a login screen (login.jsp),
 which
 validates a user. There is an ActionForm (LoginForm)
 with appropriate get and set methods.
 
 The struts-config.xml looks like :
 
   form-beans
 
 !-- Logon form bean --
 form-bean  name=loginForm
 type=com.anshin.LoginForm/
 
   /form-beans
 
 !-- Process a user logon --
 actionpath=/login
type=com.anshin.LoginAction
name=loginForm
validate=true
input=login.jsp
 
  forward name=success
 path=/login.jsp/
  /action
 
 When I execute the application (invoke login.jsp), I
 get a 404 error on the page login.do. I gave
 debugging statements and I find that the get methods
 of the ActionForm gets executed, but nothing else
 happens. It does not even enter the LoginAction
 class.
 But from the Tomcat startup messages, I find that
 the
 mappings have been identified and loaded by Tomcat.
 
 I have struts.jar in WEB-INF/lib. I am really
 banging
 my head over this problem. The other applications
 like
 struts-example etc. are running fine ..
 
 Pls. help.
 
 Regards.
 
 - Debasish
 
 __
 Do You Yahoo!?
 Make international calls for as low as $.04/minute
 with Yahoo! Messenger
 http://phonecard.yahoo.com/
 


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



RE: newbie question

2001-08-09 Thread Debasish Ghosh

Actually I have the extension mapping set up as well.
The following is the web.xml file that I am using from
WEB-INF :

?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
  PUBLIC -//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN
  http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;

web-app



  !-- Action Servlet Configuration --
  servlet
servlet-nameaction/servlet-name
   
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valueApplicationResources/param-value
/init-param
init-param
  param-nameconfig/param-name
 
param-value/WEB-INF/struts-config.xml/param-value
/init-param
init-param
  param-namedebug/param-name
  param-value2/param-value
/init-param
init-param
  param-namedetail/param-name
  param-value2/param-value
/init-param
init-param
  param-namevalidate/param-name
  param-valuetrue/param-value
/init-param
load-on-startup1/load-on-startup
  /servlet


  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping


  !-- The Welcome File List --
  welcome-file-list
welcome-filelogin.jsp/welcome-file
  /welcome-file-list

  !-- Struts Tag Library Descriptors --
  taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
   
taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-html.tld/taglib-uri
   
taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib

  taglib
taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
   
taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib

/web-app

--- Martin Cooper [EMAIL PROTECTED]
wrote:
 This is not related to the form. It looks like you
 may not have extension 
 mapping set up for your application. My guess is
 that if you type this in 
 your browser:
 
 http://yourHost/pathToYourApp/login.do
 
 you will also see a 404. That suggests that you need
 to add something like 
 this:
 
!-- Action Servlet Mapping --
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping
 
 
 to your web.xml file. You might want to take a look
 at the web.xml file in 
 the struts-example app to make sure you've got
 everything else that you need.
 
 --
 Martin Cooper
 
 
 At 12:07 PM 8/9/01, Debasish Ghosh wrote:
 Hi -
 
 I tried these and still no luck ... I am enclosing
 the
 code for the Form.
 
 package com.anshin;
 
 import javax.servlet.http.HttpServletRequest;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
 
 public class LoginForm extends ActionForm
 {
  private String password = null;
  private String username = null;
 
  public String getPassword()
  {
  System.out.println( In
 getPassword );
  return (this.password);
  }
 
  public void setPassword(String password)
  {
  this.password = password;
  }
 
  public String getUsername()
  {
  System.out.println( In
 getUsername );
  return (this.username);
  }
 
  public void setUsername(String username)
  {
  System.out.println( In
 setUsername );
  this.username = username;
  }
 
  public void reset(ActionMapping mapping,
 HttpServletRequest request)
  {
  System.out.println( In reset );
  this.password = null;
  this.username = null;
  }
 
  public ActionErrors validate(ActionMapping
 mapping,
 HttpServletRequest request)
  {
  System.out.println( In validate
 );
  ActionErrors errors = new
 ActionErrors();
 
  if ((username == null) ||
 (username.length() 
 1))
  {
  errors.add(username, new
 ActionError(error.username.required));
  }
  if ((password == null) ||
 (password.length() 
 1))
  {
  errors.add(password, new
 ActionError(error.password.required));
  }
  return errors;
  }
 
 }
 
 I am only getting the debug prints for In
 getUsername() and In getPassword(). Then the 404
 error comes up. I have a print in the first line of
 the action class, which is NOT getting printed.
 
 Cheers.
 - Debasish
 --- Rick Hightower [EMAIL PROTECTED] wrote:
   On your form make sure you have
  
   html:form action=/login focus=name
   ...
  
   Then define the following forward in your
   struts-config
  
   forward name =login path=/login.do /
   ...
  
   If this does not work, try including your form
 code
   so people can help you
   better

Re: newbie question

2001-08-09 Thread Debasish Ghosh

No ... doesn't work ..

--- Rama Krishna [EMAIL PROTECTED] wrote:
 try this.
 
 !-- The Welcome File List --
   welcome-file-list
 welcome-filelogin.do/welcome-file
   /welcome-file-list
 
 
 rama.
   
 - Original Message - 
 From: Debasish Ghosh [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, August 09, 2001 1:09 PM
 Subject: RE: newbie question
 
 
  Actually I have the extension mapping set up as
 well.
  The following is the web.xml file that I am using
 from
  WEB-INF :
  
  ?xml version=1.0 encoding=ISO-8859-1?
  
  !DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD Web
  Application 2.2//EN
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
  
  web-app
  
  
  
!-- Action Servlet Configuration --
servlet
  servlet-nameaction/servlet-name
  
 

servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
param-nameapplication/param-name
   
 param-valueApplicationResources/param-value
  /init-param
  init-param
param-nameconfig/param-name
  
 

param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value2/param-value
  /init-param
  init-param
param-namedetail/param-name
param-value2/param-value
  /init-param
  init-param
param-namevalidate/param-name
param-valuetrue/param-value
  /init-param
  load-on-startup1/load-on-startup
/servlet
  
  
!-- Action Servlet Mapping --
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping
  
  
!-- The Welcome File List --
welcome-file-list
  welcome-filelogin.jsp/welcome-file
/welcome-file-list
  
!-- Struts Tag Library Descriptors --
taglib
 
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
  
 

taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib
  
taglib
 
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
  
 

taglib-location/WEB-INF/struts-html.tld/taglib-location
/taglib
  
taglib
 
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
  
 

taglib-location/WEB-INF/struts-logic.tld/taglib-location
/taglib
  
  /web-app
  
  --- Martin Cooper [EMAIL PROTECTED]
  wrote:
   This is not related to the form. It looks like
 you
   may not have extension
   mapping set up for your application. My guess is
   that if you type this in
   your browser:
  
   http://yourHost/pathToYourApp/login.do
  
   you will also see a 404. That suggests that you
 need
   to add something like
   this:
  
  !-- Action Servlet Mapping --
  servlet-mapping
servlet-nameaction/servlet-name
url-pattern*.do/url-pattern
  /servlet-mapping
  
  
   to your web.xml file. You might want to take a
 look
   at the web.xml file in
   the struts-example app to make sure you've got
   everything else that you need.
  
   --
   Martin Cooper
  
  
   At 12:07 PM 8/9/01, Debasish Ghosh wrote:
   Hi -
   
   I tried these and still no luck ... I am
 enclosing
   the
   code for the Form.
   
   package com.anshin;
   
   import javax.servlet.http.HttpServletRequest;
   import org.apache.struts.action.ActionError;
   import org.apache.struts.action.ActionErrors;
   import org.apache.struts.action.ActionForm;
   import org.apache.struts.action.ActionMapping;
   
   public class LoginForm extends ActionForm
   {
private String password = null;
private String username = null;
   
public String getPassword()
{
System.out.println( In
   getPassword );
return (this.password);
}
   
public void setPassword(String
 password)
{
this.password = password;
}
   
public String getUsername()
{
System.out.println( In
   getUsername );
return (this.username);
}
   
public void setUsername(String
 username)
{
System.out.println( In
   setUsername );
this.username = username;
}
   
public void reset(ActionMapping
 mapping,
   HttpServletRequest request)
{
System.out.println( In reset
 );
this.password = null;
this.username = null;
}
   
public ActionErrors
 validate(ActionMapping
 
=== message truncated ===


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Re: newbie question

2001-08-09 Thread Debasish Ghosh

Dear All -

There was a problem in the deployment of the
application in the container. I re-deployed the
application by creating a war file, and it worked.
Thanks for all the help.
I am now getting the prompts that u are getting and
which should be the case.

Cheers.

- Debasish
--- Rama Krishna [EMAIL PROTECTED] wrote:
 you didnot send me ur source???
 
 In getUsername
 In getPassword
 In reset
 In setUsername
 In validate
 In action
 In getUsername
 In getPassword
 User = abc Password = abc
 
 this is what i got in my log file.
 
 is this what u r expecting or something else???
 
 i didnot get a 404 but this::
 so i guess it's working fine.
 
 500 Internal Server Error
 /dep/login.do:
 
 java.lang.IllegalArgumentException: URI is missing
 leading slash
 
 let me know.
 
 rama.
 
 
 - Original Message - 
 From: Debasish Ghosh [EMAIL PROTECTED]
 To: Rama Krishna [EMAIL PROTECTED]
 Sent: Thursday, August 09, 2001 2:37 PM
 Subject: Re: newbie question
 
 
  Here's the WAR file ...
  
  --- Rama Krishna [EMAIL PROTECTED] wrote:
   can u zip u r code and  send me??
  
  
  
   - Original Message -
   From: Debasish Ghosh [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Thursday, August 09, 2001 1:44 PM
   Subject: Re: newbie question
  
  
No ... doesn't work ..
   
--- Rama Krishna [EMAIL PROTECTED]
 wrote:
 try this.

 !-- The Welcome File List --
   welcome-file-list
 welcome-filelogin.do/welcome-file
   /welcome-file-list


 rama.

 - Original Message -
 From: Debasish Ghosh
 [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Thursday, August 09, 2001 1:09 PM
 Subject: RE: newbie question


  Actually I have the extension mapping set
 up
   as
 well.
  The following is the web.xml file that I
 am
   using
 from
  WEB-INF :
 
  ?xml version=1.0
 encoding=ISO-8859-1?
 
  !DOCTYPE web-app
PUBLIC -//Sun Microsystems, Inc.//DTD
 Web
  Application 2.2//EN
 
   http://java.sun.com/j2ee/dtds/web-app_2_2.dtd;
 
  web-app
 
 
 
!-- Action Servlet Configuration --
servlet
  servlet-nameaction/servlet-name
 
 

   
  
 

servlet-classorg.apache.struts.action.ActionServlet/servlet-class
  init-param
param-nameapplication/param-name
 

 param-valueApplicationResources/param-value
  /init-param
  init-param
param-nameconfig/param-name
 
 

   
  
 

param-value/WEB-INF/struts-config.xml/param-value
  /init-param
  init-param
param-namedebug/param-name
param-value2/param-value
  /init-param
  init-param
param-namedetail/param-name
param-value2/param-value
  /init-param
  init-param
param-namevalidate/param-name
param-valuetrue/param-value
  /init-param
  load-on-startup1/load-on-startup
/servlet
 
 
!-- Action Servlet Mapping --
servlet-mapping
  servlet-nameaction/servlet-name
  url-pattern*.do/url-pattern
/servlet-mapping
 
 
!-- The Welcome File List --
welcome-file-list
  welcome-filelogin.jsp/welcome-file
/welcome-file-list
 
!-- Struts Tag Library Descriptors --
taglib
 

  
 taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
 
 

   
  
 

taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib
 
taglib
 

  
 taglib-uri/WEB-INF/struts-html.tld/taglib-uri
 
 

   
  
 

taglib-location/WEB-INF/struts-html.tld/taglib-location
/taglib
 
taglib
 

  
 taglib-uri/WEB-INF/struts-logic.tld/taglib-uri
 
 

   
  
 

taglib-location/WEB-INF/struts-logic.tld/taglib-location
/taglib
 
  /web-app
 
  --- Martin Cooper
   [EMAIL PROTECTED]
  wrote:
 
=== message truncated ===


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



newbie question

2001-08-08 Thread Debasish Ghosh

Hi all -

I am facing a weird problem, which I could not solve
in the last couple of hours. I checked up the
mail-archive but could not locate any solution to
this.

The application has a login screen (login.jsp), which
validates a user. There is an ActionForm (LoginForm)
with appropriate get and set methods.

The struts-config.xml looks like :

  form-beans

!-- Logon form bean --
form-bean  name=loginForm
type=com.anshin.LoginForm/

  /form-beans

!-- Process a user logon --
actionpath=/login
   type=com.anshin.LoginAction
   name=loginForm
   validate=true
   input=login.jsp

 forward name=success
path=/login.jsp/
 /action

When I execute the application (invoke login.jsp), I
get a 404 error on the page login.do. I gave
debugging statements and I find that the get methods
of the ActionForm gets executed, but nothing else
happens. It does not even enter the LoginAction class.
But from the Tomcat startup messages, I find that the
mappings have been identified and loaded by Tomcat. 

I have struts.jar in WEB-INF/lib. I am really banging
my head over this problem. The other applications like
struts-example etc. are running fine ..

Pls. help.

Regards.

- Debasish

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/



Suggestion on grid implementation

2001-07-15 Thread Debasish Ghosh

Dear All -

I am relatively new to Struts. Hence I would like to
invite your suggestions on the following
implementation:

In our application, for which we are using Struts, we
need to implement a table of multiple columns, where 
1. the number of rows will be dynamic and fetched from
the database
2. a couple of columns will be editable by the users
and
3. the rest of the columns will be read-only

Any ideas on how to implement this using Struts ?

Cheers.

- Debasish

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: Help with Resources !!

2001-07-04 Thread Debasish Ghosh

Hi -

The problem was that I had struts.jar in the
environment classpath. Once I removed that, restarted
Tomcat, the problem was solved.

Cheers.

- Debasish
--- joi [EMAIL PROTECTED] wrote:
 Verify the path to the
 ApplicationResources.properties file in web.xml
 is correct. Solved my problem..
 
 -Original Message-
 From: Keith Bacon [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 04, July, 2001 15:26
 To: [EMAIL PROTECTED]
 Subject: RE: Help with Resources !!
 
 
 I also had index.title not found 
 ClassNotFoundException occurring in
 struts-example  other webapps (Windows 98,
 Tomcat3.2.2, struts-1.0-b3).
 My Action  Form classes weren't found by struts but
 I could instantiate
 them directly in a JSP. Does this imply that when a
 class is loaded from
 java code in a JSP the class loading is different
 than when loaded by
 the struts action servlet?
 

http://www.husted.com/about/struts/kickstart.html#jar
 explains about classpath  struts.jar (lots of other
 useful stuff there
 too). After conforming to this I still had the
 problems.
 
 After experiments the problem cleared. I suspect the
 solution was that I
 shutdown Tomcat, deleted the webapps/struts-stub
 directory 
 webapps/struts-stub.war  restarted Tomcat.
 
 Sorry I haven't spent the time to prove this but
 any-one else with these
 problems could try it. 
 
 Keith
 
 
 --- Jyothi Palvai [EMAIL PROTECTED]
 wrote:
  The struts.jar should contain the property file.
 This is how I fixed
  this problem. And check whether the web.xml has
 the right path to
  the
  property file.
  
  Jyothi
  
  -Original Message-
  From: suhas [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 03, 2000 4:09 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Help with Resources !!
  
  
  Dunno . but u can try this.
  
  check ur application's web-inf/lib folder . should
 have struts.jar in 
  it
  
  Then do not set any classpath to struts.jar using
 set classpath = 
  explicitely .
  that's what I read in mailing list before
  
  Check this out
  
  Suhas
  
  
  
  
  
  - Original Message -
  From: Debasish Ghosh [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, July 03, 2001 7:05 AM
  Subject: Re: Help with Resources !!
  
  
   Yes, it is there. Actually I am trying to run
 the struts-example 
   application that came with Struts. I checked
 that the 
   ApplicationResources file is in proper place and
 contains the key : 
   index.title.
  
   I am running on Windows NT. Actually I looked up
 the
   mail archive and found a similar problem faced
 by a
   Windows 2000 user. No solution to this problem
 was
   posted in the thread.
  
   --- Pham Thanh Quan [EMAIL PROTECTED] wrote:
Whether there is the key index.title in your
 ApplicationResources 
file or not ?
   
- Original Message -
From: Debasish Ghosh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 03, 2001 11:17 AM
Subject: Help with Resources !!
   
   
 Hello All -

 I am new to Struts and trying to run the
 Struts
 example applications. When I am starting
 Tomcat, everything 
 loads fine (as found in the
 $TOMCAT_HOME/logs/servlet.log file).
 
 In fact the following gets logged in the
 file :

 2001-07-02 08:38:46 - path=/struts-example
 :jsp:
 init
 2001-07-02 08:38:46 - path=/struts-example
 :database: init
 2001-07-02 08:38:46 - path=/struts-example
 :database: Initializing database servlet
 2001-07-02 08:38:46 - path=/struts-example
 :database: Loading database from
 '/WEB-INF/database.xml'
 2001-07-02 08:38:46 - path=/struts-example
:action:
 init
 2001-07-02 08:38:46 - path=/struts-example
:action:
 Loading application resources from resource 

 org.apache.struts.example.ApplicationResources
 2001-07-02 08:38:46 - path=/struts-example
:action:
 Initializing configuration from resource
 path 
 /WEB-INF/struts-config.xml 2001-07-02
 08:38:46 - 
 path=/struts-example
:action:
 Process servletName=action, urlPattern=*.do
 2001-07-02 08:38:46 - path=/struts-example
:action:
 Mapping for servlet 'action' = '*.do'

 But when I try to run the application in
 struts-example, I get 
 the following error :

 javax.servlet.ServletException: Missing
 message
for
 key index.title

 But the ApplicationResources file is in
 proper
place,
 as given in the configuration files.

 Any help will be appreciated.

 Cheers.

 - Debasish


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo!
 Mail 
 http://personal.mail.yahoo.com/

   
  
  
  
 __
   Do You Yahoo!?
   Get personalized email addresses from Yahoo!
 Mail 
   http://personal.mail.yahoo.com

RE: Help with Resources !!

2001-07-04 Thread Debasish Ghosh

Hi -

The problem was that I had struts.jar in the
environment classpath. Once I removed that, restarted
Tomcat, the problem was solved.

Cheers.

- Debasish
--- joi [EMAIL PROTECTED] wrote:
 Verify the path to the
 ApplicationResources.properties file in web.xml
 is correct. Solved my problem..
 
 -Original Message-
 From: Keith Bacon [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, 04, July, 2001 15:26
 To: [EMAIL PROTECTED]
 Subject: RE: Help with Resources !!
 
 
 I also had index.title not found 
 ClassNotFoundException occurring in
 struts-example  other webapps (Windows 98,
 Tomcat3.2.2, struts-1.0-b3).
 My Action  Form classes weren't found by struts but
 I could instantiate
 them directly in a JSP. Does this imply that when a
 class is loaded from
 java code in a JSP the class loading is different
 than when loaded by
 the struts action servlet?
 

http://www.husted.com/about/struts/kickstart.html#jar
 explains about classpath  struts.jar (lots of other
 useful stuff there
 too). After conforming to this I still had the
 problems.
 
 After experiments the problem cleared. I suspect the
 solution was that I
 shutdown Tomcat, deleted the webapps/struts-stub
 directory 
 webapps/struts-stub.war  restarted Tomcat.
 
 Sorry I haven't spent the time to prove this but
 any-one else with these
 problems could try it. 
 
 Keith
 
 
 --- Jyothi Palvai [EMAIL PROTECTED]
 wrote:
  The struts.jar should contain the property file.
 This is how I fixed
  this problem. And check whether the web.xml has
 the right path to
  the
  property file.
  
  Jyothi
  
  -Original Message-
  From: suhas [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 03, 2000 4:09 AM
  To: [EMAIL PROTECTED]
  Subject: Re: Help with Resources !!
  
  
  Dunno . but u can try this.
  
  check ur application's web-inf/lib folder . should
 have struts.jar in 
  it
  
  Then do not set any classpath to struts.jar using
 set classpath = 
  explicitely .
  that's what I read in mailing list before
  
  Check this out
  
  Suhas
  
  
  
  
  
  - Original Message -
  From: Debasish Ghosh [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, July 03, 2001 7:05 AM
  Subject: Re: Help with Resources !!
  
  
   Yes, it is there. Actually I am trying to run
 the struts-example 
   application that came with Struts. I checked
 that the 
   ApplicationResources file is in proper place and
 contains the key : 
   index.title.
  
   I am running on Windows NT. Actually I looked up
 the
   mail archive and found a similar problem faced
 by a
   Windows 2000 user. No solution to this problem
 was
   posted in the thread.
  
   --- Pham Thanh Quan [EMAIL PROTECTED] wrote:
Whether there is the key index.title in your
 ApplicationResources 
file or not ?
   
- Original Message -
From: Debasish Ghosh [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 03, 2001 11:17 AM
Subject: Help with Resources !!
   
   
 Hello All -

 I am new to Struts and trying to run the
 Struts
 example applications. When I am starting
 Tomcat, everything 
 loads fine (as found in the
 $TOMCAT_HOME/logs/servlet.log file).
 
 In fact the following gets logged in the
 file :

 2001-07-02 08:38:46 - path=/struts-example
 :jsp:
 init
 2001-07-02 08:38:46 - path=/struts-example
 :database: init
 2001-07-02 08:38:46 - path=/struts-example
 :database: Initializing database servlet
 2001-07-02 08:38:46 - path=/struts-example
 :database: Loading database from
 '/WEB-INF/database.xml'
 2001-07-02 08:38:46 - path=/struts-example
:action:
 init
 2001-07-02 08:38:46 - path=/struts-example
:action:
 Loading application resources from resource 

 org.apache.struts.example.ApplicationResources
 2001-07-02 08:38:46 - path=/struts-example
:action:
 Initializing configuration from resource
 path 
 /WEB-INF/struts-config.xml 2001-07-02
 08:38:46 - 
 path=/struts-example
:action:
 Process servletName=action, urlPattern=*.do
 2001-07-02 08:38:46 - path=/struts-example
:action:
 Mapping for servlet 'action' = '*.do'

 But when I try to run the application in
 struts-example, I get 
 the following error :

 javax.servlet.ServletException: Missing
 message
for
 key index.title

 But the ApplicationResources file is in
 proper
place,
 as given in the configuration files.

 Any help will be appreciated.

 Cheers.

 - Debasish


 __
 Do You Yahoo!?
 Get personalized email addresses from Yahoo!
 Mail 
 http://personal.mail.yahoo.com/

   
  
  
  
 __
   Do You Yahoo!?
   Get personalized email addresses from Yahoo!
 Mail 
   http://personal.mail.yahoo.com

Help with Resources !!

2001-07-02 Thread Debasish Ghosh

Hello All -

I am new to Struts and trying to run the Struts
example applications. When I am starting Tomcat,
everything loads fine (as found in the
$TOMCAT_HOME/logs/servlet.log file). In fact the
following gets logged in the file :

2001-07-02 08:38:46 - path=/struts-example :jsp:
init
2001-07-02 08:38:46 - path=/struts-example
:database: init
2001-07-02 08:38:46 - path=/struts-example
:database: Initializing database servlet
2001-07-02 08:38:46 - path=/struts-example
:database: Loading database from
'/WEB-INF/database.xml'
2001-07-02 08:38:46 - path=/struts-example :action:
init
2001-07-02 08:38:46 - path=/struts-example :action:
Loading application resources from resource
org.apache.struts.example.ApplicationResources
2001-07-02 08:38:46 - path=/struts-example :action:
Initializing configuration from resource path
/WEB-INF/struts-config.xml
2001-07-02 08:38:46 - path=/struts-example :action:
Process servletName=action, urlPattern=*.do
2001-07-02 08:38:46 - path=/struts-example :action:
Mapping for servlet 'action' = '*.do'

But when I try to run the application in
struts-example, I get the following error :

javax.servlet.ServletException: Missing message for
key index.title

But the ApplicationResources file is in proper place,
as given in the configuration files.

Any help will be appreciated.

Cheers.

- Debasish

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: Help with Resources !!

2001-07-02 Thread Debasish Ghosh

Yes, it is there. Actually I am trying to run the
struts-example application that came with Struts. I
checked that the ApplicationResources file is in
proper place and contains the key : index.title.

I am running on Windows NT. Actually I looked up the
mail archive and found a similar problem faced by a
Windows 2000 user. No solution to this problem was
posted in the thread.

--- Pham Thanh Quan [EMAIL PROTECTED] wrote:
 Whether there is the key index.title in your
 ApplicationResources file or
 not ?
 
 - Original Message -
 From: Debasish Ghosh [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, July 03, 2001 11:17 AM
 Subject: Help with Resources !!
 
 
  Hello All -
 
  I am new to Struts and trying to run the Struts
  example applications. When I am starting Tomcat,
  everything loads fine (as found in the
  $TOMCAT_HOME/logs/servlet.log file). In fact the
  following gets logged in the file :
 
  2001-07-02 08:38:46 - path=/struts-example :jsp:
  init
  2001-07-02 08:38:46 - path=/struts-example
  :database: init
  2001-07-02 08:38:46 - path=/struts-example
  :database: Initializing database servlet
  2001-07-02 08:38:46 - path=/struts-example
  :database: Loading database from
  '/WEB-INF/database.xml'
  2001-07-02 08:38:46 - path=/struts-example
 :action:
  init
  2001-07-02 08:38:46 - path=/struts-example
 :action:
  Loading application resources from resource
  org.apache.struts.example.ApplicationResources
  2001-07-02 08:38:46 - path=/struts-example
 :action:
  Initializing configuration from resource path
  /WEB-INF/struts-config.xml
  2001-07-02 08:38:46 - path=/struts-example
 :action:
  Process servletName=action, urlPattern=*.do
  2001-07-02 08:38:46 - path=/struts-example
 :action:
  Mapping for servlet 'action' = '*.do'
 
  But when I try to run the application in
  struts-example, I get the following error :
 
  javax.servlet.ServletException: Missing message
 for
  key index.title
 
  But the ApplicationResources file is in proper
 place,
  as given in the configuration files.
 
  Any help will be appreciated.
 
  Cheers.
 
  - Debasish
 
  __
  Do You Yahoo!?
  Get personalized email addresses from Yahoo! Mail
  http://personal.mail.yahoo.com/
 
 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: View data

2001-06-27 Thread Debasish Ghosh

Hi -

I am new to Struts. I also have this kind of
application where I need to show a lot of data. I
understand your solution. But for this, do I need to
make any entry in the config file for the jsp which
renders the view of the bean. Otherwise, how will it
fit in the overall framework of Struts ? Does this
mean that we will have a FormBean and an Action class
for this JSP as well ?

TIA.

- Debasish

--- John Schroeder [EMAIL PROTECTED] wrote:
 The application I am developing uses a lot of view
 only data.  We are doing
 exactly what you mention.  We have DAOs that contact
 the database and return
 CachedRowSets.  These RowSet objects are stored in
 the proper context and
 custom tags on the JSP handle the display.
 
 Hope this helps...
 
 --John
 
 
 
 -Original Message-
 From: Jay Walters [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 25, 2001 1:03 PM
 To: '[EMAIL PROTECTED]'
 Subject: View data
 
 
 Just to bounce this off of people, the ActionForm is
 really just for
 handling Form based input data from the user.
 
 What do people do to handle result data which is
 view only.  We are thinking
 we will just put the model beans into our request
 object in the
 action.perform method and pull them out to use in
 the jsp.  Does this make
 sense?  Any reason we should be using forms for
 output of read only data?
 
 Cheers
 Jay


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/