ActionForm Connection from a Pool

2001-11-19 Thread Jürgen Leonhardt

Hi there,

does anybody know, how to access a database in an ActionForm
with a Connection from a pool stored in the ServletContext?

Or how can i access the ServletContext in my webapp from any class
(Not as a Servlet or JSP, lets say a bean) ?

thanks for your help

regards

Jürgen Leonhardt

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




RE: reusing form for readonly

2001-11-19 Thread Tom Klaasen (TeleRelay)

Templates come to mind: one template for viewing, one for editing, and
then you'd only need one select.

Never worked with templates though, so I'm absolutely not sure about
this. Would love to hear about your solution though, as I am going to do
the same in the near future :-)

tomK

 -Original Message-
 From: Scriven, Marcos [mailto:[EMAIL PROTECTED]] 
 Sent: zondag 18 november 2001 15:32
 To: 'Struts Users Mailing List'
 Subject: reusing form for readonly
 
 
 Hi
 
 I have a form which can be in several different modes: VIEW, 
 ADD, EDIT, and
 DELETE
 
 If I am in view mode (which I have enumerated as 0 in an 
 interface called
 WebConstants.VIEW), I want the values in my html:text fields to be
 readonly.
 
 I can do this on a field by field basis, as such:
 
 logic:equal name=productForm property=action 
 scope=request
 value=%=String.valueOf(WebConstants.VIEW)%
 html:text styleClass=form2 property=tradeProduct.ISIN
 size=17 maxlength=17 readonly=true
 onBlur=javascript:validateName(this); /
 /logic:equal
 logic:notEqual name=productForm property=action 
 scope=request
 value=%=String.valueOf(WebConstants.VIEW)%
 html:text styleClass=form2 property=tradeProduct.ISIN
 size=17 maxlength=17 onBlur=javascript:validateName(this); /
 /logic:notEqual
 
 However, is there a shorter/more succinct way? I have many 
 fields within my
 form, and adding all these equal/notEqual tags adds a lot of 
 lines to my JSP
 
 
 Thanks
 
 Marcos
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 

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




Re: ActionForm Connection from a Pool

2001-11-19 Thread Jin

1) ActionForms have the method getServlet() which returns an instance of the
ActionServlet.  From this you have access to the ServletContext.

2) The easiest way to access the ServletContext from your bean would be to
pass an instance of the ActionServlet to your bean.  This somewhat goes
against the struts design principles (in the docs anyway) in that they state
that business logic beans should be unaware of the webapp (ie
javax.servlet.xxx) to maintain pluggablility.

IMHO it is ok to create a kind of mediator layer between the action layer
and business logic bean layer that is aware of the webapp and the business
logic layer and can do things like read request params etc.

Hope this helps

Jin
- Original Message -
From: Jürgen Leonhardt [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 10:01 AM
Subject: ActionForm  Connection from a Pool


 Hi there,

 does anybody know, how to access a database in an ActionForm
 with a Connection from a pool stored in the ServletContext?

 Or how can i access the ServletContext in my webapp from any class
 (Not as a Servlet or JSP, lets say a bean) ?

 thanks for your help

 regards

 Jürgen Leonhardt

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



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




RE: Setting up a form in an action

2001-11-19 Thread Tom Klaasen (TeleRelay)



 -Original Message-
 From: Scriven, Marcos [mailto:[EMAIL PROTECTED]] 
 Sent: zondag 18 november 2001 18:32
 To: 'Struts Users Mailing List'
 Subject: Setting up a form in an action
 
 
 I am trying to do this sequence of events:
 
 1) setupProductForm.do?isin=abcd
 
 2) This creates a productForm instance, and initialises the 
 product, based
 on the given ISIN
 
 3) persistProduct - This should save the product
 
 What happens at the moment is my form is my setupProductForm action
 correctly loads the product, and sets it on the form:
 
 productForm.setTradeProduct(tradeProduct);
 
 On success, I forward to 'success', which maps to productForm.jsp
 
  
 The action in productForm is persistProduct
 
 When I submit this form, in the validate() method I output 
 the tradeProduct
 to the console - this confirms that a new form has been 
 created, and the
 attributes persisted from the values in the form.
 
 This wouldn't be a problem, but I have a productID, which is 
 not in the
 form, and I don't think it should be. For that reason, it's 
 just the default
 '-1' I set it to in the static intialiser.
 
 Do I have to have unseen attributes as hidden fields in the 
 JSP, and why? 

Since you're using the 'request' scope, the unseen attributes have to be
hidden fields, yes. After the first request is sent, Struts 'forgets'
the form, until it receives it again.

If you really hate the hidden fields, use the 'application' scope. Don't
forget to remove the form bean though.

hth,
tomK

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




RE: Struts servlet debug log entries - go to where??

2001-11-19 Thread Tom Klaasen (TeleRelay)

 -Original Message-
 From: Greg Callaghan [mailto:[EMAIL PROTECTED]] 
 Sent: maandag 19 november 2001 3:46
 To: [EMAIL PROTECTED]
 Subject: Struts servlet debug log entries - go to where??
 
 
 Hi,
 
 [A repost as I didn't get a reply as far as I'm aware]
 
 Can anyone help our in terms of use of the struts debug 
 logging please.  I 
 have a few questions -:
 
 [1] Where do the servlet debug log messages go to in terms of 
 file and path?
   I can't seem to find them!  For example the struts example
 
 if (servlet.getDebug() = 1)
servlet.log(LogonAction: User ' + user.getUsername() +
' logged on in session  + session.getId());

In the servlet logging of your servlet container. In Tomcat, this is
TOMCAT_HOME/logs/servlet.log

 
 [2] Is there something beyond setting the servlet debug 
 parameter in the
 web.xml file for the app that is required to get debug 
 happening.  That is
 -:
 
 init-param
   param-namedebug/param-name
   param-value3/param-value
 /init-param

Not that I am aware of.

 [3] Any thoughts on whether there is benefit in going to 
 Log4j above and
 beyond the struts servlet debug functionality?

I did, because I like logcat.debug() more than (if servlet.getDebug =
1). Moreover, you can do all your logging in the same file. If you use
the struts logging, and want to do logging in your business objects,
you'd have to pass them the servlet Object you're using for logging,
which isn't a nice way to work IMHO. But I can see reasons why struts
doesn't embrace log4j though.

hth, 
tomK

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




RE: reusing form for readonly

2001-11-19 Thread Adriano Labate

Hi Marcos,

I am handling the readonly field behaviors by javascript. 

For example, based on the current CRUD mode, the action form must set a
property called readonlyFields with a comma-separated list of all fields
in the form that will be displayed as readonly on the client browser.

input type=hidden name=readonlyFields
value=bau_bkost,bau_bdatpe,bau_bdatbw,bau_bdatbb,bau_bdatbe

Then at the onload event of the body tag, a javascript function will split
the readonlyFields value and for each one will set its readonly attribute
to true or do other things according to its type (text, select, ...).

Adriano Labate


-Original Message-
From: Scriven, Marcos [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 18, 2001 3:32 PM
To: 'Struts Users Mailing List'
Subject: reusing form for readonly


Hi

I have a form which can be in several different modes: VIEW, ADD, EDIT, and
DELETE

If I am in view mode (which I have enumerated as 0 in an interface called
WebConstants.VIEW), I want the values in my html:text fields to be
readonly.

I can do this on a field by field basis, as such:

logic:equal name=productForm property=action scope=request
value=%=String.valueOf(WebConstants.VIEW)%
html:text styleClass=form2 property=tradeProduct.ISIN
size=17 maxlength=17 readonly=true
onBlur=javascript:validateName(this); /
/logic:equal
logic:notEqual name=productForm property=action scope=request
value=%=String.valueOf(WebConstants.VIEW)%
html:text styleClass=form2 property=tradeProduct.ISIN
size=17 maxlength=17 onBlur=javascript:validateName(this); /
/logic:notEqual

However, is there a shorter/more succinct way? I have many fields within my
form, and adding all these equal/notEqual tags adds a lot of lines to my JSP


Thanks

Marcos

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

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




Re: web.xml struts-config.xml - what i'm doing wrong? - SOLVED

2001-11-19 Thread Dalibor Kezele

From: Dalibor Kezele [EMAIL PROTECTED]
To: [EMAIL PROTECTED]


 Apache Tomcat/4.0.1 - HTTP Status 404 - /lead/basicdata.do
 type Status report
 message /lead/basicdata.do
 description The requested resource (/lead/basicdata.do) is not available.
 I have a form with 10 properties.

Problem solved: some .jar files were missing.




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




RE: HOW TO: set up a pager with struts

2001-11-19 Thread Malcolm Wise

You could also try the JSPTags.com Pager Tag Library at
http://JSPTags.com/tags/navigation/pager/
I am using this with Struts Iterator tags.

HTH
Malc

-Original Message-
From: Brian Cochran [mailto:[EMAIL PROTECTED]]
Sent: 16 November 2001 00:47
To: Struts Users Mailing List
Subject: RE: HOW TO: set up a pager with struts


Whereas this may be a little cross posted, I just submitted a proposal to
struts-dev on possibly developing a suite of
PageIterators that have support for various functionality including:
cacheing, JDBC 2.0 RecordSets, the Petstore way of requerying every time and
support for extending to different methods. Let me know if you are
interested on working on this.

Brian


-Original Message-
From: Long Nguyen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 15, 2001 7:09 PM
To: 'Struts Users Mailing List'
Subject: RE: HOW TO: set up a pager with struts



Hi Oleg,

If it is not too much trouble, can you send me an example?

Thanks.

Long B. Nguyen

-Original Message-
From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 2:23 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: HOW TO: set up a pager with struts


Hello storck,

I can suggest you my way. On base of query parameters, offset and page
length values generate container or array of objects from database and
store total value of records. Container or array you can display with
iterate tag. For purposes of page links generation I can suggest bean
and tag for you - I can send it for you.

Wednesday, November 14, 2001, 1:09:06 PM, you wrote:

s Hi,

s I am developing a webapp with struts and EJB's. In some cases I only have
to
s display a list of Items. The problem is, that I cant show the whole list
...
s sure to big ...
s For retrieving the list I will either use the Fast-Lane Reader Pattern
and
s the Page-by-Page Iterator Pattern. In the Pet Store Demo they
s implemented the Page-by-Page Iterator as a applicationspecific Tag, but
I
s think it should also be possible to implement it with struts (I am
right).
s Now I NEED your HELP. How must I set it up correct?

s Any suggestions and comments are welcome !!!


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



--
Best regards,
 Olegmailto:[EMAIL PROTECTED]



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

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



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



*
The information contained in this message or any of its
attachments may be privileged and confidential and intended 
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*

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




Re: how to number of rows in resultset without % ...

2001-11-19 Thread Dmitri Colebatch

A resultset has a cursor, and depending on how big it is, you might be
better off having a separate query to detemine the number of rows (using
SELECT COUNT(index) FROM table WHERE same_where_clause).

cheers
dim

On Mon, 19 Nov 2001, Dalibor Kezele wrote:

 From: Bradley M. Handy [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 
  Try this.
  
  ResultSet resultSet = execute query here to return a result set
  int numRows = 0;
  if(resultSet.last()) {
  numRows = resultSet.getRow();  // return the row id.
  }
  One thing to note is if your ResultSet is not setup to for
  bi-directional reading, you will lose the use of your ResultSet doing
  this.
  
 That's okay, but I would like to do this without using java.
 
 Something like:
 html:select property=segment multiple=true size=sql:getSize/
 
 TIA,
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




ActionForms and GET requests

2001-11-19 Thread Jin Bal

Hi All,

Will the ActionServlet populate an action form instance from a GET request
or does there have to be an HTML form that submitted the POST request?.

Thanks in adv

Jin

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




Re: Form based login

2001-11-19 Thread Dmitri Colebatch

The idea of form based login is that the servlet container does the job
for you.  so you dont write anything, apart from provide the look and feel
for the form.

what you are describing is essentially application managed security...

hth
dim

On Mon, 19 Nov 2001, Martin Farrell wrote:

 Hi
 
 How can I use a form based login within the struts framework?
 
 My basic problem is that i can set up the tomcat realm and validate a user
 to allow access to an area, but I want to be able to access the entered
 j_username and j_password variables on the webapp side. One solution might
 be to allow a successful form based login to forward to a struts form to
 strip out the parameters and populate the relevant beans in my action class?
 Is this possible? I would prefer to use this method because I dont want to
 be writing a set of login methods as part of my application
 
 I have read thru the mailing lists and found nothing to demonstrate this.
 
 Thanks
 
 Martin 
 
 
 ** For great Emap magazine subscription  gift offers visit 
http://www.emapmagazines.co.uk **
 
 
 The information in this email is intended only for the addressee(s) named above.
 Access to this email by anyone else is unauthorised.
 If you are not the intended recipient of this message any disclosure, copying, 
 distribution or any action taken in reliance on it is prohibited and may be 
unlawful. 
 
 Emap plc and or its subsidiaries do not warrant that any attachments are free from 
 viruses or other defects and accept no liability for any losses resulting from 
 infected email transmissions.
 
 Please note that any views expressed in this email may be those of the originator 
 and do not necessarily reflect those of this organisation.
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




RE: Setting up a form in an action

2001-11-19 Thread Scriven, Marcos

Hi Tom

Thanks for that

Where is a good place to remove beans from the session scope? Do I have to
forward to an action that does this for me?

Also, I thought there was a difference between 'page' and 'request' scope.
Is there no such thing as page scope in struts?

Marcos

 -Original Message-
 From: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
 Sent: 19 November 2001 09:16
 To: Struts Users Mailing List
 Subject: RE: Setting up a form in an action
 
 
 
 
  -Original Message-
  From: Scriven, Marcos [mailto:[EMAIL PROTECTED]] 
  Sent: zondag 18 november 2001 18:32
  To: 'Struts Users Mailing List'
  Subject: Setting up a form in an action
  
  
  I am trying to do this sequence of events:
  
  1) setupProductForm.do?isin=abcd
  
  2) This creates a productForm instance, and initialises the 
  product, based
  on the given ISIN
  
  3) persistProduct - This should save the product
  
  What happens at the moment is my form is my setupProductForm action
  correctly loads the product, and sets it on the form:
  
  productForm.setTradeProduct(tradeProduct);
  
  On success, I forward to 'success', which maps to productForm.jsp
  
   
  The action in productForm is persistProduct
  
  When I submit this form, in the validate() method I output 
  the tradeProduct
  to the console - this confirms that a new form has been 
  created, and the
  attributes persisted from the values in the form.
  
  This wouldn't be a problem, but I have a productID, which is 
  not in the
  form, and I don't think it should be. For that reason, it's 
  just the default
  '-1' I set it to in the static intialiser.
  
  Do I have to have unseen attributes as hidden fields in the 
  JSP, and why? 
 
 Since you're using the 'request' scope, the unseen attributes 
 have to be
 hidden fields, yes. After the first request is sent, Struts 'forgets'
 the form, until it receives it again.
 
 If you really hate the hidden fields, use the 'application' 
 scope. Don't
 forget to remove the form bean though.
 
 hth,
 tomK
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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




RE: Setting up a form in an action

2001-11-19 Thread Tom Klaasen (TeleRelay)

 -Original Message-
 From: Scriven, Marcos [mailto:[EMAIL PROTECTED]] 
 Sent: maandag 19 november 2001 11:39
 To: 'Struts Users Mailing List'
 Subject: RE: Setting up a form in an action
 
 
 Hi Tom
 
 Thanks for that
 
 Where is a good place to remove beans from the session scope? 
 Do I have to
 forward to an action that does this for me?

Yup. Have a look at struts-example: it is done all the time there, in
the action that processes the input of the form.

 Also, I thought there was a difference between 'page' and 
 'request' scope.
 Is there no such thing as page scope in struts?

There are four scopes. Have a look at
http://jakarta.apache.org/struts/userGuide/building_model.html (2.2)

hth,
tomK

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




Customised Error handling

2001-11-19 Thread Anthony Chater

The HTMLErrors tag handles validation errors well and of course I can load
other text messages into an  ActionError and present them via an HTML:errors
tag. 
But I need to have at least one other category of  error message. 
 Is there a built-in mechanism for doing this or do I have to write my own
tag?



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




dynamic template:insert

2001-11-19 Thread Jürgen Leonhardt

Hi there,

i would like to do something like:
template:insert template='%=application.getAttribute(tpldir)%'

but I don't know if this syntax is legal or recommended. Is there a better
idea?

thanks for any answers

Jürgen Leonhardt

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




RE: Customised Error handling

2001-11-19 Thread Alexander Jesse

Hi,

if you need special formatting for the errors: have a look at the validator
error-tags. (in the nightly build or via ted's page 

hope this helps
Alexander

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 12:04 PM
To: [EMAIL PROTECTED]
Subject: Customised Error handling


The HTMLErrors tag handles validation errors well and of course I can load
other text messages into an  ActionError and present them via an HTML:errors
tag. 
But I need to have at least one other category of  error message. 
 Is there a built-in mechanism for doing this or do I have to write my own
tag?



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

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




Dynamic anchor

2001-11-19 Thread Stefano Mancarella

Is there a way to specify a dynamic anchor using the html link tag?
I want to specify something like:

html:link href=http://someUrl; anchor=someAnchor

where someAnchor in dynamically generated.



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




RE: Dynamic anchor

2001-11-19 Thread Tom Klaasen (TeleRelay)

% String anchor = // define anchor here ; %
html:link href='http://someUrl#%=anchor%'

should work AFAIK

jsp:useBean might also be useful for your purpose.


hth,
tomK

 -Original Message-
 From: Stefano Mancarella [mailto:[EMAIL PROTECTED]] 
 Sent: maandag 19 november 2001 13:59
 To: [EMAIL PROTECTED]
 Subject: Dynamic anchor
 
 
 Is there a way to specify a dynamic anchor using the html link tag?
 I want to specify something like:
 
 html:link href=http://someUrl; anchor=someAnchor
 
 where someAnchor in dynamically generated.
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 

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




RE: Form based login

2001-11-19 Thread Martin Farrell

hi

thanks for the clarification

can you offer me some advice on application managed security? my requirement
is that i have both users and groups within my system

martin



-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2001 10:32
To: Struts Users Mailing List
Subject: Re: Form based login


The idea of form based login is that the servlet container does the job
for you.  so you dont write anything, apart from provide the look and feel
for the form.

what you are describing is essentially application managed security...

hth
dim

On Mon, 19 Nov 2001, Martin Farrell wrote:

 Hi
 
 How can I use a form based login within the struts framework?
 
 My basic problem is that i can set up the tomcat realm and validate a user
 to allow access to an area, but I want to be able to access the entered
 j_username and j_password variables on the webapp side. One solution might
 be to allow a successful form based login to forward to a struts form to
 strip out the parameters and populate the relevant beans in my action
class?
 Is this possible? I would prefer to use this method because I dont want to
 be writing a set of login methods as part of my application
 
 I have read thru the mailing lists and found nothing to demonstrate this.
 
 Thanks
 
 Martin 
 
 
 ** For great Emap magazine subscription  gift offers visit
http://www.emapmagazines.co.uk **
 



 The information in this email is intended only for the addressee(s) named
above.
 Access to this email by anyone else is unauthorised.
 If you are not the intended recipient of this message any disclosure,
copying, 
 distribution or any action taken in reliance on it is prohibited and may
be unlawful. 
 
 Emap plc and or its subsidiaries do not warrant that any attachments are
free from 
 viruses or other defects and accept no liability for any losses resulting
from 
 infected email transmissions.
 
 Please note that any views expressed in this email may be those of the
originator 
 and do not necessarily reflect those of this organisation.



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


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

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




bean:message and performance

2001-11-19 Thread Francois-Xavier Bonnet

Hello all,

I am using bean:message tag for internationalizing my pages. My problem
is that some pages have too many tags (sometimes up to 50 just for bean:
message) :

1) for some jsp, the generated .class file may exceed the 64 K limit
allowed for a java method

2) even if pages do not reach this limit, performance are poor

I have been thinking about 2 solutions to this problem :

1) writing some servlet that would replace bean:message tags by their
value before compilation and cache the result jsp file in one folder for
 each language.

2) using some other tool for i18n of my application (maybe cocoon ?)


Any idea or advice would be greatly appreciated.


Francois-Xavier
[EMAIL PROTECTED]

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




RE: bean:message and performance

2001-11-19 Thread Rey Francois

- Are you absolutely sure the i18n is the reason of the poor performance or
is it an assumption? Using some profiling tool could help pinpoint the
problem.

- Another solution to the size issue: decompose your pages into included
subcomponents that are of smaller size.

Fr.

-Original Message-
From: Francois-Xavier Bonnet [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2001 14:18
To: [EMAIL PROTECTED]
Subject: bean:message and performance


Hello all,

I am using bean:message tag for internationalizing my pages. My problem 
is that some pages have too many tags (sometimes up to 50 just for bean:
message) :

1) for some jsp, the generated .class file may exceed the 64 K limit 
allowed for a java method

2) even if pages do not reach this limit, performance are poor

I have been thinking about 2 solutions to this problem :

1) writing some servlet that would replace bean:message tags by their 
value before compilation and cache the result jsp file in one folder for
 each language.

2) using some other tool for i18n of my application (maybe cocoon ?)


Any idea or advice would be greatly appreciated.


Francois-Xavier
[EMAIL PROTECTED]

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

The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, please notify the sender of this email 
immediately. You should not copy, use or disseminate the 
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***


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




how does this checkbox thing work-Thanks.

2001-11-19 Thread Alex Colic

Thanks for the help. I got it working.

Alex


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




Re: Help with jsp:include tag

2001-11-19 Thread Cedric Dumoulin


  When you call /view-calendar.do, Struts execute your action, and do a forward
to the jsp page you specified.
  Unfortunately, JSP specification forbid a call to forward or sendRedirect once
you have already written something. So, you can't do what you try if you have
already written something ...

  Hope this help,

Cedric

Trever M. Shick wrote:

 I'd like to use an action/action form to handle a JSP include, can this be
 done...?

 I'd like to do the following..

 ...
 jsp:include page=/view-calendar.do flush=true/
 ...

 My view-calendar.do will either choose:
 month.jsp
 daily.jsp
 week.jsp

 for it's view.

 However, when I try to use this, it tells me that the response has already
 been committed.  I understand the mechanics behind it all, but I don't know
 Struts well enough to work around this.

 I could probably do this via the template tags, but I don't want to use them
 as I'm still working on learning the others...  I have enough darned tags in
 my brain.

 Trever

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


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




RE: reusing form for readonly

2001-11-19 Thread Sandeep Takhar

The delete and view are almost the same no?  Maybe you
can use the if statements for these.

For the others - it is really security related.  I
think you should put the logic in the perform() method
and then forward to mapping.readMode() or
mapping.editMode().

Maybe can use the same logic to determine if it is a
delete and then just use the same included jsp as the
view mode (just factor out the similarities).

Using templates or tiles might help as well. (Eg --
the view,delete,edit and add component are really just
extensions of some base component which you can define
with tiles).  The beauty of tiles is the ability to
define all these definitions in a central xml file.

Sandeep
--- Tom Klaasen (TeleRelay)
[EMAIL PROTECTED] wrote:
 Templates come to mind: one template for viewing,
 one for editing, and
 then you'd only need one select.
 
 Never worked with templates though, so I'm
 absolutely not sure about
 this. Would love to hear about your solution though,
 as I am going to do
 the same in the near future :-)
 
 tomK
 
  -Original Message-
  From: Scriven, Marcos
 [mailto:[EMAIL PROTECTED]] 
  Sent: zondag 18 november 2001 15:32
  To: 'Struts Users Mailing List'
  Subject: reusing form for readonly
  
  
  Hi
  
  I have a form which can be in several different
 modes: VIEW, 
  ADD, EDIT, and
  DELETE
  
  If I am in view mode (which I have enumerated as 0
 in an 
  interface called
  WebConstants.VIEW), I want the values in my
 html:text fields to be
  readonly.
  
  I can do this on a field by field basis, as such:
  
  logic:equal name=productForm
 property=action 
  scope=request
  value=%=String.valueOf(WebConstants.VIEW)%
  html:text styleClass=form2
 property=tradeProduct.ISIN
  size=17 maxlength=17 readonly=true
  onBlur=javascript:validateName(this); /
  /logic:equal
  logic:notEqual name=productForm
 property=action 
  scope=request
  value=%=String.valueOf(WebConstants.VIEW)%   
 
  html:text styleClass=form2
 property=tradeProduct.ISIN
  size=17 maxlength=17
 onBlur=javascript:validateName(this); /
  /logic:notEqual
  
  However, is there a shorter/more succinct way? I
 have many 
  fields within my
  form, and adding all these equal/notEqual tags
 adds a lot of 
  lines to my JSP
  
  
  Thanks
  
  Marcos
  
  --
  To unsubscribe, e-mail:   
  mailto:struts-user-
 [EMAIL PROTECTED]
  For 
  additional commands, 
  e-mail:
 mailto:[EMAIL PROTECTED]
  
  
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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




Re: bean:message and performance

2001-11-19 Thread Cedric Dumoulin


  Hi,

  I don't know if your poor performances come from bean:message tags, but there
is an alternative to it.
  Another approach to i18n is having one page for each Locale. Each page contains
appropriate translation. Pages can be grouped in localized directories.
  Tiles framework can help you for this (and for the 64k limit !). You can have
different version of the same Tile (a jsp page), one for each Locale. When you
insert your Tile, framework choose the appropriate one, according to Locale.
Mapping between Tiles name to insert and real jsp page is done in
tilesDefinition.xml file. You have one config file per Locale. Config file naming
follow the Java properties file convention (extension with Locale's
abbreviation).
  Tiles allow mixing of localized Tiles and use of bean:message. Use Tiles for
big pages, tags for small part, menus, ...

  Hope this help,

Cedric


Francois-Xavier Bonnet wrote:

 Hello all,

 I am using bean:message tag for internationalizing my pages. My problem
 is that some pages have too many tags (sometimes up to 50 just for bean:
 message) :

 1) for some jsp, the generated .class file may exceed the 64 K limit
 allowed for a java method

 2) even if pages do not reach this limit, performance are poor

 I have been thinking about 2 solutions to this problem :

 1) writing some servlet that would replace bean:message tags by their
 value before compilation and cache the result jsp file in one folder for
  each language.

 2) using some other tool for i18n of my application (maybe cocoon ?)

 Any idea or advice would be greatly appreciated.

 Francois-Xavier
 [EMAIL PROTECTED]

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


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




RE: If someone is interested

2001-11-19 Thread Robert J. Sanford, Jr.

yes please

 -Original Message-
 From: Peter Georgiou [mailto:[EMAIL PROTECTED]]
 Sent: Friday, November 16, 2001 8:36 AM
 To: Struts Users Mailing List
 Subject: Re: If someone is interested


 I think there are so many people interested you may as well publicly show
 the code.


 Peter


  Hello colleagues,
 
  I've been developing a web app for myself and since
  it's not the first app using Struts I attempted
  to solve some general issues by providing some interfaces,
  custom tag and generic actions. More specifically I'm talking
  about tables, you know that questions about navigation,
  sorting, formatting and so on...
 
  To see what's done already, point your browser to
  http://english.yuriy-zubarev.com
 
  And if my work raises some interest among people,
  I'll beautify the code (if there is no big load in the office)
  and share it (with one of the purposes to get feedbacks
  and criticism).
 
  Best of luck,
  Yuriy Zubarev
 
 
 
 
  __
  Do You Yahoo!?
  Find the one for you at Yahoo! Personals
  http://personals.yahoo.com
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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



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




Help, can I do this..two fields one property.

2001-11-19 Thread Alex Colic

Help,

I have a page that is dynamically created. One of the fields is a date
field. I have a javascript calendar that allows the user to input the date
into that field. Now I have been told that they also need to select the
time. I need to create a select box with values of (12am-11pm) and have the
select value appended to the end of the date input box on submit.

Any ideas on how to get around this predicament.

Thanks for any info.

Alex


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




Re: Help, can I do this..two fields one property.

2001-11-19 Thread Scott Atwell

Just use some javascript...
hava a hidden field that will be used to concat the two fields (date and
time) and on the onClick (or whatever!) of the fields run the javascript.

- Original Message -
From: Alex Colic [EMAIL PROTECTED]
To: Struts [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 2:58 PM
Subject: Help, can I do this..two fields one property.


 Help,

 I have a page that is dynamically created. One of the fields is a date
 field. I have a javascript calendar that allows the user to input the date
 into that field. Now I have been told that they also need to select the
 time. I need to create a select box with values of (12am-11pm) and have
the
 select value appended to the end of the date input box on submit.

 Any ideas on how to get around this predicament.

 Thanks for any info.

 Alex


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



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




Problem with bean:cookie id=cookies name=.. multiple=true /

2001-11-19 Thread Juan Alvarado \(Struts List\)

Hello:

Every time I use the bean:cookie id=cookies name=.. multiple=true /
tag, my page fails to compile.

It looks like the source being generated is not syntactically correct.

Any help with this is appreciated.

Thanks


Error: 500
Location: /struts-juan/main.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for JSPC:\Program
Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:75: Missing term.
JspRuntimeLibrary.introspecthelper(_jspx_th_bean_cookie_2,
name,..,null,null, false);

^
C:\Program Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat
Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:76: ']' expected.
[Ljavax.servlet.http.Cookie; cookies = null;
   ^
C:\Program Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat
Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:79: Missing term.
cookies = ([Ljavax.servlet.http.Cookie;)
pageContext.getAttribute(cookies);
   ^
C:\Program Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat
Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:79: ']' expected.
cookies = ([Ljavax.servlet.http.Cookie;)
pageContext.getAttribute(cookies);
  ^
C:\Program Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat
Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:84: Missing term.
cookies = ([Ljavax.servlet.http.Cookie;)
pageContext.getAttribute(cookies);
   ^
C:\Program Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat
Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:84: ']' expected.
cookies = ([Ljavax.servlet.http.Cookie;)
pageContext.getAttribute(cookies);
  ^
C:\Program Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat
Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:88: Missing term.
cookies = ([Ljavax.servlet.http.Cookie;)
pageContext.getAttribute(cookies);
   ^
C:\Program Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat
Test
Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002ejspmain_jsp_0.
java:88: ']' expected.
cookies = ([Ljavax.servlet.http.Cookie;)
pageContext.getAttribute(cookies);
  ^
8 errors

java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.ServletException(java.lang.String)
org.apache.jasper.JasperException(java.lang.String)
boolean org.apache.jasper.compiler.Compiler.compile()
boolean org.apache.jasper.runtime.JspServlet.loadJSP(java.lang.String,
java.lang.String, boolean, javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(javax
.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void
org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
java.lang.Throwable, boolean)
void
org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
equest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
javax.servlet.ServletResponse)
void
org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R
equest, org.apache.tomcat.core.Response)
void
org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request
, org.apache.tomcat.core.Response)
void
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a
pache.tomcat.service.TcpConnection, java.lang.Object [])
void org.apache.tomcat.service.TcpConnectionThread.run()
void java.lang.Thread.run()



**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]


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




RE: Problem with bean:cookie id=cookies name=.. multiple=true /

2001-11-19 Thread Tom Klaasen (TeleRelay)

try replacing the two dots with a real name...

tomK

 -Original Message-
 From: Juan Alvarado (Struts List) [mailto:[EMAIL PROTECTED]] 
 Sent: maandag 19 november 2001 16:14
 To: Struts
 Subject: Problem with bean:cookie id=cookies name=.. 
 multiple=true /
 
 
 Hello:
 
 Every time I use the bean:cookie id=cookies name=.. 
 multiple=true /
 tag, my page fails to compile.
 
 It looks like the source being generated is not syntactically correct.
 
 Any help with this is appreciated.
 
 Thanks
 
 
 Error: 500
 Location: /struts-juan/main.jsp
 Internal Servlet Error:
 
 org.apache.jasper.JasperException: Unable to compile class 
 for JSPC:\Program
 Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:75: Missing term.
 
 JspRuntimeLibrary.introspecthelper(_jspx_th_bean_cookie_2,
 name,..,null,null, false);
 
 ^
 C:\Program Files\IBM\VisualAge for 
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:76: ']' expected.
 [Ljavax.servlet.http.Cookie; cookies = null;
^
 C:\Program Files\IBM\VisualAge for 
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:79: Missing term.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
^
 C:\Program Files\IBM\VisualAge for 
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:79: ']' expected.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
   ^
 C:\Program Files\IBM\VisualAge for 
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:84: Missing term.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
^
 C:\Program Files\IBM\VisualAge for 
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:84: ']' expected.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
   ^
 C:\Program Files\IBM\VisualAge for 
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:88: Missing term.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
^
 C:\Program Files\IBM\VisualAge for 
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:88: ']' expected.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
   ^
 8 errors
 
   java.lang.Throwable(java.lang.String)
   java.lang.Exception(java.lang.String)
   javax.servlet.ServletException(java.lang.String)
   org.apache.jasper.JasperException(java.lang.String)
   boolean org.apache.jasper.compiler.Compiler.compile()
   boolean 
 org.apache.jasper.runtime.JspServlet.loadJSP(java.lang.String,
 java.lang.String, boolean, javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)
   void
 org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfN
 ecessary(javax
 .servlet.http.HttpServletRequest, 
 javax.servlet.http.HttpServletResponse)
   void
 org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
 (javax.servlet
 .http.HttpServletRequest, 
 javax.servlet.http.HttpServletResponse, boolean)
   void
 org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.serv
 let.http.HttpS
 ervletRequest, javax.servlet.http.HttpServletResponse, 
 java.lang.String,
 java.lang.Throwable, boolean)
   void
 org.apache.jasper.runtime.JspServlet.service(javax.servlet.htt
 p.HttpServletR
 equest, javax.servlet.http.HttpServletResponse)
   void 
 javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
 javax.servlet.ServletResponse)
   void
 org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache
 .tomcat.core.R
 equest, org.apache.tomcat.core.Response)
   void
 org.apache.tomcat.core.ContextManager.service(org.apache.tomca
 t.core.Request
 , org.apache.tomcat.core.Response)
   void
 org.apache.tomcat.service.http.HttpConnectionHandler.processCo
 nnection(org.a
 pache.tomcat.service.TcpConnection, java.lang.Object [])
   void 

Re: Help, can I do this..two fields one property.

2001-11-19 Thread Sean Owen

And the server-side option, how about:


public class MyActionForm extends ActionForm {

private Calendar theDateAndTime;

...
public void reset(...) {
...
theDateAndTime = new GregorianCalendar(0,0,0,0,0,0);
}

...

public void setDate(String date) {
// parse date and set year/month/day of Calendar object
}

public void setTime(String time) {
// parse time and set hour/minute/sec of Calendar object
}

...
// and then to get the time...
public Date getDateAndTime() {
return theDateAndTime.getTime();
}

...
}


Sean


- Original Message -
From: Alex Colic [EMAIL PROTECTED]
To: Struts [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 2:58 PM
Subject: Help, can I do this..two fields one property.


 Help,

 I have a page that is dynamically created. One of the fields is a date
 field. I have a javascript calendar that allows the user to input the date
 into that field. Now I have been told that they also need to select the
 time. I need to create a select box with values of (12am-11pm) and have
the
 select value appended to the end of the date input box on submit.

 Any ideas on how to get around this predicament.

 Thanks for any info.

 Alex


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


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


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




RE: [ANNOUNCE] Struts Console v1.1 beta 2

2001-11-19 Thread Robert J. Sanford, Jr.

any chance of struts console being ported over to
Eclipse (http://www.eclipse.org)?

rjsjr

 -Original Message-
 From: James Holmes [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 05, 2001 9:01 PM
 To: [EMAIL PROTECTED]
 Subject: [ANNOUNCE] Struts Console v1.1 beta 2


 Struts Console version 1.1 beta 2 is now available.

 http://www.jamesholmes.com/struts/
 http://www.jamesholmes.com/struts/struts-console-1.1b2.zip

 I've gone ahead and added support for Borland JBuilder
 into this release.  This means that the Struts Console
 is now able to be used seamlessly inside of JBuilder.
 I have tested the JBuilder support with JBuilder 5
 Enterprise Edition.  Please email me if you use
 another version of JBuilder and the Struts Console
 plugin works.  I would like to keep a running list of
 supported versions.

 I know this release should only have bugfixes, but I
 wanted to go ahead and get this functionality out
 there
 for everyone.  Please download a copy and use the
 latest version.  I want to get any bugs that arise
 fixed so that the 1.1 version can be finalized.

 Changes with Struts Console v1.1b2

   *) Struts Console is now able to be plugged into
  Borland JBuilder. This allows users to seamlessly
  manage Struts config files with Struts Console
  from within the JBuilder IDE.

   *) Updated Referencing Actions tab on Form Bean
  screen to allow for double-clicking of Actions,
  which takes you to that Action's screen.

   *) Fixed bug where double-clicking on table elements
  would break if more than one config file was open
  at a time.  This was only happening in the
  NetBeans/Forte module since you can only have one
  file open at a time in the standalone version.

   *) Fixed bug where NetBeans/Forte module was
  throwing exceptions when NetBeans/Forte started
  up after having been closed with a Struts Console
  window open.  Thanks to Petr Jiricka
  [EMAIL PROTECTED] for pointing this
  out.


 As usual, let me know if there are any features you'd
 like added or if you come across any bugs.

 Thanks,

 -james
 [EMAIL PROTECTED]
 http://www.jamesholmes.com/struts/


 __
 Do You Yahoo!?
 Find a job, post your resume.
 http://careers.yahoo.com

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



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




RE: Help, can I do this..two fields one property.

2001-11-19 Thread Tom Klaasen (TeleRelay)

I made a separate DateBean for this purpose.
allows in your main class to define public DateBean getDate(), and in
your jsp property=date.time

nesting javabeans can make things very easy :)

hth,
tomK

 -Original Message-
 From: Sean Owen [mailto:[EMAIL PROTECTED]] 
 Sent: maandag 19 november 2001 16:27
 To: Struts Users Mailing List
 Cc: [EMAIL PROTECTED]
 Subject: Re: Help, can I do this..two fields one property.
 
 
 And the server-side option, how about:
 
 
 public class MyActionForm extends ActionForm {
 
 private Calendar theDateAndTime;
 
 ...
 public void reset(...) {
 ...
 theDateAndTime = new GregorianCalendar(0,0,0,0,0,0);
 }
 
 ...
 
 public void setDate(String date) {
 // parse date and set year/month/day of Calendar object
 }
 
 public void setTime(String time) {
 // parse time and set hour/minute/sec of Calendar object
 }
 
 ...
 // and then to get the time...
 public Date getDateAndTime() {
 return theDateAndTime.getTime();
 }
 
 ...
 }
 
 
 Sean
 
 
 - Original Message -
 From: Alex Colic [EMAIL PROTECTED]
 To: Struts [EMAIL PROTECTED]
 Sent: Monday, November 19, 2001 2:58 PM
 Subject: Help, can I do this..two fields one property.
 
 
  Help,
 
  I have a page that is dynamically created. One of the 
 fields is a date
  field. I have a javascript calendar that allows the user to 
 input the date
  into that field. Now I have been told that they also need 
 to select the
  time. I need to create a select box with values of 
 (12am-11pm) and have
 the
  select value appended to the end of the date input box on submit.
 
  Any ideas on how to get around this predicament.
 
  Thanks for any info.
 
  Alex
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.yahoo.com
 
 
 --
 To unsubscribe, e-mail:   
 mailto:struts-user- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 

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




RE: [ANNOUNCE] Struts Console v1.1 beta 2

2001-11-19 Thread Sean Gollschewsky

I'm also interested in this, and may be able to lend a hand...

Sean.

-Original Message-
From: Robert J. Sanford, Jr. [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 19 November 2001 3:28 PM
To: Struts Users Mailing List
Subject: RE: [ANNOUNCE] Struts Console v1.1 beta 2

any chance of struts console being ported over to
Eclipse (http://www.eclipse.org)?

rjsjr

 -Original Message-
 From: James Holmes [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 05, 2001 9:01 PM
 To: [EMAIL PROTECTED]
 Subject: [ANNOUNCE] Struts Console v1.1 beta 2


 Struts Console version 1.1 beta 2 is now available.

 http://www.jamesholmes.com/struts/
 http://www.jamesholmes.com/struts/struts-console-1.1b2.zip

 I've gone ahead and added support for Borland JBuilder
 into this release.  This means that the Struts Console
 is now able to be used seamlessly inside of JBuilder.
 I have tested the JBuilder support with JBuilder 5
 Enterprise Edition.  Please email me if you use
 another version of JBuilder and the Struts Console
 plugin works.  I would like to keep a running list of
 supported versions.

 I know this release should only have bugfixes, but I
 wanted to go ahead and get this functionality out
 there
 for everyone.  Please download a copy and use the
 latest version.  I want to get any bugs that arise
 fixed so that the 1.1 version can be finalized.

 Changes with Struts Console v1.1b2

   *) Struts Console is now able to be plugged into
  Borland JBuilder. This allows users to seamlessly
  manage Struts config files with Struts Console
  from within the JBuilder IDE.

   *) Updated Referencing Actions tab on Form Bean
  screen to allow for double-clicking of Actions,
  which takes you to that Action's screen.

   *) Fixed bug where double-clicking on table elements
  would break if more than one config file was open
  at a time.  This was only happening in the
  NetBeans/Forte module since you can only have one
  file open at a time in the standalone version.

   *) Fixed bug where NetBeans/Forte module was
  throwing exceptions when NetBeans/Forte started
  up after having been closed with a Struts Console
  window open.  Thanks to Petr Jiricka
  [EMAIL PROTECTED] for pointing this
  out.


 As usual, let me know if there are any features you'd
 like added or if you come across any bugs.

 Thanks,

 -james
 [EMAIL PROTECTED]
 http://www.jamesholmes.com/struts/


 __
 Do You Yahoo!?
 Find a job, post your resume.
 http://careers.yahoo.com

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



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



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




RE: Problem with bean:cookie id=cookies name=.. multiple=true /

2001-11-19 Thread Juan Alvarado \(Struts List\)

Tom:

Thanks for your reply.

What I am trying to do is replace the following:

%
Cookie[] cookies = request.getCookies();
pageContext.setAttribute(cookies, cookies);
%

with bean:cookie id=cookies name=.. multiple=true /

Basically what I want to do is replace the above scriptlet with the bean
tag. Someone sent me a sample bean:cookie tag in which they use .. to get
all cookies.

If you know of a better way to accomplish this, please let me know.

Thanks

**
Juan Alvarado
Internet Developer -- Manduca Management
(786)552-0504
[EMAIL PROTECTED]
AOL Instant Messenger: [EMAIL PROTECTED]

-Original Message-
From: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 10:24 AM
To: Struts Users Mailing List
Subject: RE: Problem with bean:cookie id=cookies name=..
multiple=true /


try replacing the two dots with a real name...

tomK

 -Original Message-
 From: Juan Alvarado (Struts List) [mailto:[EMAIL PROTECTED]]
 Sent: maandag 19 november 2001 16:14
 To: Struts
 Subject: Problem with bean:cookie id=cookies name=..
 multiple=true /


 Hello:

 Every time I use the bean:cookie id=cookies name=..
 multiple=true /
 tag, my page fails to compile.

 It looks like the source being generated is not syntactically correct.

 Any help with this is appreciated.

 Thanks


 Error: 500
 Location: /struts-juan/main.jsp
 Internal Servlet Error:

 org.apache.jasper.JasperException: Unable to compile class
 for JSPC:\Program
 Files\IBM\VisualAge for Java\ide\project_resources\Apache Tomcat Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:75: Missing term.

 JspRuntimeLibrary.introspecthelper(_jspx_th_bean_cookie_2,
 name,..,null,null, false);

 ^
 C:\Program Files\IBM\VisualAge for
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:76: ']' expected.
 [Ljavax.servlet.http.Cookie; cookies = null;
^
 C:\Program Files\IBM\VisualAge for
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:79: Missing term.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
^
 C:\Program Files\IBM\VisualAge for
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:79: ']' expected.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
   ^
 C:\Program Files\IBM\VisualAge for
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:84: Missing term.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
^
 C:\Program Files\IBM\VisualAge for
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:84: ']' expected.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
   ^
 C:\Program Files\IBM\VisualAge for
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:88: Missing term.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
^
 C:\Program Files\IBM\VisualAge for
 Java\ide\project_resources\Apache Tomcat
 Test
 Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
 jspmain_jsp_0.
 java:88: ']' expected.
 cookies = ([Ljavax.servlet.http.Cookie;)
 pageContext.getAttribute(cookies);
   ^
 8 errors

   java.lang.Throwable(java.lang.String)
   java.lang.Exception(java.lang.String)
   javax.servlet.ServletException(java.lang.String)
   org.apache.jasper.JasperException(java.lang.String)
   boolean org.apache.jasper.compiler.Compiler.compile()
   boolean
 org.apache.jasper.runtime.JspServlet.loadJSP(java.lang.String,
 java.lang.String, boolean, javax.servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)
   void
 org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfN
 ecessary(javax
 .servlet.http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse)
   void
 org.apache.jasper.runtime.JspServlet$JspServletWrapper.service
 (javax.servlet
 .http.HttpServletRequest,
 javax.servlet.http.HttpServletResponse, boolean)
   void
 

RE: [ANNOUNCE] Struts Console v1.1 beta 2

2001-11-19 Thread James Holmes

Actually, this is in progress.  There is not a
scheduled completion date, but it is one of the
upcoming features.  Right now I'm still working some
of the kinks out of the existing plugins for
Forte/NetBeans and JBuilder.

I'll send out an announcement as soon as this is
available.  Thanks for your interest.

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/


--- Robert J. Sanford, Jr.
[EMAIL PROTECTED] wrote:
 any chance of struts console being ported over to
 Eclipse (http://www.eclipse.org)?
 
 rjsjr
 
  -Original Message-
  From: James Holmes [mailto:[EMAIL PROTECTED]]
  Sent: Monday, November 05, 2001 9:01 PM
  To: [EMAIL PROTECTED]
  Subject: [ANNOUNCE] Struts Console v1.1 beta 2
 
 
  Struts Console version 1.1 beta 2 is now
 available.
 
  http://www.jamesholmes.com/struts/
 

http://www.jamesholmes.com/struts/struts-console-1.1b2.zip
 
  I've gone ahead and added support for Borland
 JBuilder
  into this release.  This means that the Struts
 Console
  is now able to be used seamlessly inside of
 JBuilder.
  I have tested the JBuilder support with JBuilder 5
  Enterprise Edition.  Please email me if you use
  another version of JBuilder and the Struts Console
  plugin works.  I would like to keep a running list
 of
  supported versions.
 
  I know this release should only have bugfixes, but
 I
  wanted to go ahead and get this functionality out
  there
  for everyone.  Please download a copy and use the
  latest version.  I want to get any bugs that arise
  fixed so that the 1.1 version can be finalized.
 
  Changes with Struts Console v1.1b2
 
*) Struts Console is now able to be plugged into
   Borland JBuilder. This allows users to
 seamlessly
   manage Struts config files with Struts
 Console
   from within the JBuilder IDE.
 
*) Updated Referencing Actions tab on Form
 Bean
   screen to allow for double-clicking of
 Actions,
   which takes you to that Action's screen.
 
*) Fixed bug where double-clicking on table
 elements
   would break if more than one config file was
 open
   at a time.  This was only happening in the
   NetBeans/Forte module since you can only have
 one
   file open at a time in the standalone
 version.
 
*) Fixed bug where NetBeans/Forte module was
   throwing exceptions when NetBeans/Forte
 started
   up after having been closed with a Struts
 Console
   window open.  Thanks to Petr Jiricka
   [EMAIL PROTECTED] for pointing
 this
   out.
 
 
  As usual, let me know if there are any features
 you'd
  like added or if you come across any bugs.
 
  Thanks,
 
  -james
  [EMAIL PROTECTED]
  http://www.jamesholmes.com/struts/
 
 
  __
  Do You Yahoo!?
  Find a job, post your resume.
  http://careers.yahoo.com
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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




Pb with un-selection of multibox or select multiple objects

2001-11-19 Thread Xavier Brunel

Hi all,

I have a problem with objects such a multibox, and select multiple :
I cannot un-select those objects after having set them in a prior action.

Let see somme details:

I go to a page named Fill to fill a form containing multibox and select
multiple struts tags.
I choose several values in each form objects then I submit.
I then go to another page where I have sereval navigation options,
one of them is to modify the previous form I filled.
When I choose modify, I go to the Fill form correctly initialized with the
previous values,
I then deselect every multiple select or multibox object and submit: my
form is not updated by those
un-selection.()
Everything is OK if I choose to CHANGE my selection, but nothing is taken
into account if I UNSELECT all.

Do you have an explaination to this, and an solution to bypass this 

Xavier BRUNEL


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




RE: Problem with bean:cookie id=cookies name=.. multiple=true /

2001-11-19 Thread Tom Klaasen (TeleRelay)

I'm afraid you'll have to do some coding. Just had a brief glance at the
CookieTag code, and it seems there is no way to get all cookies at once.

What you'll have to do at least:
(1) adapt the tld so that name is not required anymore
(2) a little editing of CookieTag (won't be much): if no name is
specified, return all cookies

And if you want to be honored and thanked until the End Of Times:
(3) a little editing of the docs
(4) make a unified diff of all this, and post it to struts-dev, together
with the explanation why you did this

hth,
tomK


 -Original Message-
 From: Juan Alvarado (Struts List) [mailto:[EMAIL PROTECTED]] 
 Sent: maandag 19 november 2001 16:35
 To: Struts Users Mailing List
 Subject: RE: Problem with bean:cookie id=cookies name=.. 
 multiple=true /
 
 
 Tom:
 
 Thanks for your reply.
 
 What I am trying to do is replace the following:
 
 %
   Cookie[] cookies = request.getCookies();
   pageContext.setAttribute(cookies, cookies);
 %
 
 with bean:cookie id=cookies name=.. multiple=true /
 
 Basically what I want to do is replace the above scriptlet 
 with the bean
 tag. Someone sent me a sample bean:cookie tag in which they 
 use .. to get
 all cookies.
 
 If you know of a better way to accomplish this, please let me know.
 
 Thanks
 
 **
 Juan Alvarado
 Internet Developer -- Manduca Management
 (786)552-0504
 [EMAIL PROTECTED]
 AOL Instant Messenger: [EMAIL PROTECTED]
 
 -Original Message-
 From: Tom Klaasen (TeleRelay) [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 10:24 AM
 To: Struts Users Mailing List
 Subject: RE: Problem with bean:cookie id=cookies name=..
 multiple=true /
 
 
 try replacing the two dots with a real name...
 
 tomK
 
  -Original Message-
  From: Juan Alvarado (Struts List) [mailto:[EMAIL PROTECTED]]
  Sent: maandag 19 november 2001 16:14
  To: Struts
  Subject: Problem with bean:cookie id=cookies name=..
  multiple=true /
 
 
  Hello:
 
  Every time I use the bean:cookie id=cookies name=..
  multiple=true /
  tag, my page fails to compile.
 
  It looks like the source being generated is not 
 syntactically correct.
 
  Any help with this is appreciated.
 
  Thanks
 
 
  Error: 500
  Location: /struts-juan/main.jsp
  Internal Servlet Error:
 
  org.apache.jasper.JasperException: Unable to compile class
  for JSPC:\Program
  Files\IBM\VisualAge for Java\ide\project_resources\Apache 
 Tomcat Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:75: Missing term.
 
  JspRuntimeLibrary.introspecthelper(_jspx_th_bean_cookie_2,
  name,..,null,null, false);
 
  ^
  C:\Program Files\IBM\VisualAge for
  Java\ide\project_resources\Apache Tomcat
  Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:76: ']' expected.
  [Ljavax.servlet.http.Cookie; cookies = null;
 ^
  C:\Program Files\IBM\VisualAge for
  Java\ide\project_resources\Apache Tomcat
  Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:79: Missing term.
  cookies = ([Ljavax.servlet.http.Cookie;)
  pageContext.getAttribute(cookies);
 ^
  C:\Program Files\IBM\VisualAge for
  Java\ide\project_resources\Apache Tomcat
  Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:79: ']' expected.
  cookies = ([Ljavax.servlet.http.Cookie;)
  pageContext.getAttribute(cookies);
^
  C:\Program Files\IBM\VisualAge for
  Java\ide\project_resources\Apache Tomcat
  Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:84: Missing term.
  cookies = ([Ljavax.servlet.http.Cookie;)
  pageContext.getAttribute(cookies);
 ^
  C:\Program Files\IBM\VisualAge for
  Java\ide\project_resources\Apache Tomcat
  Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:84: ']' expected.
  cookies = ([Ljavax.servlet.http.Cookie;)
  pageContext.getAttribute(cookies);
^
  C:\Program Files\IBM\VisualAge for
  Java\ide\project_resources\Apache Tomcat
  Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:88: Missing term.
  cookies = ([Ljavax.servlet.http.Cookie;)
  pageContext.getAttribute(cookies);
 ^
  C:\Program Files\IBM\VisualAge for
  Java\ide\project_resources\Apache Tomcat
  Test
  Environment\work\localhost_8080%2Fstruts-juan\_0002fmain_0002e
  jspmain_jsp_0.
  java:88: ']' expected.
  cookies = ([Ljavax.servlet.http.Cookie;)
  

Re: Using tiles and expresso

2001-11-19 Thread Peter Pilgrim


It is a question of looking at the source code and merging I guess.
It is a classic __multiple inheritance__ of implementation
 C++ problem.

  S
   / \
 /\
 ET
\ /
  \/
A

Of course you cant do that in Java, except through design by contract
interfaces.

I think the expresso initialisation will be far more involved than tiles.
I would subclass A from E, make a subclass of the Expresso servlet
and move the tiles T over to A at the same.

  S
  \
\
E
  \
\
A(T)

It may be as simple as mergeing `init( ServletConfig )' methods,
let us know how you get on!
--
Peter Pilgrim ++44 (0)207-545-9923
  //_\\
Mathematics is essentially the study of islands of  ===
disparate subjects in a sea of ignorance.   || ! ||
Andrew Wiles _


 Message History 



From: Peter Georgiou [EMAIL PROTECTED] on 18/11/2001 17:12

Please respond to Struts Users Mailing List [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Using tiles and expresso


Hi

My question regards using struts with tiles and expresso.   For tiles I need
to define in web.xml:

org.apache.struts.tiles.ActionComponentServlet   and for expresso I need
to define in web.xml:

com.jcorporate.expresso.core.controller.ExpressoActionServlet.

If I want to use both Tiles and Expresso what can I do to include both of
the required Action classes.  The only way I can think of is to include the
implementation of one within the other.  I'm ion.assuming that I can only
use one Action servlet within an applicat

Thanks

Peter









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






--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.



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




-help

2001-11-19 Thread Mark Ragan

-help

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




Re: Pb with un-selection of multibox or select multiple objects

2001-11-19 Thread Andras Balogh

Hi,

Your select multiple if NONE of the values are selected is not getting
to your ActionForm.(same thing happens in case of a Checkbox)
You should set you String[] variable to null (or empty ??) in the reset
method.


Andras.



On Mon, 2001-11-19 at 17:49, Xavier Brunel wrote:
 Hi all,
 
 I have a problem with objects such a multibox, and select multiple :
 I cannot un-select those objects after having set them in a prior action.
 
 Let see somme details:
 
 I go to a page named Fill to fill a form containing multibox and select
 multiple struts tags.
 I choose several values in each form objects then I submit.
 I then go to another page where I have sereval navigation options,
 one of them is to modify the previous form I filled.
 When I choose modify, I go to the Fill form correctly initialized with the
 previous values,
 I then deselect every multiple select or multibox object and submit: my
 form is not updated by those
 un-selection.()
 Everything is OK if I choose to CHANGE my selection, but nothing is taken
 into account if I UNSELECT all.
 
 Do you have an explaination to this, and an solution to bypass this 
 
 Xavier BRUNEL
 



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




Re: Statement object

2001-11-19 Thread Andras Balogh

Hi,

You might try using LIMIT: 
SELECT LastName FROM Students LIMIT 10,20

This works in MYSQL and Postgres but is not SQL standard as far as i
know.


Andras.


 


On Mon, 2001-11-19 at 19:11, John M. Corro wrote:
 I'm trying to enhance performance on pages the produce listings from a given DB 
table (ie search result pages or pages that list only 10 products out of 100 at a 
time ).  Due to the nature of user interaction, it seems the best way is to execute a 
new query for each page (rather then retrieve all records on the first page and store 
them to memory which is what's done now).  That is, as the user hits Previous 20... 
or Next 20 ..., a new connection to the DB is opened and a new ResultSet is 
retrieved/displayed.  
 
 My question is in regards to the Statement.setMaxRows() method.  Consider the 
following scenario:
 
 - Table 'Students' has 1000 records
 - I use the following code to retrieve the first 100 student records:
 Connection connection = ...;
 PreparedStatement ps = connection.prepareStatement(SELECT LastName FROM Students);
 ps.setMaxRows(100);
 ResultSet rs = ps.executeQuery();
 
 In this scenario, does the PreparedStatement object actually retrieve all 1000 
records, but then only load the first 100 into the ResultSet thus silently dropping 
excess rows (as is described by Javadocs)?  If so, that would seem like only 
marginal performance gains would be realized and that I'd be better off capping that 
size of the ResultSet at the SQL query itself.  
 
 My hope is that the PreparedStatement object is smart enough to only retrieve 100 
records.  Anybody have any experiences w/ it?
 
 John M. Corro
 Cornerstone Consulting
 414.212.3500



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




Re: Statement object

2001-11-19 Thread John M. Corro

I was thinking along those lines as well, but AFAIK there is not ANSI
standard way to limit the size of a result set.  My preference is to not use
DB-specific functionality, but if push comes to shove it sounds like I'll
have to go down that route.  Before I do that I'd like to explore
behind-the-scenes performance implications w/ the Statement.setMaxRows()
method.  Thanks, Andras!


- Original Message -
From: Andras Balogh [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 7:29 AM
Subject: Re: Statement object


 Hi,

 You might try using LIMIT:
 SELECT LastName FROM Students LIMIT 10,20

 This works in MYSQL and Postgres but is not SQL standard as far as i
 know.


 Andras.





 On Mon, 2001-11-19 at 19:11, John M. Corro wrote:
  I'm trying to enhance performance on pages the produce listings from a
given DB table (ie search result pages or pages that list only 10 products
out of 100 at a time ).  Due to the nature of user interaction, it seems the
best way is to execute a new query for each page (rather then retrieve all
records on the first page and store them to memory which is what's done
now).  That is, as the user hits Previous 20... or Next 20 ..., a new
connection to the DB is opened and a new ResultSet is retrieved/displayed.
 
  My question is in regards to the Statement.setMaxRows() method.
Consider the following scenario:
 
  - Table 'Students' has 1000 records
  - I use the following code to retrieve the first 100 student records:
  Connection connection = ...;
  PreparedStatement ps = connection.prepareStatement(SELECT LastName FROM
Students);
  ps.setMaxRows(100);
  ResultSet rs = ps.executeQuery();
 
  In this scenario, does the PreparedStatement object actually retrieve
all 1000 records, but then only load the first 100 into the ResultSet thus
silently dropping excess rows (as is described by Javadocs)?  If so, that
would seem like only marginal performance gains would be realized and that
I'd be better off capping that size of the ResultSet at the SQL query
itself.
 
  My hope is that the PreparedStatement object is smart enough to only
retrieve 100 records.  Anybody have any experiences w/ it?
 
  John M. Corro
  Cornerstone Consulting
  414.212.3500



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





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




HTML Link Tags Seem Clumsy

2001-11-19 Thread Tom Morris

Hello there,

I'm starting to use Struts and was wondering If I'm correct in thinking
that it's a little inflexible when it comes to choosing datatypes for
form-bean properties.

Displaying a query-parameter based HREF link is annoying since, it only
accepts String types.
It would be nice to model my beans in their true form, and have Struts apply
'toString()'
on all non-String data. For example I can't have Integer form-bean
properties participate
in a 'html:link' tag.

Am I missing some fundamental Struts design decision?

Building 'html:link' tags seems particularly awkward when parameters are
required.
The Map approach seems ugly since it requires an extra method on every bean
which
goes through a population process on some object that implements 'Map'.
Why was the tag-lib attribute interface not extended in some way?

I was going to post this to the dev-list, but felt that I must have the
wrong end-of-the stick.

Many thanks for your help (and understanding...)

-Tom

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




localized html pages

2001-11-19 Thread Bruce Geerdes

I'm trying to work out a relatively simple way of implementing localized
html pages.  I'm already using bean:message to localize labels and
messages in my app.

My first idea was to place my links in a localized properties file.

  app.properties:
  home=home.html

  app_fr.properties
  home=home_fr.html

I have a bean that can access this file.  But then I thought it might be
convenient to combine these properties with my bean:message properties. 
The problem is that it doesn't appear possible to include a bean:message
tag within a jsp:include.  The following isn't working for me.

  jsp:include page='bean:message key=%= key %/' flush=true /

My questions are:

1. Is it possible to access the bean:message resource through a
scriptlet or expression?  Something that I could use in the following: 

  jsp:include page=%= bean.message.code.here % flush=true /

2. Is there a simpler way to accomplish what I want (localized html
files)?  I've heard Tiles can do what I want, but it seems to be a
little more complicated than what I need.

Thanks for any input or suggestions,
Bruce

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




Re: localized html pages

2001-11-19 Thread flare

I've coded this time ago.. 

--- cut here - template

%@ page import=app.* %
%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%! String output,link,ext; %

bean:header id=lang name=Accept-Language /

%  link=StringUtils.pathFilter(request.getParameter(link));
if (link==null || link.equals())
 link=index;

   ext=StringUtils.matchLang(it,en,lang,it);
   output=../page/ + link + ext + .jsp;
%

template:insert template='chapterTemplate.jsp'
  template:put name='title' content='%=link%' direct='true' /
  template:put name='header' content='../page/header.jsp' /
  template:put name='left' content='../page/left.jsp' /
  template:put name='content' content='%=output%' /
  template:put name='right' content='../page/right.jsp' /
  template:put name='footer' content='../page/footer.html' /
/template:insert



--- cut here --- support routines

public static final String pathFilter(String string) {
if (string == null || string.length() == 0 ) {
return string;
}
char [] sArray = string.toCharArray();
StringBuffer buf = new StringBuffer(sArray.length);
char ch;
for (int i=0; isArray.length; i++) {
ch = sArray[i];
if(ch == '.'||ch=='/'||ch=='\\') 
 continue;
else {
buf.append(ch);
}
}
return buf.toString();
}

/** data la lingua sul server e quella via browser restituisce una
 *  estensione accettabile nel formato _lang es _it 
 *  @param servlet la sequenza di linque supportate (es: it,en,de)
 *  @param browser la sequenza di lingue preferite dall'utente 
 *  @param def  se lang=default restituisce 
 *  @return la stringa nel formato _lang o  se default (lingua 
di default)
 **/
public static final String matchLang(String servlet, String 
browser, String def)
{
 String br,se;
 StringTokenizer st1 = new StringTokenizer(servlet,,);
 StringTokenizer st2 = new StringTokenizer(browser,,);
 
 while(st2.hasMoreTokens()) {
  br=(String)st2.nextToken().substring(0,2);
  while(st1.hasMoreTokens()) {
   se=(String)st1.nextToken().substring(0,2);
   if (br.equals(se))
 if (br.equals(def))
  return ;
 else return _+se;  
  }
 }
 return ;
}


--- cut here
in the template just set the available languages and the preferred 
ones, then use this kind of links in your pages:
general.jsp?link=pippo

and pippo_xx.jsp (where xx is the foreign language) will be called, 
if the browser language is the default or the language is not 
supported pippo.jsp will be used

Just an idea 

 Flare


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




struts validator - console messages at startup

2001-11-19 Thread Michelle Popovits

Hi,

I have the struts validator extension installed.  When ever I start up my 
app server, the details of all the different validations are displayed on 
the server console.

Is there a way to suppress this?

Thanks,
Michelle

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


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




Newbie Needs Advice : Struts Simple and Images/Mapping

2001-11-19 Thread Paul

Hello All,

You might have mentioned this before, but I am having
problems getting images to offer the same
functionality as the form buttons as well as getting
back to specific steps in the application process.

Using the struts.simple application wizard interface
(act1form), is there a way to specifically take you
back to a page in the application process? For
example, if the application process is 6 steps with a
verification page at the end, how can I map back to
the 3rd step or any step besides the functionally used
with the BACK step? And I suppose the follow up to
that would be how to map back to the verification
(step6)??

If possible, does anyone have sample code for the
update or delete function- that would be an incredible
help.

I hope to return the favor as i get more familiar w/
struts... as you can see i'm trying to dive in head
first.

Sincerely,
Paul



Thanks,

__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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




RE: localized html pages

2001-11-19 Thread Moree, Andrae [Contractor]

This is the initial question:
Any reasons why struts tags don't get processed? Here is the code placed in
a JSP:

html:form action=/commitcancel
html:hidden property=billOrderMaterial
value=%=request.getParameter(billOrderMaterial)%/
html:hidden property=useCurrent
value=%=request.getParameter(useCurrent)%/
html:hidden property=processType
value=%=request.getParameter(processType)%/

%String processType=request.getParameter(processType);
if(processType != null  processType.equalsIgnoreCase(cancelreq)) { %
html:submit styleClass=button value=Cancel/

% }
%
/html:form

-Original Message-
From: Sandeep Takhar [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 3:45 PM
To: Struts Users Mailing List
Subject: Re: localized html pages


don't know what the initial question was, but tiles
has support for multiple languages as well.

Sandeep
--- flare [EMAIL PROTECTED] wrote:
 I've coded this time ago.. 
 
 --- cut here - template
 
 %@ page import=app.* %
 %@ taglib uri='/WEB-INF/struts-template.tld'
 prefix='template' %
 %@ taglib uri=/WEB-INF/struts-bean.tld
 prefix=bean %
 %! String output,link,ext; %
 
 bean:header id=lang name=Accept-Language /
 
 % 

link=StringUtils.pathFilter(request.getParameter(link));
 if (link==null || link.equals())
  link=index;
 
ext=StringUtils.matchLang(it,en,lang,it);
output=../page/ + link + ext + .jsp;
 %
 
 template:insert template='chapterTemplate.jsp'
   template:put name='title' content='%=link%'
 direct='true' /
   template:put name='header'
 content='../page/header.jsp' /
   template:put name='left'
 content='../page/left.jsp' /
   template:put name='content' content='%=output%'
 /
   template:put name='right'
 content='../page/right.jsp' /
   template:put name='footer'
 content='../page/footer.html' /
 /template:insert
 
 
 
 --- cut here --- support routines
 
 public static final String pathFilter(String
 string) {
 if (string == null || string.length() == 0 )
 {
 return string;
 }
 char [] sArray = string.toCharArray();
 StringBuffer buf = new
 StringBuffer(sArray.length);
 char ch;
 for (int i=0; isArray.length; i++) {
 ch = sArray[i];
 if(ch == '.'||ch=='/'||ch=='\\') 
  continue;
 else {
 buf.append(ch);
 }
 }
 return buf.toString();
 }
 
 /** data la lingua sul server e quella via
 browser restituisce una
  *  estensione accettabile nel formato _lang es
 _it 
  *  @param servlet la sequenza di linque
 supportate (es: it,en,de)
  *  @param browser la sequenza di lingue
 preferite dall'utente 
  *  @param def  se lang=default restituisce 
  *  @return la stringa nel formato _lang o  se
 default (lingua 
 di default)
  **/
 public static final String matchLang(String
 servlet, String 
 browser, String def)
 {
  String br,se;
  StringTokenizer st1 = new
 StringTokenizer(servlet,,);
  StringTokenizer st2 = new
 StringTokenizer(browser,,);
  
  while(st2.hasMoreTokens()) {
   br=(String)st2.nextToken().substring(0,2);
   while(st1.hasMoreTokens()) {
   
 se=(String)st1.nextToken().substring(0,2);
if (br.equals(se))
  if (br.equals(def))
   return ;
  else return _+se;  
   }
  }
  return ;
 }
 
 
 --- cut here
 in the template just set the available languages and
 the preferred 
 ones, then use this kind of links in your pages:
 general.jsp?link=pippo
 
 and pippo_xx.jsp (where xx is the foreign language)
 will be called, 
 if the browser language is the default or the
 language is not 
 supported pippo.jsp will be used
 
 Just an idea 
 
  Flare
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

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

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




RE: localized html pages

2001-11-19 Thread Sandeep Takhar

someone has probably pointed this out: have you
defined the tag library at the top of the jsp and does
it exist where it should in the web.xml file etc.

Sandeep
--- Moree, Andrae [Contractor]
[EMAIL PROTECTED] wrote:
 This is the initial question:
 Any reasons why struts tags don't get processed?
 Here is the code placed in
 a JSP:
 
 html:form action=/commitcancel
 html:hidden property=billOrderMaterial

value=%=request.getParameter(billOrderMaterial)%/
 html:hidden property=useCurrent
 value=%=request.getParameter(useCurrent)%/
 html:hidden property=processType
 value=%=request.getParameter(processType)%/
 
 %String
 processType=request.getParameter(processType);
 if(processType != null 
 processType.equalsIgnoreCase(cancelreq)) { %
 html:submit styleClass=button value=Cancel/
 
 % }
 %
 /html:form
 
 -Original Message-
 From: Sandeep Takhar
 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 3:45 PM
 To: Struts Users Mailing List
 Subject: Re: localized html pages
 
 
 don't know what the initial question was, but tiles
 has support for multiple languages as well.
 
 Sandeep
 --- flare [EMAIL PROTECTED] wrote:
  I've coded this time ago.. 
  
  --- cut here - template
  
  %@ page import=app.* %
  %@ taglib uri='/WEB-INF/struts-template.tld'
  prefix='template' %
  %@ taglib uri=/WEB-INF/struts-bean.tld
  prefix=bean %
  %! String output,link,ext; %
  
  bean:header id=lang name=Accept-Language /
  
  % 
 

link=StringUtils.pathFilter(request.getParameter(link));
  if (link==null || link.equals())
   link=index;
  
 ext=StringUtils.matchLang(it,en,lang,it);
 output=../page/ + link + ext + .jsp;
  %
  
  template:insert template='chapterTemplate.jsp'
template:put name='title' content='%=link%'
  direct='true' /
template:put name='header'
  content='../page/header.jsp' /
template:put name='left'
  content='../page/left.jsp' /
template:put name='content'
 content='%=output%'
  /
template:put name='right'
  content='../page/right.jsp' /
template:put name='footer'
  content='../page/footer.html' /
  /template:insert
  
  
  
  --- cut here --- support routines
  
  public static final String
 pathFilter(String
  string) {
  if (string == null || string.length() == 0
 )
  {
  return string;
  }
  char [] sArray = string.toCharArray();
  StringBuffer buf = new
  StringBuffer(sArray.length);
  char ch;
  for (int i=0; isArray.length; i++) {
  ch = sArray[i];
  if(ch == '.'||ch=='/'||ch=='\\') 
   continue;
  else {
  buf.append(ch);
  }
  }
  return buf.toString();
  }
  
  /** data la lingua sul server e quella via
  browser restituisce una
   *  estensione accettabile nel formato _lang
 es
  _it 
   *  @param servlet la sequenza di linque
  supportate (es: it,en,de)
   *  @param browser la sequenza di lingue
  preferite dall'utente 
   *  @param def  se lang=default restituisce 
   *  @return la stringa nel formato _lang o 
 se
  default (lingua 
  di default)
   **/
  public static final String matchLang(String
  servlet, String 
  browser, String def)
  {
   String br,se;
   StringTokenizer st1 = new
  StringTokenizer(servlet,,);
   StringTokenizer st2 = new
  StringTokenizer(browser,,);
   
   while(st2.hasMoreTokens()) {
   
 br=(String)st2.nextToken().substring(0,2);
while(st1.hasMoreTokens()) {

  se=(String)st1.nextToken().substring(0,2);
 if (br.equals(se))
   if (br.equals(def))
return ;
   else return _+se;  
}
   }
   return ;
  }
  
  
  --- cut here
  in the template just set the available languages
 and
  the preferred 
  ones, then use this kind of links in your pages:
  general.jsp?link=pippo
  
  and pippo_xx.jsp (where xx is the foreign
 language)
  will be called, 
  if the browser language is the default or the
  language is not 
  supported pippo.jsp will be used
  
  Just an idea 
  
   Flare
  
  
  --
  To unsubscribe, e-mail:  
 
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
 
 
 __
 Do You Yahoo!?
 Find the one for you at Yahoo! Personals
 http://personals.yahoo.com
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 




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




Logic:empty

2001-11-19 Thread Ines

I can´t find the empty tag. 
The documentation presents it but I could not find the class.

The problem i have is that I want to check if a bean is null. In that case i have to 
print some data

Is there any tag that could help me with this problem?

Thanks a lot!

Ines Pederiva.



RE: Logic:empty

2001-11-19 Thread Siggelkow, Bill

Use the logic:notPresent tag

-Original Message-
From: Ines [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 5:30 PM
To: [EMAIL PROTECTED]
Subject: Logic:empty


I can´t find the empty tag. 
The documentation presents it but I could not find the class.

The problem i have is that I want to check if a bean is null. In that case i
have to print some data

Is there any tag that could help me with this problem?

Thanks a lot!

Ines Pederiva.

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




action chain

2001-11-19 Thread Jerry Wang

Hi,

I've the following questions. Thanks in advance.

1. How can I build a chain of actions for a request ? Do I have to use
forward in action definition to do this ?
2. for register.do?action=edit, what does action=edit do with the action?
Does it override the default action ?
3. Can I chain actions by doing register.do?action=editaction=commit...

Jerry Wang
Bank of New York
CT Office: 203-863-8056
Mobile: 917-495-5598




RE: Form based login

2001-11-19 Thread Dmitri Colebatch

Martin,

With container managed security, you tell the container what urls are
proteected, and how the container ought to authenticate people requesting
access to those urls.  see the servlet spec for details on this, it has a
relatively concise chapter on security.

With application managed security, you would essentially have a login
form, and have people login using it, going through your action, where you
would typically store some details about the user in the session.  Then -
when a user requests a page, its up to you to programmatically determine
if the user is allowed to access the page or not (they may not even be
logged in), and act accordingly.

the difference is that with container managed, you _declare_ the security
in your web.xml, whereas in application managed you _program_ the security
in your code but for your trouble get more flexibility.

hth
dim

On Mon, 19 Nov 2001, Martin Farrell wrote:

 hi
 
 thanks for the clarification
 
 can you offer me some advice on application managed security? my requirement
 is that i have both users and groups within my system
 
 martin
 
 
 
 -Original Message-
 From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
 Sent: 19 November 2001 10:32
 To: Struts Users Mailing List
 Subject: Re: Form based login
 
 
 The idea of form based login is that the servlet container does the job
 for you.  so you dont write anything, apart from provide the look and feel
 for the form.
 
 what you are describing is essentially application managed security...
 
 hth
 dim
 
 On Mon, 19 Nov 2001, Martin Farrell wrote:
 
  Hi
  
  How can I use a form based login within the struts framework?
  
  My basic problem is that i can set up the tomcat realm and validate a user
  to allow access to an area, but I want to be able to access the entered
  j_username and j_password variables on the webapp side. One solution might
  be to allow a successful form based login to forward to a struts form to
  strip out the parameters and populate the relevant beans in my action
 class?
  Is this possible? I would prefer to use this method because I dont want to
  be writing a set of login methods as part of my application
  
  I have read thru the mailing lists and found nothing to demonstrate this.
  
  Thanks
  
  Martin 
  
  
  ** For great Emap magazine subscription  gift offers visit
 http://www.emapmagazines.co.uk **
  
 
 
 
  The information in this email is intended only for the addressee(s) named
 above.
  Access to this email by anyone else is unauthorised.
  If you are not the intended recipient of this message any disclosure,
 copying, 
  distribution or any action taken in reliance on it is prohibited and may
 be unlawful. 
  
  Emap plc and or its subsidiaries do not warrant that any attachments are
 free from 
  viruses or other defects and accept no liability for any losses resulting
 from 
  infected email transmissions.
  
  Please note that any views expressed in this email may be those of the
 originator 
  and do not necessarily reflect those of this organisation.
 
 
 
  
  
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  
  
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 
 


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




struts-simple.war

2001-11-19 Thread iT meDic

Hi All,

I know this question has been asked millions of times however i am using the 
struts simple example and i have tried all methods in the struts thread and 
none of them seem to work(for me!), if you will be kind enuff to point out 
where i am going wrong I will grateful

Mapping an image to a form button

// JSP

// this is ted husted's example - this button works
html:submit onclick=bCancel=true;BACK/html:submit

I am trying to map this image to the form action but doesn't work :(

html:image page=/images/buttons/Back.gif onclick=bCancel=true; 
property=submit value=BACK/

// ACTIVITY1

protected int insert(int step, HttpServletRequest request, ActionMapping 
mapping) {
   String submit = request.getParameter(submit);
if (BACK.equals(submit)) step--;
else {
if (step==STEP_LAST)
step = commit(request,mapping);
else step++;
}
return step;
}


Please help.
Another side question - is it possible to hard code the steps to keywords, 
because i have a 6 page form and i would like take the user back to lets say 
the third step from the fifth step. Any help would be greatly appreciated!

it_medic

pushing struts nicely along...:)

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


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




Re: Forms and Dates

2001-11-19 Thread Yee Keat

I have encountered this problem also, not with dates but with Integer and 
other stuffs, the only way I know how to fix the problem is to change 
everyhing to string, or at least change the getter and setter to work with 
string.

On Monday 19 November 2001 11:35 pm, you wrote:
 I want to create a form with an option field which contains dates (i.e.
 java.util.Date).
 If I use an html:options tag and feed it with a collection containing
 Dates, what I get in my ActionForm it's always Strings.
 Which is the best way to pass Dates to the server through a form?
 Thanks for you help!

-- 
Cheers,

Yee Keat

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




Re: Logic:empty

2001-11-19 Thread martin . cooper

The logic:empty and logic:notEmpty tags are not part of Struts 1.0. They
are currently available only in the nightly builds.

To just check for null, you can use logic:present and logic:notPresent.
The difference is that the 'empty' tags check for an empty string value as
well as null.

--
Martin Cooper


- Original Message -
From: Ines [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 2:30 PM
Subject: Logic:empty


I can´t find the empty tag.
The documentation presents it but I could not find the class.

The problem i have is that I want to check if a bean is null. In that
case i have to print some data

Is there any tag that could help me with this problem?

Thanks a lot!

Ines Pederiva.




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




Re: -help

2001-11-19 Thread @Basebeans.com

Subject: Re: -help
From: Jon Carnes [EMAIL PROTECTED]
 ===
Mark Ragan wrote:

 -help
 
Perhaps a wee bit more detail is called for...

JC

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




Re: static forwards

2001-11-19 Thread martin . cooper

Take a look at the 'forward' attribute for action mappings in
struts-config.xml. I believe this is what you are looking for.

--
Martin Cooper


- Original Message -
From: Martin Samm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 14, 2001 1:30 AM
Subject: static forwards


 Dear all,

 i'm setting up a new site, controlled by struts, where some of the area
are
 not form driven. I want to easily set up mappings such that
 http://someSite/news sends me to a certain page eg pages/news/index.jsp
and
 http://somsite/bites sends me to pages/bites/index.jsp

 Can i set up these /area forwards / redirects easily instruts without
going
 through an 'Action' object?
 --
 Martin Samm


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




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




Re: Forms and Dates

2001-11-19 Thread Paul Devine

There is a separate Jakarta project called 'Taglibs' which may be of
interest for what you are facing.  Taglibs is a set of reusable tags.  There
is a DateTime tag library which looks like it would take away most of the
pain in Date conversion .  Your form classes could then be written to deal
with Date objects and the date tags take care of the conversion.   I believe
Taglibs is connected to a JSR asking for a standard jsp tag library, so
there's a good chance the tags will be supported and stay around.

Hope it is of some help

- Paul

- Original Message -
From: Yee Keat [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 8:21 PM
Subject: Re: Forms and Dates


 I have encountered this problem also, not with dates but with Integer and
 other stuffs, the only way I know how to fix the problem is to change
 everyhing to string, or at least change the getter and setter to work with
 string.

 On Monday 19 November 2001 11:35 pm, you wrote:
  I want to create a form with an option field which contains dates (i.e.
  java.util.Date).
  If I use an html:options tag and feed it with a collection containing
  Dates, what I get in my ActionForm it's always Strings.
  Which is the best way to pass Dates to the server through a form?
  Thanks for you help!

 --
 Cheers,

 Yee Keat

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



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




How to prevent FormBean validate() errors from showing up on logon page

2001-11-19 Thread T. Wheeler

My application requires that users log on, so created a tag to check if the
requester has already logged on.  If not, this tag redirects him to a logon
page (/logon.jsp).  

I have found that if the validate() method of the form bean returns errors
and the user's session is lost (e.g. timed out), it takes the validation
errors that it would normally display on the failure page and instead shows
them on the /logon.jsp page (which also has an html:errors/ tag).

Here are the steps I can take to demonstrate this effect:

1.  Log on to the app with the browser.

2.  Go to the /changePassword.jsp page.  Don't fill it out completely, so
validate() will return errors.  Don't submit the page yet, either.

3.  Restart the servlet engine (resin) which causes all sessions to be lost.

4.  Submit the page that was loaded in step 2

5.  The logon.jsp page is displayed, but so are the validation errors from
the incomplete /changePassword.jsp form.

How can I prevent the validation errors from being displayed when
redirecting to the logon page and still require users to log on?  I suspect
that the form bean returns errors to the changePassword.jsp (and never calls
the action class).  The changePassword.jsp has a app:checkLogon/ tag and
this causes a forward to /logon.jsp

This is the relevant part of the code for the custom tag

  HttpSession session = pageContext.getSession();
  if ((session != null)  (session.getAttribute(name) != null))
valid = true;

if (valid)
  return(EVAL_PAGE);
else
{
  try
  {
//  how do I clear out all ActionErrors here? 
pageContext.forward(page);
  } catch (Exception e) {
throw new JspException(e.toString());
  }
  return(SKIP_PAGE);
}
  }

Also, how could I redirect from within this custom tag instead of forward (I
want the URL to change).

Any ideas?

Thanks in advance,

tw

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




Java script submit on select from drop down

2001-11-19 Thread Ravi Kharse


Hi,

I'm using struts select and options tag for creating a dropdown. I want to 
submit the form on selecting from the dropdown.
I coded :

html:select property=organizationName onchange=this.form.submit()
html:options collection=orgTypes property=value /

Can someone help me on this.

Thanks
Ravi


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




Design Question. Better to have jsp files in root or in WEB-INF/jsp-files

2001-11-19 Thread antony

Hi Folks

I am wanting to know what people think is better.  To have all the jsp 
files in the root directory of the web app or in a directory like

WEB-INF/jsp-pages

I have seen in a few places people putting all there jsp-pages in this 
directory and I cannot see the advantages in doing so, why is this 
better than putting them in the root directory?  It seems like extra 
work to have to then make mappings to get to the jsp files in the 
struts-config.xml file.  Is it worth it?

Cheers

Tony


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