Re: [ot] help on generics...

2007-09-28 Thread nicolas de loof
Thanks a lot.
Nico.

2007/9/28, Engelking, Nicholas <[EMAIL PROTECTED]>:
> Unfortunately, the short answer is that you can't.
>
> The compiler will yell at you about class literals for generics because in 
> Java they are implemented using erasure. This is in contrast to C# (which is 
> where I first learned how to use generics) and annoys many people to no end. 
> It was done to maintain binary compatibility between generic and non generic 
> versions of classes and to ensure generic classes could run on JVMs that have 
> no concepts of generics. The compiler basically makes all your generic 
> methods use Object and inserts casts that are garneted to be safe by the 
> compiler.
>
> At run time the method
> Optional  opt = composite. getFeature();
> Looks like
> Optional  opt = (Optional) composite. getFeature();
> To the JVM (more or less)
>
> T.class doesn't work because class literals are resolved at runtime (even 
> though as a programmer you know what they are at compile time). Since a T 
> type is really an Object type, T.class makes no sense and doesn't give you 
> the object you want.
>
> For the method you describe, you can still avoid the casts using generics but 
> you need a parameter that takes an object representing a type, not a 
> parameter that IS a type, since type parameters aren't really method 
> parameters in the normal sense.
>
> public  T getFeature(Class clazz) {
>return aggregators.get( clazz );
> }
>
> Then you can call the method like so
>
> Optional opt = composite.getFeature( Optional.class );
>
> And there are no casts required.
>
> This comes from the fact that class objects are now parameratized to there 
> class. So for example:
>
> String.class
>
> Will return a Class object.
>
> It doesn't seem ideal but it's as close as you can get with the way Generics 
> are implemented in Java. You will have problems though if the caller of your 
> method uses type parameters instead of explicit types. For example:
>
> public class OptionWrapper {
>
>private final Composite composite;
>
>public OptionWrapper(Composite composite) {
>this.composite = composite;
>}
>
>public T getOpt() {
>//needs a class object!
>T  opt = composite. getFeature();
>return opt;
>}
> }
>
> Hope this helps.
> -Original Message-
> From: nicolas de loof [mailto:[EMAIL PROTECTED]
> Sent: September 28, 2007 4:54 AM
> To: Struts Users Mailing List
> Subject: Re: [ot] help on generics...
>
> Thanks a lot for those detailed examples !
>
> I don't want to setup a factory, but to expose internals as optional features 
> :
>
> my class is a composite, with a map of "features", where the key is
> the feature interface (
> Map)
>
> I'd like to get an optional feature using :
>
>   Optional opt = composite.getFeature( Optional.class );
>
> The generics way seems to be :
>
>   Optional  opt = composite. getFeature();
>
> How can I then get the Class object used as generics type, to get it
> from the map ?
>
>public  T getFeature()
>{
>return aggregators.get( T.class ); // Doesn't work
>}
>
>
>
> 2007/9/27, Engelking, Nicholas <[EMAIL PROTECTED]>:
> >
> > Specifically, you could use
> >
> > public  T getInstance(Class clazz)
> > throws InstantiationException, 
> > IllegalAccessException{
> > return clazz.newInstance();
> > }
> >
> > The Class object has a method newInstance() that creates an instance of 
> > a class with the default constructor. The exceptions it throws represent 
> > cases where you don't have visibility permissions for the constructor, 
> > there is no default constructor, the class is abstract, or the constructor 
> > call throws an error (which is then wrapped and rethrown). The method 
> > outlined above is just a wrapper - if you already have the class object you 
> > can just instantiate it. If you need to not use the default constructor, 
> > try something like:
> >
> > public  T getInstance(Class clazz)
> > throws IllegalArgumentException,
> > SecurityException,
> > InstantiationException,
> > IllegalAccessException,
> > InvocationTargetException,
> > NoSuchMethodException {
> > re

Re: [ot] help on generics...

2007-09-28 Thread nicolas de loof
Thanks a lot for those detailed examples !

I don't want to setup a factory, but to expose internals as optional features :

my class is a composite, with a map of "features", where the key is
the feature interface (
Map)

I'd like to get an optional feature using :

   Optional opt = composite.getFeature( Optional.class );

The generics way seems to be :

   Optional  opt = composite. getFeature();

How can I then get the Class object used as generics type, to get it
from the map ?

public  T getFeature()
{
return aggregators.get( T.class ); // Doesn't work
}



2007/9/27, Engelking, Nicholas <[EMAIL PROTECTED]>:
>
> Specifically, you could use
>
> public  T getInstance(Class clazz)
> throws InstantiationException, IllegalAccessException{
> return clazz.newInstance();
> }
>
> The Class object has a method newInstance() that creates an instance of a 
> class with the default constructor. The exceptions it throws represent cases 
> where you don't have visibility permissions for the constructor, there is no 
> default constructor, the class is abstract, or the constructor call throws an 
> error (which is then wrapped and rethrown). The method outlined above is just 
> a wrapper - if you already have the class object you can just instantiate it. 
> If you need to not use the default constructor, try something like:
>
> public  T getInstance(Class clazz)
> throws IllegalArgumentException,
> SecurityException,
> InstantiationException,
> IllegalAccessException,
> InvocationTargetException,
> NoSuchMethodException {
> return clazz
> .getConstructor(
> Parameter1Type.class,
> Parameter2Type.class)
> .newInstance(
> parameter1,
> parameter2);
> }
>
> The getConstructor methods takes all they types for it's parameters in 
> declaration order. This is to resolve the method signature. In this class 
> your class would have a constructor:
>
> MyClass(Parameter1Type parameter1, Parameter2Type parameter2){
> // constructor stuff here
> }
>
> The newInstance method takes the actual parameters to pass to the 
> constructor. In this example, they are parameter1 (which is a Parameter1Type) 
> and parameter2 (which is a Parameter2Type). The errors occur if the 
> constructor doesn't exist, the arguments are the wrong type, the caller 
> doesn't have visibility permissions, the class is abstract, or the 
> constructor throws an error (which is then wrapped and rethrown).
>
> You could also pass the parameters into the getInstance method and pick out 
> the constructer dynamically like so:
>
> public  T getInstance(Class clazz, Object... args)
> throws InvocationTargetException {
> T newObject = null;
> for (java.lang.reflect.Constructor c : 
>   clazz.getConstructors()) {
> // try creating objects with the passed
> // args until one works.
> try {
> newObject = c.newInstance(args);
> break;
> } catch (IllegalArgumentException e) {
> } catch (InstantiationException e) {
> } catch (IllegalAccessException e) {
> }
> }
> return newObject;
> }
>
> This method returns an instance of the class passed created with the 
> constructor parameters passed. If the constructor throws an error it is 
> wrapped in an InvocationTargetException and rethrown. If no constructor 
> matches the method returns null.
>
>
> -Original Message-----
> From: Giovanni Azua [mailto:[EMAIL PROTECTED]
> Sent: September 27, 2007 11:56 AM
> To: Struts Users Mailing List
> Subject: Re: [ot] help on generics...
>
> how about:
>
> public static  T
> getInstance(Class aClass)
> {
>  // TODO:
> }
>
> regards,
> Giovanni
>
> nicolas de loof wrote:
> > Hello,
> >
> > my question is fully off topic, but Struts2 is the only java5 project I 
> > know.
> >
> > I'd like a method to return an instance of

[ot] help on generics...

2007-09-27 Thread nicolas de loof
Hello,

my question is fully off topic, but Struts2 is the only java5 project I know.

I'd like a method to return an instance of a class passed as parameter :

public Object getInstance( Class clazz )

I'd like to use generics to make the return type in sync with the
class type. Is this possible ???

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



Re: [FRIDAY] JPA War Stories?

2007-09-15 Thread nicolas de loof
>
> Venturing slightly (more) off-topic, I recently switched from having
> my DAOs extend from Spring's HibernateDaoSupport, and using
> HibernateTemplate, to just going directly to the Hibernate API. Or,
> now, to the JPA API. I don't benefit from Spring's exception
> translation that way, but you know what? I don't think that really
> matters (in Hibernate 2, it was helpful, but the exceptions have are
> now unchecked). If the applications relied on Spring's DAO
> exceptions, this could make it harder to switch from Hibernate to JPA.

Just for info, simply tagging your DAO classes with @Repository makes
spring handle exception translation.

my 2 cents...

Nico.

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



Re: [ANN] Struts 2.0.9 General Availability Release with Important Security Fix

2007-07-25 Thread nicolas de loof

Could any struts commiter also deploy the -sources.jar for struts² 2.0.9 on
maven repo ?

Nico.

2007/7/25, Deepak Kumar <[EMAIL PROTECTED]>:


Hi,

Discuss the new features and how to use these new features in your
application at
http://www.roseindia.net/struts/struts2/struts2download/struts2.0.9.shtml

Thanks


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ted
Husted
Sent: Wednesday, July 25, 2007 10:35 AM
To: Struts Users Mailing List
Subject: Re: [ANN] Struts 2.0.9 General Availability Release with
Important Security Fix


To help get the word out, I'd ask that anyone with a blog please post
this announcement (if you haven't already), or link back to my blog on
JRoller.

* http://www.jroller.com/TedHusted/entry/struts_2_0_9

-Ted.

On 7/24/07, Ted Husted <[EMAIL PROTECTED]> wrote:
> Apache Struts 2.0.9 is now available from
> .
>
> This release includes an important security fix regarding a remote
> code exploit.  For more information about the exploit, visit our
> security bulletins page at
> .
>
> * ALL DEVELOPERS ARE STRONGLY ADVISED TO UPDATE TO STRUTS 2.0.9 OR
> XWORK 2.0.4 IMMEDIATELY!
>
> For other changes included in Struts 2.0.9, see the release notes
> .
>
> -Ted.

-
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]




[s2] Restful2ActionMapper requires SlashesInActionNames

2007-04-25 Thread nicolas de loof

Hello,

I'm trying to setup the Restful2ActionMapper based on the struts2 tutorial
(helloworld).

The Restful2ActionMapper is expected to invoke "index" method on request for
"/helloworld".

From what I see in the code, the Restful2ActionMapper will only apply this

method for "/helloworld/" (with ending slash)

It also requires action name to include slashes. I tried to set in my
struts.properties,
struts.enable.SlashesInActionNames = true
and also defined in my struts.xml
   

This had no effect : requesting "
http://localhost:8080/tutorial/helloWorld/.action"; always gives me
actionName="".

What did I miss ?

Nico


Re: fail to run struts tutorial

2007-04-18 Thread nicolas de loof

struts2-archetype-starter-2.0.5-20070212.050844-2.jar

thats seems to be the latest available...

2007/4/18, Musachy Barroso <[EMAIL PROTECTED]>:


Are you using the latest version of the archetype? I think I had this same
problem with an older version.

musachy

On 4/18/07, nicolas de loof <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I've followed struts tutorial and cannot run the archetype webapp in
jetty
> :
>
> WARN:  failed action2
> java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine
> ...
>
> adding velocity 1.5 and velocty-tools-view 1.2 as dependency solve this,
> but
> this looks strange to me. Isn't velocity optional ?
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd



fail to run struts tutorial

2007-04-18 Thread nicolas de loof

Hello

I've followed struts tutorial and cannot run the archetype webapp in jetty :

WARN:  failed action2
java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine
...

adding velocity 1.5 and velocty-tools-view 1.2 as dependency solve this, but
this looks strange to me. Isn't velocity optional ?


Re: [s2] Do I still need a business service layer ?

2007-04-17 Thread nicolas de loof

I fully agree with those architecture consideration.

What I see in struts2 is that I can use my business service as MVC controler
with no dependency on the web framework. My business service only has to
switch from a stateless-style (method with parameters) to a statefull or
command-style (properties for input / output + execution method).

If I write my business layer this way, I don't consider it to become part of
the wab layer, but it can be used directly by strut2 as an "Action" by
simply setting the expected properties in the valueStack and executing the
business method.

Am I wrong ?

2007/4/18, Ray Clough <[EMAIL PROTECTED]>:



Architecture is architecture, regardless of whether it is Struts-1,
Struts-2,
or something else.  A Service Layer has the benefits of giving clear
separation of function between the Controller (Struts) and the
Application.
The web framework (here Struts) is primarily a vehicle for delivering data
back and forth between the Application and the user.  The application
should
be independent of the framework.  The Service Layer is really the API for
your application.  Without using a Service Layer, you tend to get lots of
Business Logic in the Action classes, which will tie your application not
only to the framework, but to the type of delivery platform (eg a Web
App),
which will prevent you from later making a Swing app or something else out
of it if you want to.

- Ray Clough



nicolas de loof-2 wrote:
>
> Hello,
>
> I've used struts1 for several years and I'm now looking at Struts².
>
> In struts1, to create a "registerUser" use-case I need a RegisterAction,
a
> RegistrationService and some business code.
> My struts1 RegistrationService is only used to start a transaction using
> Spring @Transactional annotation. Hibernate does all the required job.
>
> In struts2, AFAIK I can use any POJO as controler. Can I use my (maybe
> adapted) RegistrationService as a Controller by simply changing to a
> statefull model (user to register is not a method parameter anymore but
a
> bean property) ? This would make things really simplier !
>
> Nico.
>
>

--
View this message in context:
http://www.nabble.com/-s2--Do-I-still-need-a-business-service-layer---tf3591059.html#a10051941
Sent from the Struts - User mailing list archive at Nabble.com.


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




[s2] Do I still need a business service layer ?

2007-04-17 Thread nicolas de loof

Hello,

I've used struts1 for several years and I'm now looking at Struts².

In struts1, to create a "registerUser" use-case I need a RegisterAction, a
RegistrationService and some business code.
My struts1 RegistrationService is only used to start a transaction using
Spring @Transactional annotation. Hibernate does all the required job.

In struts2, AFAIK I can use any POJO as controler. Can I use my (maybe
adapted) RegistrationService as a Controller by simply changing to a
statefull model (user to register is not a method parameter anymore but a
bean property) ? This would make things really simplier !

Nico.


Re: Newbie Lost in the Apache Jungle

2007-01-10 Thread nicolas de loof

Struts si not a RAD framework.


From an existing database, you may look at Hibernate that can generate

a persistent Model be reverse engeneering.
Lot's of other frameworks use this feature of hibernate to generate
quickly a CRUD application (appfuse, Seam, ...).



2007/1/10, Phil_M <[EMAIL PROTECTED]>:


Well okay, the Apache live in a desert, but that didn't sound as good for a
subject line.

I'm trying to figure out which Apache products to use to easily build a
database application where the users would access the system via a web
browser.  From several hours of reading descriptions of various Apache
products, it seems like Struts might be the way to go, but I'm not sure.

My background is as a RAD database developer (Remedy & xBase, specifically)
who's read a couple of Java books.  I also have some network engineering
skills.

I'm looking for some kind of RAD suite/framework that will produce a highly
interactive client-side interface for the users.  If possible, I'd like the
application to be DBE independent.  My long-range goal is to deliver to
customers turnkey servers that are 100% open source.

I know this is pretty vague, but can anyone point me in the right direction?

TIA,
--Phil
--
View this message in context: 
http://www.nabble.com/Newbie-Lost-in-the-Apache-Jungle-tf2953416.html#a8260640
Sent from the Struts - User mailing list archive at Nabble.com.


-
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]



[s1.3] modules and JSP under WEB-INF

2007-01-05 Thread nicolas de loof

Hello,

I'm using Struts 1.3.5. My application use struts modules. I'd like to put
my JSPs under /WEB-INF/pages, so I've set forwardPattern to
"/WEB-INF/pages$M$P". That works for JSP, but when I use a redirect forward
to a ".do" (for postback actions) the action URI also is converted to
"/WEB-INF/pages/module/action.do"

Is there any way to use an alternate pattern for redirect forwards ?

Nico.


Re: [s2] servlet 2.4 required ?

2006-12-07 Thread nicolas de loof

OK for JEE version, but none of my customer server is servlet 2.4 compliant
(all are servlet 2.3, and sometime java 1.3 !).

Is servlet 2.4 dependency required for all features ? Can I run a
Struts 2.0webapp with some limitations on tomcat
4.1 : Mailreader 2.0.1 runs fine under my tomcat 4.1.30

Nico.

2006/12/7, Wendy Smoak <[EMAIL PROTECTED]>:


On 12/7/06, nicolas de loof <[EMAIL PROTECTED]> wrote:

> I'm starting a project based on Java 1.4 and serlet 2.3 (tomcat 4.1).
I'd
> like to use Struts2 as it includes retro-translated support for java 1.4
.
> According to project main page (
> http://struts.apache.org/2.x/#Platform%20Requirements), servlet 2.4 is
> required.

Yes, Struts 2 requires Servlet 2.4.  The Servlet 2.4 spec was
finalized over three years ago, and if I've got my versions straight,
is part of J2EE 1.4.

> Does this mean I will have to wait all my customer to upgrade to
> JEE5 prior to using Struts2 ? If so, I'll have to wait 1 or 2 years ...

No.  Java EE 5 is Servlet 2.5, not 2.4.  See:

From http://java.sun.com/javaee/technologies/

Java EE 5
Java Platform, Enterprise Edition 5 (Java EE 5) (JSR 244)
...
Web Application Technologies
Java Servlet 2.5 (JSR 154)
JavaServer Faces 1.2 (JSR 252)
JavaServer Pages 2.1 (JSR 245)
JavaServer Pages Standard Tag Library (JSR 52)

--
Wendy

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




[s2] servlet 2.4 required ?

2006-12-07 Thread nicolas de loof

Hello,

I'm starting a project based on Java 1.4 and serlet 2.3 (tomcat 4.1). I'd
like to use Struts2 as it includes retro-translated support for java 1.4.
According to project main page (
http://struts.apache.org/2.x/#Platform%20Requirements), servlet 2.4 is
required. Does this mean I will have to wait all my customer to upgrade to
JEE5 prior to using Struts2 ? If so, I'll have to wait 1 or 2 years ...

Nico


Re: test

2006-12-06 Thread nicolas de loof

My fiulter automatically place my sent message under "struts" tag, so my
contribs to the list are not lost, and does not get duplicated, so this is a
nice feature.

Nico.

2006/12/6, Adam K <[EMAIL PROTECTED]>:


It's a bit annoying, but I suppose it's to try and avoid mail loops/excess
inbox junk.  It's not that difficult to search your inbox or bcc yourself
though.

On 12/6/06, James Mitchell <[EMAIL PROTECTED]> wrote:
>
> That's because GMail doesn't send you your own postings.
>
> On 12/6/06, nicolas de loof <[EMAIL PROTECTED]> wrote:
> >
> > It seems to work !
> >
> > Just was curious not getting messages I send to the list in my mail
box.
> >
> > 2006/12/6, Adam K <[EMAIL PROTECTED]>:
> > >
> > > You had a question if it would work ?
> > >
> > >
> > >
> > > On 12/6/06, nicolas de loof <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Please ignore ...
> > > >
> > > > just testing my gMail account.
> > > >
> > > >
> > >
> > >
> >
> >
>
>
> --
> James Mitchell
> 678.910.8017
>
>




Re: [s2] First try : failed to run mailreader-2.0.1

2006-12-06 Thread nicolas de loof

it works with xalan 2.6.0.

If this lib is required, why isn't it in the war WEB-INF/lib ?

2006/12/6, nicolas de loof <[EMAIL PROTECTED]>:


Hello,

I'd like to install Struts 2.0.1 apps as a live-demo to Struts 2. I'm
using Tomcat 4.1.30 on Java5 (jrockit). When running mailreader app, I get
:

TransformerFactoryConfigurationError: Provider 
org.apache.xalan.processor.TransformerFactoryImpl
 not found


Seems there is some dependency to Xalan. I added xalan-2.7.0 in tomcat
common-lib and got a NoSuchMethodError : nextSibling. What version is
used by struts ?

Nico.







Re: test

2006-12-06 Thread nicolas de loof

It seems to work !

Just was curious not getting messages I send to the list in my mail box.

2006/12/6, Adam K <[EMAIL PROTECTED]>:


You had a question if it would work ?



On 12/6/06, nicolas de loof <[EMAIL PROTECTED]> wrote:
>
> Please ignore ...
>
> just testing my gMail account.
>
>




test

2006-12-06 Thread nicolas de loof

Please ignore ...

just testing my gMail account.


[s2] First try : failed to run mailreader-2.0.1

2006-12-06 Thread nicolas de loof

Hello,

I'd like to install Struts 2.0.1 apps as a live-demo to Struts 2. I'm using
Tomcat 4.1.30 on Java5 (jrockit). When running mailreader app, I get :

TransformerFactoryConfigurationError: Provider
org.apache.xalan.processor.TransformerFactoryImpl not found


Seems there is some dependency to Xalan. I added xalan-2.7.0 in tomcat
common-lib and got a NoSuchMethodError : nextSibling. What version is
used by struts ?

Nico.


Re: Best practice for external webapp configuration ?

2006-08-30 Thread Nicolas De Loof


Thanks for this info,

I'm targeting Tomcat 4 (for developpers) and Websphere 5 (for production)

Nico.


Lance a écrit :

On jboss, this can be done by configuring the SystemPropertiesService.
@see jboss\server\all\deploy\properties-service.xml

Properties can be configured inline in the xml file or can be declared in a
separate file which is referenced by properties-service.xml.

  

Hello,

I'm searching for best practice in JEE applications to put 
configuration elements outside the war/ear.


Here is what I mean : My webapp requires some filesystem path to work 
(logs dir, system-dependent config files...). I'm using a java sytem 
property to setup a root path for external configuration, but this 
requires to customize the container JVM ("-Dxxx=yyy"). Is there a 
better "JEE" way to do such things ?


Nico.






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

  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Best practice for external webapp configuration ?

2006-08-30 Thread Nicolas De Loof


You didn't understand my problem :
My configuration requires a path that is system dependent. I cannot 
include this info in my WAR. I need to set it on the production server.


I'm using a single system property that gives me a filesystem path (or 
URL) and get it in my app to setup application properties that are 
system dependent. But this require to change the appserver JVM 
configuration and I cannot deploy my webapp twice on the same server 
with different configs (for example to deploy version N and N+1).


What would be the "JEE way" to do this ?

Kalra, Ashwani a écrit :

You can set them in your startup class by reading the configuration
file. 
System.setProperty()


/Ashwani
 


-Original Message-----
From: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 30, 2006 1:08 PM

To: Struts Users Mailing List
Subject: Best practice for external webapp configuration ?


Hello,

I'm searching for best practice in JEE applications to put configuration
elements outside the war/ear.

Here is what I mean : My webapp requires some filesystem path to work
(logs dir, system-dependent config files...). I'm using a java sytem
property to setup a root path for external configuration, but this
requires to customize the container JVM ("-Dxxx=yyy"). Is there a better
"JEE" way to do such things ?

Nico.



This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,
you are not authorized to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all
copies of this message.


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


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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


  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Best practice for external webapp configuration ?

2006-08-30 Thread Nicolas De Loof


Hello,

I'm searching for best practice in JEE applications to put configuration 
elements outside the war/ear.


Here is what I mean : My webapp requires some filesystem path to work 
(logs dir, system-dependent config files...). I'm using a java sytem 
property to setup a root path for external configuration, but this 
requires to customize the container JVM ("-Dxxx=yyy"). Is there a better 
"JEE" way to do such things ?


Nico.



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Struts + Spring 2.0

2006-08-04 Thread Nicolas De Loof


I've updated the wiki.
Please review it as my english is so bad...

Wendy Smoak a écrit :

On 8/3/06, Nicolas De Loof <[EMAIL PROTECTED]> wrote:


I've looked a Struts-scripting, but AFAIK this requires me to rewrite
all my struts-config.xml to set the Action java source as parameter.
Lot's of my action already use a parameter and I don't want to change my
projet (huge) struts-configs.


Just checking.  Don doesn't advertise much, some people don't know
it's there. :)


http://forum.springframework.org/showthread.php?t=27534


Would you be willing to write this up as a howto for the wiki?  It
doesn't print out very well from the forum posts. I added the link you
provided, feel free to add a new page if you want.

* http://wiki.apache.org/struts/StrutsAndSpring



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Struts + Spring 2.0

2006-08-03 Thread Nicolas De Loof




Have you looked at Struts Scripting?  It would be interesting to see
how your approach differs from this.  (And whether Struts Scripting
works with Spring 2.0 the way you need it to.)

I've looked a Struts-scripting, but AFAIK this requires me to rewrite 
all my struts-config.xml to set the Action java source as parameter.
Lot's of my action already use a parameter and I don't want to change my 
projet (huge) struts-configs.
I think the scripts also have to be placed in the application root. I'd 
like to point to the project src folder in my eclipse workspace.


In my approach, there is no change in the config files (expect the 
processorClass).


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Struts + Spring 2.0

2006-08-03 Thread Nicolas De Loof


To those of you that are using Struts with Spring,

I've searched a way to make my actions hot-reloadable (no recompile 
neither redeploy) for quick prototyping using Spring 2.0 groovy scripted 
bean, without having to hardly change my existing actions and configuration.


I've found a "not so bad" solution described here : 
http://forum.springframework.org/showthread.php?t=27534


Any comment or better idea is welcome.

Nico.






This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Bean works in JDK 1.4.2_05 doesnt with JDK 1.4.2_12

2006-07-24 Thread Nicolas De Loof


This bug comes from the JavaBean spec that defines the "get*" methods to 
acces javabean properties. JavaBeans can have "indexed" properties if 
they have a getter with an index param. In your case, two getters exist 
for the same "property", according to strict JavaBean spec.


1.4.2_05 may not support indexed properties, or fallback to simple 
property when confusing methods are found, and 1.4.2_12 does not 
consider the getter to be "acceptable" getters for a JavaBean property, 
or something like this. Those 2 versions of the JDK handle in a 
different way, but you should not consider this to be a JDK bug : your 
bean is not compilant with JavaBean spec.


In any case, rename your getters to avoid name conflicts. You can have 
same troubles in some JRE if getter / setter does not have the same type 
as returned valu / param.


Capaul Giachen F. (KISX 41) a écrit :

Hi all,

A developer of ours has a Bean class which looks something like this:


public class Level1 {

public String getLevel(){
return "level1";
}


public String getLevel(int dummy){
return "int method level1";
}
}

Basically a Bean which has two methods which only differ in once not
taking any parameters and the other one taking an int as a parameter.
Running this webapp with WebLogic Server 8.1.3 and JDK 1.4.2_05 works
fine.

Migrating to JDK 1.4.2_12  stops this bean from working with an JSP
Exception "No getter method for property level". (I double checked. The
identical War File works in _05 and ceases working in 1.4.2_12). I see
some related bugs in the Sun Bug DB but for different JDKs (Mainly
talking about some kind of "IndexedPropertyDescriptor").

Does someone have an idea what the cause of this issue is ? 


Kind Regards,

Flurin Capaul


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


  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Properties

2006-04-12 Thread Nicolas De Loof


http://struts.apache.org/struts-doc-1.2.7/faqs/struts-el.html

EL-tags are similar to standard ones, but without functions that JSTL 
supports, like the  /  tag for example.


Neil Meyer a écrit :

Ok, I'm still working with the standard ones as well. I also use a include
page where all my libraries are declared. 


Is there a place where I can find a list of the differences between the
standard and the EL taglibs?

Neil

-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2006 03:04 PM

To: Struts Users Mailing List
Subject: Re:  Properties



I'm using a single "taglibs" JSP that has all taglibs includes headers. 
I don't use "-el" suffix for EL taglibs as I only use EL tags (not 
standard ones).

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt"; prefix="fmt" %>
<%@ taglib uri="http://struts.apache.org/tags-bean-el"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic-el"; prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles-el"; prefix="tiles" %>
...

All my JSPs includes this "taglibs.jsp" :
<%@ include file="/WEB-INF/jsp/taglibs.jsp" %>

Using this, migration to a servlet 2.4 container will not require any 
change to my JSPs, only to make the "taglibs.jsp" target standard Struts 
tags, as the container will handle EL itself.


Nico.

Neil Meyer a écrit :
  

Hi All,

It worked the following way. 




I tried the same with the  but it did not work so the EL works
fine.

Thanks for all your help.

Regards
Neil Meyer

-Original Message-
From: Kjersti Berg [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2006 12:54 PM

To: Struts Users Mailing List
Subject: Re:  Properties

On 12/04/06, Neil Meyer <[EMAIL PROTECTED]> wrote:

  


Hi,

Would like to know why the following doesn't work can anybody explain it
please.

I have a text box on a page this text box is readonly when the readonly
property is set to true.




  

You cannot use tags as attribute values like this. You need to use


scriptlet
  

code.




I think you could accomplish the same using jstl, but I haven't used that
myself, so somebody else explain what's wrong with the last example you
sent. (Besides the obvious missing equal sign, which I'm guessing is a
typo.)


  


" />

Regards
Neil Meyer

  

Kjersti

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


  



This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the person to
whom it is addressed. If you are not the intended recipient,  you are not
authorized to read, print, retain, copy, disseminate,  distribute, or use
this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.


-
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]


  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Properties

2006-04-12 Thread Nicolas De Loof



I'm using a single "taglibs" JSP that has all taglibs includes headers. 
I don't use "-el" suffix for EL taglibs as I only use EL tags (not 
standard ones).

<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt"; prefix="fmt" %>
<%@ taglib uri="http://struts.apache.org/tags-bean-el"; prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic-el"; prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles-el"; prefix="tiles" %>
...

All my JSPs includes this "taglibs.jsp" :
<%@ include file="/WEB-INF/jsp/taglibs.jsp" %>

Using this, migration to a servlet 2.4 container will not require any 
change to my JSPs, only to make the "taglibs.jsp" target standard Struts 
tags, as the container will handle EL itself.


Nico.

Neil Meyer a écrit :

Hi All,

It worked the following way. 




I tried the same with the  but it did not work so the EL works
fine.

Thanks for all your help.

Regards
Neil Meyer

-Original Message-
From: Kjersti Berg [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2006 12:54 PM

To: Struts Users Mailing List
Subject: Re:  Properties

On 12/04/06, Neil Meyer <[EMAIL PROTECTED]> wrote:

  

Hi,

Would like to know why the following doesn't work can anybody explain it
please.

I have a text box on a page this text box is readonly when the readonly
property is set to true.







You cannot use tags as attribute values like this. You need to use scriptlet
code.




I think you could accomplish the same using jstl, but I haven't used that
myself, so somebody else explain what's wrong with the last example you
sent. (Besides the obvious missing equal sign, which I'm guessing is a
typo.)


  

" />

Regards
Neil Meyer




Kjersti

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


  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Properties

2006-04-12 Thread Nicolas De Loof


Using struts-EL tags :





Nico.


Kjersti Berg a écrit :

On 12/04/06, Neil Meyer <[EMAIL PROTECTED]> wrote:

  

Hi,

Would like to know why the following doesn't work can anybody explain it
please.

I have a text box on a page this text box is readonly when the readonly
property is set to true.







You cannot use tags as attribute values like this. You need to use scriptlet
code.




I think you could accomplish the same using jstl, but I haven't used that
myself, so somebody else explain what's wrong with the last example you
sent. (Besides the obvious missing equal sign, which I'm guessing is a
typo.)


  

" />

Regards
Neil Meyer




Kjersti

  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: how to use message resource key for href

2006-04-04 Thread Nicolas De Loof


Perhaps somethig like this may work :



Some text


Nico.

Vinit Sharma a écrit :

Hi,

My requirement is to use a message resource key for html:link href attribute
instead of passing a hardcoded value.

Below:

Some text

I want to replace, ${item.link} with a key from resource file, btw my ${
item.link} returns a key only.

Can some one give an insight.

Thanks,


--
Vinit Sharma

  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: html:option, how to print html characters in the label.

2006-02-20 Thread Nicolas De Loof


If you're looking for a way to indent options in a select box, you 
should use the  HTML tag.


Nico.

Robert Alexandersson a écrit :

Hello, i want to output the String " Level 2" in my optionlists,
but the label attribute of options does not return this but the
transforemed   mending it prints the text instead, is there any
way around this?




Regards
Robert A


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


  


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Accessing static methods from Struts/JSTL

2006-02-08 Thread Nicolas De Loof


You can use jakarta unstandard taglib. 
(http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/intro.html)


I use it to access const from JSP.  :

<%@ taglib prefix="u" 
uri="http://jakarta.apache.org/taglibs/unstandard-1.0"; %>





   Base


Nico.

Keith Sader a écrit :


IMO this is a design smell of the presentation layer.

My suggestion would be to refactor these items down to the
'business-layer' and then have your actions put the results of that
layer into the form/display bean.

Then the .jsp could just look like 

There may be more to this with your particular site, but that's a
first off-the-cuff guess.

hth,


On 2/8/06, Keith Fetterman <[EMAIL PROTECTED]> wrote:

 


We are converting old JSP pages to Struts and JSTL and I am running into
a problem.  On the old JSP pages, we have some calls to static methods
in scriptlets and runtime expressions.  On the new JSP pages, we have
disabled scriptlets and runtime expressions.  Here is an example:

The old code will have an expression like:
<%= OrderRulesBean.getSmallOrderFeeLimit() %>

What is the best way (best practice or easiest to implement) to access
static methods in the JSP pages without resorting to runtime expressions?
   



--
Keith Sader
[EMAIL PROTECTED]
http://www.saderfamily.org/roller/page/ksader
http://www.jroller.com/page/certifieddanger

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


 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



default submited image button

2006-01-10 Thread Nicolas De Loof


Hello,

I've a form with a text input field and two  buttons : one 
to "add new user" and one for "search"


My porblem is when I type [Return] from input field, the form is 
submited with some strange image button informations :
- on IE, non image button (x,y position) is submited, so I can use the 
default beheviour.

- on Firefox, I get x=0 and y=0 for the first "add new user" button.

This behaviour is not expected, as I'd like default submit to go to 
"search", and "add new user" to occur only when button is explicitly presed.


Do you know any way to change firefox behaviour ? I've tested using 
tabindex without result...


Nico.


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



how to setup 2 validwhen-based validation rules

2005-12-09 Thread Nicolas De Loof


Hello,

I've a form where some data are required IF an option is selected + I've 
to check for duplicated entries.


I can setup validation rules using validwhen for both case, but how to 
register those 2 rules (with different message) under the same validwhen 
validator ?


Nico.


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: http proxy

2005-12-08 Thread Nicolas De Loof


Thanks for the link !

Tremal Naik a écrit :


2005/12/8, Nicolas De Loof <[EMAIL PROTECTED]>:
 


Do you know any opensource (java) proxy that could help me doing this ?
   



i've used muffin for a while:

http://muffin.doit.org/

I used it for much simpler tasks then those you need, but I see it's
very flexible and maybe it gives you what you need


--
TREMALNAIK

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


 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



http proxy

2005-12-08 Thread Nicolas De Loof


Hello,

My app will be used (in production) behind a SSO server that adds HTTP 
headers to incoming requests. I use those headers for user 
authentication. For tests, I need to emulate those headers and I'm 
looking for a HttpProxy that can be customized to process incoming HTTP 
request and add mock HTTP headers.


Do you know any opensource (java) proxy that could help me doing this ?

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



how to set token after an exception occurs ?

2005-12-05 Thread Nicolas De Loof


Hello,

I'm using token to avoid multiple submits in this flow :

"/commande.do" creates an empty form-bean, saves a token and forwards to 
"tile:commande.new"

"/commande/create.do" checks for token and creates datas in the database.

If an exception occurs, an exceptionHandler is used to display an error 
message. I'm using it to catch Data integrity exception when user try to 
create an allready-existing entry. In this case, no token is saved 
anymore and user cannot change it's input and resubmit.


How can I setup struts to have a new token beeing saved when an 
exception occurs, to allow the user to correct the form and submit ?


Nico.


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: how to add additional parameters to a form url?

2005-11-24 Thread Nicolas De Loof


Use a hiden input :


  

Hiden value can be a runtime expression (EL if you use the JSTL like 
struts taglib)
You can also not set value in JSP but in the form-bean, and use struts 
mapping between form-bean ant HTML form.


Nico.

Henning Moll a écrit :


Hi!

I use the  tag in my jsps. For example:



This will be rendered to

...

...

Now i need to have an parameter in that action, something like this:

...

...

At least the value needs to be dynamic. 
I can't find a solution. Any suggestions?


Kind regards
Henning

 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: struts-dialogs on maven repo

2005-11-22 Thread Nicolas De Loof


I've allready made maven upload requests and build upload bundles.

I've created upload bundles for struts-dialogs artifact and set JIRA 
issues :


http://jira.codehaus.org/browse/MAVENUPLOAD-599
http://jira.codehaus.org/browse/MAVENUPLOAD-600

You may add comment to this issue if bundles seems invalid to you.

Nico.


Michael Jouravlev a écrit :


On 11/21/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:
 


On 11/21/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:

   


Is struts-dialog extension available somewhere on maven repository ?
   


As far as I know, it does not.
 


Would you like it to be?  You don't have to build it with Maven to get
it into the repository, it's just a matter of getting files into the
right directory structures so that people using Maven in their own
projects can retrieve the artifacts.

Here's how to request that releases be uploaded to the central Maven repository:
 http://maven.apache.org/guides/mini/guide-ibiblio-upload.html

Another way is to set up the directory structure under the sourceforge
website, similar to how the Maven Plugins sf project is doing it:
http://maven-plugins.sourceforge.net/repository/maven-plugins/

I can help this weekend, if you want.

--
Wendy
   



Wendy, thank you for clearly laying out my options. I will think which
approach is better for me and then try it later this week.

Nicolas, I will make sure that Struts Dialogs is in Maven repo.

Michael.

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


 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



struts-dialogs on maven repo

2005-11-21 Thread Nicolas De Loof


Hello

Is struts-dialog extension available somewhere on maven repository ?

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: How to make a preview

2005-11-18 Thread Nicolas De Loof


Yo may use a customized requestProcessor that check for this preview 
attribute (or any other thing) and put a flag in request scope. Any 
other controller/view element can then check this flag to change it's 
behaviour.


Nico.

Nick Sophinos a écrit :


Given that we are talking about an MVC framework, that kind of controlling
input should be processed in the controller. In other words, it would be
best to
request.getParameter("preview") in the action class.

- Nick

On 11/18/05, Jesper Preuss <[EMAIL PROTECTED]> wrote:
 


My homepage is loaded with struts, tiles.
Because I use the url parameter preview
(http://localhost/page/Page1.do?preview=true), this is inserted in all
the links and forms actions (links).
I use the request.getParameter("preview") in the JSP page to test if it
should load the special preview stuff. And no it's not only css, also
special stuff from the database.

I have a problem: Tiles template page inserts some jsp pages. And these
jsp pages can't catch the request.getParameter("preview") parameter.
That's why it's a Struts related problem.

And I also thought that Struts have had this problem before. Different
pages with the same session.


-Oprindelig meddelelse-
Fra: Michael Jouravlev [mailto:[EMAIL PROTECTED]
Sendt: 17. november 2005 21:52
Til: Struts Users Mailing List
Emne: Re: How to make a preview

On 11/17/05, Jesper Preuss <[EMAIL PROTECTED]> wrote:
   


Hi !

Hi have a web project using struts.

My homepage have an administrator module. Where you can change
 


pictures,
   


CSS/colors, page texts and more.
Now you can save Submit->"save" a form. Here you have saved all the
 


new
   


CSS colors permanent. And it will show for all the users of the page.

What I would like to do is, add an button Submit->"preview" to this
form. And when you 'preview' it will come with an pop-window. And here
you can browse the whole web-site, with the preview values.

You should be able to close the window. The original browser windows
session should not be affected by the preview values.

It is one session and two browsers, showing two different color
 


schemes.
   


How do you implement this in Struts.
 


Non-Struts related. Search for CSS style switcher.

Michael.

-
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]


   



 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: OT: Best AJAX framework

2005-11-08 Thread Nicolas De Loof


I'm using DWR on my webapp for navigation in a table, using a "Page 1 2 
3 ..." footer.
DWR makes it realy simple based on a List put into user session. Browser 
can get requested elements from list and DWR comes with utils to upgrade 
the table contain.


Faisal Mahmoud a écrit :


Check out http://www.backbase.com for an Ajax framework.

On 11/8/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
 


Far be it from me to push my own creation...

http://javawebparts.sourceforge.net

Go into the javadocs and look at the javawebparts.taglib.ajaxtags package.
This isn't the AjaxTags you may have heard of lately, they are two
separate projects that just happen to have the same name.  I think it's
reasonable to say that this AjaxTags is a bit different from most of the
other Ajax toolkits/taglibs/whatever out there, but folks might like what
they find here (many do already!).  If it seems interesting, I recommend
downloading the cookbook and checking out the examples there.  The recipes
in there are simpler than what you'll find in the Java Web Parts sample
app, much mroe focused, and can even be used as-is.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: [EMAIL PROTECTED]

On Tue, November 8, 2005 10:24 am, David Gagnon said:
   


Hi all,

   Sorry for the OT guys.  I'm looking for a good AJAX framework.  I
haven't found one under apache.org.  Is there one?  If not is there one
who is more popular/cool/good that other?

Thansk for your help!!

Best Regard
/David



-
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]


   




--
http://www.quidprocode.com

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


 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: wizard-style form and validator

2005-11-03 Thread Nicolas De Loof


I'll have a look, thansk for the link.

Thanks also to bsimonin for code suggestion.

Michael Jouravlev a écrit :


On 11/3/05, Nicolas De Loof <[EMAIL PROTECTED]> wrote:
 


Hello,

I'm building a wizard style webapp with 3 pages. I'm using the page
attribute to make validator check inputs.
I've got this problem :
first page validate an userId selection (required)
When this rules failes on page 2 or 3 (let's consider the user has used
a bookmark), I'd like struts to go back to page 1. How to configure my
action-mapping for this as I only have one "input" attribute, without
paging support ?
   



Have you tried this:
http://struts.sourceforge.net/strutsdialogs/wizardaction.html
Even if you will not use WizardAction, here is the tip: display all
wizard pages from a single action. This way a user won't be able to
navigate to arbitrary page.

Michael.

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


 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



wizard-style form and validator

2005-11-03 Thread Nicolas De Loof


Hello,

I'm building a wizard style webapp with 3 pages. I'm using the page 
attribute to make validator check inputs.

I've got this problem :
first page validate an userId selection (required)
When this rules failes on page 2 or 3 (let's consider the user has used 
a bookmark), I'd like struts to go back to page 1. How to configure my 
action-mapping for this as I only have one "input" attribute, without 
paging support ?


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Strange Problem with logic:equals!

2005-10-07 Thread Nicolas De Loof


 creates BOTH 
- a script variable (a Java variable you can use in <% ... %> java blocs)

- a bean in specified scope (defaults to page)


So you have a "myBeanValue" variable set to 1 and a "myBeanValue" String 
put into page scope.


<% myBeanValue = "2"; %> changes value of script variable. myBeanValue bean in 
page scope is not impacted

 checks the bean in page scope, witch equals 
"1".

To solve this, you may :

- use scriptlet, not logic tag, to check script variables (NOT RECOMENDED) :
 <% if ("1".equals(myBeanValue)) { %> ...<% } %>

- reuse  to change myBeanValue, but be carreful some servlet 
container don't accept multiple use of this tag with the same id, -> so NOT RECOMENDED

- not use scriptlets anymore ! Change myBeanValue by using tags, especially use 
EL struts tags and JSTL :
 
 ...
 
 ...
 
   ...
   ...



Nico.


Aymeric Alibert a écrit :


Do you have the struts-bean tag library defined in your jsp:?
Something like <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

Aymeric.

On 10/7/05, starki78 <[EMAIL PROTECTED]> wrote:
 


Hi, we have a strange Problem
with logic:equal

Look at the following code:


//--> first we create a bean



//--> changing the value is this possible in the way???

<% myBeanValue = "2"; %>


// tests with the logic:equals tags


is equal



is notequal



After running the jsp we are getting the result= is equal!!!

But Why?? Is it not possible to redefine the variable
in the way that we try this in the example!
What makes us even more worried is that
when we debug, it neither jumps in the first nor
in the second logic:equal tag.

Please help me!

Nice Greetings
Starki














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


   



 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



as cancel button

2005-10-07 Thread Nicolas De Loof


Hello,

My application uses image buttons, based on  tag. I'd like 
to add a "cancel" button, that may skip javascript validation.


I didn't find any attribute to set this on . Do I have to 
set myself the javascript "bCancel = true" ?


Thanks,
Nico.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Please enhance validator "validwhen" to avoid associative braces

2005-10-06 Thread Nicolas De Loof


I'm using validwhen rule and find great for complex validation

I'm just frustrated on the requirement to use braces to group conditions 
by pairs :
I must make a 4 element "or" validation, each element beeing itself a 
"and" expression.


I'd like to write test = (A and B) or (C and D) or (E and F) or (G and H)

I have to write an ugly : (A and B) or ((C and D) or ((E and F) or (G 
and H)))

doesn't look so ugly here, but A, B, C... are themself long lines

Is there any way to enhance walidwhen antlr grammar in future version to 
support non braces expressions ?


Nico.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



[OT] howto replicate Application context

2005-09-07 Thread Nicolas De Loof


Hello all,

I've a requirement to replicate application context data in a 2 server 
cluster (load-balanced). I know tomcat option to use in-memory session 
replication. Is there anything similar for application context ?


Thanks for any suggestion.

Nico.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: [URGENT] Struts 1.1 Source Download

2005-08-23 Thread Nicolas De Loof


I've put it on
http://loof.free.fr/jakarta-struts-1.1-src.zip

Hope it will help you.

Nico.

Pilgrim, Peter a écrit :


Can anyone tell me where I can download the full Struts 1.1 source code
other than http://archive.apache.org/dist/struts/ which is being blocked 
by my clients corporate security ?



--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom

Tel: +44-(0)207-883-4497

==
Please access the attached hyperlink for an important electronic communications disclaimer: 


http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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

 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: [fully-OT] File replication between webapps

2005-06-13 Thread Nicolas De Loof


Thanks a lot, I'll take a loot at this ORB.

Nico.

Leon Rosenberg a écrit :

Do you hold the data inmemory or in a file system? 


In later case you'll be just fine with mounting a common share, like NFS
or SMB.
In first case you'd need a software synchronization inbetween, which is
typically solved by a publisher/subscriber pattern. You can use MDB
(message-driven beans, there are enough (open source) solutions
available without an obligatory application server.
Personally I'd prefer an ORB with an EventService like JacORB -
www.jacorb.org.

regards
Leon

P.S. Still you have to build the
say-the-other-one-that-the-data-has-been-updated logic by yourself. But
this is about 5 lines of code, so i don't think you should search for a
tool herefore.



On Mon, 2005-06-13 at 14:06 +0200, Nicolas De Loof wrote:
 


Hi all,

this mail is totaly of topic, so sory sory sory...
... but there is so much java masters on this list !

I have to replicate some datas between two servers running my app (with 
a load balancer, but not using a cluster mode). We are going to build a 
home-made solution, and I wonder if any open-source tool could help me 
on this.
I'm looking for something like a "2 phase commit" or "rsync" Java lib, 
that could be used to assert an update on one server will be 
automagically replicated on the other one.


Thanks.

Nico.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


-
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]

 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: [fully-OT] File replication between webapps

2005-06-13 Thread Nicolas De Loof


Oracle is the only aproved database (clusterable or not). This is the 
reason I was looking for a "rsync"-linke solution.


Nico.


delbd a écrit :


Le Lundi 13 Juin 2005 14:27, Nicolas De Loof a écrit :
 


Our customer defines architecture restriction for it's applications. One
of them is that the (only) usable database is Oracle. As we don't use a
database for the app, adding orcale only to get DB replication may be
difficult to explain (and will add a significant cost)
   



Sure it does :)
If oracle is only 'clustered' database possible but other non lcustered ones 
are available, maybe C-JDBC could help you (it provide RAID like ontop of any 
database).


If not, maybe the transactional Collections in 
http://jakarta.apache.org/commons/transaction/ may be of interrest (they 
supports 2 phases commits using XAressources if am not wrong)


 


delbd a écrit :
   


Just my two cents

I'll suggest storing the datas on a central database (which could be
clustered amongst your servers)

Le Lundi 13 Juin 2005 14:06, Nicolas De Loof a écrit :
 


Hi all,

this mail is totaly of topic, so sory sory sory...
... but there is so much java masters on this list !

I have to replicate some datas between two servers running my app (with
a load balancer, but not using a cluster mode). We are going to build a
home-made solution, and I wonder if any open-source tool could help me
on this.
I'm looking for something like a "2 phase commit" or "rsync" Java lib,
that could be used to assert an update on one server will be
automagically replicated on the other one.

Thanks.

Nico.

This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient, 
you are not authorized to read, print, retain, copy, disseminate, 
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all 
copies of this message.



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


This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,  you
are not authorized to read, print, retain, copy, disseminate,  distribute,
or use this message or any part thereof. If you receive this  message in
error, please notify the sender immediately and delete all  copies of this
message.


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



 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: [fully-OT] File replication between webapps

2005-06-13 Thread Nicolas De Loof


Our customer defines architecture restriction for it's applications. One 
of them is that the (only) usable database is Oracle. As we don't use a 
database for the app, adding orcale only to get DB replication may be 
difficult to explain (and will add a significant cost)


delbd a écrit :


Just my two cents

I'll suggest storing the datas on a central database (which could be clustered 
amongst your servers)



Le Lundi 13 Juin 2005 14:06, Nicolas De Loof a écrit :
 


Hi all,

this mail is totaly of topic, so sory sory sory...
... but there is so much java masters on this list !

I have to replicate some datas between two servers running my app (with
a load balancer, but not using a cluster mode). We are going to build a
home-made solution, and I wonder if any open-source tool could help me
on this.
I'm looking for something like a "2 phase commit" or "rsync" Java lib,
that could be used to assert an update on one server will be
automagically replicated on the other one.

Thanks.

Nico.

This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,  you
are not authorized to read, print, retain, copy, disseminate,  distribute,
or use this message or any part thereof. If you receive this  message in
error, please notify the sender immediately and delete all  copies of this
message.


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



 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



[fully-OT] File replication between webapps

2005-06-13 Thread Nicolas De Loof


Hi all,

this mail is totaly of topic, so sory sory sory...
... but there is so much java masters on this list !

I have to replicate some datas between two servers running my app (with 
a load balancer, but not using a cluster mode). We are going to build a 
home-made solution, and I wonder if any open-source tool could help me 
on this.
I'm looking for something like a "2 phase commit" or "rsync" Java lib, 
that could be used to assert an update on one server will be 
automagically replicated on the other one.


Thanks.

Nico.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: How to encrypt and decrypt?.

2005-06-07 Thread Nicolas De Loof


It seems you'r not encrypting the password but hashing it
explanation :
- pasword *encryption* can be reversed, using some secret key
- pasword *hashing* produces a unique String, that DOES NOT CONTAIN 
infos about the password (cannot be reversed). The hash algorithm (MD5, 
SHA...) is designed so that it is VERY difficult (but not impossible) to 
build another String that will produce the same hash.


If you're using hashing, you cannot get the password back. You may 
provide a 'reset password' link to user having lost they're password, 
that will create a new (random) password and send it by mail.


Nico.


senthil Kumar a écrit :


Hello all.,



In my database password already stored in encrypted format.

Once user forget the password i need to send back him but its seeing by 
encryption format only.

Bofere send password to user, i need to decrypt in java.

I am encrypt using following code


cryptoInterface=CryptoFactory.getCryptoHandler();
password = cryptoInterface.getHash(password);


But i cant decrypt back. Any one can send the code or help me.

Thanks in advance.
Senthil S



This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient or received it in error, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
Please do not copy it for any purpose or disclose its contents.

Copyright Tarang Software Technologies Pvt. Ltd. 2004. All rights Reserved



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Newbie Q - Struts expression language taglibs

2005-06-03 Thread Nicolas De Loof


Take a look into the contrib/struts-el/lib folder !

Nico.

Ibha Gandhi a écrit :


Hi All,


From where can I download struts el tag libraries.
I downloaded jakarta-struts-1.2.4.zip, but it does 
not contain struts-html-el tag libraries


Thanks,
Ibha



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

 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Struts 1.2.7

2005-05-18 Thread Nicolas De Loof
I'm using it for the same reason. I expected this enhancement, also with 
EL tag support for errorStyle attributes.

It works fine for me.
Nico.
Aladin Alaily a écrit :
Hi Everyone,
I was just curious if anyone has been using struts v. 1.2.7?
If so, what do you think of the new features?  Personally, I think that
being able to save the errors in the session is a great addition (I wrote
a hack for v. 1.2.4 to do exactly that).
Thanks,
Aladin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: JSTL EL replacement of logic:present tag

2005-05-18 Thread Nicolas De Loof
This may work :

But you have to know the scope where is stored the ActionMessages bean.
Struts-logic-el has some value-added over JSTL, as it can be used for 
struts-related logic (like errors/messages), so why not using them ? 
Logic tags having an equivalent JSTL tag are not declared in struts-el TLD.

Nico.
Yaroslav Novytskyy a écrit :
Hi!
Does anybody know how to write this

in JSTL Expression Language?
( does not work)
I'd like to get rid of old "struts-logic" in my project and leave only 
jstl's tags and "html-el".

Yaroslav Novytskyy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts and XML/XSL

2005-05-18 Thread Nicolas De Loof
You may take a look at stXX http://stxx.sourceforge.net/ , that is a 
commonly used XSLT extension to Struts.
I've used it for a prototype, but we have finally built our app on 
standard JSP, as it was easier to learn for developers.
According to prototype, XSLT (Stxx) was aprox. 2 time slower than JSP 
(JSP 1.2 + JSTL).

Nico.
Gaet a écrit :
Thanks Leon!
Have you already implemented this solution?
Do you know if it will be supported by WAS?
Have you a complete but simple sample with struts and XML/XSL?
So, that's mean that I won't have jsp anymore?
Could i still use struts-layout?
Do you think it will be simple to rewrite a basic JSP-struts-tiles webapp?
Or will it be a big effort?
Does the XSL template will allow me to define a common template for my whole
webapp?
Thanks if you could help me to answer these important question that will
allow me to take my decision
- Original Message - 
From: "Leon Rosenberg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, May 18, 2005 10:50 AM
Subject: Re: Struts and XML/XSL

 

First)
yes it's possible and quite easy, just render xml in your jsp or write
out the dom out of the action
Second)
You premises are false. It's far less powerful, and it's significantly
slower then jsps.
regards
Leon

On Wed, 2005-05-18 at 10:45 +0200, Gaet wrote:
   

hi,
Actually we have a website developped with struts and tiles...but as
 

XML/XSL seems to be more powerful than tiles for presentation (support
different browser, easier to change presentation, better performance...)
 

My question is : is it possible to develop an application using struts
 

and XML/XSL..
 

If yes, If you have any tutorial or code sample...that's would be great!
Thanks
 

-
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]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Which release to use for production?

2005-05-03 Thread Nicolas De Loof
1.2.4 is the current "stable" version
I'm using Sturts 1.2.6 for production, as known bugs does not affect my app.
Take a look at bug list to check if you can use it for your apps.
1.3.x is in development and not ready for production. Use it only for 
early test as a preview.

Martin Kindler a écrit :
Hi group,
I have successfully developed a prototype system using Struts 1.2.1 and are
about to start rewriting it for production use. Therefore I would like to
use the most up-to-date stable version.
Looking thru the archives, wiki, and the download site I am a bit confused:
last released version is 1.2.4, 1.2.6 is labelled "beta" but has apparently
not changed for half a year (millenia in struts release periods), there also
seems to be work ongoing on 1.2.7.
Many members of this list seem to work with 1.3. Not talking about 2.x ...
So I am confused. I want to start with a version which is definitely no
longer beta, but is 1.2.4 therefore the right choice?
Any remarks are welcome!
martin
---
cityExperience.net
Dipl. Inf. Martin Kindler
Kaulbachstr. 20a
D-12247 Berlin
Deutschland
eMail [EMAIL PROTECTED]
Tel.  +49 (030) 260 78 48 2
Fax   +49 (030) 260 78 48 3

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

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: request information to 2 databases

2005-03-22 Thread Nicolas De Loof
Simply define 2 datasources as resources for your webapp and get them 
using a JNDI lookup.

You will not have a share transactionnal context until you use JTA and 
2-pass commit, but for readonly access, you don't need it.

Nico.
Ryan julius a écrit :
Hi, 

I would like, from a struts action, to query informations from 2 different 
databases: mySql and Oracle.
both are on different servers, respectively (Jupiter:2740) and (orion:2556).
How should I configure the system for being able to do that.
Any references would be appreciated.
Thanks.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [HELP] What's wrong with my html:link syntax... :(

2005-03-16 Thread Nicolas De Loof
You cannot use a tag as attribute of another tag : they must follow an 
XML structure
Use a variable to store the result of your tag :


Go
or


If you don't use struts-EL, use bean:define to define a script v

Go


Nico.
Pham Anh Tuan a écrit :
Hi all,
I got a problem when I code like below:
">Go

I can not get value of 
if my code is incorrect, plz help me solve it.
thanks
Bowl
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts tags and enums

2005-03-14 Thread Nicolas De Loof
You can use jakarta unstandard taglib to "bind" a variable to the static 
fiedl YES



Nico.
Vinicius Caldeira Carvalho a écrit :
Hello there! I'm using enum types in my app and I'd like to use 
combine them with struts tags.
My enum class hierarchy descends to PersistenEnum (the example on 
hibernate)
a method called getEnumCode() returns a Serializable that represents 
the code for that enum :P

So far what I'm doing is:
<%String code = String.valueOf(YesNoEnum.YES.getEnumCode())%>

This of course s cuz I have to import the enum and also adds 
scriptlets to my jsp. So I tried the struts-el using:
value="{YesNoEnum.YES.enumCode}"
not working either.

Anyone has a good experience with that?
Thanks
Vinicius
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: user management

2005-03-11 Thread Nicolas De Loof
I'm using SecurityFilter and use the Principal to store the user ID. The 
actions use the J2EE compliant request.getUserPrincipal(). Having 
userId, they can call business objects.

Nico.
Günther Wieser a écrit :
i for one put the user object into the session, as i have a lot of method
calls against this use object on each page. if you don't use the user object
often, put some identifier in the session to mark that the user has logged
in, eg. key="user", value=. if you need to access the user data
later on, you can user the value of this session object to retrieve the real
user object from a service or whatever.
but there is nothing like "built in support" in struts as far as i know.
kr,
guenther
-Original Message-
From: wo_shi_ni_ba_ba [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 11, 2005 12:55 AM
To: user@struts.apache.org
Subject: user management

do struts developers usually store user as an object in session? or does
struts have additional framework for handling user management.
thanks in advance
		
__
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

-
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]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Wizard implementation wanted

2005-03-11 Thread Nicolas De Loof
Validator has a built-in support for wizards
You have to include in your pages all form-bean fields (use hidden tag 
for those the user doesn't have to edit in a page)
You also have to add a hidden input named "page"

Validator rule can use this page param to 'only' validate inputs prior 
to a page numbre. Using this, on the N wizard action, all fields set on 
page 1..N are validated, and on final action (that will commit inputs in 
DB) all fields are validated.

Nico.
Viktar Duzh a Ãcrit :
Guys,
I have a web application that is built on struts framework. I need to 
implement a couple of wizards within the application. Could anybody 
recommend a robust approach?

Thanks,
- Viktar
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AOP Benchmark (Was: MVC Frameworks)

2005-03-10 Thread Nicolas De Loof
Take a look at  http://docs.codehaus.org/display/AW/AOP+Benchmark
Result shows Spring AOP to be slower than all other tested AOP 
frameworks. They're lot's of comment on this bench on the net 
(http://www.theserverside.com/news/thread.tss?thread_id=30238), ant 
Spring seems to be "as quick as using proxy-based-architecture can be".

In practice, database response time is more significant than AOP 
framework one.

Nico.
Robert Taylor a écrit :
Nicolas,
Can you provide any metrics for the benchmarks when comparing Spring 
to AspectWorks? What exactly does "not good for Spring" mean?

/robert
Nicolas De Loof wrote:
I get such a case recently : we are using Spring as IoC container. On 
some situation we use a simple AOP interceptor.

Our customer have found on the net a benchmark comparing Spring vs 
AspectJ vs AspectWerkz. The bench result was not good for Spring 
(compared to AspectWerkz). The technical reason has no interest here, 
but my customer has warned us on this and expected us to make load 
test to confirm good application response-time (such load-tests had 
to be done in any case...).

Here is an example why we may not use some framework or function, not 
because it isn't the best, but just because customer doesn't agree 
(for some reason that may not be technical).

For info, load-tests have demonstrated Spring was good enough for us...
Nico.
Fogleson, Allen a écrit :
I think the biggest argument was stated by Nicolas.
I use struts because I like it sure, but I really use it because it is
the framework that the client will accept and pay for and my developers
know best.
We recently used (portions) of Spring on a project and had a heck of a
time getting the client to accept the app during user testing. Granted
there were a bunch of other issues with this particular client that 
went
against "best practices" but the major sticking point was Spring. (note
we didn't even use the MVC part of spring even, just the beanfactory
stuff)

Struts has of course gained popular acceptance so clients really don't
think much about it when you say you are using it, vs something else.
Al
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Tuesday, 
March 08, 2005 10:17 AM
To: Justin Morgan
Cc: Struts Users Mailing List
Subject: Re: MVC Frameworks

For my part, I still prefer Struts because I think it has a great
potential if it endorses some move to IoC and does not fall off the
strict web MVC pattern.  I have no time for the event-based frameworks
like Echo, Tapestry, JSF, Shale, etc.  Others need that sort of thing.
What framework you choose depends a lot on what you want to do, the
sophistication of your developers, etc.
Jack
On Tue, 8 Mar 2005 08:44:26 -0600, Justin Morgan 
<[EMAIL PROTECTED]>
wrote:
 

Thanks...
I recently picked up Rod Johnson's J2EE Design and Development (ISBN:
0-7645-4385-7), and Chapter 12 is titled "Web-Tier MVC Design"...  I'm
going to assume this chapter is pretty similar to the one you mention.
I agree with you that this author is incredibly clear-minded, and I'm
soaking it all in.  Most of the book is model-neutral, and focuses
  

more
 

on good practices and patterns, which is great because we have not
decided on a model yet.  But in chapter 12 he only really discusses
Struts, Maverick, and WebWork.  I was hoping for some commentary on
  

JSF
 

and Tapestry as well, especially regarding why one might choose one
  

over
 

the other.
It all boils down to two questions:
1.  Why do you prefer Struts over any other web application framework?
(Tapestry, JSF, Maverick, WebWork, etc)
2.  Why should _I_ prefer ?
The second question is not meant to make anyone defensive; I'm just
trying to get past
Thanks,
-Justin
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Monday, March 07, 2005 3:30 PM
To: Struts Users Mailing List
Subject: Re: MVC Frameworks
Rod Johnson (author of Spring and one of the clearest thinkers I have
ever read IMHO) has a good discussion of the options in J2EE
Development without EJB in Chapter 13: Web Tier Design.
Jack
On Mon, 7 Mar 2005 14:19:47 -0600, Justin Morgan
  

<[EMAIL PROTECTED]>
 

wrote:
 

Hi there,
I am currently researching different web application frameworks...


JSF,
 

Struts, and Tapestry specifically.  We are planning to migrate a


large
 

existing web application to a rigorous model 2 standard using one or
more of these frameworks, and I am looking for more information on


the
 

differences between them.  My research thus far has turned up only a


few
 

sources, and many of them seem religiously biased toward one of


them.
 

If any of you have opinions, or better yet, articles contrasting


these
 

technologies, please let me know.
Thanks,
-Justin


-
 

To unsubscribe, e-mail: [EMAIL PRO

Re: Sorting of array lists

2005-03-10 Thread Nicolas De Loof
Use Collections.sort(list, new Comparator() {...});
or Collections.sort(list) if your Plan class implements Comparable
Nico.
Krishna Mohan Radhakrishnan a écrit :
Hi all,
I have a doubt regarding sorting in array List.
I have an array List  which contains array list objects of type Plan.
The Plan object contains 3 variables : plantitle ,plandescription and
planname.
I have to sort the arraylist based on the plantitle first and then based
on the plandescription.
ArrayList list = new ArrayList();
Plan planobj = null;
For (i= 1, i<=100, i++){
planObj = readPlanObjectFromDB();
list.add(planObj);
}
//?? Now how to sort it 

Private Plan readPlanObjectFromDB(){
//queries the database to return plan object
return plan;
}
I am totally confused. Even if use bubble sorting it will cause a lot of
performance issues.
Could any one please suggest me a good method?
Regards,
Krishna Mohan
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design problem

2005-03-09 Thread Nicolas De Loof
This is a simple way to do it. Have 2 mappings for 2 behaviours.
Using a dispatchAction is usefull if you have code to share.
Nico.
Gaet a écrit :
Nicolas,
Do you mean this :

   


   

So, when I click on an employee name in may list I will call
/ShowEmployeeDetail.do
and I define the edit form of  EmployeeDetail.jsp like this : 
Like this I don't need to change my actual Action class...
Is it well-designed like this?
Thanks
- Original Message -
From: "Nicolas De Loof" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, March 09, 2005 5:09 PM
Subject: Re: Design problem
 

You should define 2 mappings for detail :
a "/showEmployeeDetail" without validation (or a unique rule employeeId
required)
a "/updateEmployeeDetail" with validation.
Your action can be a dispatch action if you don't want to have 2 classes.
Nico.
Gaet a écrit :
   

Hi,
I have page with a list of employees.
On that list, if you click on an employee name, I want to redirect to an
edit page...easy no?
but how to define the complete process into struts-config? Below you will
find my actual struts-config but here is my problem :
I have defined the /EmployeeDetail action-mapping with validate equal to
false to be able to display the employee detail page without any
checkbut if the user made any changes on the employee information in
 

the
 

detailled page, the same action is called and then i need to validate my
form! Maybe my configuration is not good

  
  
  


  

in EmployeeDetail.jsp, I have the following form definition :
  ...
Thanks for your help
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

This message contains information that may be privileged or confidential
   

and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,  you
are not authorized to read, print, retain, copy, disseminate,  distribute,
or use this message or any part thereof. If you receive this  message in
error, please notify the sender immediately and delete all  copies of this
message.
 

-
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]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design problem

2005-03-09 Thread Nicolas De Loof
Each mapping have to define a parameter that sets the internal method to 
be used

You can use parameter as the method name :

and in execute() :
if ("show".equals(getParameter))
   return show(mapping, form...)
else if ("update".equals(getParameter))
   return update(mapping, form...)
else
   return mapping.findForward("error");
Another way is to set parameter to the name of a request param that will 
define the method to be used. Doing this, you have to add this parameter 
to your request (using an hidden input). Doing this, you only need one 
mapping as you can change validation behaviour according to this 
attribute value.


in form-bean validate() :
String param = mapping.getParameter();
String action = request.getParameter(param)
if ("show".equals(action))
   // check employeId is set
else if ("update".equals(action))
   // check employee datas
Nico.
Gaet a écrit :
Thanks nicolas,
I know the dispatch action but I don't see how to use it with 2 mappings:
how the mappings "/showEmployeeDetail" and "/updateEmployeeDetail" will know
the method to execute in my dispatch action?
Thank you very much!
- Original Message -
From: "Nicolas De Loof" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, March 09, 2005 5:09 PM
Subject: Re: Design problem
 

You should define 2 mappings for detail :
a "/showEmployeeDetail" without validation (or a unique rule employeeId
required)
a "/updateEmployeeDetail" with validation.
Your action can be a dispatch action if you don't want to have 2 classes.
Nico.
Gaet a écrit :
   

Hi,
I have page with a list of employees.
On that list, if you click on an employee name, I want to redirect to an
edit page...easy no?
but how to define the complete process into struts-config? Below you will
find my actual struts-config but here is my problem :
I have defined the /EmployeeDetail action-mapping with validate equal to
false to be able to display the employee detail page without any
checkbut if the user made any changes on the employee information in
 

the
 

detailled page, the same action is called and then i need to validate my
form! Maybe my configuration is not good

  
  
  


  

in EmployeeDetail.jsp, I have the following form definition :
  ...
Thanks for your help
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 

This message contains information that may be privileged or confidential
   

and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,  you
are not authorized to read, print, retain, copy, disseminate,  distribute,
or use this message or any part thereof. If you receive this  message in
error, please notify the sender immediately and delete all  copies of this
message.
 

-
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]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Design problem

2005-03-09 Thread Nicolas De Loof
You should define 2 mappings for detail :
a "/showEmployeeDetail" without validation (or a unique rule employeeId 
required)
a "/updateEmployeeDetail" with validation.

Your action can be a dispatch action if you don't want to have 2 classes.
Nico.
Gaet a écrit :
Hi,
I have page with a list of employees.
On that list, if you click on an employee name, I want to redirect to an
edit page...easy no?
but how to define the complete process into struts-config? Below you will
find my actual struts-config but here is my problem :
I have defined the /EmployeeDetail action-mapping with validate equal to
false to be able to display the employee detail page without any
checkbut if the user made any changes on the employee information in the
detailled page, the same action is called and then i need to validate my
form! Maybe my configuration is not good

   
   
   


   

in EmployeeDetail.jsp, I have the following form definition :
   ...
Thanks for your help
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: MVC Frameworks

2005-03-09 Thread Nicolas De Loof
I get such a case recently : we are using Spring as IoC container. On 
some situation we use a simple AOP interceptor.

Our customer have found on the net a benchmark comparing Spring vs 
AspectJ vs AspectWerkz. The bench result was not good for Spring 
(compared to AspectWerkz). The technical reason has no interest here, 
but my customer has warned us on this and expected us to make load test 
to confirm good application response-time (such load-tests had to be 
done in any case...).

Here is an example why we may not use some framework or function, not 
because it isn't the best, but just because customer doesn't agree (for 
some reason that may not be technical).

For info, load-tests have demonstrated Spring was good enough for us...
Nico.
Fogleson, Allen a écrit :
I think the biggest argument was stated by Nicolas.
I use struts because I like it sure, but I really use it because it is
the framework that the client will accept and pay for and my developers
know best. 

We recently used (portions) of Spring on a project and had a heck of a
time getting the client to accept the app during user testing. Granted
there were a bunch of other issues with this particular client that went
against "best practices" but the major sticking point was Spring. (note
we didn't even use the MVC part of spring even, just the beanfactory
stuff)
Struts has of course gained popular acceptance so clients really don't
think much about it when you say you are using it, vs something else. 

Al
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 08, 2005 10:17 AM
To: Justin Morgan
Cc: Struts Users Mailing List
Subject: Re: MVC Frameworks

For my part, I still prefer Struts because I think it has a great
potential if it endorses some move to IoC and does not fall off the
strict web MVC pattern.  I have no time for the event-based frameworks
like Echo, Tapestry, JSF, Shale, etc.  Others need that sort of thing.
What framework you choose depends a lot on what you want to do, the
sophistication of your developers, etc.
Jack
On Tue, 8 Mar 2005 08:44:26 -0600, Justin Morgan <[EMAIL PROTECTED]>
wrote:
 

Thanks...
I recently picked up Rod Johnson's J2EE Design and Development (ISBN:
0-7645-4385-7), and Chapter 12 is titled "Web-Tier MVC Design"...  I'm
going to assume this chapter is pretty similar to the one you mention.
I agree with you that this author is incredibly clear-minded, and I'm
soaking it all in.  Most of the book is model-neutral, and focuses
   

more
 

on good practices and patterns, which is great because we have not
decided on a model yet.  But in chapter 12 he only really discusses
Struts, Maverick, and WebWork.  I was hoping for some commentary on
   

JSF
 

and Tapestry as well, especially regarding why one might choose one
   

over
 

the other.
It all boils down to two questions:
1.  Why do you prefer Struts over any other web application framework?
(Tapestry, JSF, Maverick, WebWork, etc)
2.  Why should _I_ prefer ?
The second question is not meant to make anyone defensive; I'm just
trying to get past
Thanks,
-Justin
-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED]
Sent: Monday, March 07, 2005 3:30 PM
To: Struts Users Mailing List
Subject: Re: MVC Frameworks
Rod Johnson (author of Spring and one of the clearest thinkers I have
ever read IMHO) has a good discussion of the options in J2EE
Development without EJB in Chapter 13: Web Tier Design.
Jack
On Mon, 7 Mar 2005 14:19:47 -0600, Justin Morgan
   

<[EMAIL PROTECTED]>
 

wrote:
   

Hi there,
I am currently researching different web application frameworks...
 

JSF,
   

Struts, and Tapestry specifically.  We are planning to migrate a
 

large
 

existing web application to a rigorous model 2 standard using one or
more of these frameworks, and I am looking for more information on
 

the
 

differences between them.  My research thus far has turned up only a
 

few
   

sources, and many of them seem religiously biased toward one of
 

them.
 

If any of you have opinions, or better yet, articles contrasting
 

these
 

technologies, please let me know.
Thanks,
-Justin
 

-
 

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

--
"You can lead a horse to water but you cannot make it float on its
back."
~Dakota Jack~
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error

Re: MVC Frameworks

2005-03-08 Thread Nicolas De Loof
Here is my response to such questions :
1.  Why do you prefer Struts over any other web application framework?
(Tapestry, JSF, Maverick, WebWork, etc)
I don't use Struts because I think it is the best framework. I use it because 
my dev team has some experience using it. Having to change MVC framework may 
reduce productivity. To make me change to another one, it may be really 
intuitive and easy to learn. I haven't took a look at SringMVC or any other. 
Perhaps I'm missing something...
I also use struts because my customer have read this word on the net and agree 
using it. It's a stupid argument, but it is the stronger I can give to my boss.
2.  Why should _I_ prefer ?
I realy think lot's of MVC framework may be usefull. I think they can 
also be usefull to help Struts becoming more flexible / easy / 
fonctionnal. For example, SWF introduces use of XMLHttpRequest for a 
more dynamic web GUI. Maybee some future Struts extension will do the 
same... This function can be usefull for some projects and useless for 
others, so I can't say if SWF is *better* than Struts.

In short, consider your developpers exeprience (framework learn cost) 
and the functions that may be usefull to you to decide what framework to 
use.

Nico.
Justin Morgan a écrit :
Thanks...
I recently picked up Rod Johnson's J2EE Design and Development (ISBN:
0-7645-4385-7), and Chapter 12 is titled "Web-Tier MVC Design"...  I'm
going to assume this chapter is pretty similar to the one you mention.
I agree with you that this author is incredibly clear-minded, and I'm
soaking it all in.  Most of the book is model-neutral, and focuses more
on good practices and patterns, which is great because we have not
decided on a model yet.  But in chapter 12 he only really discusses
Struts, Maverick, and WebWork.  I was hoping for some commentary on JSF
and Tapestry as well, especially regarding why one might choose one over
the other.
It all boils down to two questions:
1.  Why do you prefer Struts over any other web application framework?
(Tapestry, JSF, Maverick, WebWork, etc)
2.  Why should _I_ prefer ?
The second question is not meant to make anyone defensive; I'm just
trying to get past 

Thanks,
-Justin

-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 07, 2005 3:30 PM
To: Struts Users Mailing List
Subject: Re: MVC Frameworks

Rod Johnson (author of Spring and one of the clearest thinkers I have
ever read IMHO) has a good discussion of the options in J2EE
Development without EJB in Chapter 13: Web Tier Design.
Jack
On Mon, 7 Mar 2005 14:19:47 -0600, Justin Morgan <[EMAIL PROTECTED]>
wrote:
 

Hi there,
I am currently researching different web application frameworks...
   

JSF,
 

Struts, and Tapestry specifically.  We are planning to migrate a large
existing web application to a rigorous model 2 standard using one or
more of these frameworks, and I am looking for more information on the
differences between them.  My research thus far has turned up only a
   

few
 

sources, and many of them seem religiously biased toward one of them.
If any of you have opinions, or better yet, articles contrasting these
technologies, please let me know.
Thanks,
-Justin
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Bean Taglib Help

2005-03-08 Thread Nicolas De Loof
You can use the EL-enable version of display tag to do this (assuming 
Konstants.SESSION_USER_KEY = "users") :


Now, if you don't want to break constants usage, you may try to use 
jakarta unstandard taglib to bind the static field from your Konstants 
class to a pageContext variable :


(http://jakarta.apache.org/taglibs/sandbox/doc/unstandard-doc/index.html#bind)

.. and use it in EL :


If you don't want to use EL, you can use struts bean:define :




Nico.
Richard Reyes a écrit :
Hello All,
I have this code...
<%
   User user = ( User ) session.getAttribute( Konstants.SESSION_USER_KEY ) ;
   ArrayList x = user.getRusers() ;
   request.setAttribute( "x",x ) ;
%>
   
   
How do I use the Struts Bean Liblraries to remove the scriptlet.
TIA.
Richard
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] getRequestURL

2005-02-04 Thread Nicolas De Loof
Thnaks for link,
This doesn't tell me why tomcat getRequestURL() returns "original" URL
and Websphere impl return "current request" URL (!= from original after 
a forward)

I've used a turnaround by addind a filter that stores (orinigal) 
requestURL in request scope.

Thanks for help.
Martin Gainty a écrit :
Nicolas
Did you check out the getRequestURL() documentation from IBM
http://www.developer.ibm.com/tech/faq/individual?oid=2:25030
HTH,
Martin Gainty
__
(mobile) 617-852-7822

From: Nicolas De Loof <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: Struts Users Mailing List 
Subject: [OT] getRequestURL
Date: Fri, 04 Feb 2005 09:44:01 +0100
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by 
mc7-f31.hotmail.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 4 Feb 
2005 00:44:21 -0800
Received: (qmail 83530 invoked by uid 500); 4 Feb 2005 08:44:10 -
Received: (qmail 83515 invoked by uid 99); 4 Feb 2005 08:44:10 -
Received: pass (hermes.apache.org: local policy)
Received: from MXEPAR01.capgemini.com (HELO mxepar01.capgemini.com) 
(194.3.247.82)  by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 04 Feb 
2005 00:44:08 -0800
Received: from mxipar01.capgemini.com (prvmta2 [194.3.224.82])by 
mxepar01.capgemini.com (8.12.11/8.12.11) with ESMTP id 
j148i3Q1014790for ; Fri, 4 Feb 2005 09:44:04 
+0100 (MET)
Received: from prvmta2.capgemini.com (localhost [127.0.0.1])by 
mxipar01.capgemini.com (8.12.11/8.12.11) with ESMTP id 
j148i3PB009391for ; Fri, 4 Feb 2005 09:44:03 
+0100 (MET)
Received: from pasteur2.capgemini.fr (smtp.capgemini.fr 
[10.67.1.90])by prvmta2.capgemini.com (8.12.11/8.12.11) with ESMTP id 
j148i209009380for ; Fri, 4 Feb 2005 09:44:03 
+0100 (MET)
Received: from pasteur.capgemini.fr (localhost [127.0.0.1])by 
pasteur2.capgemini.fr (8.12.10/8.12.10) with ESMTP id 
j148i2MH002196for ; Fri, 4 Feb 2005 09:44:03 
+0100 (MET)
Received: from vasnmail.telecom.capgemini.fr ([10.67.188.21])by 
pasteur.capgemini.fr (8.12.10/8.12.10) with SMTP id j148i2Dd002192for 
; Fri, 4 Feb 2005 09:44:02 +0100 (MET)
Received: from [10.67.191.47] by vasnmail.telecom.capgemini.fr 
(SMI-8.6/SMI-SVR4)id JAA06672; Fri, 4 Feb 2005 09:47:41 +0100
X-Message-Info: JGTYoYF78jGj2Hp8idRl9DlBwN0swpe1aZdZNyUn+dA=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Subscribe: <mailto:[EMAIL PROTECTED]>
List-Help: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:user@struts.apache.org>
List-Id: "Struts Users Mailing List" 
Delivered-To: mailing list user@struts.apache.org
X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
X-Spam-Check-By: apache.org
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: fr, en
X-imss-version: 2.019
X-imss-result: Passed
X-imss-scores: Clean:99.9 C:2 M:3 S:5 R:5
X-imss-settings: Baseline:1 C:1 M:1 S:1 R:1 (0. 0.)
X-Virus-Checked: Checked
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 04 Feb 2005 08:44:21.0115 (UTC) 
FILETIME=[B8772CB0:01C50A95]

Hi all,
I'm having troubles using the request.getRequestURL() in JSP tags
In tomcat (4.1) it returns the URL I've got in my browser, and 
getRequestURI returns the Layout JSP URI. It sounds correct according 
to ServletAPI javadoc for getRequestURL "Reconstructs the URL the 
client used to make the request"

In Websphere 5.0.2, getRequestURL() allways return the JSP layout 
URL. I did not find any fix for this on IBM site.

Do you know any way in Websphere 5.0.2 to know the original URL or 
URI used to access the webapp ?

Nico.
This message contains information that may be privileged or 
confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not 
the intended recipient,  you are not authorized to read, print, 
retain, copy, disseminate,  distribute, or use this message or any 
part thereof. If you receive this  message in error, please notify 
the sender immediately and delete all  copies of this message.

-
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]
This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
--

[OT] getRequestURL

2005-02-04 Thread Nicolas De Loof
Hi all,
I'm having troubles using the request.getRequestURL() in JSP tags
In tomcat (4.1) it returns the URL I've got in my browser, and 
getRequestURI returns the Layout JSP URI. It sounds correct according to 
ServletAPI javadoc for getRequestURL "Reconstructs the URL the client 
used to make the request"

In Websphere 5.0.2, getRequestURL() allways return the JSP layout URL. I 
did not find any fix for this on IBM site.

Do you know any way in Websphere 5.0.2 to know the original URL or URI 
used to access the webapp ?

Nico.
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


and char encoding

2005-01-12 Thread Nicolas De Loof
Hi,
Can someone explain me what's wrong in HTTP / servlet API about char 
encoding :

I'm using  to build a link with parameters, whose values use 
french chars ('é', 'à' ...)
I need to set useLocaleEncoding to get values in my servlet (that is not 
a struts action) using getParameterMap.
If I do not set this attribute, I get values with strange strings that 
looks like UTF-8 sequences.

Is they're no strict standard for URI encoding ? Is tomcat servlet API 
wrong about this ?

Nico.
This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: =

2005-01-11 Thread Nicolas De Loof
Another option is to use a submit button (that will post the form) and 
CSS to make it look as a link :




   .submit {
   border:0px;
   background-color:#fff;
   cursor: pointer;
   text-decoration:underline;
   }



  
 
  


Nico
Jeff Beal a écrit :
You need to have the link fire off a JavaScript function that will 
submit the form.  I don't think you'll want to use the  
tag in this case, since you won't need to do anything fancy with a 
request URI.

Here's a really quick example that will run in Internet Explorer.  I 
haven't done enough JavaScript in other browsers to make any 
guarantees with those, but modifications to this shouldn't be all that 
difficult:

Submit
For FORMNAME, you need to use the name attribute of the FORM element. 
IIRC, Struts uses the name of the Form Bean here.  The easiest way to 
be sure is to run your app and view the generated source, though.

-- Jeff
Flávio Maldonado wrote:
Hello...
How can I do to make a  works like a  ??
For example...
I have this button: 
 
 
and I'd like to make a Link to do the same thing.
thanks for help!
Flávio Vilasboas Maldonado
Diretor de Desenvolvimento
SedNet Soluções
(35)3471-9381

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to detect Cancel button i pressed ?

2005-01-11 Thread Nicolas De Loof

Manisha Sathe a écrit :
Hi Nicolas,
Thanks for the response,
1)I tried this, but giving me error. Pls would u mind giving some code example ?
 

use  in your JSP (do not set property !)
use isCanceled(request) in action. Is cancel was used to post the form, 
it will return true.

2)About exception - do u mean to say my own method common to all ? This also if u can explain with code example would be of great help. 
 

I set a global ExceptionHandler in struts config to catch all 
exceptions. It logs them for debug and forwards to an error page.

Thanks once again,
regards
Manisha
Nicolas De Loof <[EMAIL PROTECTED]> wrote:
You can check for cancel in actions using
isCanceled(request)
Struts cancel tag uses a magic value that this method will detect 
(formbean validation is also skipped)

About exception, I used to set a global exception handler that logs 
exception stack and forwards to a generic error page.

Nico.
Manisha Sathe a écrit :
 

I had posted it before - might hv missed the response. I want to check whether 
Cancel button is pressed, if yes then want to redirect it to another page
Also how to handle th Exceptions. I am catching many exceptions inside my Action Handlers. 
what shall i do with them ? Currently just printing the error messages on System.out, but what is the good practice to handle exceptions ? Close all Resultsets/ connections and redirect to error page ? write some standard routine ? 

In struts-config i have given mapping to "errors" as global forward, but what 
if exceptions occur inside my common classes ?
regards
Manisha
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

   

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient, you are not 
authorized to read, print, retain, copy, disseminate, distribute, or use this 
message or any part thereof. If you receive this message in error, please 
notify the sender immediately and delete all copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

		
-
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How to detect Cancel button i pressed ?

2005-01-10 Thread Nicolas De Loof
You can check for cancel in actions using
isCanceled(request)
Struts cancel tag uses a magic value that this method will detect 
(formbean validation is also skipped)

About exception, I used to set a global exception handler that logs 
exception stack and forwards to a generic error page.

Nico.
Manisha Sathe a écrit :
I had posted it before - might hv missed the response. I want to check whether 
Cancel button is pressed, if yes then want to redirect it to another page
Also how to handle th Exceptions. I am catching many exceptions inside my Action Handlers. 
what shall i do with them ? Currently just printing the error messages on System.out, but what is the good practice to handle exceptions ? Close all Resultsets/ connections and redirect to error page ? write some standard routine ? 

In struts-config i have given mapping to "errors" as global forward, but what 
if exceptions occur inside my common classes ?
regards
Manisha
__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Cancel button problem

2005-01-05 Thread Nicolas De Loof
When using cancel button, validation is automatically skipped. Use 
isCanceled(request) in your action to see if cancel was clicked and 
forward to your index page.

Nico.
Manisha Sathe a écrit :
I am using struts cancel button. But when i click on that it goes to next page (w/o 
even  validation - using validator). What i want to do is i want to redirect it to 
index page. I tried using oncancel inside  but giving me error.
How i can do this ?
Thanks and regards,
Manisha
		
-
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Two Qs re: authentication servlet filter

2005-01-05 Thread Nicolas De Loof
You should have a look at securityFilter that does such a job. It tries 
to "look like" j2ee FORM security check, but allow you to use your own 
authentication rules.

Nico.
Jim Barrows a écrit :
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 11:17 AM
To: user@struts.apache.org
Subject: Two Qs re: authentication servlet filter


Can anyone help a newbie out?  I have a couple of questions:
1)  I am implementing a servlet filter for authentication.  
In my web app,
a class reunion web site, I want people to be able to login with their
first and last names and a password, instead of a single ID 
and password,
so I am NOT configuring form-based security and letting 
TomCat do the work.
Instead, I am checking authorization myself in this filter.  
Is this sound
reasoning or does anyone have better ideas?
   

I know of one other person whose name is James Barrows.  No relation to me 
at all.  Firstname/lastname is probably not unique enough.
 

2)  In web.xml, in the filter-mapping tag, is there a way to 
say "execute
this filter to all servlets except /LoginAction.do"  I tried 
the following,
using the regular expression carat, but get an "invalid 
expression" error.
I'd hate to list all servlets and JSPs that should get the 
filter applied.
   

All actions that need to have a login should be of the form 
"/secure/actionName.do", then set your filter to the secure actions.
 

More importantly, sounds like an opportunity for errors as new
actions/servlets are created but maybe not added to the list of
filter-mappings.  Here's the attempt at mapping that failed:
 
 AuthenticationFilter
 schs82.AuthenticationFilter
 
 
 AuthenticationFilter
 ^/LoginAction.do
 
   

I wish that would have worked too :)
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

This message contains information that may be privileged or confidential 
and is the property of the Capgemini Group. It is intended only for the person 
to whom it is addressed. If you are not the intended recipient,  you are not 
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you receive this  message in error, please 
notify the sender immediately and delete all  copies of this message.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Struts, JSTL and ResourceBundle

2004-12-16 Thread Nicolas De Loof

Thank you for help,

About using database for messages, I agree it requires chaching and a reload 
strategy. A simple "reload every 10
minutes" might allow changing messages without requirement to stop app or to 
search for files on server.

I'm taking a look at Spring ReloadableResourceBundleMessageSource (what's a 
name !). It allows bundle reload and sharing
messages between JSTL an Spring aware classes by using ApplicationContext as a 
MessageSource.

Nico.


>
>
> > -Original Message-
> > From: Derek Broughton [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, December 15, 2004 12:09 PM
> > To: Struts Users Mailing List
> > Subject: Re: Struts, JSTL and ResourceBundle
> >
> >
> > On Wednesday 15 December 2004 14:07, Jim Barrows wrote:
> > > > From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
> >
> > > > My customer would like to be able to change i18n messages
> > > > easily (without requirement to redeploy webapp or edit files
> > > > in context/WEB-INF/classes/...)
> > > >
> > > The solution isn't to put the messages into a database.
> > That just means
> > > everything gets slowed down as you constantly make db changes.
> >
> > Maybe, though I'd expect that there wouldn't be "constant" changes.
>
> Blech.  Wrong thing to say.  Everythign gets slowed down because you have to 
> hit the DB everytime you want a message.
Cacheing the data means your right back where you started from,  or trying to 
refresh the cache on each change.
>
>
> >
> > > What you might want to do is cause all of the i18n bundles to
> > > reload themselves to pick up new bundles. Which seems to be somewhat
> > > difficult, but this link might provide some help:
> > > http://www.jguru.com/faq/view.jsp?EID=44221
> >
> > Doing it the "right" way might be a real pain, but if you make
> > context/WEB-INF/classes/ApplicationResources.properties a
> > symlink to a file
> > they can access, and use 'reloadable="true"
> > allowLinking="true"' in the
> >  tag I would think it would work.  Ugly, but simple.
>
> So is the linke I provided.  The problem seems to be that the resource 
> bundles aren't really designed to be reloaded
during application run.  There is apparently a request for enhancement at sun 
to do this.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Struts, JSTL and ResourceBundle

2004-12-15 Thread Nicolas De Loof

Hello,

My customer would like to be able to change i18n messages easily (without 
requirement to redeploy webapp or edit files
in context/WEB-INF/classes/...)

We suggested to put messages in database, and use a custom Struts 
messageResource impl to retrieve them, according to
http://wiki.apache.org/struts/StrutsMessageResourcesFromDatabase

We want to use EL in our JSP, and AFAIK it requires the 
"javax.servlet.jsp.jstl.fmt.localizationContext" servlet-context
init param to be set to a LocalizationContext implementation or to a 
ResourceBundle path.
How can I configure JSTL to use a custom Message source ? I don't know how to 
build a ResourceBundle (as required by
LocalizationContext) from database messages (ResourceBundle is full of private 
static method I cannot override)



Thanks for any suggestion



Nico.






This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



[SOLVED] Re: IllegalAccessException using trivial formbean

2004-11-29 Thread Nicolas De Loof


Solved !

I used a struts-1.2.6 jar i compiled myself. Replacing it with binary dist 
makes my app work.
Don't know where I failed building struts jar...

Nico.


>
> Heloo,
>
> I'm getting strange troubles on my webapp and I've set a minimalist webapp to 
> test it :
>
> 1 action "/logon" & 1 for "LogonForm" with 2 fields "username" & "password".
> Struts 1.2.6 without any plugin
>
> - If I use DynaForm for my formbean, my (trivial) jsp runs fine and displays 
> the HTML form.
>
> - If I try to use a java class as formbean, I get :
>
> java.lang.IllegalAccessException: Class 
> org.apache.struts.config.FormBeanConfig can not access a member of class
> com.capgemini.map.webapp.beans.LogonForm with modifiers ""
> at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
> at java.lang.Class.newInstance0(Class.java:302)
> at java.lang.Class.newInstance(Class.java:261)
> at 
> org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:212)
>
> Notice my formbean is a simple POJO extending ActionForm !
>
> I really don't know where to search (I've allready re-installed eclipse and 
> JDK)
>
> Please, HELP !
>
> Nico.
>
>
>
>
> login.jsp :
>   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"; %>
> 
> 
> 
> login : 
> 
> password : 
> 
> 
> 
> 
> 
>
>
> This message contains information that may be privileged or confidential and 
> is the property of the Capgemini Group.
It is intended only for the person to whom it is addressed. If you are not the 
intended recipient,  you are not
authorized to read, print, retain, copy, disseminate,  distribute, or use this 
message or any part thereof. If you
receive this  message in error, please notify the sender immediately and delete 
all  copies of this message.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



IllegalAccessException using trivial formbean

2004-11-29 Thread Nicolas De Loof

Heloo,

I'm getting strange troubles on my webapp and I've set a minimalist webapp to 
test it :

1 action "/logon" & 1 for "LogonForm" with 2 fields "username" & "password".
Struts 1.2.6 without any plugin

- If I use DynaForm for my formbean, my (trivial) jsp runs fine and displays 
the HTML form.

- If I try to use a java class as formbean, I get :

java.lang.IllegalAccessException: Class org.apache.struts.config.FormBeanConfig 
can not access a member of class
com.capgemini.map.webapp.beans.LogonForm with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
at java.lang.Class.newInstance0(Class.java:302)
at java.lang.Class.newInstance(Class.java:261)
at 
org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:212)

Notice my formbean is a simple POJO extending ActionForm !

I really don't know where to search (I've allready re-installed eclipse and JDK)

Please, HELP !

Nico.




login.jsp :
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html"; %>



login : 

password : 







This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: tiles wilcard?

2004-11-23 Thread Nicolas De Loof

Here I am !

I submited a patch for this in 
http://issues.apache.org/bugzilla/show_bug.cgi?id=31034

They're is no *pretty* doc on this (tutorial or sample) but you can look at 
bugzilla comments for simple usage :

wildcard in struts-config.xml :



wildcard in tiles-defs.xml :








- Original Message - 
From: "Julio Cesar C Neto" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, November 23, 2004 10:55 AM
Subject: RES: tiles wilcard?


>   Yeah , I know and that´s exactly what would like to have with tiles.
> I´ve been searching the old messages and found that once Nicolas de loof
> developed such a patch but it does not come with *any* documentation.
>
> Hey, Nicolas, are you there?
>
>
> Julio Cesar
>
> -Mensagem original-
> De: news [mailto:[EMAIL PROTECTED] Em nome de Vic
> Enviada em: segunda-feira, 22 de novembro de 2004 16:17
> Para: [EMAIL PROTECTED]
> Assunto: Re: tiles wilcard?
>
> You can do wild cards in struts-config, if that helps.
> Tiles has a diferent mechanisam to repeat.
> .V
>
> Julio Cesar C Neto wrote:
> > Hi,
> >
> >I would like able to use wildcards in the tiles-defs.xml. Is that
> > possible? Is there any patch?
> >
> >
> > Julio Cesar
> >
> >
>
>
> -
> 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]
>


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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



Re: Dynamic html:form tags

2004-10-12 Thread Nicolas De Loof

Did you try something like this :

   
   
 
...
   
   

Nico.

> Hi group!
> 
> I have a somewhat complex application with tiles. I have a layout page
> which looks like this:
> 
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
> 
>  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> 
> 
>   
> 
> 
> 
> 
> 
> 
>   
> 
> 
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> In the content tile the html:form is set, as this tile includes the
> information to submit.
> 
> Now I want to surround the complete layout with menu-navigation with the
> form tag instead of using it only in the content tile. This is needed
> because I want the form to submit if the user hits the menu bar. If the
> action were static it would look like the following:
> 
>   
>   
> 
> 
> 
> 
> 
> 
> 
>   
>   
> 
> 
> However, the action is not static so I need to make it dynamic. I've tried
> to include the form tag with another tile, but it doesn't compile the jsp
> page. I've tried to include the action as tiles:getAsString, but it doesn't
> compile either.
> 
> I'm under the impression that this is a common problem (form including
> navigation), but I'm unaware of any solution.
> 
> Thanks in advance
> Karsten Krieg
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Clean way to obtain a property's value...

2004-10-11 Thread Nicolas De Loof


Someone posted on this list a clean way to do this using jakarta-unstandard-taglib and 
bind tag. Sometinhg like this
(not tested) :





Nico.

>
> On 2004-09-27 at 21:50:26 +0100, Adam Hardy wrote:
> > Just before this thread dies, on a closely related note, does anybody
> > have a nice way to get the value of a constant from a static on a class?
> > This is what I don't like:
> >
> > 
> >   > collection="<%=org.gargantus.GargantusLists.ESURVEY_RESULT_DISPLAY_TYPE_LIST
> > %>"
> >property="resultDisplayTypeId"
> >labelProperty="typeName" />
> > 
> >
> > I thought of JSTL variables, like:
> > 
> >   <%=org.gargantus.GargantusLists.ESURVEY_RESULT_DISPLAY_TYPE_LIST %>
> > 
> >
> > except somehow avoiding the <% %> tags?
> >
> > I thought of instantiating the class and putting in the Application
> > scope and trying to access it like this:
> >
> > ${applicationScope.get['myConstantsBean'].resultDisplayTypeId}
> >
> > but it's still messy. Does anybody have any better ideas?
> >
> > Thanks!
> >
> >
> > On 09/27/2004 04:53 PM Paul McCulloch wrote:
> > >I think you can achieve what yopu want. For example:
> > >
> > >
> > >
> > >
> > > I'm some conditional html
> > >
> > >
> > >Paul
> > >
> > >
> > >>-Original Message-
> > >>From: Freddy Villalba A. [mailto:[EMAIL PROTECTED]
> > >>Sent: Monday, September 27, 2004 3:56 PM
> > >>To: 'Struts Users Mailing List'
> > >>Subject: RE: Clean way to obtain a property's value...
> > >>
> > >>
> > >>Not sure, Paul... as I understand,  directly
> > >>outputs the value.
> > >>Therefore, I believe it would work if I wanted to use the value for
> > >>conditional (client-side) code (for instance, Javascript), but not for
> > >>storing the value in a server-side variable and using it to
> > >>(conditionally)
> > >>generate some HTML or other...
> > >>
> > >>Correct me if I'm wrong, please...
> > >>
> > >>Regards,
> > >>Freddy.
> > >>
> > >>-Mensaje original-
> > >>De: Paul McCulloch [mailto:[EMAIL PROTECTED]
> > >>Enviado el: lunes, 27 de septiembre de 2004 15:56
> > >>Para: 'Struts Users Mailing List'
> > >>Asunto: RE: Clean way to obtain a property's value...
> > >>
> > >>
> > >>Doesn't  meet your needs?
> > >>
> > >>As an aside, What is your objection to JSTL?
> > >>
> > >>Paul.
> >
> > -- 
> > struts 1.2 + tomcat 5.0.19 + java 1.4.2
> > Linux 2.4.20 Debian
> >
> >
> > -
> > 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]


This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Where to put the business logics?

2004-09-21 Thread Nicolas De Loof

I don't agree :
- My app will NEVER be anything else than a webapp
- We are 3 developpers working both on business and web

BUT we defined a business API using interfaces for business logic

Using this, we can change business tier for a mock one for application demo or testing 
cases that may be difficult to
get using real app.

Notice we use spring to link webapp with business model.

Nico.


> That's a good point...
>
> If you KNOW your application is NEVER going to be anything other than a
> web-based application, and if you KNOW you won't need to re-use your
> business logic (or expose it in any way outside the application), and if
> your development team is not really separated (especially if your the only
> developer!) then there's probably not too many good arguments for using
> delegates at all.  Might as well save the time and effort and just put
> everything in the Actions.
>
> The decision has to be based on what you know about the project.  I think
> it's fair to say that the majority of people will tell you that separating
> your business logic from your Actions is a good architectural approach,
> but there are some valid reasons for not bothering with the extra effort,
> and only you can decide.
>
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Tue, September 21, 2004 10:23 am, Michael McGrady said:
> > PC Leung wrote:
> >
> >>In the mailing list, I have read some people suggesting not to put
> >>business logics in Action class. Certainly, business logics should not
> >>be in JSP or Form class. Then where should the business logics be put?
> >>
> >>Thanks
> >>
> > A good answer to this question is impossible to give, PC, without
> > knowing your requirements.  There are some cases where the logic should
> > just be put in the Action class.  The important thing is to know the
> > issues and to do the right thing in your case.  The biggest issue,
> > determining whether you need to get outside your Action class, is
> > whether or not you need to decouple your business logic from your Action
> > class.
> >
> > If so, and this also depends upon what growth you envision, then you
> > need to do the sorts of things that people will recommend on this list.
> > But, you always have to know what the tune is as well as the lyrics, the
> > actual needs versus the technical options.
> >
> > Michael McGrady
> >
> >
> > -
> > 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]


This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Where to put the business logics?

2004-09-21 Thread Nicolas De Loof

In model !

Struts is a MVC framework without any 'M' support : you can use anything you want to 
build your model.


> In the mailing list, I have read some people suggesting not to put
> business logics in Action class. Certainly, business logics should not
> be in JSP or Form class. Then where should the business logics be put?
> 
> Thanks
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Assigning a DataSource to a Business Delegate on startup

2004-09-21 Thread Nicolas De Loof

Datasource support in struts is deprecated
JNDI is the J2EE compliant way to get Datasource, it is not tomcat dependant
It only requires to declare a resource-entry in your web.xml and to use your container 
configuration to link this to a
container-managed datasource

Nico.


> This is a nice solution, but I would like to use the DataSource
> configuration in struts-config.xml.
> I noticed that there is the "ConfigHelper.getDataSource()" method to get
> the default data source, but I want to use a DataSource that I mapped with
> a key.
> By the way, the solution above is not too tied to Tomcat? What if I want
> to distribute my application? Do I have to configure Tomcat on the other
> machine?
> Ciao
> Antonio Petrelli
>
> >
> >
> >
> > -Messaggio originale-
> > Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Inviato: martedì 21 settembre 2004 11.11
> > A: [EMAIL PROTECTED]
> > Oggetto: Assigning a DataSource to a Business Delegate on startup
> >
> >
> > Hello there,
> > is there a way I can assign a DataSource to a singleton object (i.e. a
> > Business Delegate) on startup? I know there is the "getDataSource"
> > protected method in Action, but I have to pass the DataSource itself on
> > each call of the delegate, or I have to check whether it has been
> > already passed or not. Maybe it could be done with a plugin. In this
> > case, is there already a package that I could use? And if not, how can I
> > access to a DataSource outside the Action class? Thanks in advance Ciao
> > Antonio Petrelli
> >
> >
> > -
> > 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]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Assigning a DataSource to a Business Delegate on startup

2004-09-21 Thread Nicolas De Loof


- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 21, 2004 11:31 AM
Subject: Re: Assigning a DataSource to a Business Delegate on startup


> > you can use JNDI to get a DataSource (if you use tomcat see tomcat
> > documentation in order to set the datasource).
> > Here an example code to use inside the singleton object:
> >
> > //Get DB from JNDI
> > try {
> > Context initCtx = new InitialContext();
> >   Context envCtx = (Context) initCtx.lookup("java:comp/env");
> >   DataSource dataSource = (DataSource)
> > envCtx.lookup("jdbc/DatabaseSource");
> >
> > } catch ( NamingException e ) {
> > //Handle Source Code Exception
> > }
> >
>
> This is a nice solution, but I would like to use the DataSource
> configuration in struts-config.xml.
> I noticed that there is the "ConfigHelper.getDataSource()" method to get
> the default data source, but I want to use a DataSource that I mapped with
> a key.
> By the way, the solution above is not too tied to Tomcat? What if I want
> to distribute my application? Do I have to configure Tomcat on the other
> machine?
> Ciao
> Antonio Petrelli
>
> >
> >
> >
> > -Messaggio originale-
> > Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Inviato: martedì 21 settembre 2004 11.11
> > A: [EMAIL PROTECTED]
> > Oggetto: Assigning a DataSource to a Business Delegate on startup
> >
> >
> > Hello there,
> > is there a way I can assign a DataSource to a singleton object (i.e. a
> > Business Delegate) on startup? I know there is the "getDataSource"
> > protected method in Action, but I have to pass the DataSource itself on
> > each call of the delegate, or I have to check whether it has been
> > already passed or not. Maybe it could be done with a plugin. In this
> > case, is there already a package that I could use? And if not, how can I
> > access to a DataSource outside the Action class? Thanks in advance Ciao
> > Antonio Petrelli
> >
> >
> > -
> > 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]
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: [ANNOUNCE] Struts 1.2.4 (General Availability) Released

2004-09-21 Thread Nicolas De Loof

Struts now uses tomcat-like version number, i.e. they're will be other 1.2.x struts 
releases if required by new bugs or
enhancements applied on this branch.

We use 1.2.x on new projects since 1.2.0 (test) has been released.

Nico.


> Hi,
>
> What is the difference between General Avaibility and Final Release.
> Is this new version suitable for starting new projects? Thanks
>
> Sincerely Onur
>
>
> On Tue, 21 Sep 2004 16:41:00 +0800, Nathan Coast <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > will the 1.2.4 jars & tlds be uploaded to the maven repos some time soon?
> >
> > where do they go?
> > http://www.apache.org/dist/java-repository/struts/jars/
> > or
> > http://www.ibiblio.org/maven/struts/jars/
> >
> > or is one a mirror of the other?
> >
> > thanks
> > Nathan
> >
> > Martin Cooper wrote:
> >
> > > The Struts team is pleased to announce the release of Struts 1.2.4 for
> > > General Availability. This release includes significant new
> > > functionality, as well as numerous fixes for bugs which were reported
> > > against the previous release, and supersedes the earlier 1.1 version as
> > > the latest official release of Struts from The Apache Software Foundation.
> > >
> > > The binary, source and library distributions are available from the
> > > Struts download page:
> > >
> > > http://struts.apache.org/download.cgi
> > >
> > > The Release Notes are available on the Struts web site at:
> > >
> > > http://struts.apache.org/userGuide/release-notes.html
> > >
> > > --
> > > Martin Cooper
> > >
> > > -
> > > 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]
> >
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Struts Taglib Question

2004-09-17 Thread Nicolas De Loof

JSTL :



Nico.


>
> Hello,
>
> Is there some sort of Struts tag that I can use to set the property of a
> bean?
>
> I have a small fragment that I want to look like this:
>
> 
> <%-- Set the event.date property on formBean to a default value --%>
> 
> 
> 
>
>
> It says that "if the event.date property on formBean is an empty String then
> set it to a default value."  I want to do it because I want the following
> select tag to have a specific default date selected instead of a random one
> being the deault select.
>
> I just want to be able to set the event.date property to a default value if
> it's already an empty String.  I'm looking for a tag to do it because this
> JSP page is generated via XSLT from another XML document, and there could be
> many bean properties that need to be defaulted.  I want to be able to
> preserve the use of the dot notation for nested parameters.
>
> Basically, I want a tag something like this:
>
> 
>
> Is there any way I can do this?
>
> Thanks!!
>
>
>
> This e-mail message is being sent solely for use by the intended recipient(s) and 
> may contain confidential
information.  Any unauthorized review, use, disclosure or distribution is prohibited.  
If you are not the intended
recipient, please contact the sender by phone or reply by e-mail, delete the original 
message and destroy all copies.
Thank you.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: ??? STRUTS 1.2.4 FEEDBACK ???

2004-09-16 Thread Nicolas De Loof

Works fine for me (on 2 apps : one using tomcat 4 other using tomcat 5)


> Has anyone tried out Struts 1.2.4?
> 
> If so can you feedback - positive or negative.
> 
> Niall
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Adding Tags Dynamically

2004-09-08 Thread Nicolas De Loof

- JSP tags are translated into java code during JSP compilation BEFORE any request 
processing.
- Javascript is executed by browser AFTER reponse has been built by server.

Tags must be 'statically' set in JSP

What do you ant to do ?

Nico.


> 
> Can I add struts tags dynamically after loading the page, using
> javascript probably???
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



wildcard mappings & tiles

2004-09-03 Thread Nicolas De Loof

Hello,

I've submitted a patch that extends use of wildcard mappings to tiles definitions. 
Please Wildcard users, could you try
it and give me feedback ?

You can download a patched struts build at 
http://loof.free.fr/struts-1.2.3-wildcardtiles.jar

Nico.



Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Upgrading from 1.1 to 1.2.2 (or 1.2.3 when available) - is it painful?

2004-09-02 Thread Nicolas De Loof

>From my experiments you only require to change taglibs URIs to new struts domain
http://struts.apache.org

You also have to update DTD refs in struts-config.xml and validation.xml

Nico.


> I was going to wait for a bit before I switched, but I have come across 
> a discrepancy in IE and firefox to do with the  tag.
> 
> I want to use the  tag but the action param didn't come in 
> 'till 1.2.
> 
> The question really is:  How painful is to to upgrade?  What is the bare 
> minimum I can get away with but still get the functionality?
> 
> Thanks,
> Tim
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: problem with jsp:include

2004-08-31 Thread Nicolas De Loof


taglibs must be set in the included JSP when using  tag : it includes JSP 
result, not JSP source code as
does <%@ include %>.

Nico.

- Original Message - 
From: "vineesh . kumar" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 31, 2004 11:17 AM
Subject: problem with jsp:include


hi all,

I had written the code in a.jsp like:


Accounts

Contacts

Deals

Tasks

Reports





and i included this page in another jsp file like
  
(offcourse with apropriate taglibs)

but the html:link tags are not rendered

y this is happening?
  Thanks in advance
vinu



Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Questions on logging

2004-08-31 Thread Nicolas De Loof


1. thread-safe require no variable (instance or static) that a thread may consider to
be the only one to update. Read-only member (as a logger instance) can be used safely.

2. you can configure log4j to add the thread id to the log, so that a simple grep will 
extract all logs for a request.

3. other classes can be used as you designed them. If they're creating a new instance 
for each request you will have no
thread-safe requirement to reach. If you use any singleton or static method you may 
have to take threads into account.

Nico.


> Hi
>
> I am in the stage of implementing logging in my struts application. I
> have been reading online but have some questions unanswered.
>
> 1. Action class should be thread-safe. Therefore no static variable, I
> should just use a non-static variable to hold my logger?
>
> 2. In a multi-user web application, how can I keep logs from the same
> class (same execution thread or same user request) stays together? I
> envision them to be all messy in the log file when there's multiple user
> requesting for the same action class.
>
> 3. About the thread safe issue with Actin class, that doesn't apply to
> the other classes that action execute right? Those are treated as normal
> java files.
>
> Thanks
>
> Sebastian
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



Re: Struts 1.2.x

2004-08-26 Thread Nicolas De Loof

General Availability:
http://struts.apache.org/acquiring.html


> Ted Husted wrote:
> 
> > GA grade
> 
> Pardon my ignorance; what does GA stand for?
> 
> I assume that it's not General Admission?
> 
> 
> Thanks,
> 
> Dave
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



  1   2   >