RE: How to handle a PopUp Form from another Form?

2001-10-23 Thread Shamdasani Nimmi-ANS004

Margaret,

I appreciate your suggestion. I do have to support this functionality on all browsers. 
If it is possible, can you send me the sample code. I do have some questions but 
looking at the code would help clear some.

Thanks.

-Nimmi

-Original Message-
From: Martin, Margaret [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 23, 2001 10:46 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How to handle a PopUp Form from another Form?


Nimmi -
In doing something similar to what you want to do I did the following:
1) Create javascript function to open a new modal window (I am only
concerned with supporting IE5.5, so using #showModalDialog works for me
2) create the link using plain ol' html, with an onClick handler that points
to my javascript function. Build the url to pass to the function using
html:rewrite which allows you to specify your forward, etc as you are
currently doing with the html:link tag
3) For the action that I open in the popup, I define both success and
failure pages. The success page contains javascript that looks for the
opener window and refreshes it, then closes the popup window.
4) using the #showModalDialog is the most effective way that I have found to
prevent the user from going back to the opener window. 

Hope this helps - 

Margaret
-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:53 PM
To: '[EMAIL PROTECTED]'
Subject: RE: How to handle a PopUp Form from another Form?


This is what my current html:link tag looks in my originator
form(SubmitQuotes.jsp):

html:link forward=partDetails 
paramId=partNumber paramName=submitQuotesForm 
paramProperty='%= rfqList[ + i +].PartNumber %' 

where partDetails is an action class that retrieves the details for the part
from the database into an ActionForm PartForm.
The mapping for partUpdate.do will have a forward defined to part.jsp which
displays data in partForm.

1. How do I specify in above html:link that part.jsp should open up in a new
window with no location bar, tool bar,etc (The forward in mappings only
allow TARGET parameter)?

2. The form action in part.jsp would be savePartInfo.do action class which
saves part changes to database. If the partForm passes all validations I
have to save the data and close this popup window and put control back to
SubmitQuotes.jsp. How would I close the popup window in action class
savePartInfo?
 
3. If I specified inputForm=part.jsp in savePartInfo mapping, would it
correct to assume that if the partForm validations failed  the control would
return back to the popup window(part.jsp) and NOT to the SubmitQuotes.jsp? 

3. How do I make sure that while part.jsp is open the user cannot go back to
SubmitQuotes.jsp?


Hope this makes clear what I am trying to achieve.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:09 PM
To: [EMAIL PROTECTED]
Subject: RE: How to handle a PopUp Form from another Form?




I haven't done this before, but am not sure what the problem is.  You say
you
have an indexed link to partInfo.do, which you can bring up in a new window
using target=.  Submit etc from this window should return you to this window
if
error etc..

Where exactly is your difficulty?

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 04:47:25 PM

Please respond to [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: How to handle a PopUp Form from another Form?



It is an indexed link. I already know how to get the indexed link to include
the
part number.

What I want to do is:

This link should point to an action class, say partInfo.do, which
retrieves
the complete information about that part and puts it into an ActionForm and
then
forwards to a JSP in a NEW window(with no location bar,no tool bar,etc.)on
top
of the originator window.

User submits to this ActionForm have to follow the normal ActionForm
features,
i.e., bring back the part form screen in case of actionerrors. And If the
update
is successful then the part changes are to be saved to the database and the
popup window closed and user allowed to continue work on the originator
window

Until the user has successfully updated the data and the popup window is
closed,
he/she should not be able to get to the originator form.

I hope someone has handle this situation and can help me.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 3:27 PM
To: [EMAIL PROTECTED]
Subject: Re: How to handle a PopUp Form from another Form?




Perhaps you can use a indexed link which brings up the data in the popup
form.

As for the second part, could you use javascript onload function in the
original
page, which checks to see if popup exists, and if it does puts focus back on
it?

Cheers,

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 02:50:51 PM

Please

How to handle a PopUp Form from another Form?

2001-10-22 Thread Shamdasani Nimmi-ANS004

Hi,

I am looking for suggestions on how to handle this situation:

I have a grid form (i.e., a form with tabular data). One of the columns of this 
tabular data is PartNumber which when clicked on a row should popup a form in a new 
window bringing up all the information about this part, e.g., description, 
dimensions,price, etc. from the database and the user should be able to modify this 
part data.

1.The popup form has to be just another ActionForm where the control returns to the 
form if any validation errors encountered.

2. The user should not be able to go back to the Originator form until done with the 
popup form.


Thanks.

-Nimmi





RE: How to handle a PopUp Form from another Form?

2001-10-22 Thread Shamdasani Nimmi-ANS004

Yes I do know how to open the popup form in a new window. That's the easy part. How to 
handle the popup form is the problem.

-Nimmi

-Original Message-
From: Alexander Jesse [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 2:01 PM
To: struts-user
Subject: RE: How to handle a PopUp Form from another Form?


Hi,

part one is not really a problem: just add target=_a_window_name_ to the link.

part two is where it gets tough...I do not know of a html-construct allowing for this. 
Maybe you could create a javascript that will put the focus on _a_window_name_ if it 
exists...

hth
Alexander

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 8:51 PM
To: [EMAIL PROTECTED]
Subject: How to handle a PopUp Form from another Form?


Hi,

I am looking for suggestions on how to handle this situation:

I have a grid form (i.e., a form with tabular data). One of the columns of this 
tabular data is PartNumber which when clicked on a row should popup a form in a new 
window bringing up all the information about this part, e.g., description, 
dimensions,price, etc. from the database and the user should be able to modify this 
part data.

1.The popup form has to be just another ActionForm where the control returns to the 
form if any validation errors encountered.

2. The user should not be able to go back to the Originator form until done with the 
popup form.


Thanks.

-Nimmi



RE: How to handle a PopUp Form from another Form?

2001-10-22 Thread Shamdasani Nimmi-ANS004

It is an indexed link. I already know how to get the indexed link to include the part 
number. 

What I want to do is:

This link should point to an action class, say partInfo.do, which retrieves the 
complete information about that part and puts it into an ActionForm and then forwards 
to a JSP in a NEW window(with no location bar,no tool bar,etc.)on top of the 
originator window. 

User submits to this ActionForm have to follow the normal ActionForm features, i.e., 
bring back the part form screen in case of actionerrors. And If the update is 
successful then the part changes are to be saved to the database and the popup window 
closed and user allowed to continue work on the originator window

Until the user has successfully updated the data and the popup window is closed, 
he/she should not be able to get to the originator form.

I hope someone has handle this situation and can help me.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 3:27 PM
To: [EMAIL PROTECTED]
Subject: Re: How to handle a PopUp Form from another Form?




Perhaps you can use a indexed link which brings up the data in the popup form.

As for the second part, could you use javascript onload function in the original
page, which checks to see if popup exists, and if it does puts focus back on it?

Cheers,

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 02:50:51 PM

Please respond to [EMAIL PROTECTED]

To:   struts-user@jakarta. apache. org (E-mail)
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  How to handle a PopUp Form from another Form?



Hi,

I am looking for suggestions on how to handle this situation:

I have a grid form (i.e., a form with tabular data). One of the columns of this
tabular data is PartNumber which when clicked on a row should popup a form in
a new window bringing up all the information about this part, e.g., description,
dimensions,price, etc. from the database and the user should be able to modify
this part data.

1.The popup form has to be just another ActionForm where the control returns to
the form if any validation errors encountered.

2. The user should not be able to go back to the Originator form until done with
the popup form.


Thanks.

-Nimmi










RE: How to handle a PopUp Form from another Form?

2001-10-22 Thread Shamdasani Nimmi-ANS004

This is what my current html:link tag looks in my originator form(SubmitQuotes.jsp):

html:link forward=partDetails 
paramId=partNumber paramName=submitQuotesForm 
paramProperty='%= rfqList[ + i +].PartNumber %' 

where partDetails is an action class that retrieves the details for the part from the 
database into an ActionForm PartForm.
The mapping for partUpdate.do will have a forward defined to part.jsp which displays 
data in partForm.

1. How do I specify in above html:link that part.jsp should open up in a new window 
with no location bar, tool bar,etc (The forward in mappings only allow TARGET 
parameter)?

2. The form action in part.jsp would be savePartInfo.do action class which saves part 
changes to database. If the partForm passes all validations I have to save the data 
and close this popup window and put control back to SubmitQuotes.jsp. How would I 
close the popup window in action class savePartInfo?
 
3. If I specified inputForm=part.jsp in savePartInfo mapping, would it correct to 
assume that if the partForm validations failed  the control would return back to the 
popup window(part.jsp) and NOT to the SubmitQuotes.jsp? 

3. How do I make sure that while part.jsp is open the user cannot go back to 
SubmitQuotes.jsp?


Hope this makes clear what I am trying to achieve.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 4:09 PM
To: [EMAIL PROTECTED]
Subject: RE: How to handle a PopUp Form from another Form?




I haven't done this before, but am not sure what the problem is.  You say you
have an indexed link to partInfo.do, which you can bring up in a new window
using target=.  Submit etc from this window should return you to this window if
error etc..

Where exactly is your difficulty?

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 04:47:25 PM

Please respond to [EMAIL PROTECTED]

To:   '[EMAIL PROTECTED]'
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: How to handle a PopUp Form from another Form?



It is an indexed link. I already know how to get the indexed link to include the
part number.

What I want to do is:

This link should point to an action class, say partInfo.do, which retrieves
the complete information about that part and puts it into an ActionForm and then
forwards to a JSP in a NEW window(with no location bar,no tool bar,etc.)on top
of the originator window.

User submits to this ActionForm have to follow the normal ActionForm features,
i.e., bring back the part form screen in case of actionerrors. And If the update
is successful then the part changes are to be saved to the database and the
popup window closed and user allowed to continue work on the originator window

Until the user has successfully updated the data and the popup window is closed,
he/she should not be able to get to the originator form.

I hope someone has handle this situation and can help me.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 22, 2001 3:27 PM
To: [EMAIL PROTECTED]
Subject: Re: How to handle a PopUp Form from another Form?




Perhaps you can use a indexed link which brings up the data in the popup form.

As for the second part, could you use javascript onload function in the original
page, which checks to see if popup exists, and if it does puts focus back on it?

Cheers,

Dave





Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] on
10/22/2001 02:50:51 PM

Please respond to [EMAIL PROTECTED]

To:   struts-user@jakarta. apache. org (E-mail)
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  How to handle a PopUp Form from another Form?



Hi,

I am looking for suggestions on how to handle this situation:

I have a grid form (i.e., a form with tabular data). One of the columns of this
tabular data is PartNumber which when clicked on a row should popup a form in
a new window bringing up all the information about this part, e.g., description,
dimensions,price, etc. from the database and the user should be able to modify
this part data.

1.The popup form has to be just another ActionForm where the control returns to
the form if any validation errors encountered.

2. The user should not be able to go back to the Originator form until done with
the popup form.


Thanks.

-Nimmi















How have others handled management concerns over storing database userid and password in struts-config.xml?

2001-09-05 Thread Shamdasani Nimmi-ANS004

Hi,

Here's my problem. My management feels that storing the database 
account(userid/password)in the config file is a security risk. According to them a 
hacker can get access to the whole database if they can get access to this info.

Supposedly the security team wants to put the application server outside the Firewall 
in Quarantine zone and the database behind the FW. 

Did any of you had to go thru this issue and how did you explain/resolve it. 

Can someone help me dispel their concern?

TIA.

-Nimmi




RE: How have others handled management concerns over storing database userid and password in struts-config.xml?

2001-09-05 Thread Shamdasani Nimmi-ANS004

I am using struts way of handling database using struts-config.xml. Where would I 
encrypt it?

-Original Message-
From: Ernest Jones [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 10:46 AM
To: [EMAIL PROTECTED]
Subject: Re: How have others handled management concerns over storing
database userid and password in struts-config.xml?


If they're not getting the firewall reasoning, you could encrypt it, using
sun's JCE api's.  That might help your bosses feel better.

- Original Message -
From: Shamdasani Nimmi-ANS004 [EMAIL PROTECTED]
To: struts-user@jakarta. apache. org (E-mail)
[EMAIL PROTECTED]
Sent: Wednesday, September 05, 2001 9:24 AM
Subject: How have others handled management concerns over storing database
userid and password in struts-config.xml?


 Hi,

 Here's my problem. My management feels that storing the database
account(userid/password)in the config file is a security risk. According to
them a hacker can get access to the whole database if they can get access to
this info.

 Supposedly the security team wants to put the application server outside
the Firewall in Quarantine zone and the database behind the FW.

 Did any of you had to go thru this issue and how did you explain/resolve
it.

 Can someone help me dispel their concern?

 TIA.

 -Nimmi




RE: How have others handled management concerns over storing databaseuserid and password in struts-config.xml?

2001-09-05 Thread Shamdasani Nimmi-ANS004

I really appreciate all the responses.

Ted, I just want to make sure there is no confusion in understanding my problem. I am 
not sure if by Web user you mean the application user or the database account.
 
Each application user, i.e., a supplier has only access to a subset of the database 
depending on what he/she is allowed to see but the database account(the account which 
is used by the application to get the connection pool) has access to the complete 
database. This database account information(user, password, etc.) is stored in 
struts-config.xml. This database account information is what the management is worried 
about.

So are you saying that the database server should only accept access by database 
account from the Webserver IP only. I am not much familiar with the setting up of the 
servers but could a database server be made to allow access on a database account only 
at a particular IP?

Also regarding your statement:

The configuration folder should also be protected with file system
security, so only the Web server user can read them. This should be a
system-type user that can only be accessed by su, and not by public
login.

do you mean that the database account be the only one to be able to read the folder or 
that the application users be the only ones allowed to read?

Thanks.

-Nimmi
-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 11:09 AM
To: [EMAIL PROTECTED]
Subject: Re: How have others handled management concerns over storing
databaseuserid and password in struts-config.xml?


You would want to restrict what kind of access your generic Web user has
to the database. If the permissions are set right on the database, then
they can't do much they couldn't do from the Website anyway. 

You should also restrict from where the Web user login can be used. It
should only be good from the Web server's IP, and anyone trying to log
in with it from another machine should be rejected. In a firewall
situation, this can be an internal IP that is not available through the
Web site.

The configuration folder should also be protected with file system
security, so only the Web server user can read them. This should be a
system-type user that can only be accessed by su, and not by public
login.

If you use a seperate connection pool, like poolman
(www.codestudio.com), you will have more flexibility as to where the
configuration file can be placed. It would need to be on the classpath,
but it could be kept well outside the Web server file structure. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/


Shamdasani Nimmi-ANS004 wrote:
 
 Hi,
 
 Here's my problem. My management feels that storing the database 
account(userid/password)in the config file is a security risk. According to them a 
hacker can get access to the whole database if they can get access to this info.
 
 Supposedly the security team wants to put the application server outside the 
Firewall in Quarantine zone and the database behind the FW.
 
 Did any of you had to go thru this issue and how did you explain/resolve it.
 
 Can someone help me dispel their concern?
 
 TIA.
 
 -Nimmi



RE: How have others handled management concerns over storing databaseuserid and password in struts-c

2001-09-05 Thread Shamdasani Nimmi-ANS004

Daniel,

Initially we might be using Tomcat/Catalina. In such a case how do I go about doing 
what you have done?

Thanks.

-Nimmi

-Original Message-
From: Daniel Jimenez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 05, 2001 12:42 PM
To: [EMAIL PROTECTED]
Subject: Re: How have others handled management concerns over storing
databaseuserid and password in struts-c


We had a similar problem with management when we tried to implement our DMZ using 
websphere.  The solution that we'd come up with is retrieving the username and 
password from a secure LDAP server.  We continued to use the struts-config file to 
define our datasource and removed the username and password properties.  Our users are 
authenticated based on WebSphere security (LDAP). We then retrieved some information 
about the users rights.  Based on those rights we retrieved the appropriate username 
and password for our database.  My post described how to get around the 
getConnection(user,pass) that is not supported in the GenericDataSource that struts 
implements. 

http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg14731.html

Dan Jimenez

 [EMAIL PROTECTED] 9/5/01 11:08:49 AM 
You would want to restrict what kind of access your generic Web user has
to the database. If the permissions are set right on the database, then
they can't do much they couldn't do from the Website anyway. 

You should also restrict from where the Web user login can be used. It
should only be good from the Web server's IP, and anyone trying to log
in with it from another machine should be rejected. In a firewall
situation, this can be an internal IP that is not available through the
Web site.

The configuration folder should also be protected with file system
security, so only the Web server user can read them. This should be a
system-type user that can only be accessed by su, and not by public
login.

If you use a seperate connection pool, like poolman
(www.codestudio.com), you will have more flexibility as to where the
configuration file can be placed. It would need to be on the classpath,
but it could be kept well outside the Web server file structure. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/ 


Shamdasani Nimmi-ANS004 wrote:
 
 Hi,
 
 Here's my problem. My management feels that storing the database 
account(userid/password)in the config file is a security risk. According to them a 
hacker can get access to the whole database if they can get access to this info.
 
 Supposedly the security team wants to put the application server outside the 
Firewall in Quarantine zone and the database behind the FW.
 
 Did any of you had to go thru this issue and how did you explain/resolve it.
 
 Can someone help me dispel their concern?
 
 TIA.
 
 -Nimmi



RE: STRANGE: session.invalidate() is not invalidating the session

2001-08-30 Thread Shamdasani Nimmi-ANS004

I am under the impression that session.invalidate() should be sufficient for logout. 
The problem that's happening is that I can run the whole application again and go to 
pages that I didn't go to before logging out, which means these pages were never in 
the cache.

-Nimmi

-Original Message-
From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 8:07 AM
To: [EMAIL PROTECTED]
Subject: RE: STRANGE: session.invalidate() is not invalidating the
session


try adding these lines to the JSP
%
response.setHeader(Cache-Control,no-store); //HTTP 1.1
response.setHeader(Pragma,no-cache); //HTTP 1.0
response.setDateHeader (Expires, 0); //prevents caching at the proxy 
server

%




From: Dudley Butt@i-Commerce [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: RE: STRANGE: session.invalidate() is not invalidating the session
Date: Thu, 30 Aug 2001 10:13:40 +0200

i'm having the same problem , please help anyone?

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 29, 2001 9:32 PM
To: struts-user@jakarta. apache. org (E-mail)
Subject: STRANGE: session.invalidate() is not invalidating the session


Hi,

I noticed a peculiar thing. In my application I have a logout link on 
pages.
This link control goes to 'Logout' action where I  clean up the session
variables and then invalidate the session with:

session.invalidate();

and this class forwards it to Logout.jsp which just has the goodbye 
message.

I have noticed that at this point if I keep going back with the back key of
my browser to the point where jsessionid is part of the URL, i.e.,

http://localhost:8080/msqc/logon.do;jsessionid=149062E2E0A77480075991317505D
453


and do the browser refresh here then I can go back into the application
without having to log in again. It is as if the session is still alive.

All the screens(incl. the above URL point) going backwards from Logout.jsp
do show the page expired message but doing refresh on the above URL screen
only brings back the application

Could someone please explain this to me? Has anyone else seen this?

BTW I am using Tomcat 4.0 and Struts 1.1(same happens with 1.0 too)

TIA.

-Nimmi


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp



RE: STRANGE: session.invalidate() is not invalidating the session

2001-08-30 Thread Shamdasani Nimmi-ANS004

Before I invalidate a session I remove all user session objects and at the top of each 
JSP I check that the user is logged on(i.e., check for an object in session). 

If I typein a URL with any JSP it brings up the Logon screen as it should do but if I 
go back in browser history to the screen whose URL contains the jsessionid info then I 
go right back into the application.

-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 30, 2001 10:44 AM
To: [EMAIL PROTECTED]
Subject: RE: STRANGE: session.invalidate() is not invalidating the
session


I think there was a recent post dealing with this.

Struts tends to create a new session if there isn't one there. (every
time the action servlet runs I suspect?).

To restrict access to pages you should require the user to be logged
on.
- At logon add some object to the session (I call mine singedOnUser).
- When a page starts (at start of your Action class code) if that
object the user is logged on so you allow access.
Hope that helps
Keith.


--- Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] wrote:
 I am under the impression that session.invalidate() should be
 sufficient for logout. The problem that's happening is that I can
 run the whole application again and go to pages that I didn't go to
 before logging out, which means these pages were never in the
 cache.
 
 -Nimmi
 
 -Original Message-
 From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 30, 2001 8:07 AM
 To: [EMAIL PROTECTED]
 Subject: RE: STRANGE: session.invalidate() is not invalidating the
 session
 
 
 try adding these lines to the JSP
 %
 response.setHeader(Cache-Control,no-store); //HTTP 1.1
 response.setHeader(Pragma,no-cache); //HTTP 1.0
 response.setDateHeader (Expires, 0); //prevents caching at
 the proxy 
 server
 
 %
 
 
 
 
 From: Dudley Butt@i-Commerce [EMAIL PROTECTED]
 Reply-To: [EMAIL PROTECTED]
 To: '[EMAIL PROTECTED]'
 [EMAIL PROTECTED]
 Subject: RE: STRANGE: session.invalidate() is not invalidating the
 session
 Date: Thu, 30 Aug 2001 10:13:40 +0200
 
 i'm having the same problem , please help anyone?
 
 -Original Message-
 From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, August 29, 2001 9:32 PM
 To: struts-user@jakarta. apache. org (E-mail)
 Subject: STRANGE: session.invalidate() is not invalidating the
 session
 
 
 Hi,
 
 I noticed a peculiar thing. In my application I have a logout link
 on 
 pages.
 This link control goes to 'Logout' action where I  clean up the
 session
 variables and then invalidate the session with:
 
 session.invalidate();
 
 and this class forwards it to Logout.jsp which just has the
 goodbye 
 message.
 
 I have noticed that at this point if I keep going back with the
 back key of
 my browser to the point where jsessionid is part of the URL, i.e.,
 

http://localhost:8080/msqc/logon.do;jsessionid=149062E2E0A77480075991317505D
 453
 
 
 and do the browser refresh here then I can go back into the
 application
 without having to log in again. It is as if the session is still
 alive.
 
 All the screens(incl. the above URL point) going backwards from
 Logout.jsp
 do show the page expired message but doing refresh on the above
 URL screen
 only brings back the application
 
 Could someone please explain this to me? Has anyone else seen
 this?
 
 BTW I am using Tomcat 4.0 and Struts 1.1(same happens with 1.0
 too)
 
 TIA.
 
 -Nimmi
 
 

**
 This email and any files transmitted with it are confidential and
 intended solely for the use of the individual or entity to whom
 they
 are addressed. If you have received this email in error please
 notify
 the system manager.
 
 This footnote also confirms that this email message has been swept
 by
 MIMEsweeper for the presence of computer viruses.
 
 www.mimesweeper.com

**
 
 
 _
 Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp


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



RE: STRANGE: session.invalidate() is not invalidating the session

2001-08-30 Thread Shamdasani Nimmi-ANS004
Title: RE: STRANGE: session.invalidate() is not invalidating the session



I 
don't remember facing this session.invalidate() not invalidating the session 
problem when I was using tomcat 3.2.1. Are others who got the same problem using 
Tomcat 4.0-b7 also?

-Nimmi

  -Original Message-From: Krueger, Jeff 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 
  12:14 PMTo: [EMAIL PROTECTED]Subject: RE: 
  STRANGE: session.invalidate() is not invalidating the 
  session
  You 
  have to go through a action class before your welcome.jsp, but there is a 
  thing called a transaction token. Is what this does is generates a 
  unique number and puts it in a hidden field on you page if your using a struts 
  form. Then in your action class that the welcome.jsp submits to you can 
  call isTokenValid. That will check that hidden field to make sure it is 
  the same number that was generated and put on the page for you in the other 
  action class. If it is valid then call resetToken and that value will be 
  removed from the session. If the user backs up and submit the page they 
  will have the old token and when you call isTokenValidyou will get false 
  and be able to deal with it as you please. Hope that 
  helps.
  
  Jeff 
  Krueger
  
  
-Original Message-From: Luna, Katherine 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 
10:47 AMTo: '[EMAIL PROTECTED]'Subject: 
RE: STRANGE: session.invalidate() is not invalidating the 
session
I also am suffering from this problem. 
I have the user object in the session, and each jsp page 
except the logon.jsp checks the session. This prevents display of any 
page EXCEPT the one immediately following the login page 
(Welcome.jsp). If the user refreshes Welcome.jsp, IE resubmits the 
LogonForm containg the username and password, LogonAction accepts these 
values and 'presto' the user is in again.
Basically, if the user logs out from welcome.jsp, then backs 
up with the Browser 'Back' button, they can refresh the page and become 
logged in without re-entering the username and password because these values 
must be stored in teh request. I have added the following code to 
prevent caching of LogonForm (it has scope request according to 
struts-config.xml)
% response.setHeader("pragma","no-cache"); response.setHeader("Cache-Control","no-cache"); response.setHeader("Cache-Control","no-store"); response.addDateHeader("Expires", 0); response.setDateHeader("max-age", 0); response.setIntHeader ("Expires", -1); //prevents caching at the 
proxy server response.addHeader("cache-Control", 
"private"); //IE5.x only; % meta http-equiv="pragma" content="no-cache" meta http-equiv="expires" content="0" 
but no luck. Anyone who backs in from a Logout to 
Welcome.jsp can simply refresh the page and resubmit whatever values were 
originally entered on the Login page.
This method makes every page except welcome.jsp 
secure. Does anyone have any suggestions for removing the values input 
in LoginForm from the cache??
Kat  
-Original Message- From: 
Keith Bacon [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 30, 2001 11:44 AM To: [EMAIL PROTECTED] Subject: 
RE: STRANGE: session.invalidate() is not invalidating the session 
I think there was a recent post dealing with this. 

Struts tends to create a new session if there isn't one 
there. (every time the action servlet runs I 
suspect?). 
To restrict access to pages you should require the user to 
be logged on. - At logon add 
some object to the session (I call mine singedOnUser). - When a page starts (at start of your Action class code) if 
that object the user is logged on so you allow 
access. Hope that helps Keith. 
--- Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] 
wrote:  I am under the impression that 
session.invalidate() should be  sufficient for 
logout. The problem that's happening is that I can  run the whole application again and go to pages that I didn't go 
to  before logging out, which means these pages 
were never in the  cache.   -Nimmi  
 -Original Message-  From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, August 30, 2001 8:07 AM 
 To: [EMAIL PROTECTED]  Subject: RE: STRANGE: session.invalidate() is not invalidating 
the  session  
  try adding these 
lines to the JSP  %  
response.setHeader("Cache-Control","no-store"); //HTTP 1.1  response.setHeader("Pragma","no-cache"); 
//HTTP 1.0  
response.setDateHeader ("Expires", 0); //prevents caching at 
 the proxy  server 
  %
  From: "Dudley 
Butt@i-Commerce" [EM

RE: STRANGE: session.invalidate() is not invalidating the session

2001-08-30 Thread Shamdasani Nimmi-ANS004
Title: RE: STRANGE: session.invalidate() is not invalidating the session



I do 
not have a welcome page. The first page is the Logon page where the user enters 
logon id and password which gets stored in session. During logout I am clearing 
these values before calling invalidate() so why is the application letting me go 
everywhere after logout though I do have checkLogon (checking session for stored 
objects). It is as though these objects are still there and its the same 
session.

-Nimmi

  -Original Message-From: Krueger, Jeff 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 
  12:14 PMTo: [EMAIL PROTECTED]Subject: RE: 
  STRANGE: session.invalidate() is not invalidating the 
  session
  You 
  have to go through a action class before your welcome.jsp, but there is a 
  thing called a transaction token. Is what this does is generates a 
  unique number and puts it in a hidden field on you page if your using a struts 
  form. Then in your action class that the welcome.jsp submits to you can 
  call isTokenValid. That will check that hidden field to make sure it is 
  the same number that was generated and put on the page for you in the other 
  action class. If it is valid then call resetToken and that value will be 
  removed from the session. If the user backs up and submit the page they 
  will have the old token and when you call isTokenValidyou will get false 
  and be able to deal with it as you please. Hope that 
  helps.
  
  Jeff 
  Krueger
  
  
-Original Message-From: Luna, Katherine 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 
10:47 AMTo: '[EMAIL PROTECTED]'Subject: 
RE: STRANGE: session.invalidate() is not invalidating the 
session
I also am suffering from this problem. 
I have the user object in the session, and each jsp page 
except the logon.jsp checks the session. This prevents display of any 
page EXCEPT the one immediately following the login page 
(Welcome.jsp). If the user refreshes Welcome.jsp, IE resubmits the 
LogonForm containg the username and password, LogonAction accepts these 
values and 'presto' the user is in again.
Basically, if the user logs out from welcome.jsp, then backs 
up with the Browser 'Back' button, they can refresh the page and become 
logged in without re-entering the username and password because these values 
must be stored in teh request. I have added the following code to 
prevent caching of LogonForm (it has scope request according to 
struts-config.xml)
% response.setHeader("pragma","no-cache"); response.setHeader("Cache-Control","no-cache"); response.setHeader("Cache-Control","no-store"); response.addDateHeader("Expires", 0); response.setDateHeader("max-age", 0); response.setIntHeader ("Expires", -1); //prevents caching at the 
proxy server response.addHeader("cache-Control", 
"private"); //IE5.x only; % meta http-equiv="pragma" content="no-cache" meta http-equiv="expires" content="0" 
but no luck. Anyone who backs in from a Logout to 
Welcome.jsp can simply refresh the page and resubmit whatever values were 
originally entered on the Login page.
This method makes every page except welcome.jsp 
secure. Does anyone have any suggestions for removing the values input 
in LoginForm from the cache??
Kat  
-Original Message- From: 
Keith Bacon [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 30, 2001 11:44 AM To: [EMAIL PROTECTED] Subject: 
RE: STRANGE: session.invalidate() is not invalidating the session 
I think there was a recent post dealing with this. 

Struts tends to create a new session if there isn't one 
there. (every time the action servlet runs I 
suspect?). 
To restrict access to pages you should require the user to 
be logged on. - At logon add 
some object to the session (I call mine singedOnUser). - When a page starts (at start of your Action class code) if 
that object the user is logged on so you allow 
access. Hope that helps Keith. 
--- Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] 
wrote:  I am under the impression that 
session.invalidate() should be  sufficient for 
logout. The problem that's happening is that I can  run the whole application again and go to pages that I didn't go 
to  before logging out, which means these pages 
were never in the  cache.   -Nimmi  
 -Original Message-  From: SUPRIYA MISRA [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, August 30, 2001 8:07 AM 
 To: [EMAIL PROTECTED]  Subject: RE: STRANGE: session.invalidate() is not invalidating 
the  session  
  try adding these 
lines to the JSP  %  
response.setHeader("Cache-Control","no-store"); //HTTP 1.1  response.s

[CRAIG CAN YOU PLEASE HELP!!!]RE: STRANGE: session.invalidate() is not invalidating the session

2001-08-30 Thread Shamdasani Nimmi-ANS004
Title: RE: STRANGE: session.invalidate() is not invalidating the session



I take 
it back. I went back to tomcat 3.2.1 andit has the same problem. One thing 
I did find was that if you went back to the screen with jsessionid in URL using 
browser back and if that screen has any links, etc. and you clicked 
thatlink you get NullPointerException. But if you just did browser refresh 
the links start working again. 

Craig, 
if you read this email then could you please explain this session returning back 
situation.

TIA

-Nimmi

  -Original Message-From: Shamdasani Nimmi-ANS004 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 2:22 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  STRANGE: session.invalidate() is not invalidating the 
  session
  I 
  don't remember facing this session.invalidate() not invalidating the session 
  problem when I was using tomcat 3.2.1. Are others who got the same problem 
  using Tomcat 4.0-b7 also?
  
  -Nimmi
  
-Original Message-From: Krueger, Jeff 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 
12:14 PMTo: [EMAIL PROTECTED]Subject: RE: 
STRANGE: session.invalidate() is not invalidating the 
session
You have to go through a action class before your welcome.jsp, but 
there is a thing called a transaction token. Is what this does is 
generates a unique number and puts it in a hidden field on you page if your 
using a struts form. Then in your action class that the welcome.jsp 
submits to you can call isTokenValid. That will check that hidden 
field to make sure it is the same number that was generated and put on the 
page for you in the other action class. If it is valid then call 
resetToken and that value will be removed from the session. If the 
user backs up and submit the page they will have the old token and when you 
call isTokenValidyou will get false and be able to deal with it as you 
please. Hope that helps.

Jeff Krueger


  -Original Message-From: Luna, Katherine 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 30, 2001 
  10:47 AMTo: '[EMAIL PROTECTED]'Subject: 
  RE: STRANGE: session.invalidate() is not invalidating the 
  session
  I also am suffering from this problem. 
  I have the user object in the session, and each jsp page 
  except the logon.jsp checks the session. This prevents display of 
  any page EXCEPT the one immediately following the login page 
  (Welcome.jsp). If the user refreshes Welcome.jsp, IE resubmits the 
  LogonForm containg the username and password, LogonAction accepts these 
  values and 'presto' the user is in again.
  Basically, if the user logs out from welcome.jsp, then 
  backs up with the Browser 'Back' button, they can refresh the page and 
  become logged in without re-entering the username and password because 
  these values must be stored in teh request. I have added the 
  following code to prevent caching of LogonForm (it has scope request 
  according to struts-config.xml)
  % response.setHeader("pragma","no-cache"); response.setHeader("Cache-Control","no-cache"); response.setHeader("Cache-Control","no-store"); response.addDateHeader("Expires", 0); response.setDateHeader("max-age", 0); response.setIntHeader ("Expires", -1); //prevents caching at the 
  proxy server response.addHeader("cache-Control", 
  "private"); //IE5.x only; % meta http-equiv="pragma" content="no-cache" 
  meta http-equiv="expires" content="0" 
  
  but no luck. Anyone who backs in from a Logout to 
  Welcome.jsp can simply refresh the page and resubmit whatever values were 
  originally entered on the Login page.
  This method makes every page except welcome.jsp 
  secure. Does anyone have any suggestions for removing the values 
  input in LoginForm from the cache??
  Kat  
  -Original Message- From: 
  Keith Bacon [mailto:[EMAIL PROTECTED]] 
  Sent: Thursday, August 30, 2001 11:44 AM To: [EMAIL PROTECTED] Subject: 
  RE: STRANGE: session.invalidate() is not invalidating the session 
  I think there was a recent post dealing with this. 
  
  Struts tends to create a new session if there isn't one 
  there. (every time the action servlet runs I 
  suspect?). 
  To restrict access to pages you should require the user to 
  be logged on. - At logon 
  add some object to the session (I call mine singedOnUser). 
  - When a page starts (at start of your Action class code) 
  if that object the user is logged on so you allow 
  access. Hope that helps Keith. 
  --- Shamdasani Nimmi-ANS004 [EMAIL PROTECTED] 
  wrote:  I am under the impression that 
  session.invalidate() should

Please Help!!! Struts application running fine on tomcat 3.2.3 does not run on tomcat 4.0

2001-08-28 Thread Shamdasani Nimmi-ANS004

Hi,

My application, which runs fine with tomcat 3.2.3, gives the error below on tomcat 
4.0. I am using struts 1.0. 

I copied the jaxp.jar, crimson.jar and xalan.jar to CATALINA_HOME/lib. Looking at the 
log there seems to be problem with the datasource. I am using Oracle and my classpath  
has classes.zip from Oracle which I believe includes the driver, JDBC 2.0 API and JDBC 
standard extension. Since the application works fine on tomcat 3.2.3 I take it that I 
have all JDBC stuff that I need.

So why this error? Please help because I am on a time crunch.

Thanks in advance.

-Nimmi

Here's the error:

2001-08-28 11:48:05 StandardHost[localhost]: Installing web application at context 
path /msqc from URL file:D:\jakarta-tomcat-4.0-b7\webapps\msqc
2001-08-28 11:48:05 WebappLoader[/msqc]: Deploying class repositories to work 
directory D:\jakarta-tomcat-4.0-b7\work\localhost\msqc
2001-08-28 11:48:05 WebappLoader[/msqc]: Deploy JAR /WEB-INF/lib/struts.jar to 
D:\jakarta-tomcat-4.0-b7\webapps\msqc\WEB-INF\lib\struts.jar
2001-08-28 11:48:05 StandardManager[/msqc]: Seeding random number generator class 
java.security.SecureRandom
2001-08-28 11:48:05 StandardManager[/msqc]: Seeding of random number generator has 
been completed
2001-08-28 11:48:06 StandardWrapper[/msqc:default]: Loading container servlet default
2001-08-28 11:48:06 default: init
2001-08-28 11:48:06 StandardWrapper[/msqc:invoker]: Loading container servlet invoker
2001-08-28 11:48:06 invoker: init
2001-08-28 11:48:06 action: init
2001-08-28 11:48:06 action: Loading application resources from resource 
com.motorola.mms.msqc.other.ApplicationResources
2001-08-28 11:48:06 action: Initializing configuration from resource path 
/WEB-INF/struts-config.xml
2001-08-28 11:48:07 StandardContext[/msqc]: Servlet /msqc threw load() exception
javax.servlet.ServletException: Servlet.init() for servlet action threw exception
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3240)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3350)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:415)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:643)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:278)
at org.apache.catalina.core.StandardService.start(StandardService.java:368)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:473)
at org.apache.catalina.startup.Catalina.start(Catalina.java:738)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:657)
at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)
- Root Cause -
java.lang.NoClassDefFoundError: javax/sql/DataSource
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1484)
at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:851)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1113)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
at org.apache.struts.digester.Digester.startElement(Digester.java:528)
at org.xml.sax.helpers.XMLReaderAdapter.startElement(XMLReaderAdapter.java:329)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1451)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1468)
at org.apache.crimson.parser.Parser2.content(Parser2.java:1700)
at 

RE: Please Help!!! Struts application running fine on tomcat 3.2.3 does not run on tomcat 4.0

2001-08-28 Thread Shamdasani Nimmi-ANS004

I tried that but still the same problem.

-Nimmi

-Original Message-
From: Rama Krishna [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 12:31 PM
To: [EMAIL PROTECTED]
Subject: Re: Please Help!!! Struts application running fine on tomcat
3.2.3 does not run on tomcat 4.0


try placing the oracle classes.zip in you catalina_home/lib

hope this helps,
rama.

- Original Message -
From: Shamdasani Nimmi-ANS004 [EMAIL PROTECTED]
To: struts-user@jakarta. apache. org (E-mail)
[EMAIL PROTECTED]
Sent: Tuesday, August 28, 2001 9:53 AM
Subject: Please Help!!! Struts application running fine on tomcat 3.2.3 does
not run on tomcat 4.0


 Hi,

 My application, which runs fine with tomcat 3.2.3, gives the error below
on tomcat 4.0. I am using struts 1.0.

 I copied the jaxp.jar, crimson.jar and xalan.jar to CATALINA_HOME/lib.
Looking at the log there seems to be problem with the datasource. I am using
Oracle and my classpath  has classes.zip from Oracle which I believe
includes the driver, JDBC 2.0 API and JDBC standard extension. Since the
application works fine on tomcat 3.2.3 I take it that I have all JDBC stuff
that I need.

 So why this error? Please help because I am on a time crunch.

 Thanks in advance.

 -Nimmi

 Here's the error:

 2001-08-28 11:48:05 StandardHost[localhost]: Installing web application at
context path /msqc from URL file:D:\jakarta-tomcat-4.0-b7\webapps\msqc
 2001-08-28 11:48:05 WebappLoader[/msqc]: Deploying class repositories to
work directory D:\jakarta-tomcat-4.0-b7\work\localhost\msqc
 2001-08-28 11:48:05 WebappLoader[/msqc]: Deploy JAR
/WEB-INF/lib/struts.jar to
D:\jakarta-tomcat-4.0-b7\webapps\msqc\WEB-INF\lib\struts.jar
 2001-08-28 11:48:05 StandardManager[/msqc]: Seeding random number
generator class java.security.SecureRandom
 2001-08-28 11:48:05 StandardManager[/msqc]: Seeding of random number
generator has been completed
 2001-08-28 11:48:06 StandardWrapper[/msqc:default]: Loading container
servlet default
 2001-08-28 11:48:06 default: init
 2001-08-28 11:48:06 StandardWrapper[/msqc:invoker]: Loading container
servlet invoker
 2001-08-28 11:48:06 invoker: init
 2001-08-28 11:48:06 action: init
 2001-08-28 11:48:06 action: Loading application resources from resource
com.motorola.mms.msqc.other.ApplicationResources
 2001-08-28 11:48:06 action: Initializing configuration from resource path
/WEB-INF/struts-config.xml
 2001-08-28 11:48:07 StandardContext[/msqc]: Servlet /msqc threw load()
exception
 javax.servlet.ServletException: Servlet.init() for servlet action threw
exception
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3240)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3350)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:415)
 at org.apache.catalina.core.StandardHost.install(StandardHost.java:643)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:300)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:155)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:278)
 at
org.apache.catalina.core.StandardService.start(StandardService.java:368)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:473)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:738)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:657)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)
 - Root Cause -
 java.lang.NoClassDefFoundError: javax/sql/DataSource
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
 at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLo
ader.java:1484)
 at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.jav
a:851)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1230)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1113)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:120)
 at
org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
 at org.apache.struts.digester.Digester.startElement(Digester.java:528

Tomcat 4.0 frustrating problem

2001-08-28 Thread Shamdasani Nimmi-ANS004

Hi,

I am trying to port my application (using Struts 1.0) which runs fine on tomcat 3.2.3 
to tomcat 4.0 but I am getting error. I did copy the crimson.jar and jaxp.jar from 
JAXP1.1 to $CATALINA_HOME/lib. I did find another set of crimson.jar and jaxp.jar in 
$CATALINA_HOME/server/lib. Those also I replaced with the copies from Jaxp1.1.

Do I need to add the above jar files to my classpath? I don't think so or am I wrong?

Could JBuilder which I am using for compiling my application be the culprit. I am not 
sure if the jaxp.jar  parser.jar in JBuilder are used for compiling. If they are, 
then should I replace JBuilder's jaxp.jar with the JAXP1.1 jaxp.jar (don't know what 
to do with parser.jar)

Could someone please help me get over this misery?

TIA

-Nimmi

This the error that appears on browser:

A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans 
collection
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:452)
at org.apache.jsp._0002fLogon_jsp._jspService(_0002fLogon_jsp.java:682)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1000)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093)
at java.lang.Thread.run(Thread.java:484)
Root Cause:
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans 
collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
at org.apache.jsp._0002fLogon_jsp._jspService(_0002fLogon_jsp.java:416)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 

RE: Tomcat 4.0 frustrating problem :SOLVED

2001-08-28 Thread Shamdasani Nimmi-ANS004

Tomcat 4.0 was not able to see Oracle driver class, the path to which was specified in 
system classpath. Tomcat 3.2.3 had no problem finding it. Putting classes.zip file 
(Oracle Driver) in $JAVA-HOME/jre/lib/ext solved the problem.

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 28, 2001 3:08 PM
To: struts-user@jakarta. apache. org (E-mail)
Subject: Tomcat 4.0 frustrating problem


Hi,

I am trying to port my application (using Struts 1.0) which runs fine on tomcat 3.2.3 
to tomcat 4.0 but I am getting error. I did copy the crimson.jar and jaxp.jar from 
JAXP1.1 to $CATALINA_HOME/lib. I did find another set of crimson.jar and jaxp.jar in 
$CATALINA_HOME/server/lib. Those also I replaced with the copies from Jaxp1.1.

Do I need to add the above jar files to my classpath? I don't think so or am I wrong?

Could JBuilder which I am using for compiling my application be the culprit. I am not 
sure if the jaxp.jar  parser.jar in JBuilder are used for compiling. If they are, 
then should I replace JBuilder's jaxp.jar with the JAXP1.1 jaxp.jar (don't know what 
to do with parser.jar)

Could someone please help me get over this misery?

TIA

-Nimmi

This the error that appears on browser:

A Servlet Exception Has Occurred
Exception Report:
javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans 
collection
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:452)
at org.apache.jsp._0002fLogon_jsp._jspService(_0002fLogon_jsp.java:682)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1000)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093)
at java.lang.Thread.run(Thread.java:484)
Root Cause:
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans 
collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
at org.apache.jsp._0002fLogon_jsp._jspService(_0002fLogon_jsp.java:416)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java

What is this error?

2001-08-27 Thread Shamdasani Nimmi-ANS004

Hi,

I decided to move my application to the latest Struts 1.1 build (20010827) and Tomcat 
4.0- b7. But I am getting the error below.

My application was working fine with Struts 1.0 and Tomcat 3.2.1

Could someone please help me solve it. Thanks.

-Nimmi

Here's the error:

javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans 
collection
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:452)
at org.apache.jsp._0002fLogon_jsp._jspService(_0002fLogon_jsp.java:682)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1000)
at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1093)
at java.lang.Thread.run(Thread.java:484)
Root Cause:
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans 
collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:773)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
at org.apache.jsp._0002fLogon_jsp._jspService(_0002fLogon_jsp.java:416)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:458)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:215)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2314)
at 

Does the Validator package work with indexed properties?

2001-08-21 Thread Shamdasani Nimmi-ANS004

Hi,

This question probably could be answered best by David Winderfeldt. I want to validate 
some indexed fields and was wondering if I could use the validator package. Also 
where could I more info on how to write expressions for the mask field in formset?

TIA.

-Nimmi




RE: Does the Validator package work with indexed properties?

2001-08-21 Thread Shamdasani Nimmi-ANS004

David,

What I was referring to are the tabular fields, i.e, multiple rows of the same kind of 
data (a grid). Can your package be used to validate those.

Thanks.

-Nimmi

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 21, 2001 5:37 PM
To: [EMAIL PROTECTED]
Subject: Re: Does the Validator package work with indexed properties?


If you are referring to having an html field with
indexed=true then someone else asked about this. 
I've been pretty busy so I don't know when I'll get to
this, but I did add it to my To Do List.  I'll make it
a top priority when I have time to work on the
validator again.  Currently you would have to define
each field/property in validation.xml that would be
generated.

The regexp package uses standard Perl 5 pattern
matching.  So any perl regular expression tutorial
would help you write your own.  Here is the javadoc
link for the class that is used for regular
expressions.

http://jakarta.apache.org/regexp/apidocs/org/apache/regexp/RE.html

David

--- Shamdasani Nimmi-ANS004 [EMAIL PROTECTED]
wrote:
 Hi,
 
 This question probably could be answered best by
 David Winderfeldt. I want to validate some indexed
 fields and was wondering if I could use the
 validator package. Also where could I more info on
 how to write expressions for the mask field in
 formset?
 
 TIA.
 
 -Nimmi
 


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



How do I use application scope bean in JSP?

2001-06-26 Thread Shamdasani Nimmi-ANS004

Hi,

I have a bean stored in application scope in a startup servlet using:

getServletContext().setAttribute(Constants.COMMON_DROP_DOWN_KEY, 
commonDropDownListBean);

This bean of type CommonDropDownList has a property getResponseIndicatorList which 
returns a HashMap. 

I want to use this HashMap for the html:options in my JSP like this:

bean:define id=responseIndicator name=common_lists 
type=com.motorola.mms.msqc.beans.CommonDropDownListBean 
property=responseIndicatorList scope=application/

html:options collection=responseIndicator labelProperty=value property=key/ 


(Constants.COMMON_DROP_DOWN_KEY is defined as common_lists )

But I get this error listed below. 
 

javax.servlet.ServletException: No getter method for property responseIndicatorList of 
bean common_lists
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at 
_0002fSubmitQuotes_0002ejspSubmitQuotes_jsp_4._jspService(_0002fSubmitQuotes_0002ejspSubmitQuotes_jsp_4.java:1265)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1727)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1727)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)



Could someone please tell me what am I doing wrong.

TIA.

-Nimmi




RE: How do I use application scope bean in JSP?

2001-06-26 Thread Shamdasani Nimmi-ANS004

I did try this:

jsp:useBean id=common_lists scope=application 
type=com.motorola.mms.msqc.beans.CommonDropDownListBean/

bean:define id=responseIndicator name=common_lists 
property=responseIndicatorList /

html:options collection=responseIndicator labelProperty=value property=key/


But I still get the same error:

javax.servlet.ServletException: No getter method for property responseIndicatorList of 
bean common_lists

-Nimmi

-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 3:14 PM
To: '[EMAIL PROTECTED]'
Subject: RE: How do I use application scope bean in JSP?


use   jsp:useBean id='%=Constants.COMMON_DROP_DOWN_KEY %'
scope=application /

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 3:53 PM
To: struts-user@jakarta. apache. org (E-mail)
Subject: How do I use application scope bean in JSP?


Hi,

I have a bean stored in application scope in a startup servlet using:

getServletContext().setAttribute(Constants.COMMON_DROP_DOWN_KEY,
commonDropDownListBean);

This bean of type CommonDropDownList has a property getResponseIndicatorList
which returns a HashMap. 

I want to use this HashMap for the html:options in my JSP like this:

bean:define id=responseIndicator name=common_lists
type=com.motorola.mms.msqc.beans.CommonDropDownListBean
property=responseIndicatorList scope=application/

html:options collection=responseIndicator labelProperty=value
property=key/ 


(Constants.COMMON_DROP_DOWN_KEY is defined as common_lists )

But I get this error listed below. 
 

javax.servlet.ServletException: No getter method for property
responseIndicatorList of bean common_lists
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:459)
at
_0002fSubmitQuotes_0002ejspSubmitQuotes_jsp_4._jspService(_0002fSubmitQuotes
_0002ejspSubmitQuotes_jsp_4.java:1265)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:177)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1727)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl
.java:194)
at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1727)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
at org.apache.tomcat.core.Handler.service(Handler.java:286)
at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
at java.lang.Thread.run(Thread.java:484)



Could someone please tell me what am I doing wrong.

TIA.

-Nimmi



PLEASE HELP: Why is this drop-down list not working?

2001-06-26 Thread Shamdasani Nimmi-ANS004

I have a bean in application scope and I want to use one of its collection 
property(responseIndicatorList) in a drop-down but I keep getting an error:

No getter method for property responseIndicatorList of bean common_lists


This is how I have in my jsp:

jsp:useBean id=common_lists scope=application 
type=com.motorola.mms.msqc.beans.CommonDropDownListBean/

bean:define id=responseIndicatorMap name=common_lists 
property=responseIndicatorList scope=application/

html:options collection=responseIndicatorMap labelProperty=value property=key/



-Nimmi



Can another bean besides the FormBean be used inside a Form?

2001-06-14 Thread Shamdasani Nimmi-ANS004

Hi,

I have a form  which has a SELECT type field. The value selected from the Select 
options should set the corresponding field in the FormBean but the options available 
in this Select field are in another bean in the session scope. How do I  specify such 
a Select field using html:select  html:options tags?

TIA

-Nimmi




RE: Can another bean besides the FormBean be used inside a Form?

2001-06-14 Thread Shamdasani Nimmi-ANS004

Never Mind I found the solution

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 10:24 AM
To: struts-user@jakarta. apache. org (E-mail)
Subject: Can another bean besides the FormBean be used inside a Form?


Hi,

I have a form  which has a SELECT type field. The value selected from the Select 
options should set the corresponding field in the FormBean but the options available 
in this Select field are in another bean in the session scope. How do I  specify such 
a Select field using html:select  html:options tags?

TIA

-Nimmi



Having problems passing more than one parameter with html:link tag

2001-06-14 Thread Shamdasani Nimmi-ANS004

Hi,

I am trying to pass 2 parameters with html:link. Since it is not legal to use the same 
attribute name more than once in the same tag, I created another reference 'tempId'  
to my 'submitQuotesForm' bean using  bean:define tag but I am only getting the last 
param 'supplier_seq'  added to my link.

Here's my JSP code:

  bean:define id=tempId  name=submitQuotesForm 
type=com.motorola.mms.msqc.beans.SubmitQuotesForm /
  html:link href=part.do 
  paramId=motorola_part paramName=submitQuotesForm paramProperty=partNbr
  paramId=supplier_seq paramName=tempId paramProperty=supplierSeq 
  bean:write name=submitQuotesForm property= partNbr  /
  /html:link


What am I doing wrong?

-Nimmi




RE: Iterate tag update?

2001-06-14 Thread Shamdasani Nimmi-ANS004

Martin,

Could you please give an example of how it can be used? I just did the index naming 
the old fashioned way(i.e., adding index to the property string)  and would like to 
replace it.

Thanks.

-Nimmi
-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 13, 2001 11:43 PM
To: [EMAIL PROTECTED]
Subject: Re: Iterate tag update?


I just checked in a change to the iterate tag which allows you to access the
current index as a scripting variable. If you specify the 'indexId'
attribute, a scripting variable with the specified name will contain the
current index (as an Integer) on each iteration. This will be available in
the 6/14 nightly build, and also in Struts 1.0.

--
Martin Cooper


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 13, 2001 9:36 AM
Subject: Iterate tag update?




 I have a question similar to Mark Kettner's.

 Could someone give an update on the iterate tag, and where it stands with
the
 ability to get hold of the current index.

 I need to have each field in each table row with a different name (ie
include
 the index in it) to reference particular one using javascript.

 do I need a custom tag for this, or is one available?

 thanks very much,

 Dave







RE: html:link only uses the last param* attributes

2001-06-14 Thread Shamdasani Nimmi-ANS004

Peter,

In my case the 2 parameters to be passed with html:link are dynamic. The link is for 
a column on each row of an editable table and the parameters passed are specific to 
each row. 

I wonder if someone has a solution. Anyone???

-Nimmi

-Original Message-
From: Peter Doyle [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 1:43 PM
To: Shamdasani Nimmi-ANS004
Cc: [EMAIL PROTECTED]
Subject: RE: html:link only uses the last param* attributes


Hi,
 No I never solved that problem. What I did is what Struts tells you to do
which is create a Hashtable or something and put your parameters into that.
Then you can have as many as you want.

Here is what I do in one case in an Edit Action to set up the form.

Hashtable parameters = new Hashtable();
parameters.put(action, Edit);
parameters.put(creativeType, Box);
destForm.setUploadBoxLinkParameters(parameters);

Then in the jsp
html:link page=/readyUploadCreative.do name=boxInfoForm
property=uploadBoxLinkParameters

Peter


-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: 14 June 2001 17:45
To: '[EMAIL PROTECTED]'
Subject: html:link only uses the last param* attributes


Hi peter,

I read this e-mail of yours in struts archives:

http://www.mail-archive.com/struts-user@jakarta.apache.org/msg06410.html

Were you able to solve this problem. If yes then could you please send me
your solution.

TIA.

-Nimmi



RE: Having problems passing more than one parameter with html:link tag

2001-06-14 Thread Shamdasani Nimmi-ANS004

Craig,

In my case the link is on a column of an editable indexed properties table. And the 2 
parameters for each row would be specific to that row. So where/how would I get the 
parameters into a HashMap?

The JSP code is like this:

  % int i=0; %
  logic:iterate id=rfq name=submitQuotesForm property=rfqListBean.rfqList
  tr
td
  bean:write name=submitQuotesForm property= '%= rfqListBean.rfqList[ + i 
+].usingLocationCode %' /
/td

td
  html:link href=part.do paramId=motorola_part paramName=submitQuotesForm 
paramProperty='%= rfqListBean.rfqList[ + i +].motorolaPartNbr %' bean:write 
name=submitQuotesForm property= '%= rfqListBean.rfqList[ + i +].motorolaPartNbr 
%'  /
  /html:link
/td

td
  html:text property='%= rfqListBean.rfqList[ + i +].PriceObjective %' 
size=5 /
/td

 and so on..

  tr
/logic:iterate

Thanks

-Nimmi
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 12:46 PM
To: struts-user@jakarta. apache. org (E-mail)
Subject: Re: Having problems passing more than one parameter with
html:link tag




On Thu, 14 Jun 2001, Shamdasani Nimmi-ANS004 wrote:

 Hi,
 
 I am trying to pass 2 parameters with html:link. Since it is not legal to use the 
same attribute name more than once in the same tag, I created another reference 
'tempId'  to my 'submitQuotesForm' bean using  bean:define tag but I am only 
getting the last param 'supplier_seq'  added to my link.
 
 Here's my JSP code:
 
   bean:define id=tempId  name=submitQuotesForm 
type=com.motorola.mms.msqc.beans.SubmitQuotesForm /
   html:link href=part.do 
   paramId=motorola_part paramName=submitQuotesForm 
paramProperty=partNbr
   paramId=supplier_seq paramName=tempId paramProperty=supplierSeq 
   bean:write name=submitQuotesForm property= partNbr  /
   /html:link
 

Using paramId and paramName only works if you want to add a *single*
parameter to the link.  XML does not allow you to specify the same
attributes twice in a single tag.

If you want to add multiple parameters, use the following approach:
* Create a Map (such as a HashMap or TreeMap) where the keys
  are the parameter names and the values are either String (for
  a single parameter value) or array of String (for multiple
  parameter value).
* Use bean:define or some other technique to introduce this
  object into some appropriate scope.  I tend to do this in
  my Actions (or business logic that they delegate to).
* Code your link tag like this:
bean:define id=parametersMap .../
html:link href=part.do name=parametersMap
  ...
/html:link

 
 What am I doing wrong?
 
 -Nimmi
 
 

Craig




RE: Logic Tag Library and (Iterator) List Navigation

2001-06-11 Thread Shamdasani Nimmi-ANS004

Hi Oleg,

Could you please send me the class and JSP too. Thanks.

-Nimmi

-Original Message-
From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 3:07 PM
To: Matt Raible
Subject: Re: Logic Tag Library and (Iterator) List Navigation


Hello Matt,

I can send you Pager class, used to generate ArrayList of links to the
pages in this result set, and a piece of jsp code to display it. I
think it can used for any container wich implements Collection
interface.

Thursday, June 07, 2001, 5:57:12 PM, you wrote:

MR Has anyone used logic:iterator to display a list of records, and
MR corresponding list navigation links at the bottom?

MR For instance, I have an Iteration of DataObjects that I can list through
MR with the following code:

MR while (iteratorName.hasNext()) {
MR dataObject = (DataObject)iteratorName.next();
MR out.println(dataObject.getName());
MR }

MR I'm assuming I can do this with the Iterator tag, however, I would also like
MR to display the following at the bottom of the list:

MR First  |  1-10  |  11-20  |  20-30  | Last

MR Where there are 30 records returned.

MR Any ideas?

MR Thanks,

MR Matt


MR _
MR Do You Yahoo!?
MR Get your free @yahoo.com address at http://mail.yahoo.com



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]




What happened to the 'etc','src' and 'web' directories in Struts binary download?

2001-06-06 Thread Shamdasani Nimmi-ANS004

Hi,

I just downloaded Struts 1.0-b3 and found out that 'etc', 'src' and 'web' directories 
are no longer there. What happened to these? It was convenient to get the source code 
also in one shot of download.

-Nimmi 




RE: Form input using image tag

2001-06-04 Thread Shamdasani Nimmi-ANS004
Title: Form input using image tag



Kat,

I 
have

html:image 
src="images/btn_login.gif"/

and it 
creates this:

input type="image" name="" 
src="images/btn_login.gif;jsessionid=lqwrkmnwb1"

I 
don't know if it should make a difference but try removing the space before 
/ and see if it works

-Nimmi

  -Original Message-From: Luna, Kat 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, June 04, 2001 1:47 
  PMTo: [EMAIL PROTECTED]Subject: Form input 
  using image tag
  Hi, 
  I'm trying to use the html:image tag to submit a form, but the 
  graphic is not rendering correctly. html:img 
  works fine for display, but this is the resulting source code of 
  html:image src="images/submit.gif" / tag: 
   tr  
  tdinput type="image" name=" 
  src="images/submit.gif"/td  tdinput type="image" name=" 
  src="images/reset.gif"/td  
  /tr 
  Does anyone know why there is a blank property for "name" 
  showing up and how to get rid of this? 
  Thanks 
  Kat Luna [EMAIL PROTECTED] 
  


RE: Logic-Iterate

2001-06-04 Thread Shamdasani Nimmi-ANS004

Shane 

This is how you do it:

logic:iterate id=eachBean name=yourBeanObject property=beanList 

TR
TDbean:write name=eachBean property=name//TD
/TR

/logic:iterate


In the above case in yourBeanObject class you will have the method getBeanList() which 
will return a list of your beans. And in the bean class eachBean) you will have a 
method getName() which will return the name variable.

Hope this helps.

-Nimmi
-Original Message-
From: Shane Warne [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 04, 2001 5:03 PM
To: [EMAIL PROTECTED]
Subject: Logic-Iterate


Hi,
I was trying to us the logic-iterate tag and i'm stuck
at a point. Please go thru the snippet below,

logic:iterate id=test name=mybean
property=name
  liembean:write name=test//em/li
%
String myName = instance.getName(mybean.getName());
System.out.println(myName);
%
/logic:iterate

Now, how do i get one of the properties of a bean when
i'm iterating through a collection of a bean objects.
Bottom line is i would like to pass the property
getName() into a variable. Can anyone help me in
sorting this out ??

Thanks,
Shane..


=


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/



How to make html:cancel as an image?

2001-04-03 Thread Shamdasani Nimmi-ANS004

Hi,

Does anyone know how to associate an image with the html:cancel tag?

Thanks.

-Nimmi





What has changed in the DataSource part?

2001-03-30 Thread Shamdasani Nimmi-ANS004

Hi,

My application works great with struts  version 1 of 1/29/01 but now I want to move to 
the latest version of struts and its not working. No changes have been made to the 
application itself. I have tried even beta 1 version and other versions after that but 
no luck.

The problem seems to be the DATASOURCE. I do not get an error but it seems the 
application is not connecting to the database. Has something changed in Datasource 
definition in struts-config file.

This is what I have it defined as(and it works fine with 1/29/01 version):

  data-sources
data-source
  autoCommit="true"
  description="MSQC Data Source Configuration"
  driverClass="oracle.jdbc.driver.OracleDriver"
   maxCount="4"
   minCount="2"
   password="nimmis"
   url="jdbc:oracle:thin:@cps.corp.mot.com:1521:SMDEV"
user="nimmis"
/
  /data-sources  

Thanks in advance

-Nimmi





SOLVED: What has changed in the DataSource part?

2001-03-30 Thread Shamdasani Nimmi-ANS004

It was a small mistake



REPOST: How to make Reset button a graphical button?

2001-03-23 Thread Shamdasani Nimmi-ANS004

Hi,

Is there a way to associate an image with the 'Reset' button?

Thanks.

-Nimmi




RE: Initial security check

2001-03-23 Thread Shamdasani Nimmi-ANS004

Struts example application uses:

app:checkLogon/

in the JSPs to force the user to go to login screen. Check that.

-Nimmi

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 3:25 PM
To: [EMAIL PROTECTED]
Subject: Initial security check




Hi everyone.

Just a quick, somewhat newbie, question.  I need to sometimes require a login,
depending on the user, when the user first enters the web app.  I am thinking I
should make the first "page" an action which will check to see if the user
requires a log in, and redirect them to that page if necessary, else the app's
first page.

Is this appropriate?  Should it be the controller which handles this, or
delegates it to an action according to good MVC Model 2 design?

Thanks,

Dave





How to make Reset button a graphical button?

2001-03-22 Thread Shamdasani Nimmi-ANS004

Hi,

Is there a way to associate an image with the 'Reset' button?

Thanks.

-Nimmi





Which? IPlanet Application server or IPlanet web server with Struts

2001-03-20 Thread Shamdasani Nimmi-ANS004

Hi,

I am forced to use IPlanet for putting my application into production. I am wondering 
if I could use just IPlanet Web Server (IWS) for my application using Struts instead 
of having to use IPlanet application server(IAS). My application consists of JSPs, 
Servlets and Java Beans( and no EJBs). Do I need an application server in such a 
scenerio or would a web server be sufficient?

I would really appreciate responses from anyone who has successfully used IPlanet 
products with Struts.

Thanks.

-Nimmi





REPOST: How to handle an extra button on login page

2001-03-19 Thread Shamdasani Nimmi-ANS004

Hi,

I want to add an extra button 'Change Password' on my logon screen, which should take 
me instead to the 'changePassword.jsp' screen where I would enter the username, 
password, new password fields .

I want a suggestion on how to handle this. Should I have the same form bean for both 
logon.jsp and changePassword.jsp? If yes then the validate method of the form bean 
cannot do validations like,e.g. check for the new password and confirm new password 
fields to be non-blank because these fields are not on logon form.

Also the validate() method of the form bean would get called when I click on 'Change 
Password' button and since username and password would be null at that time it would 
return errors.

I would really appreciate if someone could tell me how they handled such a situation.

Thanks in advance.

-Nimmi



RE: Unsafe path error

2001-03-16 Thread Shamdasani Nimmi-ANS004

If you put WEB-INF in caps, windows will show it to you as Web-inf but internally it 
would 've made it all caps. BTW it is a good idea to convert it Web-inf to caps.

-Original Message-
From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 2:24 PM
To: '[EMAIL PROTECTED]'
Subject: RE: "Unsafe path" error


Windows will not let me create an all caps WEB-INF folder.  I try and it
lower-cases all but the first letter.  Any more suggestions?

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 12:09 PM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error


Create a new directory WEB-INF under tomcat/webapps/you_app, Copy all files
from tomcat/webapps/you_app/Web-inf to tomcat/webapps/you_app/WEB-INF.
Remove
directory Web-inf.
Change all config files accordingly.

"Anderson, Jessica" wrote:

 do you mean capitalize?

 -Original Message-
 From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 16, 2001 10:29 AM
 To: [EMAIL PROTECTED]
 Subject: Re: "Unsafe path" error

 I did not know that you have Web-inf. This is absolutely not good for
Tomcat
 3.2. Relocate all your files under WEB-INF!!!

 "Anderson, Jessica" wrote:

  well,
  the best "place" for my application is "working" and until I figure out
 how
  to configure for tomcat 3.2, 3.1 will have to suffice.
  :)
  i am concerned for the future though, so I will most likely revisit this
  topic if I don't receive any feedback.
 
  It was suggested that i change Web-inf to WEB-INF in one of the email
 links
  you sent, but i was unable to change my folder to all caps.  I don't
refer
  to Web-inf anywhere else except the directory structure - it's implicit
 with
  the context of my application.  So once again, i am at a loss...
 
  It seems that someone else must have experienced this.
  jessica
 
  -Original Message-
  From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
  Sent: Friday, March 16, 2001 9:09 AM
  To: [EMAIL PROTECTED]
  Subject: Re: "Unsafe path" error
 
  The best specialist in Tomcat is Graig M. If you read our email archive,
  that
  Tomcat 3.2.1 and higher is the best "place" for struts, because 3.1 has
a
  lot
  of bugs.
 
  "Anderson, Jessica" wrote:
 
   Thanks.
  
   Another tidbit - i just discovered that this error only occurs in
Tomcat
   3.2.1 - Tomcat 3.1 works fine with no changes to the application,
   environment or anything...
  
   Any comments regarding versions of Tomcat?
  
   Jessica
  
   -Original Message-
   From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
   Sent: Friday, March 16, 2001 8:36 AM
   To: [EMAIL PROTECTED]
   Subject: Re: "Unsafe path" error
  
   Here is a link to those emails:
  
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02132.html
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02193.html
  
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02163.html
   Maybe it will help?!
  
   "Anderson, Jessica" wrote:
  
Yes,
it was from me and I never received any replies.
:)
jessica
   
-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 16, 2001 8:17 AM
To: [EMAIL PROTECTED]
Subject: Re: "Unsafe path" error
   
I remember the similar error "Unsafe Path" in the mail. Try to find
 it.
   
"Anderson, Jessica" wrote:
   
 I am still trying to troubleshoot this problem, and therefore, I
 still
need
 assistance.

 I am setting up another developer to use Struts, but we are
 receiving
  a
 message that tomcat cannot load controller and something about an
  Unsafe
 Path (see below).

 We installed the jaxp parser but he doesn't have ant - is ant
 required
 eventhough he will not be building from src dist?

 When trying to request a page using the controller a
  NullPointerExeption
is
 encountered.

 Any ideas?
 Thanks a lot,
 jessica

 -Original Message-
 From: Anderson, Jessica [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, March 15, 2001 1:48 PM
 To: '[EMAIL PROTECTED]'
 Subject: "Unsafe path" error

 Can anyone tell why I am getting this error when starting tomcat?

 2001-03-14 12:25:24 - Ctx( /best ): Unsafe path
   G:\BestPilot\src\trs\best
 /WEB-INF/struts-config.xml
 cannot load servlet name: controller

 thanks,
 jessica



RE: From where to download the XML parsers...

2001-03-08 Thread Shamdasani Nimmi-ANS004

http://java.sun.com/xml/download.html


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 4:32 AM
To: [EMAIL PROTECTED]
Subject: From where to download the XML parsers...


Hi all,
Can anyone tell me where do i get these packages I'm getting
ClassNotFoundException because of this.
I have downloaded the other XML parser classes...
This one is missing...
org.apache.crimson.jaxp.SAXParserFactoryImpl

thanks,
satyen



--
The information in this Internet email is confidential and may be 
legally privileged. It is intended solely for the addressee. Access 
to this Internet email by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this Internet email are subject to the terms and conditions
expressed in any applicable governing ING Barings' terms of business or
client engagement letter.

Visit us at www.ingbarings.com

--



RE: significance of property attribute in select tag

2001-03-08 Thread Shamdasani Nimmi-ANS004

Anand,

Try using:

html:select property='%= new String("paymentMode") %'

notice ' instead of "

-Nimmi
-Original Message-
From: Anand Raman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 08, 2001 10:09 AM
To: struts
Subject: significance of property attribute in select tag


hi guys

What exactly should be the value of the property attribute of select tag

I am using a string and it reports that the value doesnt confirm to the
TLD.

html:select property="paymentMode"
html:options collection="paymentModeList" property="id" 
labelproperty="value"/
/html:select

Tomcat reports that the property attribute's value doesnt confirm to the TLD.

Surprisingly it has been working in some other jsp files..

However when i use 

html:select property="%= new String("paymentMode") %"
html:options collection="paymentModeList" property="id" 
labelproperty="value"/
/html:select
Tomcat reports ::: Attribute paymentMode has no value

Please clarify

Thanks
Anand Raman



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.



Any reference on how to handle errors in web applications?

2001-03-07 Thread Shamdasani Nimmi-ANS004

Hi,

Does anyone have any references like articles, etc.  on the best practices for 
handling errors in web application. Are there any guidelines available anywhere?

Thanks in anticipation.

-Nimmi 





Question regarding javax.sql.Datasource

2001-03-06 Thread Shamdasani Nimmi-ANS004

Hi,

I am trying to convert my application from using DBConnectionBroker package for 
database pooling to Struts way of handling connection pooling. I am getting 
compilation error "javax.sql.Datasource not found" in JBuilder, which is using JDK 
1.3, while compiling one of my Action classes.

Doesn't  JDK1.3 already contain JDBC classes like javax.sql.Datasource or do I need to 
download another package?

Thanks in advance.

-Nimmi





RE: class notfound exception

2001-03-02 Thread Shamdasani Nimmi-ANS004

Did you put the form definition in action mappings in Struts-config.xml?

-Original Message-
From: soh syed [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 02, 2001 9:15 AM
To: [EMAIL PROTECTED]
Subject: class notfound exception



can anyone help with this
my classpath is all ok and i have the classes in right
folder but its still not visible to page


javax.servlet.ServletException: Exception creating
bean of class org.apache.struts.example.LogonForm:
java.lang.ClassNotFoundException:
org.apache.struts.example.LogonForm
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
at
_0002flogon_0002ejsplogon_jsp_0._jspService(Compiled
Code)   at org.apache

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/



RE: Question about iterate tag

2001-03-01 Thread Shamdasani Nimmi-ANS004

Craig,

I did try this way but it still does not work. Since supplier.value is of type 
SupplierBean, do I have to specify that anywhere?
--
jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/

TABLE

logic:iterate id="supplier" name="user" property="suppliers" 

TR
TDbean:write name="supplier" property="value.seq_nbr" scope="page"//TD
TDbean:write name="supplier" property="value.name" scope="page"//TD
TDbean:write name="supplier" property="value.countryName" scope="page"//TD
/TR

/logic:iterate

/TABLE
-
but this code which I am trying to replace with tags works:

jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/

TABLE
%
Hashtable hashTable = (Hashtable) user.getSuppliers();
for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) 
{
   SupplierBean supplier = (SupplierBean) e.nextElement();
%
TR
TDFONT face = "Arial"supplier.getCode() %/FONT/TD
TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
/TR

% } %
/TABLE

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 11:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Question about iterate tag


Shamdasani Nimmi-ANS004 wrote:

 Hi,

 Could someone please tell me what I am doing wrong below:

 user is a bean in session scope in my JSP and its getSuppliers() method returns a 
hashtable where keys are Suppliers Ids and elements are Supplier beans.

 logic:iterate collection="%= user.getSuppliers() %" id="supplier" 
type="com.motorola.mms.msqc.beans.SupplierBean"

 TR
 TDbean:write name="supplier" property="seq_nbr" scope="page" //TD
 TDbean:write name="supplier" property="name" scope="page" //TD
 TDbean:write name="supplier" property="country_name" scope="page" //TD
 /TR

 /logic:iterate


When you iterate over a Hashtable (or any other implementation of the Map interface), 
the object get for the "id" variable is actually an implementation of
the "Map.Entry" class, not the class of the value of the bean.  From this "Map.Entry" 
instance, however, you can easily get to the real information:

bean:write name="supplier" property="value.seq_nbr" scope="page"/

This works because a MapEntry has two properties -- key and value -- so we are using 
the nested property syntax to effectively call getValue().getSeq_nbr().


 Thanks in advance.

 -Nimmi

Craig




RE: Question about iterate tag

2001-03-01 Thread Shamdasani Nimmi-ANS004

Craig had suggested that I use:

bean:write name="supplier" property="value.seq_nbr" scope="page"/

but unfortunately it is not working.

-Original Message-
From: Matt Ho [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 12:27 PM
To: [EMAIL PROTECTED]
Subject: RE: Question about iterate tag


 I did try this way but it still does not work. Since
 supplier.value is of type SupplierBean, do I have to specify that
 anywhere?

I believe you want the bean to be SupplierBean rather than Supplier.  Your
request

bean:write name="supplier" property="value.seq_nbr" scope="page"/

seems like it would get translated into

out.print( String.valueOf(supplier.getValue().seq_nbr) );

or something akin to that which is Not At All what you're looking for.

M
 --
 jsp:useBean id="user" scope="session"
 type="com.motorola.mms.msqc.beans.UserBean"/

 TABLE

 logic:iterate id="supplier" name="user" property="suppliers" 

 TR
 TDbean:write name="supplier" property="value.seq_nbr"
 scope="page"//TD
 TDbean:write name="supplier" property="value.name" scope="page"//TD
 TDbean:write name="supplier" property="value.countryName"
 scope="page"//TD
 /TR

 /logic:iterate

 /TABLE
 -
 but this code which I am trying to replace with tags works:

 jsp:useBean id="user" scope="session"
 type="com.motorola.mms.msqc.beans.UserBean"/

 TABLE
 %
   Hashtable hashTable = (Hashtable) user.getSuppliers();
   for (Enumeration e = hashTable.elements(); e.hasMoreElements(); )
   {
  SupplierBean supplier = (SupplierBean) e.nextElement();
 %
 TR
 TDFONT face = "Arial"supplier.getCode() %/FONT/TD
 TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
 TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
 /TR

 % } %
 /TABLE

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 28, 2001 11:30 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Question about iterate tag


 Shamdasani Nimmi-ANS004 wrote:

  Hi,
 
  Could someone please tell me what I am doing wrong below:
 
  user is a bean in session scope in my JSP and its
 getSuppliers() method returns a hashtable where keys are
 Suppliers Ids and elements are Supplier beans.
 
  logic:iterate collection="%= user.getSuppliers() %"
 id="supplier" type="com.motorola.mms.msqc.beans.SupplierBean"
 
  TR
  TDbean:write name="supplier" property="seq_nbr" scope="page" //TD
  TDbean:write name="supplier" property="name" scope="page" //TD
  TDbean:write name="supplier" property="country_name"
 scope="page" //TD
  /TR
 
  /logic:iterate
 

 When you iterate over a Hashtable (or any other implementation of
 the Map interface), the object get for the "id" variable is
 actually an implementation of
 the "Map.Entry" class, not the class of the value of the bean.
 From this "Map.Entry" instance, however, you can easily get to
 the real information:

 bean:write name="supplier" property="value.seq_nbr" scope="page"/

 This works because a MapEntry has two properties -- key and value
 -- so we are using the nested property syntax to effectively call
 getValue().getSeq_nbr().

 
  Thanks in advance.
 
  -Nimmi

 Craig




RE: Question about iterate tag

2001-03-01 Thread Shamdasani Nimmi-ANS004

IT IS UNBELIEVABLE!

I have wasted so much time trying to get this to work and all that was missing in my 
JSP was this line:

%@ taglib uri="/Web-inf/struts-logic.tld" prefix="logic" %

The strange part is that I was not getting any error in the log files saying undefined 
tag or anything. 

I appreciate all the help I received :)

-Nimmi

-Original Message-----
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 01, 2001 11:04 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Question about iterate tag


Craig,

I did try this way but it still does not work. Since supplier.value is of type 
SupplierBean, do I have to specify that anywhere?
--
jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/

TABLE

logic:iterate id="supplier" name="user" property="suppliers" 

TR
TDbean:write name="supplier" property="value.seq_nbr" scope="page"//TD
TDbean:write name="supplier" property="value.name" scope="page"//TD
TDbean:write name="supplier" property="value.countryName" scope="page"//TD
/TR

/logic:iterate

/TABLE
-
but this code which I am trying to replace with tags works:

jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/

TABLE
%
Hashtable hashTable = (Hashtable) user.getSuppliers();
for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) 
{
   SupplierBean supplier = (SupplierBean) e.nextElement();
%
TR
TDFONT face = "Arial"supplier.getCode() %/FONT/TD
TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
/TR

% } %
/TABLE

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 11:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Question about iterate tag


Shamdasani Nimmi-ANS004 wrote:

 Hi,

 Could someone please tell me what I am doing wrong below:

 user is a bean in session scope in my JSP and its getSuppliers() method returns a 
hashtable where keys are Suppliers Ids and elements are Supplier beans.

 logic:iterate collection="%= user.getSuppliers() %" id="supplier" 
type="com.motorola.mms.msqc.beans.SupplierBean"

 TR
 TDbean:write name="supplier" property="seq_nbr" scope="page" //TD
 TDbean:write name="supplier" property="name" scope="page" //TD
 TDbean:write name="supplier" property="country_name" scope="page" //TD
 /TR

 /logic:iterate


When you iterate over a Hashtable (or any other implementation of the Map interface), 
the object get for the "id" variable is actually an implementation of
the "Map.Entry" class, not the class of the value of the bean.  From this "Map.Entry" 
instance, however, you can easily get to the real information:

bean:write name="supplier" property="value.seq_nbr" scope="page"/

This works because a MapEntry has two properties -- key and value -- so we are using 
the nested property syntax to effectively call getValue().getSeq_nbr().


 Thanks in advance.

 -Nimmi

Craig



RE: How do I iterate thru a hashtable using iterate tag?

2001-02-28 Thread Shamdasani Nimmi-ANS004

If the objects I am storing in my hashtable are of a bean type how would I access the 
properties of the bean in iterate? e.g., if the bean has get methods for properties 
Code, name, countryName, etc. I want to display these thru iterate tag on my JSP.

-Nimmi


-Original Message-
From: Pope, Tracy [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 8:41 AM
To: '[EMAIL PROTECTED]'
Subject: RE: How do I iterate thru a hashtable using iterate tag?


Craig answered a similar question on Sunday.  I think it might help you,
there he stated:

When you iterate over a Hashtable (or any other Map), the elements of 
the iteration are of class "Map.Entry", which has two properties --
"key" and "value".

The other posting did not appear to need a Hashtable and he further
suggested the possible use of an ArrayList, etc.  If that would work in your
situation it might simplify your problem.

Tracy



-----Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 2:34 PM
To: '[EMAIL PROTECTED]'
Subject: How do I iterate thru a hashtable using iterate tag?


Hi,

Could someone please tell me what I am doing wrong below:

user is a bean in session scope in my JSP and its getSuppliers() method
returns a hashtable where keys are Suppliers Ids and elements are Supplier
beans. 


logic:iterate collection="%= user.getSuppliers() %" id="supplier"
type="com.motorola.mms.msqc.beans.SupplierBean"

TR
TDbean:write name="supplier" property="seq_nbr" scope="page" //TD
TDbean:write name="supplier" property="name" scope="page" //TD
TDbean:write name="supplier" property="country_name" scope="page" //TD
/TR

/logic:iterate

--
I had the following code earlier and that was working.

%
Hashtable hashTable = (Hashtable) user.getSuppliers();
for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) {
SupplierBean supplier = (SupplierBean) e.nextElement();
%

TR

TD%= supplier.getCode() %/FONT/TD
TD%= supplier.getName() %/TD
TD%= supplier.getCountryName() %/FONT/TD
/TR

% } %

Thanks in advance.

-Nimmi



PLEASE HELP: How would I use the iterate tag here?

2001-02-28 Thread Shamdasani Nimmi-ANS004

Hi,

Could someone help me with replacing the JSP code below with iterate tag 
logic:iterate ? I have tried various permutations of logic:iterate but have been 
unsuccessful.

---
jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/

/TABLE
%
Hashtable hashTable = (Hashtable) user.getSuppliers();
for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) 
{
   SupplierBean supplier = (SupplierBean) e.nextElement();
%
TR
TD FONT face = "Arial"supplier.getCode() %/FONT/TD
TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
/TR

% } %
/TABLE
---

I can really use some help. Thanks in advance

-Nimmi



RE: PLEASE HELP: How would I use the iterate tag here?

2001-02-28 Thread Shamdasani Nimmi-ANS004

Wes,

I did try your code(and this is what I was trying before myself too) but the table 
still comes out to be blank whereas if I use the code below the supplier rows are 
displayed. So what's the problem?

Anyone else with suggestions?

-Nimmi 
-Original Message-
From: Wes Hodges [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 3:51 PM
To: [EMAIL PROTECTED]
Subject: RE: PLEASE HELP: How would I use the iterate tag here?



 Could someone help me with replacing the JSP code below with
 iterate tag logic:iterate ? I have tried various permutations
 of logic:iterate but have been unsuccessful.

 --
 -
 jsp:useBean id="user" scope="session"
 type="com.motorola.mms.msqc.beans.UserBean"/

 TABLE
 %
   Hashtable hashTable = (Hashtable) user.getSuppliers();
   for (Enumeration e = hashTable.elements(); e.hasMoreElements(); )
   {
  SupplierBean supplier = (SupplierBean) e.nextElement();
 %
 TR
 TD FONT face = "Arial"supplier.getCode() %/FONT/TD
 TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
 TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
 /TR

 % } %
 /TABLE

table
logic:iterate id="supplier" name="user" property="suppliers"
type="com.full.packagename.for.SupplierBean"
trtdfont face="Arial"bean:write name="supplier"
property="code"//td/tr
trtdfont face="Arial"bean:write name="supplier"
property="name"//td/tr
trtdfont face="Arial"bean:write name="supplier"
property="countryName"//td/tr
/tr
/logic:iterate
/table


Be sure to fix the package name in the type attr in logic:iterate.
This also assumes that there is an object in the session scope called user.

Wes



RE: PLEASE HELP: How would I use the iterate tag here?

2001-02-28 Thread Shamdasani Nimmi-ANS004

Is there a problem that getSuppliers() method returns a Hashtable and not an ArrayList?

-Nimmi

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 3:59 PM
To: '[EMAIL PROTECTED]'
Subject: RE: PLEASE HELP: How would I use the iterate tag here?


Wes,

I did try your code(and this is what I was trying before myself too) but the table 
still comes out to be blank whereas if I use the code below the supplier rows are 
displayed. So what's the problem?

Anyone else with suggestions?

-Nimmi 
-Original Message-
From: Wes Hodges [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 3:51 PM
To: [EMAIL PROTECTED]
Subject: RE: PLEASE HELP: How would I use the iterate tag here?



 Could someone help me with replacing the JSP code below with
 iterate tag logic:iterate ? I have tried various permutations
 of logic:iterate but have been unsuccessful.

 --
 -
 jsp:useBean id="user" scope="session"
 type="com.motorola.mms.msqc.beans.UserBean"/

 TABLE
 %
   Hashtable hashTable = (Hashtable) user.getSuppliers();
   for (Enumeration e = hashTable.elements(); e.hasMoreElements(); )
   {
  SupplierBean supplier = (SupplierBean) e.nextElement();
 %
 TR
 TD FONT face = "Arial"supplier.getCode() %/FONT/TD
 TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
 TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
 /TR

 % } %
 /TABLE

table
logic:iterate id="supplier" name="user" property="suppliers"
type="com.full.packagename.for.SupplierBean"
trtdfont face="Arial"bean:write name="supplier"
property="code"//td/tr
trtdfont face="Arial"bean:write name="supplier"
property="name"//td/tr
trtdfont face="Arial"bean:write name="supplier"
property="countryName"//td/tr
/tr
/logic:iterate
/table


Be sure to fix the package name in the type attr in logic:iterate.
This also assumes that there is an object in the session scope called user.

Wes



RE: PLEASE HELP: How would I use the iterate tag here?

2001-02-28 Thread Shamdasani Nimmi-ANS004

No, I am using JDK 1.3

-Nimmi

-Original Message-
From: D'Orto, David [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 4:11 PM
To: '[EMAIL PROTECTED]'
Subject: RE: PLEASE HELP: How would I use the iterate tag here?


Are you using an older JDK?  This tag requires JDK 1.2 or later.

Just a thought,
Dave

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 5:02 PM
To: '[EMAIL PROTECTED]'
Subject: RE: PLEASE HELP: How would I use the iterate tag here?


Is there a problem that getSuppliers() method returns a Hashtable and not an
ArrayList?

-Nimmi

-Original Message-
From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 3:59 PM
To: '[EMAIL PROTECTED]'
Subject: RE: PLEASE HELP: How would I use the iterate tag here?


Wes,

I did try your code(and this is what I was trying before myself too) but the
table still comes out to be blank whereas if I use the code below the
supplier rows are displayed. So what's the problem?

Anyone else with suggestions?

-Nimmi 
-Original Message-
From: Wes Hodges [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 3:51 PM
To: [EMAIL PROTECTED]
Subject: RE: PLEASE HELP: How would I use the iterate tag here?



 Could someone help me with replacing the JSP code below with
 iterate tag logic:iterate ? I have tried various permutations
 of logic:iterate but have been unsuccessful.

 --
 -
 jsp:useBean id="user" scope="session"
 type="com.motorola.mms.msqc.beans.UserBean"/

 TABLE
 %
   Hashtable hashTable = (Hashtable) user.getSuppliers();
   for (Enumeration e = hashTable.elements(); e.hasMoreElements(); )
   {
  SupplierBean supplier = (SupplierBean) e.nextElement();
 %
 TR
 TD FONT face = "Arial"supplier.getCode() %/FONT/TD
 TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
 TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
 /TR

 % } %
 /TABLE

table
logic:iterate id="supplier" name="user" property="suppliers"
type="com.full.packagename.for.SupplierBean"
trtdfont face="Arial"bean:write name="supplier"
property="code"//td/tr
trtdfont face="Arial"bean:write name="supplier"
property="name"//td/tr
trtdfont face="Arial"bean:write name="supplier"
property="countryName"//td/tr
/tr
/logic:iterate
/table


Be sure to fix the package name in the type attr in logic:iterate.
This also assumes that there is an object in the session scope called user.

Wes



RE: PLEASE HELP: How would I use the iterate tag here?

2001-02-28 Thread Shamdasani Nimmi-ANS004

Martin,

According to Craig's email:
--
When you iterate over a Hashtable (or any other Map), the elements of
the iteration are of class "Map.Entry", which has two properties --
"key" and "value".

logic:iterate id="impl" name="loadImpl" property="impl"
The curent value is bean:write name="impl" property="value"/
/logic:iterate
-

Since the "value" in my case is of the type SupplierBean how would I get access to the 
properties of SupplierBean?

-Nimmi

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 4:19 PM
To: [EMAIL PROTECTED]
Subject: Re: PLEASE HELP: How would I use the iterate tag here?


Yes, there is. See Craig McClanahan's explanation in the archives:

http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg03625.html

Hope this helps.

--
Martin Cooper
Tumbleweed Communications

- Original Message -
From: "Shamdasani Nimmi-ANS004" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 28, 2001 2:02 PM
Subject: RE: PLEASE HELP: How would I use the iterate tag here?


 Is there a problem that getSuppliers() method returns a Hashtable and not
an ArrayList?

 -Nimmi

 -Original Message-
 From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 28, 2001 3:59 PM
 To: '[EMAIL PROTECTED]'
 Subject: RE: PLEASE HELP: How would I use the iterate tag here?


 Wes,

 I did try your code(and this is what I was trying before myself too) but
the table still comes out to be blank whereas if I use the code below the
supplier rows are displayed. So what's the problem?

 Anyone else with suggestions?

 -Nimmi
 -Original Message-
 From: Wes Hodges [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 28, 2001 3:51 PM
 To: [EMAIL PROTECTED]
 Subject: RE: PLEASE HELP: How would I use the iterate tag here?



  Could someone help me with replacing the JSP code below with
  iterate tag logic:iterate ? I have tried various permutations
  of logic:iterate but have been unsuccessful.
 
  --
  -
  jsp:useBean id="user" scope="session"
  type="com.motorola.mms.msqc.beans.UserBean"/
 
  TABLE
  %
  Hashtable hashTable = (Hashtable) user.getSuppliers();
  for (Enumeration e = hashTable.elements(); e.hasMoreElements(); )
  {
 SupplierBean supplier = (SupplierBean) e.nextElement();
  %
  TR
  TD FONT face = "Arial"supplier.getCode() %/FONT/TD
  TDFONT face = "Arial"%= supplier.getName()
%/FONT/TD/FONT/TD
  TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
  /TR
 
  % } %
  /TABLE

 table
 logic:iterate id="supplier" name="user" property="suppliers"
 type="com.full.packagename.for.SupplierBean"
 trtdfont face="Arial"bean:write name="supplier"
 property="code"//td/tr
 trtdfont face="Arial"bean:write name="supplier"
 property="name"//td/tr
 trtdfont face="Arial"bean:write name="supplier"
 property="countryName"//td/tr
 /tr
 /logic:iterate
 /table


 Be sure to fix the package name in the type attr in logic:iterate.
 This also assumes that there is an object in the session scope called
user.

 Wes




RE: PLEASE HELP: How would I use the iterate tag here?

2001-02-28 Thread Shamdasani Nimmi-ANS004

Wes,

I did try the code below but it still doesn't work. Anyone has any other suggestion? 

Imagine all this trouble when all I want to do is to make my "WORKING" JSP code look 
cleaner by using iterate tag:


TABLE
logic:iterate id="supplierMapEntry" name="user" property="suppliers" 

bean:define id="supplier" name="supplierMapEntry" property="value" 
type="com.motorola.mms.msqc.beans.SupplierBean"/

TR
TDFONT face = "Arial"bean:write name="supplier" property="code"//FONT/TD
TDFONT face = "Arial"bean:write name="supplier" property="name"//FONT/TD
TDFONT face = "Arial"bean:write name="supplier" 
property="countryName"//FONT/TD
/TR

/logic:iterate
/TABLE
--
This is what I am trying to replace:

jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/

TABLE
%
Hashtable hashTable = (Hashtable) user.getSuppliers();
for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) 
{
   SupplierBean supplier = (SupplierBean) e.nextElement();
%
TR
TD FONT face = "Arial"supplier.getCode() %/FONT/TD
TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD
TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD
/TR

% } %
/TABLE



RE: PLEASE HELP: How would I use the iterate tag here? Where are you Craig McClanahan?

2001-02-28 Thread Shamdasani Nimmi-ANS004

I have tried both of the ways below without any luck:

logic:iterate id="supplier" name="user" property="suppliers" 
TR
TDFONT face = "Arial"bean:write name="supplier" 
property="value.code"//FONT/TD
TDFONT face = "Arial"bean:write name="supplier" 
property="value.name"//FONT/TD
TDFONT face = "Arial"bean:write name="supplier" 
property="countryName"//FONT/TD
/TR

/logic:iterate

and I have tried this:

logic:iterate id="supplierMapEntry" name="user" property="suppliers" 
bean:define id="supplier" name="supplierMapEntry" property="value" 
type="com.motorola.mms.msqc.beans.SupplierBean"/

TR
TDFONT face = "Arial"bean:write name="supplier" property="code"//FONT/TD
TDFONT face = "Arial"bean:write name="supplier" property="name"//FONT/TD
TDFONT face = "Arial"bean:write name="supplier" 
property="countryName"//FONT/TD
/TR

/logic:iterate

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 5:38 PM
To: [EMAIL PROTECTED]
Subject: Re: PLEASE HELP: How would I use the iterate tag here?


You should be able to use nested properties:

bean:write name="item" property="value.code"/
bean:write name="item" property="value.country"/
bean:write name="item" property="value.countryName"/

--
Martin Cooper
Tumbleweed Communications


- Original Message -
From: "Shamdasani Nimmi-ANS004" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 28, 2001 2:25 PM
Subject: RE: PLEASE HELP: How would I use the iterate tag here?


 Martin,

 According to Craig's email:
 --
 When you iterate over a Hashtable (or any other Map), the elements of
 the iteration are of class "Map.Entry", which has two properties --
 "key" and "value".

 logic:iterate id="impl" name="loadImpl" property="impl"
 The curent value is bean:write name="impl" property="value"/
 /logic:iterate
 -

 Since the "value" in my case is of the type SupplierBean how would I get
access to the properties of SupplierBean?

 -Nimmi

 -Original Message-
 From: Martin Cooper [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 28, 2001 4:19 PM
 To: [EMAIL PROTECTED]
 Subject: Re: PLEASE HELP: How would I use the iterate tag here?


 Yes, there is. See Craig McClanahan's explanation in the archives:

 http://www.mail-archive.com/struts-user%40jakarta.apache.org/msg03625.html

 Hope this helps.

 --
 Martin Cooper
 Tumbleweed Communications

 - Original Message -
 From: "Shamdasani Nimmi-ANS004" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 28, 2001 2:02 PM
 Subject: RE: PLEASE HELP: How would I use the iterate tag here?


  Is there a problem that getSuppliers() method returns a Hashtable and
not
 an ArrayList?
 
  -Nimmi
 
  -Original Message-
  From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 28, 2001 3:59 PM
  To: '[EMAIL PROTECTED]'
  Subject: RE: PLEASE HELP: How would I use the iterate tag here?
 
 
  Wes,
 
  I did try your code(and this is what I was trying before myself too) but
 the table still comes out to be blank whereas if I use the code below the
 supplier rows are displayed. So what's the problem?
 
  Anyone else with suggestions?
 
  -Nimmi
  -Original Message-
  From: Wes Hodges [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 28, 2001 3:51 PM
  To: [EMAIL PROTECTED]
  Subject: RE: PLEASE HELP: How would I use the iterate tag here?
 
 
 
   Could someone help me with replacing the JSP code below with
   iterate tag logic:iterate ? I have tried various permutations
   of logic:iterate but have been unsuccessful.
  
   --
   -
   jsp:useBean id="user" scope="session"
   type="com.motorola.mms.msqc.beans.UserBean"/
  
   TABLE
   %
   Hashtable hashTable = (Hashtable) user.getSuppliers();
   for (Enumeration e = hashTable.elements(); e.hasMoreElements(); )
   {
  SupplierBean supplier = (SupplierBean) e.nextElement();
   %
   TR
   TD FONT face = "Arial"supplier.getCode() %/FONT/TD
   TDFONT face = "Arial"%= supplier.getName()
 %/FONT/TD/FONT/TD
   TDFONT face = "Arial"%= supplier.getCountryName

Question about iterate tag

2001-02-27 Thread Shamdasani Nimmi-ANS004

Hi,

Could someone please tell me what I am doing wrong below:

user is a bean in session scope in my JSP and its getSuppliers() method returns a 
hashtable where keys are Suppliers Ids and elements are Supplier beans. 


logic:iterate collection="%= user.getSuppliers() %" id="supplier" 
type="com.motorola.mms.msqc.beans.SupplierBean"

TR
TDbean:write name="supplier" property="seq_nbr" scope="page" //TD
TDbean:write name="supplier" property="name" scope="page" //TD
TDbean:write name="supplier" property="country_name" scope="page" //TD
/TR

/logic:iterate

Thanks in advance.

-Nimmi





How do I iterate thru a hashtable using iterate tag?

2001-02-27 Thread Shamdasani Nimmi-ANS004

Hi,

Could someone please tell me what I am doing wrong below:

user is a bean in session scope in my JSP and its getSuppliers() method returns a 
hashtable where keys are Suppliers Ids and elements are Supplier beans. 


logic:iterate collection="%= user.getSuppliers() %" id="supplier" 
type="com.motorola.mms.msqc.beans.SupplierBean"

TR
TDbean:write name="supplier" property="seq_nbr" scope="page" //TD
TDbean:write name="supplier" property="name" scope="page" //TD
TDbean:write name="supplier" property="country_name" scope="page" //TD
/TR

/logic:iterate

--
I had the following code earlier and that was working.

%
Hashtable hashTable = (Hashtable) user.getSuppliers();
for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) {
SupplierBean supplier = (SupplierBean) e.nextElement();
%

TR

TD%= supplier.getCode() %/FONT/TD
TD%= supplier.getName() %/TD
TD%= supplier.getCountryName() %/FONT/TD
/TR

% } %

Thanks in advance.

-Nimmi




RE: How do I iterate thru a hashtable using iterate tag?

2001-02-27 Thread Shamdasani Nimmi-ANS004

No, the typo was on my email not in the code.

-Nimmi

-Original Message-
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 2:51 PM
To: [EMAIL PROTECTED]
Subject: Re: How do I iterate thru a hashtable using iterate tag?


Nimmi,

Check the properties names. In the working variant they are:
code, name, countryName. In the 2nd (not working variant) they are:
seq_nbr, name, country_name.
The second, maybe underscore sign is not allowed.
Maya

Shamdasani Nimmi-ANS004 wrote:

 Hi,

 Could someone please tell me what I am doing wrong below:

 user is a bean in session scope in my JSP and its getSuppliers() method returns a 
hashtable where keys are Suppliers Ids and elements are Supplier beans.

 logic:iterate collection="%= user.getSuppliers() %" id="supplier" 
type="com.motorola.mms.msqc.beans.SupplierBean"

 TR
 TDbean:write name="supplier" property="seq_nbr" scope="page" //TD
 TDbean:write name="supplier" property="name" scope="page" //TD
 TDbean:write name="supplier" property="country_name" scope="page" //TD
 /TR

 /logic:iterate

 --
 I had the following code earlier and that was working.

 %
 Hashtable hashTable = (Hashtable) user.getSuppliers();
 for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) {
 SupplierBean supplier = (SupplierBean) e.nextElement();
 %

 TR

 TD%= supplier.getCode() %/FONT/TD
 TD%= supplier.getName() %/TD
 TD%= supplier.getCountryName() %/FONT/TD
 /TR

 % } %

 Thanks in advance.

 -Nimmi



How does nested syntax in property attribute work

2001-02-27 Thread Shamdasani Nimmi-ANS004

Hi,

In some of the e-mails I have seen nested syntax being used for property attribute, 
e.g.,

html:text property="mailingAddress.street"/

what does that mean? Is it that the getMailingAddress() method of the bean will be 
called, and then what is ".street" for?

-Nimmi





RE: html:select again!

2001-02-16 Thread Shamdasani Nimmi-ANS004

Dennis,

Here's is how I have done it with javascript. With every submit I am sending in a new 
value for the hidden field 'command' and in my action class I look into this value of 
'command' to do the next combobox selection criteria thru a bean and populate the 
corresponding property in that bean.

Hope this helps.

-Nimmi


-Original Message-
From: Dennis [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 16, 2001 11:00 AM
To: [EMAIL PROTECTED]
Subject: html:select again!


I thought I saw a similar request not too long ago, but can't seem to find
it nor any responses to it - are there any examples of the html:select tag
beyond the very basic one used in the struts example?  I don't have any
javascript background, so I'm having trouble using the onchange attribute to
return me to the current page (so I can change the value of another
html:select based on the current value of the first).

Thanks,

Dennis


 Selection.jsp


RE: input form with indexed properties, when?

2001-02-13 Thread Shamdasani Nimmi-ANS004

Thanks Craig, that's exactly what I want to do and I am sure there will be others who 
want to do the same. I did enter a request to add this feature in 1.0 on Bugzilla.

Till the time that feature is available thru Struts I wonder how I should handle such 
a form. Do you have a suggestion?

Thanks in advance.

-Nimmi
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 11:45 AM
To: [EMAIL PROTECTED]
Subject: Re: input form with indexed properties, when?


Maya Muchnik wrote:

 This example not only display multiple rows, you can ADD rows. Maybe I do not 
understand what is your problem.


I believe that Nimmi is asking for the ability to edit the detail lines (of a 
master-detail) display on the original page, instead of going to a separate page for 
each detail add/change/delete.  It would technically be feasible to do this
with Struts 1.0, but would take an incredible amount of tinkering with the property 
names.

Improvements in this area are already on the TODO list for Struts 1.1.

Craig




Confusion about struts.jar in classpath

2001-02-13 Thread Shamdasani Nimmi-ANS004

Hi,

I have been following the threads on struts.jar issue and this is what I have. I have 
deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT. 

Here's the strange situation:

If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my 
own application. I get the error in the attached  'my_application_error.html' file.

 my_application_error.htm 

Now if I add struts.jar in my classpath, I can run my own application but CANNOT run 
struts-example now. The error I get is in 'struts_example_error.html' file

 struts_example_error.htm 


So what is the right way?

-Nimmi

 my_application_error.htm
 struts_example_error.htm


RE: Confusion about struts.jar in classpath

2001-02-13 Thread Shamdasani Nimmi-ANS004

Craig,
 
I did a find on 'struts.jar' on my 'D drive' and these are all the occurences of 
'struts.jar':
 
D:\jakarta-struts\lib
D:\mqc_struts_05\Web-inf\lib- This is a saved copy of my 
application with struts0.5 version
D:\tomcat-3.2.1\webapps\msqc\WEB-INF\lib  This is the current 
version of my app with struts 1.0
D:\tomcat-3.2.1\webapps\struts-documentation\WEB-INF\lib
D:\tomcat-3.2.1\webapps\struts-example\WEB-INF\lib
D:\tomcat-3.2.1\webapps\struts-template\WEB-INF\lib
D:\tomcat-3.2.1\webapps\struts-test\WEB-INF\lib
D:\tomcat-3.2.1\webapps\struts-upload\WEB-INF\lib
 
 
As I said before 
if I DON'T add struts.jar in classpath:  struts-example WORKS  but my application DOES 
NOT WORK.
If I add struts.jar in classpath: struts-example DOES NOT WORK but my application 
WORKS.
 
 
Is something in my classpath bringing this behavior?
 
 
Here are my environment variables if needed:
 
CLASSPATH:
.;d:\jdk1.3\lib\tools.jar;d:\jdk1.3\lib\dt.jar;d:\jdbc\classes12.zip;d:\tomcat-3.2.1\webapps\msqc\Webinf\classes\DbConnectionBroker1.0.11.zip;d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes
 
PATH:
D:\orant\bin;d:\jdk1.3\bin;d:\jdbc;C:\WINNT\system32;C:\WINNT;C:\Program Files\Mts
 
JAVA_HOME:
d:\jdk1.3
 
TOMCAT_HOME:
d:\tomcat-3.2.1
 
 
 

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 3:21 PM
To: [EMAIL PROTECTED]
Subject: Re: Confusion about struts.jar in classpath


Shamdasani Nimmi-ANS004 wrote: 

Hi,



I have been following the threads on struts.jar issue and this is what I have. I have 
deployed an application using struts 1.0 build with tomcat 3.2.1 on windows NT. 



Here's the strange situation:



If I don't add struts.jar in my classpath, I can run struts-example but CANNOT run my 
own application. I get the error in the attached  'my_application_error.html' file.



 my_application_error.htm 

Are you also checking to make sure there is not a copy of struts.jar in your 
$JAVA_HOME/jre/lib/ext directory?  All JAR files there are automatically added to the 
classpath as well.

Now if I add struts.jar in my classpath, I can run my own application but CANNOT run 
struts-example now. The error I get is in 'struts_example_error.html' file



 struts_example_error.htm

This error means that there was some other problem in initializing the ActionServlet 
instance -- check your other Tomcat log files for details.

The most likely error message is a class not found exception on the User class, which 
is *exactly* the reason why you should not put struts.jar on your CLASSPATH. 


So what is the right way?

See my following message -- on a new thread to ensure that it is very visible.

-Nimmi

Craig 
  


 servlet.log
 jasper.log


RE: Confusion about struts.jar in classpath - THAT DID IT

2001-02-13 Thread Shamdasani Nimmi-ANS004

Thanks Craig,

Removing 'd:\tomcat-3.2.1\webapps\msqc\Web-inf\classes' from my classpath did the 
trick.

BTW webinf instead of web-inf was a typo in my e-mail

-Nimmi

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 13, 2001 4:57 PM
To: [EMAIL PROTECTED]
Subject: Re: Confusion about struts.jar in classpath


Shamdasani Nimmi-ANS004 wrote:

 Craig,

 I did a find on 'struts.jar' on my 'D drive' and these are all the occurences of 
'struts.jar':

 D:\jakarta-struts\lib
 D:\mqc_struts_05\Web-inf\lib- This is a saved copy of my 
application with struts0.5 version
 D:\tomcat-3.2.1\webapps\msqc\WEB-INF\lib  This is the 
current version of my app with struts 1.0
 D:\tomcat-3.2.1\webapps\struts-documentation\WEB-INF\lib
 D:\tomcat-3.2.1\webapps\struts-example\WEB-INF\lib
 D:\tomcat-3.2.1\webapps\struts-template\WEB-INF\lib
 D:\tomcat-3.2.1\webapps\struts-test\WEB-INF\lib
 D:\tomcat-3.2.1\webapps\struts-upload\WEB-INF\lib


 As I said before
 if I DON'T add struts.jar in classpath:  struts-example WORKS  but my application 
DOES NOT WORK.
 If I add struts.jar in classpath: struts-example DOES NOT WORK but my application 
WORKS.


 Is something in my classpath bringing this behavior?


Possibly.  You have the following directory on the end of your classpath:

d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes

which is going to cause any classes found there to be loaded from the "wrong" class 
loader.  Try it without this directory on your classpath.  It also looks like your 
CLASSPATH entry for the
connection broker has a typo in it ("webinf" instead of "web-inf").



 Here are my environment variables if needed:

 CLASSPATH:
 
.;d:\jdk1.3\lib\tools.jar;d:\jdk1.3\lib\dt.jar;d:\jdbc\classes12.zip;d:\tomcat-3.2.1\webapps\msqc\Webinf\classes\DbConnectionBroker1.0.11.zip;d:\tomcat-3.2.1\webapps\msqc\Web-inf\classes


 PATH:
 D:\orant\bin;d:\jdk1.3\bin;d:\jdbc;C:\WINNT\system32;C:\WINNT;C:\Program Files\Mts

 JAVA_HOME:
 d:\jdk1.3

 TOMCAT_HOME:
 d:\tomcat-3.2.1


If the above doesn't solve it, could you double check the contents of 
"d:\jdk1.3\jre\lib\ext" just to make sure there is nothing suspicious there?

In addition, could you post (or send me privately) the contents of the log files that 
Tomcat creates when trying to access your own application?  You will need to shut 
Tomcat down afterwards
in order for the log files to have any contents, due to Windows limitations.

Craig




RE: question on errors, how to handle

2001-02-01 Thread Shamdasani Nimmi-ANS004

Craig,

Is there a way that only the error message(e.g., username is required) appears next to 
the error field instead of the headings:

VALIDATION ERROR
You must correct the following error(s) before proceeding


also appearing with it. It will be good if the heading could be at the top of the page 
and the actual message next to the culprit field.

-Nimmi

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 31, 2001 6:37 PM
To: [EMAIL PROTECTED]
Subject: Re: question on errors, how to handle


Mike Campbell wrote:

  I want to be able to have a set of errors returned to an input page
 such that I can spit out an error of a particular TYPE next to a
 particular input, to indicate something in particular was wrong with
 this particular field.  I'm a bit lost on how to accomplish this.Take
 your typical login screen consisting of user name and password.  If
 the login fails, I want the screen to be redrawn with errors that
 pertain to the user name field next to the user name field, and the
 errors associated with the password next to the password field.
 (Ignoring formatting), if my login screen looked
 like:---Login:
 ___Password:
 _---...and
 I typed in "foo9" in user name and nothing in password and given some
 contrived validation rules which will be obvious from the example
 below, I want something like the following to be
 shown:---Login:
 foo9* The user name must be over 8 characters long* The user
 name must only consist of alphabetic characters.Password:
 _* The password was left blank, it must be
 provided.---Figuring
 out all these conditions, constructing the ActionError class with the
 ApplicationResources.properties key and adding the ActionErrors to the
 request is pretty simple, but I'm lost on the "how to assign an error
 to a particular input field" concept.Is this covered in the
 example?Thanks. --


  Mike Campbell Email: [EMAIL PROTECTED]
  S1 Corporationvoice: 678.421.4641
  Software Engineer fax: 678.421.4865
  R  D web: http://www.s1.com/
  Black Knight


When you store an error in the ActionErrors collection, you have the
option to associate it with a particular field:

ActionErrors errors = new ActionErrors();
String username = formBean.getUsername();
String password = formBean.getPassword();
if ((username == null) || (username.length()  1)
errors.add(new ActionError("username",
"error.username.required"));
... and so on ...

Although the example app does not do so, you can utilize a recently
added feature of the html:errors tag to place the messages where you
want:

... prompt and field for the "username" field ...
html:errors property="username"/

... prompt and field for the "password" field ...
html:errors property="password"/

Craig McClanahan




RE: read only values in forms

2001-01-26 Thread Shamdasani Nimmi-ANS004

Craig,

If the form displays the data in a table form (i.e., rows of data) where some of the 
fields in each row are display only and the others are editable and need to be 
validated, is there is way to to that with ActionForm?

Thanks.

-Nimmi

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 1:53 PM
To: [EMAIL PROTECTED]
Subject: Re: read only values in forms


"Geddes, Mark (ANTS)" wrote:

 Ensure that your id value is an attribute of the FormBean associated with
 this form.
 So if your FormBean is "dataForm" with the attribute "id" then use something
 like:

   bean:write name="dataForm" property="id"/

 Of course you will need to populate the FormBean with the id value.


The Struts example app uses this approach to display a field as editable or not 
editable, depending on the circumstances.  Check out the handling of the "username" 
property on the "registration.jsp" page.


 Mark

Craig



 -Original Message-
 From: Florian Zwerina [mailto:[EMAIL PROTECTED]]
 Sent: 26 January 2001 09:50
 To: '[EMAIL PROTECTED]'
 Subject: read only values in forms

 Hi !

 Im looking for a way to display 'read only' values in a form
 (I dont want an input filed - just plain old text for some of the
 properties)

 html:form action="saveData.do" 
 html:hidden property="action"/
 table border="0" width="100%"
   tr
 th align="right"
   bean:message key="prompt.id"/
 /th
 td align="left"
 html:text property="ID" size="10"/
 /td
   /tr

   tr
 th align="right"
   bean:message key="prompt.name"/
 /th
 td align="left"
 html:text property="name" size="50"/
 /td
   /tr

   tr
 th align="right"
   bean:message key="prompt.manager"/
 /th
 td align="left"
   html:text property="manager" size="50"/
 /td
   /tr

 ... button stuff will be here.

 /table

 /html:form

 so what i want to have is an input field for 'name' and 'manager'
 and just diplay the value of 'ID'.

 any ideas ?

 regards

 flo.

 ***
 This email message contains confidential information for the above addressee only.  
If you are not the intended addressee you must not disclose or use the information in 
any manner whatsoever.

 Any opinion or views contained in this email message are those of the sender, do not 
represent those of the Company in any way and reliance should not be placed upon its 
contents.

 Unless otherwise stated this email message is not intended to be contractually 
binding.  Where an Agreement exists between our respective companies and there is 
conflict between the contents of this email message and the Agreement then the terms 
of that Agreement shall prevail.

 Abbey National Treasury Services plc. Registered in England. Registered Office:  
Abbey House, Baker Street, London NW1 6XL.  Company Registration No: 2338548.  
Regulated by the SFA
 ***



RE: New struts user - status Qs

2000-11-10 Thread Shamdasani Nimmi-ANS004

http://www.mail-archive.com/struts-user%40jakarta.apache.org/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 10, 2000 11:47 AM
To: [EMAIL PROTECTED]
Subject: New struts user - status Qs



I just got a small system running using sturts on a mysql database. 
A few Qs:

1) Is there an archive of the email list anywhere ?

2) Anyone done anything to help rapidly create an application ?

I created a QD application builder to help get started.  It reads the
structure of Mysql database and creates the Form/Action classes as well as
a list and edit JSP and the action.xml -- any place I can put it for other
users ? 

(note: it's in perl and uses the 0.5 release, and is probably written
totally wrong, BUT it does creating working aps)

Later ...

Rich Roth --- On-the-Net

Direct:  Box 927, Northampton, MA 01061

Email: [EMAIL PROTECTED]  Url: http://east.on-the-net.com
  ~~~   i-Depth lets you Add Instant Depth to your Website~~~
  ~~~  7 day free trial at: http://www.i-depth.com/signup.htm ~~~







Question about database pooling

2000-11-07 Thread Shamdasani Nimmi-ANS004

In my application I have a DatabaseServlet which gets a pool of database connections 
on startup.

What would be the best approach for my java beans to get a free connection from the 
pool? 

Should I store the pool in the servletContext and the action classes get a connection 
from the pool and pass the connection to the java bean? In such a case who should 
return the connection back to the pool, the java beans or the action classes?

Thanks in advance.

-Nimmi



How would one update indexed properties with Struts?

2000-11-03 Thread Shamdasani Nimmi-ANS004

Hi All,

I have a bean  userOrderListBean with a property 'getOrderList' which is a list of 
'Order' Bean. I would like to show the rows from getOrderList to the user on a JSP and 
allow them to update the information.

How does one update the indexed properties using Struts? And does userOrderListBean  
have to implement ValidatingActionForm?

If someone has an example I would really appreciate it.

Thanks in advance.

-Nimmi



PLEASE HELP: Does Struts allow update of the indexed properties?

2000-11-01 Thread Shamdasani Nimmi-ANS004

Hi All,

I have a bean  userOrderListBean with a property 'getOrderList' which is a list of 
'Order' Bean. I would like to show the rows from getOrderList to the user on a JSP and 
allow them to update the information.

How does one update the indexed properties using Struts? And does userOrderListBean  
have to implement ValidatingActionForm?

If someone has an example I would really appreciate it.

Thanks in advance.

-Nimmi