RE: application.properties

2003-12-29 Thread Peng, Meimin
I think you need to iterate the message out or pass the argument to get the
error out. 
you might need to post more details about how you do the key in your
resource and how you try to get the key.

-Original Message-
From: Otávio Augusto [mailto:[EMAIL PROTECTED]
Sent: Monday, December 29, 2003 9:32 AM
To: [EMAIL PROTECTED]
Subject: application.properties



Hi all

The application.properties file, from which i retrieve my resouce messages,
has given me a doubt: is it scanned from the top to the botton or from the
botton to the top? the thing is I made a mistake and added three identical
messages there (errors.login.ivalid), and it always reads the last message.
Maybe it loads the las message that matches the pattern, and overrides the
previous ones. Is that right ?


thanks a lot

Otávio Augusto

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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: [OT] Struts vs. XYZ

2003-12-16 Thread Peng, Meimin
I think I agree with Vic.
My boss told me that we don't need to use the best technology,
when it becomes to the best, it's old now. Why you want to use the old
knowledge?
He said why don't we use the most popular one and it's still on the up
trend. 
That's the Struts for us now. 
So, it make us always survival..
--Zoe

-Original Message-
From: Vic Cekvenich [mailto:[EMAIL PROTECTED]
Sent: Monday, December 15, 2003 5:50 PM
To: [EMAIL PROTECTED]
Subject: Re: [OT] Struts vs. XYZ


That feature does sound neat. I know of other exaples where good code 
did not make it in.
HOWEVER... a strength of Struts IS the DEVELOPER COMMUNITY support and 
interactivty. No other framework comes close to the developer culture 
relative to this Struts, for example this mail list.

It's also OK to be simple and not heavy. It does everything you need and 
does not get in the way when you need to do something it was not 
designed to do.

There are a dozen frameworks out there... they all start by saying :"We 
are better than Struts becuase ... "
The point is that Struts is the most popular framework out there by far. 
Like how many books do they have on XYZ framework? How many people ofer 
training on it? If you get on a project... chances are it's Struts. So 
knowing Spring or 20 other things out there will not help you. Struts + 
DAO looks good on a resume. Else you have to explain what it is. 6 
developers who all have 6 different things "better" than Struts.

I look as Struts (using Churchill's words) like this:
"It is the worst framework except for every other one out there".

I find Struts to be the simplest framework to use, you just have to 
dispatch in action, and if you need to work on someone else's code, take 
a peak at Struts.config, and you know where the M,V and C is.

Struts will not fail you project, it is production proven.

.V
Struts Trainer
baseBeans.com

ps: I think JSF is far behind a lot of other frameworks in 
features/benefits, and I will document specifics why only a newbie would 
use JSF, once it ships.

Gus Heck wrote:
> Interesting, I'm not sure I agree, but the patch that he complains about 
> not being added sounds useful...
> 
> Robert Taylor wrote:
> 
>> A coworker sent me this link and said it was an interesting read.
>>
>> http://today.java.net/pub/a/today/2003/12/11/mvc.html?page=1
>>
>> Personally I don't think the author put much research into Struts  before
writing
>> this article which has some interesting points and history about MVC, but
>> basically
>> is written to support his new ground breaking Shocks Servlet Framework.
>>
>>
>> robert
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>  
>>



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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: Struts and XSLT - solved

2003-12-12 Thread Peng, Meimin
Hello, 
(B
(BI did the very similar approach which is I load the resource bundle in the
(Bfirst beginning and put parameters in hashtable for future used. 
(BBut, when it comes out the struts way, it becomes very mess. If I could find
(Ba better way to change it, I'll do it.
(B
(BThis is a possible solution for internationalized contents. I've been try a
(Bsimple app yesterday and it seems work very well.
(Bhttp://www-106.ibm.com/developerworks/library/wa-xslt/
(BSo, check it out and wish you all have best code.
(B--Zoe
(B
(B-Original Message-
(BFrom: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
(BSent: Thursday, December 11, 2003 9:18 PM
(BTo: Struts Users Mailing List
(BCc: [EMAIL PROTECTED]
(BSubject: Re: Struts and XSLT
(B
(B
(B
(BPeng Meimin wrote:
(B>I got a question with working structs and xslt together.
(B
(B
(BI thought about, in case, how I would approach to a problem as yours. Just
(Bmy idea. I will
(B
(B(1) transform Properties files into XML format in the deployment time.
(B
(BDevelop a utility class which transformes any Properties files("key=value"
(Bpairs) into well-formed XML format. For example
(B
(B---
(Bgreeting = $B$3$s$K$A$O(J
(B---
(B
(Bwill be transformed into
(B
(B---
(B
(B
(Bgreeting
(B$B$3$s$K$A$O(J
(B
(B
(B
(B
(B
(B
(B---
(B
(BThen I will transform all of Application Resource files into
(BApplicationResource_??.xml files. Transformation would be done in the
(Bdeployment time within a Ant build process. In fact, I have developed an
(BAnt task for me which does this sort of NON-XML to XML conversion task.
(B
(BBy converting the format, the information becomes accessible for a XSLT
(Bstylesheet via call of
(B.
(B
(B
(B
(B
(B
(B(2) forward to XSLTServlet, not to JSP
(B
(BDevelop a HttpServlet class which drives XSLT processor. It will read the
(Bxml documents as Source, writes the transformation Result into the
(BServlet's OutputStream. The Saxon distribution includes a good sample of a
(BServlet class which drives XSLT processor via JAXP API.
(B
(BAn important point is that the XSLT stylesheet will obtain message
(Bresources by
(B
(B
(B
(BHere I need a magic!.
(B
(BI want this call to make a XSLT variable stuffed with message key and
(Bmessage string pairs read from one of the ApplicationResource_??.xml files.
(B
(BFirstly, how can I can identify which one of the ApplicationResource_??.xml
(Bfiles to refer?  I can identify the locale of the client by looking at
(Borg.apache.struts.action.Action.LOCALE_KEY.
(B
(BSecondly, I want the XSLT processor to be able to resolve my special URI
(Bstring "my:://ApplicationResource". For this, I  have to develop a class
(Bwhich implements javax.xml.transform.URIResolver interface. This special
(BURIResolver class will identify the message resource according to the
(BAction.LOCALE_KEY of the client and return an object of
(Bjavax.xml.transform.Souce.
(B
(BI would definitely maintein a singleton cache of XML-ised
(BApplicationResources in the XSLTServlet for better performace.
(B
(BWhy I do not use JSP with JSTL's  tag? - My solution above
(Bneed to be able to invoke
(B javax.transofrm.TransformerFactory.setURIResolver(URIResolver
(Bresover) method.
(BI do not think JSTL provides features which allows you to do such minute
(Boperation to the Transformer object.
(B
(B
(B
(B
(BI am afraid I may not understand your problem correctly. Hope it helps you.
(B
(B
(BMATSUHASHI,kazuaki
(BJapan
(B
(B
(B
(B-
(BTo unsubscribe, e-mail: [EMAIL PROTECTED]
(BFor additional commands, e-mail: [EMAIL PROTECTED]
(B
(BCONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
(Bconfidential.  Any use, copying or dissemination of any portion of this
(Be-mail by or to anyone other than the intended recipient(s) is unauthorized.
(BIf you have received this e-mail in error, please reply to sender and delete
(Bit from your system immediately.
(B
(B-
(BTo unsubscribe, e-mail: [EMAIL PROTECTED]
(BFor additional commands, e-mail: [EMAIL PROTECTED]

RE: Struts and XSLT - how to load taglib in stylesheet?

2003-12-11 Thread Peng, Meimin
Hi,
Please help. 
Since we usually load the taglib in jsp file, 
how can I load the taglib in stylesheet? another namespace?
Thanks.
--Zoe


-Original Message-
From: Manish Singla [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 6:04 PM
To: Struts Users Mailing List
Subject: Re: Struts and XSLT


 > how can I load different resource bundles(if I have many message 
resources)
 > from struts in stylesheet?

Using XSLT makes no difference. You may use same struts custom tags in 
XSLT as you may use without XSLT. It works in our implementation.

Manish Singla



Peng, Meimin wrote:
> Hi,
> I got a question with working structs and xslt together. 
> If I have a xml document which needs a stylesheet(xslt) to transform into
> different format,
> how can I load different resource bundles(if I have many message
resources)
> from struts in stylesheet? 
> if someone knows how to implement the view level in struts, please help.
> Thanks.
> --Zoe
> 
> CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
> confidential.  Any use, copying or dissemination of any portion of this
> e-mail by or to anyone other than the intended recipient(s) is
unauthorized.
> If you have received this e-mail in error, please reply to sender and
delete
> it from your system immediately.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Thanks
Manish Singla
x73166


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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: Struts and XSLT

2003-12-09 Thread Peng, Meimin
Manish,
haha. I see. It looks simple enough now. :) Thanks. 
--Zoe

-Original Message-
From: Manish Singla [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 6:04 PM
To: Struts Users Mailing List
Subject: Re: Struts and XSLT


 > how can I load different resource bundles(if I have many message 
resources)
 > from struts in stylesheet?

Using XSLT makes no difference. You may use same struts custom tags in 
XSLT as you may use without XSLT. It works in our implementation.

Manish Singla



Peng, Meimin wrote:
> Hi,
> I got a question with working structs and xslt together. 
> If I have a xml document which needs a stylesheet(xslt) to transform into
> different format,
> how can I load different resource bundles(if I have many message
resources)
> from struts in stylesheet? 
> if someone knows how to implement the view level in struts, please help.
> Thanks.
> --Zoe
> 
> CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
> confidential.  Any use, copying or dissemination of any portion of this
> e-mail by or to anyone other than the intended recipient(s) is
unauthorized.
> If you have received this e-mail in error, please reply to sender and
delete
> it from your system immediately.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
Thanks
Manish Singla
x73166


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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



Struts and XSLT

2003-12-08 Thread Peng, Meimin
Hi,
I got a question with working structs and xslt together. 
If I have a xml document which needs a stylesheet(xslt) to transform into
different format,
how can I load different resource bundles(if I have many message resources)
from struts in stylesheet? 
if someone knows how to implement the view level in struts, please help.
Thanks.
--Zoe

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: Dallas struts user groups?

2003-11-11 Thread Peng, Meimin
http://planojava.org

--Zoe

-Original Message-
From: Sasha Borodin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 10:52 AM
To: Struts Users Mailing List
Subject: Dallas struts user groups?


Are there any struts groups in the area?  Or at least java web development
groups that anyone knows of, or is a part of?

Thanks,

-Sasha


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

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



hashtable newbie question

2003-10-14 Thread Peng, Meimin
Hi, 
I want to define a bean name called "myBean" which contains "view"
hashtable. 
How can I approach it in jsp file? 
like this?

??


Thanks in advance.
--Zoe

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



design question

2003-10-13 Thread Peng, Meimin
Hi, 

Please help about app design in struts.
What I want to do is like tomcat manager tool to allow user stop or start
certain services. 
For instance:
I'll have a serviceview.jsp to populate all the services from
servicesHashTable.
In jsp page, I'll have service description which will display current
condition for a specific service and two links(stop, start) to allow next
events. 
I know I can use 
Desc 
Start 
 
to bring each service.

The problem is:
I want to make start is a link associate with an action, come back to
refresh the serviceview.jsp and of course,
service description will change from stop to start for example. 
The link will be similar like this: 
"...

How to make it work in the configuration? What else I'll need? Thanks in
advance.
--Zoe





CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



RE: html tag newbie question

2003-10-08 Thread Peng, Meimin
Hi, 
I still don't know how to do it. 
I try to avoid hard code anything, have any logic, have html tag, and have
javascripts in jsp file.
Overall, jsp file will just display whatever I got from properties or beans.

Is there a way to do like this for example: ">images
then link.yahoo will be http://www.yahoo.com/
any ideas? Thanks.
 

-Original Message-
have a look at html:link tag documentation ...And try to use the struts tags
as much as possible...
-Original Message-
Hi, 
I am very new in struts and facing a problem now. Please help. 
What I want to do is when user click a image, it will link to yahoo.com
which is defined as link.yahoo in the config property 
file. How can I approach this? 
After it generate the html source codes, it will be like
http://www.yahoo.com";>

Right now, I am doing a wrong way to combine struts and html even though
it's working fine. 
--in property file--
link.yahoo=http://www.yahoo.com"/>
image.yahoo=../images/yahoo.gif
image.yahoo.alt=Yahoo
--in jsp --
">


CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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



html tag newbie question

2003-10-08 Thread Peng, Meimin
Hi, 
I am very new in struts and facing a problem now. Please help. 
What I want to do is when user click a image, it will link to yahoo.com
which is defined as link.yahoo in the config property 
file. How can I approach this? 
After it generate the html source codes, it will be like
http://www.yahoo.com";>

Right now, I am doing a wrong way to combine struts and html even though
it's working fine. 
--in property file--
link.yahoo=http://www.yahoo.com"/>
image.yahoo=../images/yahoo.gif
image.yahoo.alt=Yahoo
--in jsp --
">

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

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