Re: bean:write and formatKey

2002-03-06 Thread Oleg V Alexeev

Hello Matt,

Check the last night build - I just commit fix for it.

Wednesday, March 06, 2002, 4:18:47 AM, you wrote:

MR I've encountered a possible bug in the use of formatKey in bean:write. As
MR always it's more likely to be my error but I'd appreciate it if anyone could
MR have a look. I'm running the latest nightly build of struts.

MR Code snippets are below but to summarise, I'm using the bean:write tag and
MR formatKey attribute in my JSP to refer to 3 different format keys in my
MR resource file. However all my values are being formatted using the
MR format.dollars key if the resource file entries are as below. If I remove
MR format.dollars then I get the strings formatted as percentages, etc. I.e.
MR only one format string is ever used. All my properties return datatype
MR double which I assume is something to do with the problem but I'm not sure
MR what. Why can't I format 4 different properties in 4 different ways using 4
MR different format keys?

MR Thanks,
MR Matt.

MR In a JSP file I have this snippet:

MR logic:iterate id=item name=player property=portfolio
MR tr
MR tdbean:write name=item property=desc //td
MR tdbean:write name=item property=quantity //td
MR tdbean:write name=item property=value 
formatKey=format.dollars
//td
MR tdbean:write name=item property=totalStrength
MR formatKey=format.int //td
MR tdbean:write name=item property=totalDefense 
formatKey=format.int
//td
MR tdbean:write name=item property=change
MR formatKey=format.percentage //td
MR /tr
MR /logic:iterate

MR In my ApplicationResource.properties file I have this snippet:

MR format.int=0
MR format.dollars=$0.00
MR format.percentage=0.00%


MR --
MR To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
MR 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]




Re: anyone using Castor with Struts?

2002-02-22 Thread Oleg V Alexeev

Hello John,

We use Castor  Struts in our projects.
The right way to use Castor is to develop beans to work with
entities from the problem domain, develop database structure and
mapping configuration. And after that develop your Struts application.
Struts' ActionForms are presentation specific classes - a some kind of
informational proxy between entity beans and HTML form data from user
input. Action classes incorporates business logic and work with Castor
to take and store entity beans from/to persistence storage. I think
that idea to use ActionForm as beans in Castor mapping is a potential
source of problems. ActionForm must store field values between user
submits and the best choice for type of properties in ActionForm is
java.lang.String. Entity beans can contains any type properties and
all values for it you can transfer from the ActionForm with help of
BeanUtils.populate() method, which perform automatic conversion of
the field values between String values and such types as Data, Integer
and so on.

Friday, February 22, 2002, 7:30:12 AM, you wrote:

JM I am considering using Castor as a Persistance mechanism with Struts.  Does
JM anyone currently use Castor?  Since Castor is desinged to work with any bean
JM like class, to implement castor should I use Castor QQL directly from my
JM ActionForm classes or should there be some kind of redirection from the
JM ActionForm to a more Castor specific class?

JM -john


JM --
JM To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
JM 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]




Re: Development Environment

2002-02-21 Thread Oleg V Alexeev

Hello Dave,

Far editor with colorer plugin  Ant.

Thursday, February 21, 2002, 8:41:17 PM, you wrote:

DW Hello,

DW Quick question, what is the preferred development environment that you are
DW all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


DW --
DW To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
DW 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]




Re[2]: J2EE BluePrints and Struts

2002-02-05 Thread Oleg V Alexeev

Hello Ted,

Tuesday, February 05, 2002, 4:58:37 PM, you wrote:

TH Oleg had a pager as part of his BeanFactory, but that was never made
TH part of the framework. Perhaps he will get back to that after the 
TH ServiceManager work (Go Oleg!). 

Pager bean is already ok and I can commit it to the repository
anytime. But I think that it is not struts-related stuff and can be
used with any project - so is it right to commit pager bean to the
struts repository? There is one reason only to do so - struts has not
any pager code now... 8)

TH Generally, these type of model-centric patterns do not need be a part of
TH the core framework. The framework provides places where you can plug
TH into the model (Actions). And ways to pass control back and forth
TH between the View (struts-config elements). But the implementation of
TH something like paging is an excercise left to the developer. 

TH A patterns-based approach to paging might be something I would put into
TH the optional Scaffold package, which has a number of
TH implementation-pattern type classes. 




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



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




Re[2]: J2EE BluePrints and Struts

2002-02-05 Thread Oleg V Alexeev

Hello Ted,

Tuesday, February 05, 2002, 6:20:19 PM, you wrote:

TH Or, I guess the Commons -- there's a tag, but it's mostly a  JavaBean,
TH yes?

It is not tag - it is bean only. Developer can set properties and read
page count, iterator with page labels and so all. To generate actual
pager at JSP-page developer can use logic:iterate and so all.

TH And of course, everything we're saying about Oleg's would also go for
TH Pierre's, if he would like to donate it to the cause. 

TH If the two implementations are sufficient differently, and each would
TH work better under different circumstnaces, perhaps we could offer them
TH together. 

TH -T.


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



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




Re[2]: Includes and processing time

2002-01-25 Thread Oleg V Alexeev

Hello Arron,

There are some underground features...
With static include we have one servlet for every page and for dynamic
include we have one servlet plus additional servlets for every
include. Every include page can be used in a number of pages so this
code will processed by JIT as common used part of application. So, in
some conditions dynamic include can be more preferable...

Thursday, January 24, 2002, 4:40:04 PM, you wrote:

A Actually... for performance, the first one is best. Why?... as when the 
A main page is compiled, the files included by this method are included as 
A if they were written in the one file, and then compiled. If a change is 
A made to the include, it wont be picked up unless the main page is 
A changed/recompiled for some reason. As it all ends up being the same 
A page, this is faster performance wise when everything is compiled and 
A dancing (CD? :).

A For flexibility, the second. This method will create a servlet for each 
A include, and then pass the context from the first, to the included 
A second. Because the servlets have to pass the context and everything, 
A this is slower when everything is CD. The second can also be called 
A directly in its own right.

A For my money, I usually go the first. Well, at least for any include 
A that wont be edited without being able to restart the server. If it 
A needs to be recompiled, you just touch the main page.

A In some instances you need that second servlet. Why?... Java's spec 
A means that it will only take a compiled class up to 62K (If memory 
A serves. It's around there). Some pages we have to make can make this 
A quite easily once it's all said and done. So this means you have to use 
A the separate servlets. In one case I used the same include on multiple 
A pages by creating an empty wrapper JSP which would make another servlet, 
A and then include the static include like the other pages, and where 
A included use the dynamic include.


A More often than not, I go for door number one.
A (also cool because it perfectly makes for nesting through to included 
A files, so I can have my view state files for my nested beans. :)



A Arron.


A Keith Bacon wrote:

Hi all,
I tend to think that 
%@ include file=my_page.jsp % is  bad,
%jsp: include page=my_page.jsp % is best.

Any opinions on this?
If you change an included file I assume all the jsp's that access it are recompiled 
next time they
are used (or can be manually recompiled). Which could be very slow.
Included pages get recompiled, but not the page that includes them ie. only the 
thing you change
gets recompiled.
Is this right?

Keith.

--- Arron Bates [EMAIL PROTECTED] wrote:

The type of include you're using here is a dynamic include. Meaning that 
the page to be included isn't simply added, it's compiled into its own 
servlet, and the page's context is passed to the included servlet. For 
the tags to work in the included servlet, they need all the taglib 
imports like your original JSP would.

Or you can try the other form of include, which simply takes the file 
and puts it in the larger file when the JSP is compiled (this is the 
behavior it seems you are expecting)...
%@ include file=my_page.jsp %


Arron.

Bryan P. Glennon wrote:

Hi -
   This is really more of a JSP question, but since it involves struts
tags I figured I'd give it a shot here. I have a page which contains a
form built using the html:form taglib. Based on the users selection from
that form, I go off and do some processing and redirect the user back to
the same page. During the processing, an attribute gets set to indicate
which detail information to include. I try to include this detail page
(which is also an html:form form) by doing a jsp:include.  Basically,
the page looks like this:

 html:form...
 Navigation form
 /html:form

 Static stuff here

 jsp:include page=%=detailPage% /

 My problem is that the tags in the included page never get
processed. So, is there anyway I can make this work?

   Sorry again for the OT post.

Cheers,
Bryan

--
Bryan Glennon (mailto:[EMAIL PROTECTED])
BPG Consulting, Inc. (http://www.bpgc.com)
Tech Question? (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]



__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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





A --
A To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
A 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 

Re: internationalization numeric formats

2001-12-18 Thread Oleg V Alexeev

Hello Nathan,

Monday, December 17, 2001, 8:53:29 PM, you wrote:

NC Hi,

NC does struts support different formats for numbers dependent upon the locale
NC of the user?  I've had a look in the bean write tag code which seems to
NC indicate using keys such as org.apache.struts.taglib.bean.format.float.
NC Should this be used in the Application.properties and
NC Application_de.properties files e.g:

NC org.apache.struts.taglib.bean.format.float=###,###,###,###,###.###

NC Cheers Nathan

Yes, you can define format string for every locale you use. You can
define default format string as

  org.apache.struts.taglib.bean.format.float=###,###,###,###,###.###

or you can define special format for every locale and specify it in
bean:write tag with 'formatKey' attribute -

  may.float.format=.

  bean:write name=floatValue formatKey=may.float.format/

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

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

NC **

NC --
NC To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
NC 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]




Re[2]: internationalization numeric formats

2001-12-18 Thread Oleg V Alexeev

Hello ltorrence,

Tuesday, December 18, 2001, 4:05:32 PM, you wrote:

lpc This is great for bean:write. How do you handle this for html:text tags?

Nothing. Because of html:text use values from ActionForm object.
ActionForm object must be instantiated and filled by string values
from buziness logic level. All string conversions must be perfomed on
phase of values converting from buziness level to the ActionForm
properties.

lpc -Original Message-
lpc From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
lpc Sent: Tuesday, December 18, 2001 3:52 AM
lpc To: Struts Users Mailing List
lpc Subject: Re: internationalization numeric formats


lpc Hello Nathan,

lpc Monday, December 17, 2001, 8:53:29 PM, you wrote:

NC Hi,

NC does struts support different formats for numbers dependent upon the
lpc locale
NC of the user?  I've had a look in the bean write tag code which seems to
NC indicate using keys such as org.apache.struts.taglib.bean.format.float.
NC Should this be used in the Application.properties and
NC Application_de.properties files e.g:

NC org.apache.struts.taglib.bean.format.float=###,###,###,###,###.###

NC Cheers Nathan

lpc Yes, you can define format string for every locale you use. You can
lpc define default format string as

lpc   org.apache.struts.taglib.bean.format.float=###,###,###,###,###.###

lpc or you can define special format for every locale and specify it in
lpc bean:write tag with 'formatKey' attribute -

lpc   may.float.format=.

lpc   bean:write name=floatValue formatKey=may.float.format/

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

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

NC **

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






-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



--
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-14 Thread Oleg V Alexeev

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]




Re: Digester Help PLEASE

2001-08-24 Thread Oleg V Alexeev

Hello Sean,

You can create only ONE instance of Digester in your application. If
it can help you...

Friday, August 24, 2001, 5:26:22 PM, you wrote:

S Ok, after spending over 2 hours trying to debug this can I get some eyes on
S this please?  Does anyone see anything wrong with this method ran against
S the attached datafile:

S protected void initMappings(InputStream input) {

S Digester digester = new Digester();
S digester.setDebug(1);
S digester.setValidating(false);
S digester.push(this);

S digester.addObjectCreate(factory-selector/factory,
S com.company.Factory);
S digester.addSetProperties(factory-selector/factory);
S digester.addSetNext(factory-selector/factory, addFactory,
S com.company.Factory);

S digester.addObjectCreate(*/patternset, com.company.PatternSet);
S digester.addSetProperties(*/patternset);
S digester.addSetNext(*/patternset, addPatternSet,
S com.parlano.web.struts.mapping.PatternSet);

S digester.addCallMethod(*/pattern, addPattern, 0);

S try {
S   digester.parse(input);
S }
S catch (Exception e) {
S   System.out.println(DAMN ERRORS);
S   e.printStackTrace();
S }
S }

S PLEASE, any help would be greatly appreciated ... I can't figure out why
S NONE of my objects are getting created nor are they getting populated.  No
S methods are getting called ...I get no exceptions no nothing ... I put print
S statements around things and it is getting through all of this.  I also
S tried breaking the XML in the datafile and it breaks and errors out so I
S know it is parsing the file.  ANY help would be appreciated, Thanks ...

S Sean



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Digester Help PLEASE

2001-08-24 Thread Oleg V Alexeev

Hello Sean,

What is wrong with your code - explane please.

P.S. May be I am wrong but try to avoid such patterns as
*/patternset


Friday, August 24, 2001, 5:37:58 PM, you wrote:

S Oleg,

S I am running this from a main() test program and only one instance it being
S created.  Do you see anything wrong with the rules? XML file?

S Sean



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[3]: Digester Help PLEASE

2001-08-24 Thread Oleg V Alexeev

Hello Sean,

Friday, August 24, 2001, 5:51:33 PM, you wrote:

S Oleg,

S The problem is that none of the rules are being fired at all, no objects are
S getting created, nothing at all.  The patterns match what is in the file,
S the file is valid, I should see some Factory objects get created, some
S PatternSet objects get created, and a whole bunch of sets etc happen but
S nothing is happening at all ... no a single object is getting consucted.  I
S have placed print statements in the constructors and nothing, nada ...  That
S is what is wrong ... It's like the digester is parsing the file but for some
S weird reason it doesn't see any matches to my rules I added to the Digester.

What version of Digester are you use?

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Linking HREF with Action

2001-08-16 Thread Oleg V Alexeev

Hello Olivier,

Thursday, August 16, 2001, 10:44:54 AM, you wrote:

OH Hi all,

OH I just wanted to know if it's possible to define an Action in the Struts config 
XML file that would be called from an HTML link (html:link tag) that IS NOT within a 
form ?
OH I tried but it seems that the framework needs an ActionForm bean associated with 
each Action.

OH Any idea, comments ?

If you are not define form for some action then reference to
ActionForm in perform() method for this action will be null. And you
can use html:link in any place of the JSP, not only in forms.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: LDAP Authentication To Active Directory

2001-08-13 Thread Oleg V Alexeev

Hello SUPRIYA,

Can you place your code sample to the some server and post URL to it
to the list?

Monday, August 13, 2001, 3:39:48 PM, you wrote:

SM I have successfully implemented LDAP authentication to Microsoft Active 
SM Directory at Wayne State University school of Medicine. If anyone is 
SM interested in having LDAP Authentication To Microsoft Active Directory , 
SM please email me.

SM Supriya Misra
SM System Integrator II
SM MSIS,WSUSOM
SM Detroit, MI

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




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: String as Index

2001-08-01 Thread Oleg V Alexeev

Hello Gregor,

Wednesday, August 01, 2001, 3:55:04 PM, you wrote:

GR as far as I can remember, there was a topic about String as index in
GR property getters/setters here some time ago.


GR I'd like somethigh like this:

GR html:text property=aaa{bbb} /

GR and aaa{bbb} should be converted to getAaa(bbb) and setAaa(bbb, value).

GR Is there something implemented in this direction already? Can I use the
GR results? Can I help?

Now indexed properties can be used only. All properties are processed
by utilites from beanutils package at jakarta-commons. It can parse
indexed properties only. Named properties is great addition, of
course. And of course, you can refactor beanutils package to implement
named properties. It will be great help. 8)

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: String as Index

2001-08-01 Thread Oleg V Alexeev

Hello Rey,

Rey, I search page but can not found anything about your string keyed
proeprties. Can you send URL to the archive with sources?

Wednesday, August 01, 2001, 3:59:51 PM, you wrote:


RF You can use the PropertyUtils that I have created (reusing the Struts one)
RF within the Mapper framework
RF (http://www.husted.com/about/struts/resources.htm#extensions). It supports
RF string keyed properties, using the notation
RF 'simple.nested.indexed[1].stringKeyed(key)'.
RF See this posting about this topic.
RF http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10858.html

RF Fr.

RF -Original Message-
RF From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
RF Sent: 01 August 2001 13:55
RF To: [EMAIL PROTECTED]
RF Subject: String as Index


RF Hi,

RF as far as I can remember, there was a topic about String as index in
RF property getters/setters here some time ago.


RF I'd like somethigh like this:

RF html:text property=aaa{bbb} /

RF and aaa{bbb} should be converted to getAaa(bbb) and setAaa(bbb, value).

RF Is there something implemented in this direction already? Can I use the
RF results? Can I help?

RF --
RF gR

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

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



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Passing parameters when chaining actions

2001-07-27 Thread Oleg V Alexeev

Hello Fabien,

Friday, July 27, 2001, 11:29:06 PM, you wrote:

FM Hello Oleg,

FM Thanks for your help. 

 Can you save values in request or in session context? 

FM I was trying to avoid using the session context and using
FM the request, so that I have less clean-up to do:). I could 
FM use either one if this is the best way.

FM If I place my parameter as request attribute, will the
FM form population algorithm look in both the request parameters
FM and attributes?

Form population algorithm looks for parameters only,

 If no, then you can build query string, add it to the path 
 in forward and forward to the nested action. All values 
 will be automatically passed to the action's form.

FM That's a very good idea; I actually didn't know I could
FM do that.

Find or create forward, take path from it, create Map with parameters
as for html:link tag, pass this map to the RequestUtils.computeURL()
method to compute URL and add computed URL prepended with '?' sign to
the path for the forward. Return it. Thats all.

FM Which solution do you think is best?

I don't like both... 8) But if you use your nested action twice or
more in your application and not as nested action only (in one
situation as nested in another - as standart action) then the best way
is to pass values via query string.
If you use this action as nested only then solution with request
attributes gets you less overhead against query string.


FM Thanks,

FM -Fabien

FM -  
FM Fabien Modoux,
FM Voicemate - http://www.voicemate.com

FM -Original Message-
FM From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
FM Sent: Friday, July 27, 2001 2:34 PM
FM To: [EMAIL PROTECTED]
FM Subject: Re: Passing parameters when chaining actions


FM Hello Fabien,

FM Friday, July 27, 2001, 8:02:28 PM, you wrote:

FM I would like to have an action pass parameters
FM to another actions using a forward action mapping.
FM The second action is configured with a form in
FM the request scope:

FM form-bean  name=action2Form
FM type=Action2Form/

FM actionpath=/my_action1.do
FMtype=Action1
FM   forward name=call_action2 path=/my_action2.do/
FM /action

FM actionpath=/my_action2.do
FMtype=Action2
FMname=action2Form
FMscope=request
FM   !-- forwards --
FM /action

FM I tried to have the first action instantiate
FM the form, populate it, and set it as a request 
FM attribute, under the name of the form defined 
FM in my struts-config file (action2Form). However,
FM when I cast the form in action2 to the action2Form,
FM all the fields are null? Should this work, or
FM shall I manually look in the request for the
FM form? Is there a better way to do that?

FM Can you save values in request or in session context? If no, then you
FM can build query string, add it to the path in forward and forward to
FM the nested action. All values will be automatically passed to the
FM action's form.




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: AW: newbie: initial values

2001-07-26 Thread Oleg V Alexeev

Hello ecn11,

I can suggest to you only one standart way - to add all needed
parameters to the Map and use RequestUtils.computeURL() method to
build URL for the forward.

Thursday, July 26, 2001, 3:53:52 PM, you wrote:

e Hi.

e Thank you very much. The way you have described works really fine...

e But now I have another problem:

e After saving the form my ActionForward perform(...) returns
e mapping.findForward(success); Is there a way of generating the
e editthingdifferent.do?id=BLA again - that is adding a ?id=BLA to the
e mapping that the findForward generated... I have to edit further properties
e of the same somthing in the next form.

e Dominic

e -Ursprüngliche Nachricht-
e Von: Gregor Rayman [mailto:[EMAIL PROTECTED]]
e Gesendet: Mittwoch, 25. Juli 2001 14:58
e An: [EMAIL PROTECTED]
e Betreff: Re: newbie: initial values


e ecn11 [EMAIL PROTECTED] writes:


 Hi.
 
 I apologize for this probably really stupid question, but I was not able
e to
 find a suitable answer anywhere, yet...
 
 In my user management I want to provide a way that the users can change
 their address (they are already stored in a database). Thus I need a form
 with the old address as initial values.
 
 In other words: There is a session variable UserId. How can the form
e bean
 that is used by edituser.jsp access this userid to adjust it's initial
 values.

e Dont do it this way. Implement an Action which fills the form with values.

e What I usually (I use struts one month :-) do in such edit something
e situations:

e I create I an EditTgingActionForm with properties 
e  a) the key properties
e  b) the dependent properties 
e  c) optional - a boolean indicator isEditing

e I create an EditThingAction which:
e  d) checks to see, whether the form has been filled from HTTP
e  (which means: b) properties are filled and c) is true)
e if so, then it performs the updates. If not, no updates.

e  e) fills the properties b) from the database using the key properties a).


e In my JSP which leads to that action, i use parametrized link:
e   a href=editthing.do?id=BLA  (generated with html:link)
  
e As you see, properties b) or c) are not supplied, so the Action
e knows, there is nothing to be updated, it just retrieves the data.

e editthing.do then forward to a JSP, which displays the retrieved 
e data and when submitted (again to editthing.do) EditThingAction
e know, it has to update the data.

e --
e gR







-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Error with Data Sources

2001-07-26 Thread Oleg V Alexeev

Hello Edward,

You need to add jdbc2_0-stdext.jar to the CLASSPATH or to the
WEB_INF/lib directory inside of your application.

Thursday, July 26, 2001, 5:07:10 PM, you wrote:

EM So I've put in a data-sources section that does parse right, but I get
EM the following errors when tomcat starts up een though postgresql.jar is
EM in the apps WEB-INF/lib directory... Can anyone please help?

EM BTW: I can use regular (non-pool) JDBC as that is how I have the
EM application working.

EM New org.apache.struts.util.GenericDataSource
EM java.lang.NoClassDefFoundError: javax/sql/DataSource
EM at java.lang.ClassLoader.defineClass0(Native Method)
EM at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
EM at
EM 
org.apache.tomcat.loader.AdaptiveClassLoader12.doDefineClass(AdaptiveClassLoader12.java:93)
EM at
EM 
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:509)
EM at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
EM at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
EM at java.lang.Class.forName0(Native Method)
EM at java.lang.Class.forName(Class.java:120)
EM at
EM org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
EM at org.apache.struts.digester.Digester.startElement(Digester.java:498)
EM at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
EM at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
EM at com.sun.xml.parser.Parser.parse(Parser.java:284)
EM at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
EM at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
EM at org.apache.struts.digester.Digester.parse(Digester.java:716)
EM at
EM org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247)
EM at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437)
EM at javax.servlet.GenericServlet.init(GenericServlet.java:258)
EM at
EM org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
EM at org.apache.tomcat.core.Handler.init(Handler.java:215)
EM at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
EM at
EM 
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
EM at
EM org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
EM at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
EM at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
EM at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
EM Begin event threw exception
EM java.lang.ClassNotFoundException:
EM org/apache/struts/util/GenericDataSource
EM at java.lang.Class.forName0(Native Method)
EM at java.lang.Class.forName(Class.java:120)
EM at
EM org.apache.struts.digester.ObjectCreateRule.begin(ObjectCreateRule.java:152)
EM at org.apache.struts.digester.Digester.startElement(Digester.java:498)
EM at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
EM at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM at com.sun.xml.parser.Parser.content(Parser.java:1499)
EM at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
EM at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
EM at com.sun.xml.parser.Parser.parse(Parser.java:284)
EM at javax.xml.parsers.SAXParser.parse(SAXParser.java:155)
EM at javax.xml.parsers.SAXParser.parse(SAXParser.java:77)
EM at org.apache.struts.digester.Digester.parse(Digester.java:716)
EM at
EM org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1247)
EM at org.apache.struts.action.ActionServlet.init(ActionServlet.java:437)
EM at javax.servlet.GenericServlet.init(GenericServlet.java:258)
EM at
EM org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
EM at org.apache.tomcat.core.Handler.init(Handler.java:215)
EM at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
EM at
EM 
org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
EM at
EM org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
EM at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
EM at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
EM at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)

EM On 25 Jul 2001 22:20:00 

Re[2]: dynamic forward

2001-07-26 Thread Oleg V Alexeev

Hello Erik,

One thing... I think you have a wrong way with such solution. More
flexible approach is to place all forward choosing logic to the Action
class, not to the JSP page.

Thursday, July 26, 2001, 5:34:02 PM, you wrote:

EjdW oke I solved it like this

EjdW bean:parameter id=main name=MAIN/
EjdW html:link forward=%=main%/

EjdW not very pretty but it works



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Creation of form bean

2001-07-26 Thread Oleg V Alexeev

Hello dhay,

Friday, July 27, 2001, 12:17:33 AM, you wrote:



dlc Hi.  Just a quick question - if I link directly to a jsp which contains an
dlc html:form tag with a formbean specified which I use on submit, is the formbean
dlc created by Struts?

html:form looks for the form instance and if not found one then it
will be created.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: full featured example

2001-07-26 Thread Oleg V Alexeev

Hello Michael,

Friday, July 27, 2001, 8:32:21 AM, you wrote:

MM Here is another full featured example without console.

MM www.teatimej.com  (Web Timesheet Management System).

MM It also uses Castor for O/R data binding and itext for dynamic PDF document
MM generation and JavaMail.

Is it open-source project? Can anybody take a look to the source code?
If no then it is not example - it is some kind of presentation or
demo. It think that full featured example contains source code of
itself to review source code and learn.

MM Regards

MM Michael Mok
MM www.teatimej.com

MM -Original Message-
MM From: Pan Li [mailto:[EMAIL PROTECTED]]
MM Sent: Friday, 27 July 2001 11:47
MM To: [EMAIL PROTECTED]
MM Subject: Re: full featured example


MM There is a example which is really full featured but
MM without source code.
MM It is the admin consle of WebSphere 4.0.

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



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: DataSource and Factories

2001-07-25 Thread Oleg V Alexeev

Hello Andreas,

Wednesday, July 25, 2001, 1:59:50 PM, you wrote:


AL Hi again,

AL I would like to seperate my buisness logic from the data layer. Say I
AL have an object Person, that has the fields id, firstName and lastName.
AL The only constructor I provide is one which takes two arguments (id,
AL firstName and lastName). The person objects will be stored in a certain
AL Database, but this may change in the future, this is why I use a
AL factory. The factory takes an id, connects to the DB, retrieves the
AL data, creates the Person object and returns it. 

AL This pattern also comes in handy, when you have classes that inherit
AL from Person. If the DB access would happen in the constructor, one could
AL only create Person objects, with a factory, you can create an object of
AL the real type instead.

AL Anyway, what I want is to get a DataSource without knowing about a
AL servlet. Is this somehow possible? Is there some static access to the
AL DataSource Repository?

Take a look to the Castor project -
http://castor.exolab.org

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Accessing JDBC-ODBC from Struts

2001-07-25 Thread Oleg V Alexeev

Hello Rodney,

Wednesday, July 25, 2001, 5:19:58 PM, you wrote:

RS Hi

RS I need some direction on how to incorporate JDBC-ODBC into my struts
RS and where the ODBC should be stored in my application. Also how to reference
RS that in my Action Servlet, I am a little unsure about this area, but would
RS appreciate some feed back or documentation that will simplify my work.

No problem. Open connection with ODBC-JDBC driver in Action class and
perform any operations with this datasource.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: calling actionmapping from a URL

2001-07-25 Thread Oleg V Alexeev

Hello Jan,

Thursday, July 26, 2001, 1:40:48 AM, you wrote:

JFØ Hi
JFØ I have a action class that is used in several actionmappings and in some
JFØ situations it is called directly
JFØ from a url, like href=myaction.do, but in these cases the validation
JFØ implemented prevents me from continuing the process.
JFØ My question is: how can i turn off validation when calling a action class
JFØ from a URL.

Is is simple - set validate attribute in action mapping to false:

actionpath=/registration/register
   name=registrationForm
   input=/WEB-INF/jsp/registration.jsp
   validate=true
   type=com.rb.action.RegisterAction
forwardname=confirm  
path=/WEB-INF/jsp/confirmRegister.jsp/
/action



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Subclass ActionServlet to behave as central controller

2001-07-18 Thread Oleg V Alexeev

Hello Peter,

Wednesday, July 18, 2001, 5:53:01 PM, you wrote:

PS Hi ppl,

PS Would it be possible to subclass the ActionServlet to add behaviour
PS needed for it to behave as central controller so it could handle all the
PS requests coming to the web application, not only the action execution
PS requests ? In the subclassed ActionServlet I want to be able to add some
PS logic which will determine where the request should be forwarded in case
PS where isn't any action to be processed by ActionServlet. For example a
PS request for /example/some_page.do could be forwarded to /some_page.jsp
PS OR /WEB-INF/jsp/some_page.jsp. I don't want to add mappings in
PS struts-config.xml for each page I have in the application.

Yes, of course. You can extend ActionServlet and append your own logic
to support additional behaviors.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Where do YOU put JDBC calls?

2001-07-18 Thread Oleg V Alexeev

Hello Ryan,

Wednesday, July 18, 2001, 5:55:46 PM, you wrote:

RC I'm wondering what people are considering best practices for JDBC calls?

RC I have been writing beans that wrap a database table, and include functions 
select, insert, delete. These functions either load the bean, insert the bean 
values in the database, or delete
RC the record from the database. In all of these functions, I pass in a database 
connection from the action. (Or whatever else is calling the bean.)

RC ie- public boolean select(Connection cn1, String primaryKey)

RC How are others doing it? I think this is a good approach, but want to see if 
someone has come up with something better.

RC Thanks,
RC Ryan

Take a look to the jdbc-example in validator - it contains sample of
jdbc calls similar to Command pattern.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: message masks

2001-07-06 Thread Oleg V Alexeev

Hello Renzo,

You can use -

bean:message key=some.key arg0='%= crazy %'/

Friday, July 06, 2001, 4:30:27 PM, you wrote:


RT Hi there,

RT First of all, I want to thank all Struts developers  contributors for
RT creating such a nifty  framework. After working with it for some time now, I
RT really miss message masks, like 'Hi {0}, welcome back'. Ok, I _could_ use a
RT pre and suffix, but that's not very proper.

RT Now I have found a thread (url below) on the user mailinglist, but I cant
RT seem to find any resolution on the subject.

RT http://marc.theaimsgroup.com/?l=struts-userm=99400475317567w=2

RT So I hope you can answer my question. Do you know by any chance if someone's
RT working on it, or should I consider this a do-it-yourself?



RT Cheers,

RT Renzo


RT ps. have also posted this to the devlist, but I figure more people read this
RT list.



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Pager tag library

2001-06-29 Thread Oleg V Alexeev

Hello Biggs,

Friday, June 29, 2001, 10:27:40 AM, you wrote:


B Has anyone successfully used the pager tag library from www.jsptags.com within a 
form? What I currently have is a page that contains a form that allows the user to 
perform a search for a customer,
B based upon there criteria we return the results (in a collection) and display this 
list to the user. The problem (I believe) that I am encountering is that I am using a 
form to perform a search
B action, and when I click upon one of the links produced by the pager, it executes 
the action of the form. 
B http://myserver/findcust.do?pager.offset=10
B This is one of the links produced by the pager, which returns an action:error 
message (no search results found). I am not sure exactly what I am doing wrong, but 
any assistance would greatly be
B appreciated.

You need to store search results in sessions scope or pass search
parameters for each URL to page in pager.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: attributes in the Bean Logic tags - Help

2001-06-29 Thread Oleg V Alexeev

Hello Jonathan,

Friday, June 29, 2001, 4:09:04 PM, you wrote:

JA I have been looking at the documentation and I am still not
JA comfortable with understanding what certain attributes represent
JA in the Bean  Logic tags. I am particularly confused with nested
JA tags   
JA and  these attributes:

JA id=
JA name=
JA property=

Common use -
 id - name for new bean in page or (rarely) another scope
 name - name of some existing bean
 property - property (pair of setter  getter) name of some bean


JA Could one of you kind gentlemen help with a concise yet on the
JA money explanation. 
JA I am understanding that the value placed in property will
JA translate to a getProperty, but I am not sure which bean it
JA pertains to?  



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Can I Use logical name for path of local forwards?

2001-06-27 Thread Oleg V Alexeev

Hello Ted,

Wednesday, June 27, 2001, 2:12:07 PM, you wrote:

TH How about this:

TH action  path=/maauto/quote
TH   type=MyClass
THforward   name=success path=/maauto/done.do/

TH action  path=/maauto/done
TH   forward=/myapp/apage.jsp
/

One question here... Imagine that you have one page to view result of
two actions  -

 action  path=/maauto/quote type=MyClass
  forward   name=success path=/done.jsp/
 /action
 
 action  path=/maauto/another type=MyClass
  forward   name=success path=/done.jsp/
 /action

But what URI can I place to the img tags to the JSP page to view
pictures without any troubles in both variants?
If I use relative path then for /maauto/quote it will be
/maauto/quote/image.gif and for another URL /maauto/another it will be
/maauto/another/image.gif. Bad choice. Try to use absolute path for
images - this way we must place our application to the root only or
always write hard coded path to the image URIs -
/application/image.gif.
How can we avoid such collision?
 
-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Delegating the request processing to an Action class

2001-06-27 Thread Oleg V Alexeev

Hello ssuku,

Wednesday, June 27, 2001, 4:24:58 PM, you wrote:



shhc Hi,
shhc  How can a  request processing be delegated from an Action class to
shhc another?

shhc Thanks
shhc Sandhya

Return forward to another action -

 return new ActionForward( someaction.do );



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Sealing violation exception in Tomcat 4.0b4

2001-06-24 Thread Oleg V Alexeev

Hello struts-user,

  Has anyone answer to question about using struts in Tomcat 4.0?
  Today I try to migrate to the Tomcat 4.0b4 and all struts based
  applications throw exception at action processing step -
  
2001-06-24 19:15:00 StandardWrapperValve[action]: Servlet.service() for servlet action 
threw exception
javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:837)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:594)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:525)
at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:335)
at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:272)
at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1758)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:254)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:194)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
at java.lang.Thread.run(Thread.java:484)
- Root Cause -
java.lang.SecurityException: sealing violation
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:664)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:1076)
at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:975)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at 
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCache.java:163)
at 
org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:137)
at 
org.apache.jasper.EmbededServletOptions.init(EmbededServletOptions.java:324)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:263)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:818)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:594)
at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:525)
 

Re[4]: Dynamic creation of Actions's with 'forName'

2001-06-21 Thread Oleg V Alexeev

Hello Craig,

Wednesday, June 20, 2001, 8:52:18 PM, you wrote:

CRM On Wed, 20 Jun 2001, Oleg V Alexeev wrote:

 Hello Craig,
 
 Interesting question and clear answer... 8)
 

CRM Yah, I really enjoy the interesting ones :-).

 What do you think about such caching for Class? With this approach we
 call forName() method only once - no other overhead.
 

CRM Class loaders do this kind of caching already, so I guess I don't see all
CRM that much benefit.

CRM For Struts in particular, if you're concerned about repeated
CRM Class.forName() calls, a better strategy is avoidance -- arrange your
CRM application so that the form beans are created for you ahead of
CRM time.  Then Struts will never have to call it.

Sorry, but I have not idea how to do so. Explain please, how can I
arrange your application so that the form beans are created for you ahead of
time? Is it step in struts-config or no?

CRM Or, throw you can just throw hardware at it and take advantage of Moore's
CRM Law ... :-)

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: MessageBundle

2001-06-21 Thread Oleg V Alexeev

Hello Simon,

Wednesday, June 20, 2001, 10:31:36 PM, you wrote:

SL For some reason, Strut can't find my message bundle. For testing purpose, i
SL have 2 language(thus 2 properties files).
SL MyResources.properties(default for English)
SL MyResources_fr.properties(for French)

SL On the JSP message bean call, the default English works fine. But i can't
SL get the French version to work. It tells me:
SL javax.servlet.jsp.JspException: Cannot find message resources under key
SL MyResources

SL !-- jsp code --
SL h3bean:message bundle=MyResouces locale=fr key=um_user.heading/
SL %= userSession.getName()%
SL /h3
SL !-- end jsp code --

SL !-- the xml config file here --
SL servlet
SL servlet-nameaction/servlet-name

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

If your work with on bundle only then just remove bundle attribute
form bean:message -

bean:message locale=fr key=um_user.heading/

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: how to quote nested tags

2001-06-21 Thread Oleg V Alexeev

Hello Felix,

Thursday, June 21, 2001, 2:03:49 PM, you wrote:

FvD my:foo a='my:bar b=stuff/' /
FvD  ^-^
FvD   ^---^

You can use in tag attributes only run time expressions - not another
tag.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: newbie question: Missing message for key index.title error

2001-06-20 Thread Oleg V Alexeev

Hello John,

You must place string for key index.title to the your resources.
Name for the resource bundle is in parameter application in servlet
description for ActionServlet in web.xml.

Wednesday, June 20, 2001, 12:55:40 PM, you wrote:

ONJH Hi Everyone,

ONJH Could anyone please tell me why I am getting the following error message
ONJH when trying to run the 'blank' example that comes with Struts?

ONJH Cheers,
ONJH John


ONJH Error 500
ONJH An error has occured while processing
ONJH request:http://localhost:8080/blank/index.jsp
ONJH Message: Server caught unhandled exception from servlet [jsp]: Missing
ONJH message for key index.title

ONJH Target Servlet: jsp
ONJH StackTrace: 

ONJH Root Error-1: Missing message for key index.title
ONJH javax.servlet.jsp.JspException: Missing message for key index.title
ONJH java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String)
ONJH javax.servlet.jsp.JspException(java.lang.String) int
ONJH org.apache.struts.taglib.bean.MessageTag.doStartTag() void
ONJH blank._index_xjsp_jspsrc_910258570._jspService(javax.servlet.http.HttpServle
ONJH tRequest, javax.servlet.http.HttpServletResponse) void
ONJH org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet
ONJH Request, javax.servlet.http.HttpServletResponse) void
ONJH javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
ONJH javax.servlet.ServletResponse) void
ONJH org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
ONJH .http.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
ONJH void
ONJH org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ONJH ervletRequest, javax.servlet.http.HttpServletResponse, java.lang.String,
ONJH java.lang.Throwable, boolean) void
ONJH org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
ONJH equest, javax.servlet.http.HttpServletResponse) void
ONJH javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
ONJH javax.servlet.ServletResponse) void
ONJH com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
ONJH ServletRequest, javax.servlet.ServletResponse) void
ONJH com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
ONJH ServletRequest, javax.servlet.ServletResponse) void
ONJH com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin
ONJH e.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest,
ONJH javax.servlet.ServletResponse) void
ONJH com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S
ONJH ervletRequest, javax.servlet.ServletResponse) void
ONJH com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR
ONJH equest, javax.servlet.ServletResponse,
ONJH com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void
ONJH com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se
ONJH rvlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest,
ONJH javax.servlet.ServletResponse,
ONJH com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void
ONJH com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle
ONJH t.ServletRequest, javax.servlet.ServletResponse,
ONJH com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void
ONJH com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c
ONJH om.ibm.servlet.engine.webapp.WebAppRequest,
ONJH javax.servlet.http.HttpServletResponse, boolean) void
ONJH com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet
ONJH .ServletRequest, javax.servlet.ServletResponse, boolean) void
ONJH com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet.
ONJH ServletRequest, javax.servlet.ServletResponse) void
ONJH com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Obje
ONJH ct) void
ONJH com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lan
ONJH g.Object) void
ONJH com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(java.lan
ONJH g.Object) void
ONJH com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.S
ONJH tring, com.ibm.servlet.engine.srp.ISRPConnection) void
ONJH com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.ser
ONJH vlet.engine.oselistener.api.IOSEConnection) void
ONJH com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection(
ONJH java.net.Socket) void
ONJH com.ibm.servlet.engine.http_transport.HttpTransportHandler.run() void
ONJH java.lang.Thread.run() 

ONJH Wrapped Error-2: Missing message for key index.title
ONJH javax.servlet.ServletException: Missing message for key index.title
ONJH java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String)
ONJH javax.servlet.ServletException(java.lang.Throwable) void
ONJH org.apache.jasper.runtime.PageContextImpl.handlePageException(java.lang.Exce
ONJH ption) void
ONJH 

Re[2]: newbie question: Missing message for key index.title error

2001-06-20 Thread Oleg V Alexeev

Hello John,

Remove resources from classpath and place it to the WEB-INF/classes
directory. For example

WEB-INF
  classes
 ApplicationResources.properties
 ApplicationResources_en.properties
  (...place here resources for every language used in your app...)
  
In resources track for string

index.title=Some title

in every file.

That's all.
  
Wednesday, June 20, 2001, 1:37:53 PM, you wrote:

ONJH Hi Oleg,

ONJH I currently have the parameters to the ActionServlet in web.xml as
ONJH follows.

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

ONJH This seems to be as you are saying to have it. I also have the
ONJH classpath set to find the directory where my ApplicationResources.properties
ONJH file is and it contains the 'index.title' and other string property values.
ONJH Unfortunately this doesn't seem to solve the problem. Any other ideas?

ONJH Thanks,
ONJH John

ONJH -Original Message-
ONJH From:   Oleg V Alexeev [SMTP:[EMAIL PROTECTED]]
ONJH Sent:   Wednesday, June 20, 2001 10:19 AM
ONJH To: [EMAIL PROTECTED]
ONJH Subject:Re: newbie question: Missing message for key
ONJH index.title error

ONJH Hello John,

ONJH You must place string for key index.title to the your resources.
ONJH Name for the resource bundle is in parameter application in servlet
ONJH description for ActionServlet in web.xml.

ONJH Wednesday, June 20, 2001, 12:55:40 PM, you wrote:

ONJH ONJH Hi Everyone,

ONJH ONJH Could anyone please tell me why I am getting the following
ONJH error message
ONJH ONJH when trying to run the 'blank' example that comes with Struts?

ONJH ONJH Cheers,
ONJH ONJH John


ONJH ONJH Error 500
ONJH ONJH An error has occured while processing
ONJH ONJH request:http://localhost:8080/blank/index.jsp
ONJH ONJH Message: Server caught unhandled exception from servlet [jsp]:
ONJH Missing
ONJH ONJH message for key index.title

ONJH ONJH Target Servlet: jsp
ONJH ONJH StackTrace: 

ONJH ONJH Root Error-1: Missing message for key index.title
ONJH ONJH javax.servlet.jsp.JspException: Missing message for key
ONJH index.title
ONJH ONJH java.lang.Throwable(java.lang.String)
ONJH java.lang.Exception(java.lang.String)
ONJH ONJH javax.servlet.jsp.JspException(java.lang.String) int
ONJH ONJH org.apache.struts.taglib.bean.MessageTag.doStartTag() void
ONJH ONJH
ONJH blank._index_xjsp_jspsrc_910258570._jspService(javax.servlet.http.HttpServle
ONJH ONJH tRequest, javax.servlet.http.HttpServletResponse) void
ONJH ONJH
ONJH org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServlet
ONJH ONJH Request, javax.servlet.http.HttpServletResponse) void
ONJH ONJH
ONJH javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
ONJH ONJH javax.servlet.ServletResponse) void
ONJH ONJH
ONJH org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(javax.servlet
ONJH ONJH .http.HttpServletRequest,
ONJH javax.servlet.http.HttpServletResponse, boolean)
ONJH ONJH void
ONJH ONJH
ONJH org.apache.jasper.runtime.JspServlet.serviceJspFile(javax.servlet.http.HttpS
ONJH ONJH ervletRequest, javax.servlet.http.HttpServletResponse,
ONJH java.lang.String,
ONJH ONJH java.lang.Throwable, boolean) void
ONJH ONJH
ONJH org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR
ONJH ONJH equest, javax.servlet.http.HttpServletResponse) void
ONJH ONJH
ONJH javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,
ONJH ONJH javax.servlet.ServletResponse) void
ONJH ONJH
ONJH com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet.
ONJH ONJH ServletRequest, javax.servlet.ServletResponse) void
ONJH ONJH
ONJH com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet.
ONJH ONJH ServletRequest

Re[4]: newbie question: Missing message for key index.title e rror

2001-06-20 Thread Oleg V Alexeev

Hello John,

Remove struts.jar and all links to the WEB-INF/classes from your
classpath.

Wednesday, June 20, 2001, 2:08:28 PM, you wrote:

ONJH Hi Oleg,

ONJH That is the way I have it set up Unless my directory structure is wrong?

ONJH Directory structure as follows

ONJH web group name
ONJH   web
ONJH WEB-INF
ONJH   classes

ONJH John


ONJH -Original Message-
ONJH From:   Oleg V Alexeev [SMTP:[EMAIL PROTECTED]]
ONJH Sent:   Wednesday, June 20, 2001 10:54 AM
ONJH To: [EMAIL PROTECTED]
ONJH Subject:Re[2]: newbie question: Missing message for key
ONJH index.title error

ONJH Hello John,

ONJH Remove resources from classpath and place it to the WEB-INF/classes
ONJH directory. For example

ONJH WEB-INF
ONJH   classes
ONJH  ApplicationResources.properties
ONJH  ApplicationResources_en.properties
ONJH   (...place here resources for every language used in your
ONJH app...)
  
ONJH In resources track for string

ONJH index.title=Some title

ONJH in every file.

ONJH That's all.
  
ONJH Wednesday, June 20, 2001, 1:37:53 PM, you wrote:

ONJH ONJH Hi Oleg,

ONJH ONJH I currently have the parameters to the ActionServlet
ONJH in web.xml as
ONJH ONJH follows.

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

ONJH ONJH This seems to be as you are saying to have it. I also
ONJH have the
ONJH ONJH classpath set to find the directory where my
ONJH ApplicationResources.properties
ONJH ONJH file is and it contains the 'index.title' and other string
ONJH property values.
ONJH ONJH Unfortunately this doesn't seem to solve the problem. Any
ONJH other ideas?

ONJH ONJH Thanks,
ONJH ONJH John

ONJH ONJH -Original Message-
ONJH ONJH From:   Oleg V Alexeev [SMTP:[EMAIL PROTECTED]]
ONJH ONJH Sent:   Wednesday, June 20, 2001 10:19 AM
ONJH ONJH To: [EMAIL PROTECTED]
ONJH ONJH Subject:Re: newbie question: Missing message
ONJH for key
ONJH ONJH index.title error

ONJH ONJH Hello John,

ONJH ONJH You must place string for key index.title to the your
ONJH resources.
ONJH ONJH Name for the resource bundle is in parameter
ONJH application in servlet
ONJH ONJH description for ActionServlet in web.xml.

ONJH ONJH Wednesday, June 20, 2001, 12:55:40 PM, you wrote:

ONJH ONJH ONJH Hi Everyone,

ONJH ONJH ONJH Could anyone please tell me why I am getting the
ONJH following
ONJH ONJH error message
ONJH ONJH ONJH when trying to run the 'blank' example that
ONJH comes with Struts?

ONJH ONJH ONJH Cheers,
ONJH ONJH ONJH John


ONJH ONJH ONJH Error 500
ONJH ONJH ONJH An error has occured while processing
ONJH ONJH ONJH request:http://localhost:8080/blank/index.jsp
ONJH ONJH ONJH Message: Server caught unhandled exception from
ONJH servlet [jsp]:
ONJH ONJH Missing
ONJH ONJH ONJH message for key index.title

ONJH ONJH ONJH Target Servlet: jsp
ONJH ONJH ONJH StackTrace: 

ONJH ONJH ONJH Root Error-1: Missing message for key
ONJH index.title
ONJH ONJH ONJH javax.servlet.jsp.JspException: Missing message
ONJH for key
ONJH ONJH index.title
ONJH ONJH ONJH java.lang.Throwable(java.lang.String)
ONJH ONJH java.lang.Exception

Re: forwarding to itself

2001-06-19 Thread Oleg V Alexeev

Hello salinaale,

Tuesday, June 19, 2001, 1:34:12 PM, you wrote:

sli Hello,
sli i have one action bean for changing language and the relative mapping 
sli in Struts-config.xml.
sli This mapping can be called from many page so i can't 
sli use mapping.findForward(mapping.getInput()) !!
sli How can i do to to forward request to the page which from this request 
sli comes???

You can calculate query string for current page

%
   String sourceURL = null;
   StringBuffer URL = HttpUtils.getRequestURL(request);
   String queryString = request.getQueryString();
   if( (queryString!=null)  (queryString.length()0) ) {
URL.append(?);
URL.append( queryString );
   }
   sourceURL = URL.toString();

%

for example. But this will work only if you call your page directly
and not use forward from action.
If you use forward (without redirect) then you must calculate path to
redisplay page in action class, store it in request scope and use this
string as parameter for language switch. Language switch action take
this query string and make forward to it after language switching.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Extending ActionServlet

2001-06-19 Thread Oleg V Alexeev

Hello TODD,

Tuesday, June 19, 2001, 5:11:49 PM, you wrote:

TH Is there a way I can override the ActionServlet class to allow for
TH multiple struts-config.xml files to be parsed for a single
TH application? Our struts-config.xml file is getting rather large
TH and   
TH it would be nice if we could split the struts-config.xml into
TH multiple .xml files and have the ActionServlet, or a descendant,
TH be able to parse all of the config files and store the action
TH mappings.

You can extend ActionServelt, parse multiple
struts-configs with Digester, store all stuff and work with it as with
one big config. Each config must contains struts-config tag and
store all stuff inside of it.
And another way - you can write you own servlet to parse configs. Use
ActionServlet as base for your configs loader, parse and store all
mappings by the way, similar ActionServlet.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Dynamic creation of Actions's with 'forName'

2001-06-19 Thread Oleg V Alexeev

Hello Craig,

Interesting question and clear answer... 8)

What do you think about such caching for Class? With this approach we
call forName() method only once - no other overhead.

public class EntityMapping {

   protected Class cach = null;

   protected String type = null;

   public String getType() {
  return type;
   }

   public void setType( String type ) {
  this.type = type;
   }

   public Class getStub() throws ClassNotFoundException {
  if( cach!=null )
  cach = Class.forName( type );
  return cach;
   }

   public Entity getEntity() throws ClassNotFoundException {
  return getStub().newInstance();
   }
   
}


Wednesday, June 20, 2001, 12:31:03 AM, you wrote:



CRM On Tue, 19 Jun 2001 [EMAIL PROTECTED] wrote:

 Hi,
 
 Is anyone using the STRUTS framework in a production environment yet?
 
 We're currently developing a MVC based webapp and are looking at 
 potentially taking a step backwards and basing it around STRUTS.  One area 
 of concern is the dynamic creation of the Action objects using 'forName'.  
 What sort of performance hit does this give?
 
 Advice from our Tech Architect at the moment seems to be to look at STRUTS 
 but write our own version and he's not too keen on 'forName' processing.  
 Is this an unfounded concern?
 

CRM There are several considerations to think about in trying to address this
CRM concern:

CRM * How often does it happen?  In Struts, objects are created
CRM   dynamically only under the following circumstances:
CRM   - The first time a particular Action class is accessed (so it's not
CRM really relevant to discussions about performance impacts).
CRM   - When you are a using form bean, AND the form bean does not already
CRM exist in appropriate scope.  If you adopt a pure MVC approach (and
CRM flow all your requests through the controller), you can easily
CRM arrange to create form bean instances from a recyclable pool if
CRM you want to.

CRM * Does it matter when it does happen?  One of the most striking
CRM   differences between modern HotSpot-based JVMs and earlier generations
CRM   is that the cost of object creation (and the subsequent garbage
CRM   collection) has been dramatically reduced.  I have had people who are
CRM   pretty sharp tell me that object pooling can easily cost you more
CRM   performance than it saves by avoiding object creations, in many
CRM   circumstances.

CRM * Is it worth the cost?  The point of many features of Struts (or any
CRM   other application framework) is to accelerate development, and to
CRM   reduce ongoing maintenance costs by making your architecture naturally
CRM   easier to maintain.  Is this worth throwing a little extra hardware
CRM   at the server to deal with any perceived overhead of object creation?
CRM   For many people, the answer is yes, absolutely.  And projections for
CRM   the future cost of a developer's time, as compared to the cost of
CRM   x MIPs worth of CPU time, is going to make this even more attractive.

CRM As you can see, there's no cut-and-dried answer.  Dynamic object creation
CRM has a cost (which can be mitigated in your application design).  So does
CRM introspection to do the BeanUtils.populate() trick of copying request
CRM parameters into bean properties (which vastly reduces the work needed to
CRM create and maintain form bean classes).  Like everything, it's a balance
CRM of cost versus benefit.  And the benefits can be quite dramatic.


 Regards,
 

CRM Craig McClanahan




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: General DATABASE programming question

2001-06-16 Thread Oleg V Alexeev

Hello Mindaugas,

Saturday, June 16, 2001, 10:36:45 PM, you wrote:

MI My original goal is to ask the database for a page of information at a time.
MI However, MS SQL server does not let you display your results starting at an
MI offset.

MI In my web app's search method, I load the ResultSet into a LinkedList and
MI use the struts iterate taglib to display the results to the JSP tags pager
MI taglib.

MI So, I see two ways of resolving this. 1) Do the query one time and store the
MI LinkedList in the session -- effectively caching the entire results in
MI memory. 2) Query the database each time and skip over the first n results
MI and discarding the last x results.

MI Neither of these solutions are really ideal since the the ammount of results
MI I expect to return are in 1,000 range.

MI So, is it time to pick a better database? Thanks.

I think you have next variants -

1. Cach results in session (if you have large amount of memory - it is
   your way) or in application scope (if you use static data set).
2. Write stored proc in SQL Server -
   by the stored proc you can query database, scroll to the target row
   and return limited count of rows
3. Query database directly -
   you can scroll directly - via ResultSet.absolute(int) - if your
   JDBC driver supports scrollable result sets, or scroll manually -
   via ResultSet.next().

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: preprocess suggestion on struts change

2001-06-15 Thread Oleg V Alexeev

Hello Kiet,

Friday, June 15, 2001, 4:41:22 PM, you wrote:

KN I think action classes should allow a method(preloadPerform) definition.
KN This method would be called prior to the form being load.  This way we can
KN initialize form values and do pre-process stuff.  Currently I have a link to
KN doSomething.do which execute a corresponding DoSomethingAction class; the
KN action will then redirect to actual page.  I populate the form and do some
KN business processing in the doSomethingAction class.  Is this how it is
KN intended to work.

KN kiet

There is already such method in ActionServlet -
 processPreprocess

It is called before ActionForm creation and filling. In ActionServlet
it is empty - you can override it without any problems.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Forward Problem

2001-06-13 Thread Oleg V Alexeev

Hello Sridhar,

 Hm.. But why do you place validate=false attribute to the action
 mapping? I think it switch off validate process.

 validateSet to true if the validate() method of the form bean
 should be called prior to calling this action, or set to
 false if you do not want validation performed.
 

Wednesday, June 13, 2001, 10:14:23 AM, you wrote:

SS Thank U Oleg,

SS But like I mentioned earlier if I remove the input tag, it gives me a page
SS not found error

SS Ne more hints???

SS -Original Message-
SS From: Oleg V Alexeev [mailto:[EMAIL PROTECTED]]
SS Sent: Wednesday, June 13, 2001 1:22 AM
SS To: [EMAIL PROTECTED]
SS Subject: Re: Forward Problem


SS Hello Sridhar,

SS Try to remove 'input' attribute from action mapping. I view
SS validate=false here - you are not use validate after form submitting -
SS why do you specify input attribute?

SS Here is quote from struts-config.dtd -

SS  input   Context-relative path of the input form to which
SS control
SS  should be returned if a validation error is
SS encountered.
SS  Required if name is specified and the input bean
SS  returns validation errors.  Optional if name is
SS  specified and the input bean does not return validation
SS  errors.  Not allowed if name is not specified.



SS Tuesday, June 12, 2001, 5:49:55 PM, you wrote:

SS Hi All,

SS We are using Struts Version 1. We are having a problem with the forward
SS tag
SS of the action defined in struts-config.xml.
SS No matter what is defined in the forward it is going to the page defined
SS in
SS input.

SS I am attaching a part of the struts-config for clarity:

SS actionpath=/registerFormAction
SStype=net.itcube.bsts.user.register.RegisterFormAction
SSname=registerForm
SS   scope=session
SS  input=/Register.jsp
SSvalidate=false
SS   forward name=success   path=/PostRegistration.html/
SS /action


SS Once the action is performed action.findForward returns success (This
SS we
SS checked!!!). But still the page in the above case goes to Register.jsp
SS instead of PostRegistration.html.

SS If we remove the input tag it gives a 500 page not found error.

SS We have successfully deployed a project on struts with an earlier
SS version
SS and never faced such a problem.

SS Can someone please throw some light on it


SS Cheers,
SS Sridhar S
SS You must be the change you wish to see in the world
SS  --- Mahatma Gandhi.




SS --
SS Best regards,
SS  Olegmailto:[EMAIL PROTECTED]






-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: i18n + html:link

2001-06-13 Thread Oleg V Alexeev

Hello Steve,

Wednesday, June 13, 2001, 9:10:39 PM, you wrote:

SAD  Hello. I am trying to implement internationalized rollover buttons using
SAD html:link. To do this, I'm trying to use quotes three levels deep and I
SAD guess that's illegal in Javascript. For example, for onmouseover, if I
SAD try to extract the source name from the resource file, I try:


SAD onmouseover=changeImage('bean:message key=header.simpleQueryImageSourceR/')

There is two strings - changeImage('bean:message key= and /')
Here is problem - parser treates it as two different string constants.

You can create javascript functions to implement logic and refer to it
from in onmouseover event. In javascript you can insert scriptlet code
or bean:message tags.

SAD then I get a servlet exception:


SAD A Servlet Exception Has Occurred

SAD org.apache.jasper.compiler.ParseException:
SAD /usr/apps/tomcat/jakarta-tomcat-4.0-b
SAD 1/webapps/moria/test.jsp(55,84) Attribute header.simpleQueryImageSourceR
SAD has no value
SAD at
SAD org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:565)
SAD at
SAD org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:683)
SAD at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:826)
SAD ...


SAD If I hardwire the source name that I'm trying to extract, it works. For
SAD example:

SAD onmouseover=changeImage('simpq_en_r')


SAD I'm using Struts 1.0-b3. Ideas are appreciated. Thanks in advance.



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: No getter method

2001-06-13 Thread Oleg V Alexeev

Hello Gus,

Wednesday, June 13, 2001, 11:03:05 PM, you wrote:

GD I'm trying to re-write the example included in the struts package. I made
GD some changes to the code and now when I try to bring the registration.jsp
GD with an action=Edit. I get an error: No getter method for property
GD mypropertyname of bean mybeanname. I change what I think is everything I
GD needed to change to use that property (the Form bean, the Action bean, the
GD struts-config.xml, etc) I'm missing something?

You must search changed jsp pages to find reference to 'mybeanname' or
to 'mypropertyname' from struts tags.

GD How does struts know which property is map to which getter and setter?

With Java reflection API.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: javax.servlet.ServletException: Cannot find bean client in scope null

2001-06-12 Thread Oleg V Alexeev

Hello Geoffrey,

Try to specify scope to iterate tag.

Tuesday, June 12, 2001, 12:40:21 PM, you wrote:

GVN Hi all,

GVN I always have this error with this code in my jsp.

GVN body bgcolor=white

GVN logic:iterate id=client name=test property=clients
GVN   bean:write name=client property=nmclient/
GVN /logic:iterate

GVN /body
GVN /html:html

GVN The problem is the bean:write  tag inside the logic:iterate tag.
GVN The iterate is working... and the write is working without the
GVN iterate.

GVN What I have to do ??
GVN Is it a bug ???

GVN Thanks in advance,
GVN Geoffrey...



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Forward Problem

2001-06-12 Thread Oleg V Alexeev

Hello Sridhar,

Try to remove 'input' attribute from action mapping. I view
validate=false here - you are not use validate after form submitting -
why do you specify input attribute?

Here is quote from struts-config.dtd -

 input   Context-relative path of the input form to which control
 should be returned if a validation error is encountered.
 Required if name is specified and the input bean
 returns validation errors.  Optional if name is
 specified and the input bean does not return validation
 errors.  Not allowed if name is not specified.



Tuesday, June 12, 2001, 5:49:55 PM, you wrote:

SS Hi All,

SS We are using Struts Version 1. We are having a problem with the forward tag
SS of the action defined in struts-config.xml.
SS No matter what is defined in the forward it is going to the page defined in
SS input.

SS I am attaching a part of the struts-config for clarity:

SS actionpath=/registerFormAction
SStype=net.itcube.bsts.user.register.RegisterFormAction
SSname=registerForm
SS   scope=session
SS  input=/Register.jsp
SSvalidate=false
SS   forward name=success   path=/PostRegistration.html/
SS /action


SS Once the action is performed action.findForward returns success (This we
SS checked!!!). But still the page in the above case goes to Register.jsp
SS instead of PostRegistration.html.

SS If we remove the input tag it gives a 500 page not found error.

SS We have successfully deployed a project on struts with an earlier version
SS and never faced such a problem.

SS Can someone please throw some light on it


SS Cheers,
SS Sridhar S
SS You must be the change you wish to see in the world
SS  --- Mahatma Gandhi.




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: XML Namspace Problem

2001-06-11 Thread Oleg V Alexeev

Hello Sunil,

You must place struts.jar to the WEB-INF/lib directory and cut it from
CLASSPATH. And try to install latest jaxp1.1.

Monday, June 11, 2001, 8:36:31 AM, you wrote:

SPS Hi group,
SPS I am trying to using the struts framework and trying to run one example.
SPS I am getting the following problem.
 
SPS org.xml.sax.SAXException: Namespace not supported by SAXParser
SPS at
SPS org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transform
SPS erFactoryImpl.java:714)
SPS at
SPS org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transfo
SPS rmerFactoryImpl.java:601)
SPS at XSLView.transform(XSLView.java:26)
SPS at FileListingView.perform(FileListingView.java:37)
SPS at
SPS org.apache.struts.action.ActionServlet.processActionPerform(ActionServle
SPS t.java:1775)
SPS at
SPS org.apache.struts.action.ActionServlet.process(ActionServlet.java:1574)
SPS at
SPS org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)
SPS at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
SPS at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
SPS at
SPS org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
SPS at org.apache.tomcat.core.Handler.service(Handler.java:286)
SPS at
SPS org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
SPS at
SPS org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher
SPS Impl.java:194)
 
 
SPS What could be the problem.. All the required jars are in the CLASSPATH..
 
SPS Please let me know at the earliest.
 
SPS Regards,
SPS sunil




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: forward attribute

2001-06-11 Thread Oleg V Alexeev

Hello rajiv,

Monday, June 11, 2001, 3:35:13 PM, you wrote:

rm How do i forward attributes from Action class, which can be
rm accessed in the jsp page. so that specific error can be displayed

rm mapping.findForward(failure);


rm forward name=failure path=/examp/logon.jsp /

Add redirect attribute to the forward mapping to avoid true jump to
the forward page -

forward name=failure path=/examp/logon.jsp redirect=false/

In Action class create objects, store it in request context and return
forward to the failure page. In failure page you can access all stored
early objects via bean-access tags - struts related or jsp:useBean.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Where should I use .do and where .jsp for the same file

2001-06-11 Thread Oleg V Alexeev

Hello Eda,

Monday, June 11, 2001, 11:39:58 AM, you wrote:

ESE Hi
ESE Here is a small doubt. Please inform me where should I call a
ESE file with .do extension and where should I call the same file
ESE with .jsp extension.

*.do is not file - web.xml maps all requests to this extension to the
ActionServlet. ActionServlet uses information from struts-config to
process such request and uses to this purpose Action classes -

actionpath=/news
   type=com.sv.action.BaseViewAction/

Each Action class contains perform method. ActionServlet call this one
and it returns ActionForward class to switch to appropriate page
(*.jsp) to display result of processing or error page or another
purpose page.

Another words - *.do is mapping to the Action class to perform some
activity at server and *.jsp is view to display result of such
activity.
   
-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Dynamic action mapping

2001-06-11 Thread Oleg V Alexeev

Hello AFASA,

Monday, June 11, 2001, 2:50:08 PM, you wrote:

ACdP I am looking for a way to invoke different Actions from one form
ACdP depending on the button clicked by the user.

ACdP Is there a simple way of configuring Struts to do this?

You can implement one of your actions as switch between other actions.
Use button name as key to choose target action and forward request
processing to it.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Help with define tag

2001-06-11 Thread Oleg V Alexeev

Hello Chuck,

comments below...

Monday, June 11, 2001, 9:46:56 PM, you wrote:

CS Hi,

CS I think I'm missing something here.  I have a bean that is available to my
CS page in the request scope.  Within that I have another bean that has
CS properties I want to display.  I'm trying to use the define tag to get a
CS reference to the embedded bean and I'm getting the infamous:
CS javax.servlet.jsp.JspException: No getter method for property homeAddress of
CS bean policyHolderInfo

CS Here's the code -
CS In my bean policyHolderInfo bean attached to the request obj:

CS public AddressInfo homeAddress;

CS public AddressInfo
CS getHomeAddress(AddressInfo homeAddress)

wrong here^

CS {
CS return homeAddress;
CS }

CS public void
CS setHomeAddress( AddressInfo homeAddress)
CS {
CS this.homeAddress = homeAddress;
CS }

CS My jsp tag is:
CS bean:define id=policyHolderAddress name=policyHolderInfo
CS property=homeAddress /

CS All other getters on the policyHolderInfo bean work just fine.

CS Am I doing something wrong or is there another way to do this?  Any
CS suggestions would be appreciated.
CS Thanks,
CS Chuck

Your property support must looks like -

public AddressInfo
getHomeAddress()
{
return homeAddress;
}

public void
setHomeAddress( AddressInfo homeAddress)
{
this.homeAddress = homeAddress;
}


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: template:put and get

2001-06-10 Thread Oleg V Alexeev

Hello Jim,

Sunday, June 10, 2001, 9:16:18 AM, you wrote:


JR I've got a situation where I want to include a header file with

JR template:insert template=/share/inc_header.jsp
JR template:put name=header_image content=/media/h_modify.gif direct=true/
JR /template:insert

JR and then in the header file have

JR html:img page=/media/h_modify.gif width=315 height=23 border=0/

JR but replace the page= with the template:get/. Trouble is you can't nest 
JR tags. One options is to do the html without the jsp, and have

JR img src=%= request.getContextPath() %/media/h_modify.gif width=315 
height=23 border=0/

JR but that doesn't look great, but I can't think of anything else. The 
template:put/
JR seems to hide the content away somewhere away in the request, and I don't want to
JR create 20 little html/jsp pages for the different headers that I have.

JR Any ideas?

You can place whole html:img tag to the template:put tag as its
content and cut content and direct attributes.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: template:put and get

2001-06-10 Thread Oleg V Alexeev

Hello Jim,

Sunday, June 10, 2001, 8:27:25 PM, you wrote:


JR I decided to do the second option, it works quite well. I don't like the
JR idea of putting the while html:img/ tag into the template:put/ because
JR that'd make the template file confusing for someone trying to maintain it
JR (the image tag would never appear in the source for the included file, the
JR developer could spend ages trying to work out what's going on)

So far we have access to the values of template placeholders only via
template:get. You can write your own tag to define registered
template placeholders as page scope beans and
access such values via bean:write tags or use it in html:img tag. I
think it will be good template mechanism enhanesment.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Can you do this with internationalisation.

2001-06-09 Thread Oleg V Alexeev

Hello Valery,

Saturday, June 09, 2001, 11:42:43 AM, you wrote:

VK  Hello 

VK My boss wants to have each  web page with link of language choose.

VK Now each page have 2 link : french and english.I define link as 
VK a href=%= request.getContextPath() %?locale=en_CA bean:message 
key=language.english/a
VK and
VK a href=%= request.getContextPath() %?locale=fr_CA bean:message 
key=language.french/a

1. create action to perform language switch - LanguageAction
2. create global forward mapping in struts-config for this action -

   forward   name=language.en path=/langauge.do?locale=en_CA/
   forward   name=language.fr path=/langauge.do?locale=fr_CA/

   and action mappings itself
   
actionpath=/language
   type=some.package.LanguageForm
   name=languageForm
/action

3. create form to catch locale strings from request LanguageForm
   and register it in struts-config -

form-bean  name=languageForm
type=some.pachage.LanguageForm/

4. place to the jsp such links as -

 html:link forward=language.enbean:message key=language.english//html:link
 html:link forward=language.frbean:message key=language.french//html:link

VK But I have problem with populate form .
VK For example :
VKFor modify category page I create Action EditCategoryAction.
VK This action populate localizable list parent_category  from Oracle.And forward 
to category.jsp .
VK All ok.
VK When I click on french or english link message replace new localized messages .But 
list still old,becouse 
VK editCategoryAction not call again.

VK   Problem:
VK I want populate localized list  from action .But when I click on change language 
link 
VK Action not called again.
VK (Of course I can populate localizable list in jsp page .But in this case many 
logic exist on jsp page)

VK   If anyone have this problem or know other solution help me.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[4]: Can you do this with internationalisation.

2001-06-09 Thread Oleg V Alexeev

Hello Valery,

Saturday, June 09, 2001, 1:56:53 PM, you wrote:

VK   Thank you for your response.
VK I try do your solution with
VK only litle change  (I'm beginer in struts .May be I understand you)
VK actionpath=/language
VKtype=some.package.LanguageAction
VK !--type=some.package.LanguageForm --
VKname=languageForm
VK /action
VK It's work.

VK But how I can know in LanguageAction url of page where I click choose
VK language.
VK I need this ,becouse  I want forward to page when I click choose language.


VK When I click choose language in Category.jsp I want forward to
VK CategoryEditAction becouse CategoryEditAction
VK populate Category.jsp localized values from db

Place, for example, forward name to the request scope and display it
hidden value in jsp page. Every action can do it with standart way -
scan ActionMappings find itself and place action path to the request
under some name. By this name you can identify source action.

P.S. This is not standart way - I only suggest you my idea to
implement it.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Struts Beta 03 Build Problem

2001-06-08 Thread Oleg V Alexeev

Hello David,

Friday, June 08, 2001, 9:06:12 AM, you wrote:

DM Any idea why I am consistently getting an 
org.apache.tools.ant.taskdefs.optional.TraXLiason ClassNotFoundException when trying 
an ant dist build of jakarta-struts-1.0-b3-src using Ant 1.3 on
DM both NT and Linux?  I have what seem to be the only required jars in my path: 
xalan.jar and jaxp.jar from jaxp-1_1.zip, and jdbc2_0-stdext.jar, with jdk1.3.1?

Place crimson.jar, jaxp.jar, xalan.jar files from jaxp-1_1.zip to the
jdk extension dir - x:\jdk1.3.1\jre\lib\ext for example.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: JSP expressions inside custom tags

2001-06-08 Thread Oleg V Alexeev

Hello Erich,

Friday, June 08, 2001, 12:56:42 PM, you wrote:

EM My code looks like this:

EM logic:iterate id=pelement name=MyBean property=pelements
EM  % String name = ((PElement)pelement).getName(); %
EM  html:link href=/%= name %/index.jsp
EM^^^ Here is my problem!
EM bean:write name=pelement property=longname/
EM  /html:linkbr /
EM /logic:iterate

try this -

 html:link href='%= name + index.jsp %'
   bean:write name=pelement property=longname/
 /html:linkbr /


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Help with selecting an image to display.

2001-06-08 Thread Oleg V Alexeev

Hello Alex,

Friday, June 08, 2001, 4:17:37 PM, you wrote:

AC Hi, I am looking for advice regarding the use of two images.

AC Lets say you have a class status that has two boolean state properties
AC isModify() and isNew(). If isModify() returns true then I want to display
AC modify.gif and call the JavaScript function modify() and, if isNew() is true
AC then I want to display new.gif and also call modify().

AC Anyone have an example of this or could offer some advice?

Name your properties as getIsModify() and getIsNew() and after that
you can use such constructions as -

logic:equal name=bean property=isModify value=true
 display modify.gif
/logic:equal

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: displaying html errors in order

2001-06-08 Thread Oleg V Alexeev

Hello Chico,

Friday, June 08, 2001, 7:50:27 PM, you wrote:

CC i can display errors fine, but they are displayed not in the same order as i
CC created them ...
 
CC I see this is because the ActionErrors class uses a HashMap and therefore
CC doesn't return them in a given order (i think it sorts them according to the
CC hashcode value).
 
CC I can use the property tag in html:errors tag to display each error
CC individually, but then it displays my error header and footer for each error
CC displayed ...
 
You can write your own version of ActionErrors and use ArrayList in
it, for example, not HashMap. 

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Reset the form

2001-06-08 Thread Oleg V Alexeev

Hello Kiet,

Friday, June 08, 2001, 9:08:07 PM, you wrote:

KN I have my reset button defined:

KN html:form action=/queryOrg
KN html:image src=images/reset.gif width=113 height=24
property=reset/

KN Why is that the reset method doesn't get call and the Action class get
KN executed.

You can not call reset method by this way. It is called automatically
by ActionServlet after form submitting in browser and before filling
of ActionForm by values from request.
-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: html errors tag not displaying content

2001-06-08 Thread Oleg V Alexeev

Hello Chris,

To use this tag you must, of course add html taglib definition to the
page and add two strings to properties files with resources for
MessageResources container. Another words - you must add such strings
as

errors.header=ul
errors.footer=/ul

to the properties package. It is described in web.xml in ActionServlet
definition section as application -

init-param
  param-nameapplication/param-name
  param-valuesome.org.package.ApplicationResources/param-value
/init-param


Friday, June 08, 2001, 7:08:05 PM, you wrote:

CW hello,

CW i just upgraded to struts beta 3.  i have an application that was
CW working just fine using the struts errors tag.  after the upgrade, i no
CW longer see any error messages.  on my jsp, i have a line:

CW html:errors /

CW that outputs no content...  however, the following line right below
CW shows the proper error:

CW %=
CW ((ActionError)((ActionErrors)request.getAttribute(Action.ERROR_KEY)).get
CW ().next()).getValues()[0] %

CW so, i know the ActionErrors object is getting to the page and that it
CW has my errors in it, but html:errors / is not showing them.

CW any idea as to what might be going on?

CW thanks for any help.

CW cheers,
CW chris

CW | chris wilson || web dev ||| [EMAIL PROTECTED] || |
CW www.wondergeek.com | | 




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Question on the ActionForm design for dynamic data?

2001-06-08 Thread Oleg V Alexeev

Hello Ellen,

You are speak about indexed properties. It can be defined by two ways

 1. One method for get and set operations
  public String[] getSomeProperty() {}

 2. Two methods
  public String getProperty( int index ) {}
  public void setProperty( int index, String value ) {}

  

Friday, June 08, 2001, 9:39:18 PM, you wrote:

EL Question on the ActionForm design for dynamic data?I have scoured this list 
unsuccessfully for an answer, and this email seemed the best starting point so I am 
responding to it with the question
EL I have:

From what I can tell, this only explains how to iterate over a collection to create 
a form with a dynamic number of rows.  What I cannot find an answer to is how does 
the ActionForm need to be set
up to handle population with the input field values from those rows when this form 
is submitted?  Does it simply need a public void setCustomerContacts(Vector 
customerContacts)?  Will Struts then
populate the Vector with CustomerContact objects?  Or does it need set() methods to 
accept Vectors of each individual column's values?

EL Thanks,
EL Ellen
EL   - Original Message - 
EL   From: Jeff Trent 
EL   To: [EMAIL PROTECTED] 
EL   Sent: Sunday, May 20, 2001 5:11 AM
EL   Subject: Re: Question on the ActionForm design for dynamic data?


EL   (1) Have a Vector / Collection of contributors (ie. getContributors()) belonging 
to your form.  Inside that function, check to see if you need more rows by using code 
similar to the following:

EL   public Vector getCustomerContacts()
EL   {
EL   CustomerContact lastCustomerContact = 
(CustomerContact)this.customerContacts.lastElement();
EL   if (!lastCustomerContact.isEmpty())  
  // is this slot being used?
EL   this.customerContacts.addElement(new CustomerContact());// 
always have one available slot at the end of the matrix
  
EL   return this.customerContacts;
EL   }

EL   (2) Do not use the reset() method.

EL   (3) On your JSP, use code like this:
EL   % int i = 0; %
EL   logic:iterate id=customerContact name=adminUpdateProfileForm 
property=customerContacts
EL  tr
EL   td class=smallFontinput type='text' name=customerContact[%= i 
%].contactName value=%= 
((com.domain.project.CustomerContact)customerContact).getContactName() %/td
EL   td class=smallFontinput type='text' name=customerContact[%= i 
%].contactTitle value=%= 
((com.domain.project.CustomerContact)customerContact).getContactTitle() %/td
EL   td class=smallFontinput type='text' name=customerContact[%= i 
%].contactPhone value=%= 
((com.domain.project.CustomerContact)customerContact).getContactPhone() %/td
EL  /tr
EL  % i++; %
EL   /logic:iterate

EL   (4) Have a button on the form Add more rows in which case the form posts to 
itself and will cause a new row to be added at the bottom of the grid.
   
   
EL   Hope this help,
EL   Jeff
   
EL - Original Message - 
EL From: Joyce Tang 
EL To: [EMAIL PROTECTED] 
EL Sent: Saturday, May 19, 2001 11:28 PM
EL Subject: Question on the ActionForm design for dynamic data?


EL Here is the situation. 

EL I am developing a system to maintain a contribution plan.  I need to input the 
plan information first and add unlimited number of contributors, specifying each share 
of the plan.  So there
EL will be a page with contribution plan information and a list of all the 
contributors.  The information you can edit on this page is the percentage of share of 
each contributor. Validation rules
EL are: share need to add up to 100 and share figure is an integer between 0 and 100. 
  Since the number of contributors is unknown in advance, how should I design the 
ActionForm?

EL Thanks a lot, 

EL Joyce 




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: reference input page from inside action?

2001-06-08 Thread Oleg V Alexeev

Hello Seth,

For example -


 return new ActionForward( mapping.getInput() );


if input attribute is defined for this action.

Friday, June 08, 2001, 9:50:25 PM, you wrote:

SL Hello,

SL Is it possible to reference and forward to the input page of an action from
SL within the action?  It seems as if I have to make an explicit forward
SL mapping for input for each action.  Sometimes, I need to do extra state
SL checking inside action, and if that fails, to forward back to input.  The
SL explicit forward mapping is fine, but it would seem more simple if input
SL was a default mapping.

SL Any tips or pointers would be much appreciated!

SL Thanks,
SL Seth



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Scratch RowSets

2001-06-08 Thread Oleg V Alexeev

Hello Ted,

Friday, June 08, 2001, 8:01:31 PM, you wrote:

TH Oleg V Alexeev wrote:
 TH Though, if stay on this road, larger project swill have to start
 TH assembling their struts-config.xml from smaller files, as some
 TH people do with their Applicaton Resource now. ;-)
 
 My first idea was to split struts-config to 'standart' part and
 bean-factory part with my definirions. But it is needed to insert
 references to bean templates into action tags and it was main reason
 to build all in one.

TH So long as we can still use a package format within struts-config,
TH that shouldn't be a problem, since people could split them up for team
TH development and concaternate them back again as part of the build.

TH (By package format, I mean that we can repeat the struts-config node
TH and all it's children as many times as needed, and still create a single
TH ActionMapping database. I do that now and can also include David's
TH form-validatation nodes in the same file, so that all package's
TH programtic settings are all together.)

So I can place several struts-config sections to the config file and
all stuff will be parsed. Is it right? Are there any differences
between file with one big section and file with several sections in
case of whole content of such files is identical?

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: struts-config.xml question

2001-06-08 Thread Oleg V Alexeev

Hello Bill,

Try to use

 html:form action=insertQuestion.do
 html:text property=questionDesc/
 /html:form

not
 
 html:form action=insertQuestion
 html:text property=questionDesc/
 /html:form

and restart servlet container (Tomcat, Resin, etc.) after
strut-config.xml changing (or call http://host:port/path/admin/reload)

Friday, June 08, 2001, 11:43:06 PM, you wrote:

BC Hello,
BC  I just am starting out with struts, and I have a question.  I 
BC started with this syntax in my test jsp:

BC html:form name=questionForm action=insertQuestion
BC html:text property=questionDesc/
BC /html:form

BC and this in my struts-config.xml:

BC form-bean  name=questionForm 
BC type=com.companyname.actionform.QuestionForm/

BC but I was getting this error:

BC javax.servlet.jsp.JspException: Must specify type attribute if name is 
BC specified

BC #

BC After searching this list's archives, I saw a reply to a similar 
BC question from Craig McClanahan that states:

BC   If you specify name here, you must also specify type.
BC  
BC   If you change this to:
BC  
BC  form:form action=regstep1.do  The tag will be smart enough
BC   to figure out what form bean name you want, without
BC   having to specify it both here and in struts-config.xml.
BC  

BC so, to test, I specified the name in my jsp html:form tag so it looked 
BC like this:

BC html:form name=questionForm 
BC type=com.companyname.actionform.QuestionForm action=insertQuestion

BC and this worked.

BC #

BC But, I don't want to have to list the classnames in the JSPs, so I tried 
BC to follow craigs suggestion.  I changed the lines in the JSP to:

BC   html:form name=questionForm action=insertQuestion

BC and tried this in my struts-config.xml:

BC form-bean name=questionForm 
BC type=com.companyname.actionform.QuestionForm/

BC actionpath=/insertQuestion 
BC type=com.companyname.actionmap.InsertQuestionAction
BC name=questionForm
BCscope=request
BC validate=false
BCforward name=success  path=/strutstest.jsp/
BC  /action

BC but now I get this error:
BC javax.servlet.jsp.JspException: Cannot find ActionMappings or 
BC ActionFormBeans collection

BC I also searched on this error, but the messages I found did not seem to 
BC match my situation.

BC ###

BC Since it works when I specify both the name and type in the html:form 
BC tag, I am starting to wonder if my struts-config.xml (in my WEB-INF dir) 
BC is being read.  Is it enough to put this file in the WEB-INF directory?

BC Also, when I had the name in my html:form tag and the type in the 
BC form-bean tag, it seemed obvious how these two things were linked (even 
BC thought this was not correct).

BC When I follow Craig's suggestion, I am unsure how The tag will be smart 
BC enough to figure out what form bean name you want.  Does it use the JSP 
BC name to link to the path attribute of the action tag, and link the 
BC name attribute of the action tag to the name attribute of the form-bean tag?

BC Sorry about the length of this message, but I wanted to try to be as 
BC specific as possible about the problem.

BC Also, if anyone knows of any good documentation links, I am open to 
BC suggestions.  Other than the docs on the apache site, I have only found 
BC www.husted.com , which has lots of useful tips.  Any others out there?

BC Thanks, Bill



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Scratch RowSets

2001-06-08 Thread Oleg V Alexeev

Hello Ted,

Saturday, June 09, 2001, 12:55:04 AM, you wrote:

TH Just as an aside, Oleg:

TH When I use RowSets as value object beans, the type is determined by the
TH JDBC metadata. I've been putting some wrappers around that so the
TH properties have ordinary getters and setters. 

TH I see that BeanFactory includes code to create tables, but what about
TH reading tables to create beans?

Some confusion... There are SQL scripts to create sample database -
are you talk about it? If yes then my answer is below.

Each factory must implement create method to generate bean.
There are abstract class org.apache.struts.factory.jdbc.JDBCFactory -
base class for all jdbc related factories. Its create method uses
first parameter from bean template as SQL query to create
PreparedStatement and call method processResult( ResultSet...). This
method is abstract and every derived class must implement it and
JDBCArrayFactory, for example, walk throw result set and for each row
create bean of target type and call populateFrom( ResultSet ) for
every bean - this method do all work to fill new bean with values from
current row.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Scratch RowSets

2001-06-08 Thread Oleg V Alexeev

Hello Ted,

Good idea. Thank you.

Saturday, June 09, 2001, 12:38:37 AM, you wrote:

TH Oleg V Alexeev wrote:
 So I can place several struts-config sections to the config file and
 all stuff will be parsed. Is it right? 

TH Yes.

TH Are there any differences
 between file with one big section and file with several sections in
 case of whole content of such files is identical?

TH A configuration file using the package format will be longer, but they
TH are functionally equivalent. 


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Scratch RowSets

2001-06-07 Thread Oleg V Alexeev

Hello Ted,

Thank for good stub. Now I am trying to implement such approach in my
extension to struts - BeanFactoryServlet.

Thursday, June 07, 2001, 3:38:30 PM, you wrote:

TH Ted Husted wrote:

TH  skipped


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: exception in MessageTag.doStartTag()

2001-06-07 Thread Oleg V Alexeev

Hello RoleModel,

Yes, it is another common error. To use bean:message tag you must
place properties files for all supported languages to the path
WEB-INF/classes or to the some jar in WEB-INF/lib derectory and place
string with properties path to the web.xml as init parameter for
ActopnServlet -

init-param
  param-nameapplication/param-name
  param-valuemy.app.ApplicationResources/param-value
/init-param

For this example you must place properties files to the path
WEB-INF/classes/my/app and fill it with all messages wich used in your
pages with bean:message tag.


Thursday, June 07, 2001, 5:03:17 PM, you wrote:

RS We have struts.jar in /WEB-INF/lib/

RS I believe that everthing is in the classpath... but that we probably have a
RS configuration problem in one of our files.
RS The immediate problem that I see in the doStartTag() method is that the
RS message we get back is null.

RS - Original Message -
RS From: Oleg V Alexeev [EMAIL PROTECTED]
RS To: RoleModel Software [EMAIL PROTECTED]
RS Sent: Thursday, June 07, 2001 1:06 AM
RS Subject: Re: exception in MessageTag.doStartTag()


 Hello RoleModel,

 Thursday, June 07, 2001, 1:44:37 AM, you wrote:

 RS We're just starting to learn about Struts. We have downloaded the code
RS (and binaries) (v.b3) for struts-example. The binaries run fine, and we get
RS the expected output. When we try to set up the
 RS source version, though, we get the following error:

 RS   javax.servlet.jsp.JspException
 RS java.lang.Throwable(java.lang.String)
 RS java.lang.Exception(java.lang.String)
 RS javax.servlet.jsp.JspException(java.lang.String)
 RS int org.apache.struts.taglib.bean.MessageTag.doStartTag()
 RS void
RS _0002findex_0002ejspindex_jsp_0._jspService(javax.servlet.http.HttpServletRe
RS quest, javax.servlet.http.HttpServletResponse)...

 RS Can anybody give us a clue about what's going on? As far as we can
RS tell, we've got everything configured properly, but we're guessing we made a
RS mistake somewhere.

 I think you place struts.jar to the CLASSPATH. struts.jar must be placed
 to the WEB-INF/lib directory of your application, remove any
 references to it from CLASSPATH.

 If struts.jar in WEB-INF/lib , CLASSPATH is free of links to the
 struts.jar and you are already has this exception then explane please
 your problem.

 --
 Best regards,
  Olegmailto:[EMAIL PROTECTED]





-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Logic Tag Library and (Iterator) List Navigation

2001-06-07 Thread Oleg V Alexeev

Hello Matt,

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

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

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

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

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

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

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

MR Where there are 30 records returned.

MR Any ideas?

MR Thanks,

MR Matt


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



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Can I have NO action?!

2001-06-07 Thread Oleg V Alexeev

Hello dhay,

From your words I found that you want to make -
 in Action
   - retrieve current filename
   - forward to the JSP page to display it
 in JSP page
   - edit current filename
   - submit new value to the action
 in Action
   - take new value
   - build or retrieve filter for new file
   - forward to the JSP
 in JSP
   - review filter
   - edit other values or just stay here

Is it right?

Thursday, June 07, 2001, 11:50:04 PM, you wrote:



dlc Oleg,

dlc Hi.  Thanks for the post.  The current file name is set in my action before the
dlc page is called.  BUT, I want to give the user the option to change the filename,
dlc and forward back to this action to display the filter for the new file.  Hence,
dlc my action doesn't need to DO anything, which prompted my question (I just need
dlc Struts to set the filename property in my form bean).

dlc Any ideas whether this is possible, or do I need to have a dummy action for it?

dlc Thanks,

dlc Dave




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Scratch RowSets

2001-06-07 Thread Oleg V Alexeev

Hello Ted,

Thursday, June 07, 2001, 9:52:24 PM, you wrote:

TH Speaking of configuration issues, I've also played with the idea of
TH loading SQL commands from a resource, so they could be changed and
TH reloaded without restarting the application. It would also be easier to
TH optimize command sets for different DBMS packages. Just wondering if
TH anyone else has implemented a SQL command resource.

I already implement this as part of my bean generation framework. It
contains JDBC bean factories (for single row, for all rows from result
set, for window from the result set) and bean-templates (may be wrong
term, of course) in which SQL queries can be defined. At bean creation
process factory uses attributes, properties and parameters from
request (all needed for this bean=template) and conserves result in
session or request scope to display with jsp page.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Logic Tag Library and (Iterator) List Navigation

2001-06-07 Thread Oleg V Alexeev

Hello Matt,

Pager - this one
PagerIterator - iterator to review Pager without cach
PagerEntry - link to page representation
JDBCPagerFactory - sample of Pager utilization
pager.jsp - displaying of pager data and current page

Friday, June 08, 2001, 12:17:19 AM, you wrote:

MR Please send it - and an example if you have one.

MR Thanks,


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]
 PagerIterator.java
 PagerEntry.java
 Pager.java
 JDBCPagerFactory.java
 pager.jsp


Re: a struts tag within another struts tag ...

2001-06-06 Thread Oleg V Alexeev

Hello Chico,

Wednesday, June 06, 2001, 12:08:38 PM, you wrote:


CC does anyone know a way of doing something like so, so that it works:

CC logic:iterate id=listElement name=myList
CC html:radio property=selectedListElement value=bean:write
name=listElement//
CC /logic:iterate

You can not use one tag in attribute value of another tag for jsp tag
libraries. Another words - if you use one tag then you can place to
the attributes as values only strings or run-time expressions like
%= % for attributes marked as rtexprvaluetrue/rtexprvalue

CC i always get a error saying that listElement has no value in that scope ...

CC i get around this problem using jsp, like so:

CC logic:iterate id=listElement name=myList
CC % String myListElement = (String)
CC pageContext.findAttribute(listElement);%
CC html:radio property=selectedListElement
CC value=%=myListElement%/
CC /logic:iterate

CC But I really don't want to be mixing jsp with struts ...

CC any ideas?

CC chico




-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Scratch RowSets

2001-06-06 Thread Oleg V Alexeev

Hello Ted,

One question here... For example I want to use rowset in iterate tag -
but database connection must be opened before iterate using and closed
after it in this case. Is it right? If yes, then how it works in MVC
framework? In Action - rows are retrieved from database and as attribute
passed via session or request to the forwarded jsp page - I mainly use
this approach to display data from database. I try to use rowset after
closing of the connection to the database but exception was raised and
I mark this way as error...
What method are you use to work with rowsets in iterate tag? Open
connection, make rowset, iterate, close rowset and connection? Or
another way exists?

Wednesday, June 06, 2001, 4:09:03 PM, you wrote:

TH The documentation for the Early Release of CachedRowSets mentions that 

TH Because both a CachedRowSet object and its metadata can be created from
TH scratch, a component
TH that acts as a factory for rowsets can use this capability to create a
TH rowset containing data from
TH non-SQL data sources.

TH has anyone here tried this yet?

TH The idea being I would like to transfer incoming properties from an
TH ActionForm into a scratch RowSet, and use that as the value object.
TH (Perhaps within a wrapper or a facade so business logic methods can be
TH added.)

TH There will be expanded support for RowSets in 1.1, and I wanted to get
TH started on some support utilities / design patterns before looking at
TH what other modifications will be needed. 

TH I put together a quick Iterate wrapper that works fine with a returned
TH RowSet, but also need to create a new RowSet from scratch to close the
TH loop. I guess the thing to try is to create a MetaDataRowSet object and
TH pass that to a new RowSet (instead of making the SQL call), and then see
TH if I can insert a row.

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



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Compositing Actions

2001-06-06 Thread Oleg V Alexeev

Hello Andrew,

May be another way is solution of your problem... Now I work under
extension of struts to support so named 'bean-factories'. Idea is to
create pluggable framework to support mechanism of data bean
generation (for example, retrieved from database) based on
declarations in struts-config.xml.
There are some terms in my concept -
 bean-factory - java class intended to create beans
 bean-template - bean description (type, name, parameters needed to
 create such bean)
 bean-registration - additional tag inside action mapping - creates
 link between bean-template and bean-factory
 
 BeanFactoryServlet extends ActionServlet and uses information from
 struts-config.xml to create beans from bean-registraions list in
 action and store this beans in request of session scope. All this
 beans avaiable to jsp-page to show this beans. Every action can hold
 list of bean-registrations and every of such registrations can use
 anyone factory and anyone bean-template.

I publish first version with sample web-application some days ago -
you can download it and review for your needs.

http://www.sura.ru/~gonza/bean-factory

Wednesday, June 06, 2001, 6:11:09 PM, you wrote:

AJ Is there a straightforward way to locate and invoke an Action from within
AJ the perform() method of another Action?  The reason I would like to do this
AJ is to create a composite Action from a number of other component
AJ Actions--these component Actions must be available individually in the
AJ Struts application, however I would like to provide a composite Action that
AJ requires objects placed in the request attributes by the component Actions.

AJ Thanks in advance,

AJ --Andy

AJ Andy Jenkins
AJ Venetica Corporation (www.venetica.com)
AJ Voice: 704.926.3080
AJ [EMAIL PROTECTED]



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Pleeeeease help me using the Digester-Class of STRUTS

2001-06-06 Thread Oleg V Alexeev

Hello Hartmut,

You must implement such method to use it in digester -

de.dhw.asim.components.benutzer.LoginObjekt.addGrp(de.dhw.asim.components.benutzer.BenutzerGruppe)

Wednesday, June 06, 2001, 11:05:06 PM, you wrote:

HB Hello,


HB it seems that the Digester Class of Struts is a strange thing.
HB I take the following XML-Document (in a String):

HB ?xml version=1.0 encoding=UTF-8?
HB login usr=Benutzername
HBhilfe=true
HBrn=Hartmut Bernecker
HBmail=[EMAIL PROTECTED]
HBtxt=Persoenlicher Begruessungstext des Benutzers
HBspr=de
HBmed=medium
HB   grp name=Gruppe 1 txt=Begruessungstext 1/grp
HB   grp name=Gruppe 2 txt=Begruessungstext 2/grp
HB /login

HB --


HB Then I want to parse it with a Digester object as follows:


HB --
HB Digester digester = new Digester();
HB digester.setDebug(1);
HB digester.setValidating(false);

HB digester.push(this);

HB digester.addObjectCreate(login/grp,
HB de.dhw.asim.components.benutzer.BenutzerGruppe);
HB digester.addSetProperties(login/grp);
HB digester.addSetNext(login/grp, addGrp,
HB de.dhw.asim.components.benutzer.BenutzerGruppe);

HB digester.addObjectCreate(login,
HB de.dhw.asim.components.benutzer.LoginObjekt);
HB digester.addSetProperties(login);
HB digester.addSetNext(login, setLoginObjekt,
HB de.dhw.asim.components.benutzer.LoginObjekt);

HB try {
HB  digester.parse(new InputSource(new StringReader(pXml)));
HB }
HB catch (IOException e){
HB   e.printStackTrace();
HB }
HB catch (SAXException e)
HB {
HB   e.printStackTrace();
HB }

HB --


HB Then I receive the following Message:
HB It seems that the stack can not be controlled.
HB Please give me an idea of what happens here and how to do it in the
HB right way!!

HB --

HB New de.dhw.asim.components.benutzer.LoginObjekt

HB Set de.dhw.asim.components.benutzer.LoginObjekt properties

HB New de.dhw.asim.components.benutzer.BenutzerGruppe

HB Set de.dhw.asim.components.benutzer.BenutzerGruppe properties

HB Call
HB 
de.dhw.asim.components.benutzer.LoginObjekt.addGrp(de.dhw.asim.components.benutzer.BenutzerGruppe@683912)

HB End event threw exception

HB java.lang.NoSuchMethodException

HB at java.lang.Class.getMethod0(Native Method)

HB at java.lang.Class.getMethod(Class.java:888)

HB at org.apache.struts.digester.SetNextRule.end(SetNextRule.java:156)

HB at org.apache.struts.digester.Digester.endElement(Digester.java:409)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

HB at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

HB at
HB 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

HB at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

HB at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

HB at org.apache.struts.digester.Digester.parse(Digester.java:738)

HB at
HB de.dhw.asim.components.benutzer.Xml2Object.getUserObjekt(Xml2Object.java:49)

HB at de.dhw.asim.components.benutzer.Test.main(Test.java:11)

HB java.lang.NoSuchMethodException

HB at org.apache.struts.digester.Digester.endElement(Digester.java:412)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)

HB at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)

HB at
HB 
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1436)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1205)

HB at
HB 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)

HB at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)

HB at
HB org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

HB --


HB Any help is very appreciated!

HB Hartmut



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Scratch RowSets

2001-06-06 Thread Oleg V Alexeev

Hello Steve,

Thank you, good paper.

Thursday, June 07, 2001, 12:31:52 AM, you wrote:

SS Take a look at sun's CachedRowSet now available in early release.

SS http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html

SS S-


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Can I have NO action?!

2001-06-06 Thread Oleg V Alexeev

Hello dhay,

Thursday, June 07, 2001, 1:34:00 AM, you wrote:

dlc Hi.  I have a form where I display the current filename, and allow them to
dlc change it.  As such, I don't need to do anything in the action, just let Struts
dlc populate the form bean.

dlc How do I go about this?  Do I need an action that does nothing in its perform
dlc method?  Or can I set things up so no action is needed at all?

What is the source of current filename? Do you retrieve it in your
form class? It is wrong solution if so.

Struts uses scheme with Action class (contains all logic to retrieve,
process and store data), ActionForm class (used to store values
between pages or actions and to validate it after submit), JSP-page as
view (to display values which was processed by Action class and stored
in session or request scope). According to this scheme you need to
implement action if you display by JSP any values fetched from
external source.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: exception in MessageTag.doStartTag()

2001-06-06 Thread Oleg V Alexeev

Hello RoleModel,

Thursday, June 07, 2001, 1:44:37 AM, you wrote:

RS We're just starting to learn about Struts. We have downloaded the code (and 
binaries) (v.b3) for struts-example. The binaries run fine, and we get the expected 
output. When we try to set up the
RS source version, though, we get the following error: 

RS   javax.servlet.jsp.JspException
RS java.lang.Throwable(java.lang.String)
RS java.lang.Exception(java.lang.String)
RS javax.servlet.jsp.JspException(java.lang.String)
RS int org.apache.struts.taglib.bean.MessageTag.doStartTag()
RS void 
_0002findex_0002ejspindex_jsp_0._jspService(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)...

RS Can anybody give us a clue about what's going on? As far as we can tell, we've got 
everything configured properly, but we're guessing we made a mistake somewhere.

I think you place struts.jar to the CLASSPATH. struts.jar must be placed
to the WEB-INF/lib directory of your application, remove any
references to it from CLASSPATH.

If struts.jar in WEB-INF/lib , CLASSPATH is free of links to the
struts.jar and you are already has this exception then explane please
your problem.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Problem with nested html:form

2001-06-06 Thread Oleg V Alexeev

Hello Marc,

Thursday, June 07, 2001, 2:20:28 AM, you wrote:



I do not believe that you are allowed to have nested forms in html (though
correct me if I'm wrong!).

Dave

ME But we need something like nested forms, because we have actions for a list
ME of objects and actions for a single one of these objects.

ME Do you have any idea how to realize it in an other way.

I think you can use such approach as -

html:form name=albumForm action=album.do
html:hidden name=albumForm property=action value=deletePhotoList /
html:hidden name=albumForm property=forward value='%= actionForward %' /
html:hidden name=albumForm property=id value='%= album.getAlbumId() %' /
logic:iterate id=photo name=albumForm property=photoList



    html:form name=movePhotoForm action=movePhotoUp.do
    html:hidden name=movePhotoForm property=action value=movePhoto/
    html:hidden name=movePhotoForm property=direction value=up/
    html:hidden name=movePhotoForm property=position value='%= 
+((Photo)photo).getPosition() %'/
    html:image src=images/up.bmp alt=Bild nach oben verschieben/
    /html:form


/logic:iterate
/html:form

Insert direct references to the form object in tags and behavior of
your code will be more definitely.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Extention of struts - BeanFactory

2001-06-02 Thread Oleg V Alexeev

Hello struts-user,

  I am glad to publish pre-alpha version of
  BeanFactory - extention of struts framework,
  intended to simplify processes of data publishing.
  
  Main idea of it - to move functionality to declarations.

  You can find short info about BeanFactory, sources, precompiled
  binaries and sample web allication (needs some configure in database
  access) at page -
   http://www.sura.ru/~gonza/bean-factory

-- 
Best regards,
 Oleg  mailto:[EMAIL PROTECTED]





Re[2]: Proposed feature: Bean property transformations

2001-06-02 Thread Oleg V Alexeev

Hello Ted,

Saturday, June 02, 2001, 1:30:00 AM, you wrote:

TH Harris, Andrew S wrote:
 A component would be able to hold a text value and a data value. The text
 value could hold the value entered by the user, prior to validation, then
 this could be played back to the user if validation failed on that
 component. If validation succeeded, the data value would be updated, then
 the text value would be replaced by the formatted value, using the data
 value and the formatter.

TH This is a good design pattern, and one we can use with Struts today. In
TH the ActionForm bean, define two properties, one for the text value and
TH one for the data value. If validation succeeds, convert the text value
TH to the data value, and (optionally) update the text value to match your
TH preferred formatting. 

TH Though, with a general conversion/transformation package, we would
TH really only need to store the desired data value since we could
TH transform it again later when the value was accessed for presentation,
TH perhaps via a bean:writeTransform tag.

What reason to store text values and data values in ActionForm? I
think that more flexible approach is to use ActionForm with text only
fields and data bean with native types, not String. In this case we
can name all corresponded fields in data bean with same names as for
ActionForm and use convert methods under it, for example, or use
another convert methods.
 We can convert text values to/from with one of the ways -
 1. Perform conversion of all fields in some method in ActionForm, for
example import/export.
 2. Make it in every setter/getter.
 3. Write special helper class to perform conversion - in this case
more flexible approach can be used - one helper can handle
multiple sources and targets.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Extention of struts - BeanFactory

2001-06-02 Thread Oleg V Alexeev

Hello Craig,

Saturday, June 02, 2001, 7:41:43 PM, you wrote:

CRM To keep things organized, can I ask a favor?  Can we have discussions of
CRM 1.1 feature design on the STRUTS-DEV list?  The STRUTS-USER list has lots
CRM of traffic about using Struts already, and talking about the new stuff
CRM here will be a little distracting.

CRM Anyone, of course, is welcome to subscribe to STRUTS-DEV to participate in
CRM (or just lurk on) the discussions of the new features.

Yes, of course, Craig.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Date formatting (simple question)

2001-04-11 Thread Oleg V Alexeev

Hello Matthew,

Thursday, April 12, 2001, 5:55:21 AM, you wrote:

MOH Can I format java.util.Date presentations with bean:write, or do I need to
MOH do something at the property getter?

You can do it in getter method and by special version of bean:write
tag - with parameters to define formatting type and locale. I can send
you one, if you interested.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: onBlur problem

2001-04-08 Thread Oleg V Alexeev

Hello Cameron,

Sunday, April 08, 2001, 7:10:25 PM, you wrote:

CI I am using
CI html:text property="productBillingAmount"
CI size="16"
CI onBlur="this.value=formatCurrency(this.value);"/

Your error lives in word 'onBlur' - it must be lowcase - as defined in
tld.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: As promised (Struts Presentation)

2001-02-14 Thread Oleg V Alexeev

Hello Maya,

Wednesday, February 14, 2001, 3:12:04 PM, you wrote:

MM Oleg,
MM Thank you very much for very detail, helpful answer.
MM The best wishes and good luck.
MM Maya

Always welcome. 8)

   You can store image file names in properties in use it in img tags
   - img src='bean:message key="picture.cat.english"/'
   img src='bean:message key="picture.cat.french"/'


Recently I fix html:img tag and post it to the struts-dev. If Craig
apply it then you can avoid such constructions as -
 img src='bean:message key="picture.cat.french"/'
and use html:img tag -
 html:img path="images" srckey="picture.cat.english" altkey="Cat!"/

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: As promised (Struts Presentation)

2001-02-13 Thread Oleg V Alexeev

Hello Maya,

Wednesday, February 14, 2001, 2:56:18 AM, you wrote:

MM 1/ Is it possible to change a language on-line. For example one user uses English
MM language with his browser, then he switchs to French. Can Struts handle this? I
MM think, in your document the properties file is loaded in the beginning
MM ActionServlet startup.

JVM load all files in properties bundle at once and all this
resources can be used in run time. Example of switching to another
locale -

public class ChangeLanguageAction extends Action {

public ActionForward perform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
String country = ((ChangeLanguageForm) form).getCountry();
String language = ((ChangeLanguageForm) form).getLanguage();
String source = ((ChangeLanguageForm) form).getSource();
HttpSession session = request.getSession();
ActionForward forward = null;

setLocale( request, new Locale( language, country ) );

if( source==null )
 forward = (mapping.findForward("success"));
else {
 forward = new RedirectingActionForward();
 forward.setPath( source );
}

return forward;
}

}

MM 2/ How replace images with a text through properties file? (I think this question
MM was posted already).

  You can store image file names in properties in use it in img tags
  - img src='bean:message key="picture.cat.english"/'
  img src='bean:message key="picture.cat.french"/'
  
  May be I not understand your 2/ question... Explane please, if so.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Struts user base

2001-02-12 Thread Oleg V Alexeev

Hello Mike,

I work with struts about 6 month - great product!

Result - http://www.penza.ru/povolgie - center to publish news from
goverment regional press services in Russia, middle Volga.
Now I work under number of another projects and all of them build on
struts.

Monday, February 12, 2001, 8:02:37 PM, you wrote:


MD I am working on the same project as Mark Mclaren, and have some additional 
questions regarding Struts:

MD 1. Does anyone have an idea of how many people are developing/using Struts?

MD I have checked the bug list and indeed it is very small, but I want to know that 
that is due to product stability, not because of the lack of users. Don't mean to be 
rude, just cautious.

MD 2. Are there any European users?
MD 3. Does anyone run Struts on commercial servers, e.g. BEA's Weblogic?
MD 4. What is the envisaged frequency of update releases? (just a rough idea, e.g. 
every 2 quarters, years, etc.)

MD Thanks in advance for your help!

MD Mike Dewhirst


MD --

MD 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
MD this e-mail. Any unauthorised copying, disclosure or distribution of the material 
in this e-mail is strictly forbidden.



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Struts user base

2001-02-12 Thread Oleg V Alexeev

Hello Craig,

Monday, February 12, 2001, 10:51:38 PM, you wrote:

 3. Does anyone run Struts on commercial servers, e.g. BEA's Weblogic?

CRM Yes, there are Struts users on Weblogic and many other server platforms -- the 
installation docs in the Struts nightly builds have been recently enhanced to include 
notes about the experience of
CRM using Struts in such environments.

CRM One thing that has been quite interesting (to me) is that Struts is often used as 
a "servlet/JSP compatibility" test by its users, and has triggered service pack 
updates on quite a few server
CRM platforms to improve their conformance to the servlet and JSP specs :-).

I try to deploy my struts based application on Resin 1.2.snap
(built Thu Feb  8 18:23:28 PST 2001) and get strings -

500 Servlet Exception
javax.xml.parsers.FactoryConfigurationError
at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:96)
at org.apache.struts.digester.Digester.getParser(Digester.java:245)
at org.apache.struts.digester.Digester.parse(Digester.java:716)
at org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1249)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:438)
at javax.servlet.GenericServlet.init(GenericServlet.java:52)
at com.caucho.server.http.Application.createServlet(Application.java:1726)
at com.caucho.server.http.Application.loadServlet(Application.java:1690)
at com.caucho.server.http.Application.initServlets(Application.java:1108)
at com.caucho.server.http.Application.init(Application.java:1061)
at com.caucho.server.http.VirtualHost.restartApplication(VirtualHost.java:827)
at com.caucho.server.http.VirtualHost.getInvocation(VirtualHost.java:586)
at com.caucho.server.http.ServletServer.getInvocation(ServletServer.java:566)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:236)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157)
at com.caucho.server.TcpConnection.run(TcpConnection.java:140)
at java.lang.Thread.run(Thread.java:484)

Previous versions of Resin (to 1.2.2) works fine.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: Validating that values are of the specified type

2001-02-09 Thread Oleg V Alexeev

Hello Kishore,

Friday, February 09, 2001, 11:36:05 PM, you wrote:

This is darkplace in Struts for my mind. Default values in this case
is not good way.
I use next approach to support validation of int values. In form I
define property of type String to hold value and in validate method I
try to convert string value to int with support of current locale. Any
exception in this stage will be processed and error will be stored in
ActionErrors.
With such scheme you can hold user's input and make stable conversion
mechanism.

KS Consider the following scenario :

KS I have a form element "A" that can accept only integers. 
KS Corresponding to this property, I have a setA(int i) and getA() methods in my 
ActionForm.

KS When the user enters a non-integer value for "A" and submits it, the ActionServlet 
populates the form and calls the validate method on my form bean
KS (assuming my form is a validating type).

KS I want to validate in my ActionForm if the value entered is an Integer and if not 
i want to populate an error message and have the original user
KS entered text in place.

KS - When I looked at the Struts code, I understand that when converting this 
property value to an Integer, if it hits a NumberFormatException, Struts
KS replaces the value with "0" and calls the validate routine. (in 
BeanUtils.populate, ConvertUtils.convert). Is this correct ?

KS - Since the FormBean is populated before the validate is called on it, it will 
have the value "0" instead of the user entered text. So my validate for
KS an integer will always succeed. 
KS - When this form bean gets displayed again, it will display the value "0" instead 
of the user entered text.

KS Does this mean that such validations SHOULD be done on the client side by way of 
JavaScript (using onBlur, onSubmit etc) ?

KS Any suggestions ? 

KS Thanks,

KS =
KS Kishore Subramanian
KS Agile Software
KS Off : 408 999 7128
KS http://www.agilesoft.com
KS =



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: graphical button in form

2001-02-04 Thread Oleg V Alexeev

Hello Christophe,

Friday, February 02, 2001, 2:07:25 AM, you wrote:

 Is there a prefered way to implement graphical buttons within a struts form ?

 You can use html:image tag and specify appropriate client-side scripts
 for image switching.
  Olegmailto:[EMAIL PROTECTED]
..
CT how do you manage several input type=submit fields within one form ?
CT input does not have a body, so you cannot nest an img inside an input

You can use html:image tag for it. This tag is rendered as

input type="image" src="any.gif"

This html tag is part of 'official' HTML spec. and can be used as
replace for submit button.


CT mouseover/out still does not work with Nescape, so I will need to test the
CT browser to produce a different response, one with a button for netscape, the
CT other without for IE... ?

I test this scheme in IE only - we don't need Netscape.

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re: graphical button in form

2001-02-01 Thread Oleg V Alexeev

Hello Christophe,

Thursday, February 01, 2001, 2:31:28 PM, you wrote:

CT Is there a prefered way to implement graphical buttons within a struts form ?

CT By graphical buttons I mean 4-state buttons
CT (enabled/disabled/mouseover/down) that display a different image for each state.

You can use html:image tag and specify appropriate client-side scripts
for image switching.
For example -

 client-script code

script LANGUAGE="JavaScript"
!--

bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
if ((bName == "Netscape"  bVer = 3) || 
(bName == "Microsoft Internet Explorer"  bVer = 4)) br = "n3"; 
else br = "n2";

if (br== "n3") { 
img1on = new Image();
img1on.src = "images/bean:message key="abt.searchover"/";

img1off = new Image();
img1off.src = "images/bean:message key="abt.searchoff"/";

img1mdn = new Image();
img1mdn.src = "images/bean:message key="abt.searchclick"/";

}


function imgAct(sourceObj, imgName) {
if (br == "n3") {
sourceObj.src = eval(imgName + "on.src");
}
}

function imgInact(sourceObj,imgName) {
if (br == "n3") {
sourceObj.src = eval(imgName + "off.src");
}
}

function imgMDown(sourceObj,imgName) {
if (br == "n3") {
sourceObj.src = eval(imgName + "mdn.src");
}
}

// --
/script

 html:image tah

html:image
   path="images/"
   src="abt.searchoff"
   isKey="true"
   onmouseover="imgAct(this,'img1')"
   onmouseout="imgInact(this,'img1')"
   onmousedown="imgMDown(this,'img1')"
 bean:message key="srch.do"/
/html:image

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Properties in ActionForms

2001-01-11 Thread Oleg V Alexeev

Hello martin,

Thursday, January 11, 2001, 10:50:00 PM, you wrote:

mctc Something I am working on at the moment is a very simple utility that 
mctc generates a form bean from an XML definition. The goal is simply to reduce 
mctc typing in generating beans - as Roger mentioned, it is kinda tedious. I'm 
mctc using something like this to specify a bean:

mctc form-bean name="AddressForm" validate="true"
mctcproperty name="street"/
mctcproperty name="city" allowEmpty="false" 
mctc errorMessage="error.city.required"/
mctcproperty name="zip" allowEmpty="false" errorMessage="error.zip.required"/
mctc /form-bean

mctc Pretty simplistic stuff, but it meets my needs right now. If this would be 
mctc of interest to people (and if my company allows it), I can make it 
mctc available when I'm done.

mctc Also, if people have ideas on what it might do differently, or what else it 
mctc might do, I'd be interested in hearing them. And if anyone has a copy of 
mctc the messages from Mark Wutka mentioned in the Struts 1.1 TODO list, I'd 
mctc appreciate it if they could forward them to me.

Good idea. I think global errorMessage for missing properties can be
defined. And add type as attribute for property. And add errorMessage
for convertion error with property. And add global errorMessage for
properties of some type 8)

-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[4]: Properties in ActionForms

2001-01-11 Thread Oleg V Alexeev

Hello Martin,

With your example -

form-bean name="AddressForm" validate="true"
  property name="street"/
  property name="city" allowEmpty="false"
 errorMessage="error.city.required"/
property name="zip" allowEmpty="false"
 errorMessage="error.zip.required"/
 /form-bean

Global error message -

messages
  errorMessage group="field.empty" key="error.field.blank"/
/messages

All fields (without errorMessage) such as it -
property name="city" allowEmpty="false"/
will be processed with message from list global messages.

Type -
property name="ordernum" allowEmpty="false"
 type="integer"
 errorMessage group="field.empty" key="error.city.required"/
 errorMessage group="field.cast" key="error.number.conversion"/
/property

Global error message for casting -
messages
  errorMessage group="field.empty" key="error.field.blank"/
  errorMessage group="field.cast.number" key="error.field.number.cast"/
/messages

All conversion operations with number properties will use global
message to generate error message in case of wrong conversion.


Friday, January 12, 2001, 7:54:44 AM, you wrote:

MC Oleg,

MC You mentioned four additions:

MC - type
MC - global error message for missing properties
MC - error message for conversion error with property
MC - global error message for properties of some type

MC I understand the first one (type). There, I was just being lazy, since all
MC my properties are Strings. :-)

MC Can you help me understand what you mean by the other three?

MC Thanks!

MC --
MC Martin Cooper
MC Tumbleweed Communications

MC - Original Message -
MC From: "Oleg V Alexeev" [EMAIL PROTECTED]
MC To: "[EMAIL PROTECTED]" [EMAIL PROTECTED]
MC Sent: Thursday, January 11, 2001 1:31 PM
MC Subject: Re[2]: Properties in ActionForms


 Hello martin,

 Thursday, January 11, 2001, 10:50:00 PM, you wrote:

 mctc Something I am working on at the moment is a very simple utility
MC that
 mctc generates a form bean from an XML definition. The goal is simply to
MC reduce
 mctc typing in generating beans - as Roger mentioned, it is kinda
MC tedious. I'm
 mctc using something like this to specify a bean:

 mctc form-bean name="AddressForm" validate="true"
 mctcproperty name="street"/
 mctcproperty name="city" allowEmpty="false"
 mctc errorMessage="error.city.required"/
 mctcproperty name="zip" allowEmpty="false"
MC errorMessage="error.zip.required"/
 mctc /form-bean

 mctc Pretty simplistic stuff, but it meets my needs right now. If this
MC would be
 mctc of interest to people (and if my company allows it), I can make it
 mctc available when I'm done.

 mctc Also, if people have ideas on what it might do differently, or what
MC else it
 mctc might do, I'd be interested in hearing them. And if anyone has a
MC copy of
 mctc the messages from Mark Wutka mentioned in the Struts 1.1 TODO list,
MC I'd
 mctc appreciate it if they could forward them to me.

 Good idea. I think global errorMessage for missing properties can be
 defined. And add type as attribute for property. And add errorMessage
 for convertion error with property. And add global errorMessage for
 properties of some type 8)

 --
 Best regards,
  Olegmailto:[EMAIL PROTECTED]







-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Actions with parameters

2000-12-13 Thread Oleg V Alexeev

Hello Matthias,

Great! Month ago I search all docs for it...

Wednesday, December 13, 2000, 6:54:18 PM, you wrote:

MK Hi Till,

 Is there any possibility to map actions with different parameters?

MK Yes, see below.

 Something like:

 action path="/newsList" type="actions.NewsListAction" 
   forward name="success" path="/newsList.jsp" /
 /action

 action path="/newsListAFew" type="actions.NewsListAction" 
   forward name="success" path="/newsList.jsp" /
   parameter key="number" value="10" /
 /action

MK You have to add a (bean)property to your Action (in your example
MK number). You can make the available to the action by (in 1.0) by

MK action path="/newsListAFew" type="actions.NewsListAction" 
MK   forward name="success" path="/newsList.jsp" /
MK   set-property property="number" value="10" /
MK /action

MK The rest is left up to your action (ie, what you do with the property).

 The designers do not have to be aware of parameters. They just call some
 action.do's.
 If we want to change the logic (i.e. the parameters) we must only change it
 at struts-config.xml instead of everywhere referring to this action.

MK I think, that's exactly the reason why set-property exists :) BTW, the
MK property subelement is also valid for forward. See struts-config.dtd
MK for more explanations.

MK HTH.



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]





Re[2]: Locale access from within a bean?

2000-12-12 Thread Oleg V Alexeev

Hello Ned,

Tuesday, December 12, 2000, 12:47:05 PM, you wrote:

NS Thanks, that would be great.

NS I reckon that there should be some kind of method to allow the bean property 
NS to specify it's format... somehow. I'll have a think.

This tag extends bean:write tag and adds one attribute above it -
format. If you use this tag as bean:write - without format attribute -
then locale from session will be used as base for printing of date and
number values. If format is specified then this format string will be
used as base for values printing. Format string rules you can find in
API doc for Java.

Add class from attachment to struts framework and extend
struts-bean.tld with next strings -

tag
nameformat/name
tagclassorg.apache.struts.taglib.bean.FormatTag/tagclass
bodycontentempty/bodycontent
attribute
namefilter/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
namename/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
nameproperty/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
namescope/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
nameformat/name
requiredfalse/required
rtexprvaluetrue/rtexprvalue
/attribute
/tag


-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]
 FormatTag.java


  1   2   >