RE: About *.do

2004-11-11 Thread David G. Friedman
See section 5.4.1 and 5.4.2 on the Struts site for how to map your action
path such as "/login" to be either "/login.do" or "/do/login" on
http://struts.apache.org/userGuide/configuration.html

Again, the do (/do/* or *.do) part is customizable.  Some people posted
about messing with people's heads by mapping every action to *.aspx instead
of *.do to mess with their boss' head. :)

Regards,
David

-Original Message-
From: Koon Yue Lam [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 11, 2004 10:42 PM
To: Struts Users Mailing List
Subject: Re: About *.do


so I need to map all actions of my webapp?
something like
/login map to /login.do ???

Regards

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



Re: About *.do

2004-11-11 Thread Koon Yue Lam
ok, I got it, thanks a lot !

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



Re: About *.do

2004-11-11 Thread Koon Yue Lam
so I need to map all actions of my webapp?
something like 
/login map to /login.do ???

Regards

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



Re: A new paradigm of Struts development

2004-11-11 Thread Tak Yoshida
Craig McClanahan wrote in <[EMAIL PROTECTED]>
>> I think page-driven development frameworks would exacerbate this problem
>> unless they clarify with eloquence up-front how to make a clear
>> seperation of the POST processing from the page preparation required for
>> the next page.
>> 
>
>Yep, that is definitely a key point.  Here is why Shale's view
>controller helps you do that.  The key point is this:
>
>  The initialization code for any page (no matter how you got there)
>  goes in the prepare() method of the corresponding ViewController.
>
>The only thing you should do in the action method for processing a
>request is to perform the necessary business transaction (save a
>record to the database or whatever), then return the outcome code used
>for navigation.  The next page is responsible for taking care of
>itself.
>
>Simple enough?
>
I agree with Craig.
OzStruts does same thing for you with OzPage.prepareRequiredProperties()
even on the curent verion of Struts. then codes will be like what Craig 
mentioned above.

Tak

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



Re: contrib/struts-shale-mailreader

2004-11-11 Thread BaTien Duong
Craig McClanahan wrote:
And one more critical one ... by default, the build script assumes you
have JSF installed inside your container already.  If you don't add
the following line to build.properties:
 build.standalone=true
This is probably what's triggering your error.
 

Yes. This is the case for those who want to try.
Now i can take time to dig in a little deeper and may have some question 
about web.xml setting since my current working prototype uses myfaces + 
tiles + Spring.

Thanks Craig
BaTien
DBGROUPS
Craig
On Thu, 11 Nov 2004 14:42:30 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote:
 

There's another dependency when you try to compile
struts-shale-mailreader ... you have to have run the "dist" target on
the shared database code in "struts-examples/mailreader" first (along
with "struts-contrib/struts-shale" of course).
You will also need to make sure you've set up a build.properties file
that points at the dependencies ... in particular, define "jsf.home",
"jstl.home", "junit.home", and "server.home" appropriately.
Craig

On Thu, 11 Nov 2004 14:16:08 -0700, BaTien Duong
<[EMAIL PROTECTED]> wrote:
   

Hello Craig:
I downloaded struts-src-2004.tar.gz and try to get the
struts-shale-mailreader program to run. Here are some issues with the build:
   1) The struts-shale was built ok to get shale.jar
   2) The struts-shale-mailreader has issue at the docs target. so I
make the dist target depends only on the compile target and get the
successful built with the war file.
   3) Put the war file under tomcat, the example has exception due to
servlet exception. I checked the build file and correct the servlet path
(you have servlet-api .jar and reference to servlet.jar). I re build again.
   4) The example has exception of faces. Check its lib, there is no RI
faces. I copy MyFaces lib and impl in the example lib.
   5) Re run the example, exception is in the attached Standalone_log.
Hope you can quickly fix these issues and have it compiled with MyFaces
in the built. Please put it in nightly built. I still need to catch up
with sub version.
Thanks
BaTien
DBGROUPS
 


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


Re: JNDI

2004-11-11 Thread Jonathan Wright
Craig,

Thanks for the prompt reply. I have in the past set up DataSources in
Tomcat's server-config.xml. However, due to the nature of our production
environment I don't want to edit this file. It's relatively important that
my web apps are completely self contained.

Jonathan Wright

- Original Message -
From: "Craig McClanahan" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, November 12, 2004 11:57 AM
Subject: Re: JNDI


> On Fri, 12 Nov 2004 11:46:22 +1300, Jonathan Wright
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > Just a quick question about JNDI in a Struts setting. I want to reduce
the
> > dependencies between objects in my app. Some objects that are not
servlet
> > aware need access to the ServletContext and DataSources. However rather
than
> > complicating matters and increasing the number of arguments I need to
pass
> > around I'm thinking of putting references to DataSources and the
> > ServletContext into a JNDI context.
> >
> > Which JNDI SPI would you recommend for a simple object registry/store?
What
> > are the issues regarding the Referenceable interface?
>
> Why not use the JNDI naming context provided by your container?  You
> shouldn't have to be worried about implementing this -- just configure
> the JNDI resources that you want to make available to your
> application.
>
> For example, the instructions for using the naming context provided by
Tomcat:
>
>
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
>
> and specific info about using a data source provided by Tomcat:
>
>
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-how
to.html
>
> Other servers will have their own mechanisms for configuring these things.
>
> Craig
>
> -
> 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]



Re: JNDI

2004-11-11 Thread Craig McClanahan
On Fri, 12 Nov 2004 11:46:22 +1300, Jonathan Wright
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> Just a quick question about JNDI in a Struts setting. I want to reduce the
> dependencies between objects in my app. Some objects that are not servlet
> aware need access to the ServletContext and DataSources. However rather than
> complicating matters and increasing the number of arguments I need to pass
> around I'm thinking of putting references to DataSources and the
> ServletContext into a JNDI context.
> 
> Which JNDI SPI would you recommend for a simple object registry/store? What
> are the issues regarding the Referenceable interface?

Why not use the JNDI naming context provided by your container?  You
shouldn't have to be worried about implementing this -- just configure
the JNDI resources that you want to make available to your
application.

For example, the instructions for using the naming context provided by Tomcat:

  http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html

and specific info about using a data source provided by Tomcat:

  
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

Other servers will have their own mechanisms for configuring these things.

Craig

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



Re: Struts app to be passed a parameter (of some kind)

2004-11-11 Thread Craig McClanahan
On Thu, 11 Nov 2004 17:16:14 -0500, John Vincent
<[EMAIL PROTECTED]> wrote:
> 
> On Tomcat, do you configure the app xml files? Or is it configured at the
> server level?

Both are supported.  For more info start at:

  http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/index.html

and, in particular, look at the  element.  This element can
either be buried inside a server.xml file, or in a separate
configuration file under the server's configuration directory, or
included in the META-INF directory of a WAR.

> 
> In other words, do I need to check the app server doc or the weblogic*.xml
> or sun-*.xml files doc for the Struts app?

None of this has anything at all to do with Struts ... it's going to
be some sort of documentation on your app server if it is possible at
all.

> 
> John
> 

Craig

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



JNDI

2004-11-11 Thread Jonathan Wright
Hi,

Just a quick question about JNDI in a Struts setting. I want to reduce the
dependencies between objects in my app. Some objects that are not servlet
aware need access to the ServletContext and DataSources. However rather than
complicating matters and increasing the number of arguments I need to pass
around I'm thinking of putting references to DataSources and the
ServletContext into a JNDI context.

Which JNDI SPI would you recommend for a simple object registry/store? What
are the issues regarding the Referenceable interface?

Thanks in advance.

Jonathan Wright


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



Re: contrib/struts-shale-mailreader

2004-11-11 Thread Craig McClanahan
And one more critical one ... by default, the build script assumes you
have JSF installed inside your container already.  If you don't add
the following line to build.properties:

  build.standalone=true

This is probably what's triggering your error.

Craig


On Thu, 11 Nov 2004 14:42:30 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> There's another dependency when you try to compile
> struts-shale-mailreader ... you have to have run the "dist" target on
> the shared database code in "struts-examples/mailreader" first (along
> with "struts-contrib/struts-shale" of course).
> 
> You will also need to make sure you've set up a build.properties file
> that points at the dependencies ... in particular, define "jsf.home",
> "jstl.home", "junit.home", and "server.home" appropriately.
> 
> Craig
> 
> 
> 
> 
> On Thu, 11 Nov 2004 14:16:08 -0700, BaTien Duong
> <[EMAIL PROTECTED]> wrote:
> > Hello Craig:
> >
> > I downloaded struts-src-2004.tar.gz and try to get the
> > struts-shale-mailreader program to run. Here are some issues with the build:
> > 1) The struts-shale was built ok to get shale.jar
> > 2) The struts-shale-mailreader has issue at the docs target. so I
> > make the dist target depends only on the compile target and get the
> > successful built with the war file.
> > 3) Put the war file under tomcat, the example has exception due to
> > servlet exception. I checked the build file and correct the servlet path
> > (you have servlet-api .jar and reference to servlet.jar). I re build again.
> > 4) The example has exception of faces. Check its lib, there is no RI
> > faces. I copy MyFaces lib and impl in the example lib.
> > 5) Re run the example, exception is in the attached Standalone_log.
> > Hope you can quickly fix these issues and have it compiled with MyFaces
> > in the built. Please put it in nightly built. I still need to catch up
> > with sub version.
> >
> > Thanks
> >
> > BaTien
> > DBGROUPS
> >
> > 
> > 2004-11-11 13:40:58 StandardContext[]Loading root WebApplicationContext
> > 2004-11-11 13:41:04 StandardContext[/struts-shale-mailreader]Exception 
> > starting filter shale
> > java.lang.IllegalStateException: No Factories configured for this 
> > Application - typically this is because a context listener is not setup in 
> > your web.xml.
> > A typical config looks like this;
> > 
> >   
> > net.sourceforge.myfaces.webapp.StartupServletContextListener
> > 
> >
> > at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:98)
> > at 
> > org.apache.shale.faces.ShaleApplicationFilter.getLifecycle(ShaleApplicationFilter.java:146)
> > at 
> > org.apache.shale.faces.ShaleApplicationFilter.init(ShaleApplicationFilter.java:124)
> > at 
> > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
> > at 
> > org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
> > at 
> > org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:79)
> > at 
> > org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3698)
> > at 
> > org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
> > at 
> > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
> > at 
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
> > at 
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
> > at 
> > org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
> > at 
> > org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
> > at 
> > org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
> > at 
> > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
> > at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
> > at 
> > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
> > at 
> > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> > at 
> > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
> > at 
> > org.apache.catalina.core.StandardHost.start(StandardHo

Re: contrib/struts-shale-mailreader

2004-11-11 Thread Craig McClanahan
There's another dependency when you try to compile
struts-shale-mailreader ... you have to have run the "dist" target on
the shared database code in "struts-examples/mailreader" first (along
with "struts-contrib/struts-shale" of course).

You will also need to make sure you've set up a build.properties file
that points at the dependencies ... in particular, define "jsf.home",
"jstl.home", "junit.home", and "server.home" appropriately.

Craig


On Thu, 11 Nov 2004 14:16:08 -0700, BaTien Duong
<[EMAIL PROTECTED]> wrote:
> Hello Craig:
> 
> I downloaded struts-src-2004.tar.gz and try to get the
> struts-shale-mailreader program to run. Here are some issues with the build:
> 1) The struts-shale was built ok to get shale.jar
> 2) The struts-shale-mailreader has issue at the docs target. so I
> make the dist target depends only on the compile target and get the
> successful built with the war file.
> 3) Put the war file under tomcat, the example has exception due to
> servlet exception. I checked the build file and correct the servlet path
> (you have servlet-api .jar and reference to servlet.jar). I re build again.
> 4) The example has exception of faces. Check its lib, there is no RI
> faces. I copy MyFaces lib and impl in the example lib.
> 5) Re run the example, exception is in the attached Standalone_log.
> Hope you can quickly fix these issues and have it compiled with MyFaces
> in the built. Please put it in nightly built. I still need to catch up
> with sub version.
> 
> Thanks
> 
> BaTien
> DBGROUPS
> 
> 
> 2004-11-11 13:40:58 StandardContext[]Loading root WebApplicationContext
> 2004-11-11 13:41:04 StandardContext[/struts-shale-mailreader]Exception 
> starting filter shale
> java.lang.IllegalStateException: No Factories configured for this Application 
> - typically this is because a context listener is not setup in your web.xml.
> A typical config looks like this;
> 
>   
> net.sourceforge.myfaces.webapp.StartupServletContextListener
> 
> 
> at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:98)
> at 
> org.apache.shale.faces.ShaleApplicationFilter.getLifecycle(ShaleApplicationFilter.java:146)
> at 
> org.apache.shale.faces.ShaleApplicationFilter.init(ShaleApplicationFilter.java:124)
> at 
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
> at 
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
> at 
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:79)
> at 
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3698)
> at 
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
> at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
> at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
> at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
> at 
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
> at 
> org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
> at 
> org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
> at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
> at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
> at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
> at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
> at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
> at 
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
> at 
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
> at 
> org.apache.catalina.core.StandardService.start(StandardService.java:480)
> at 
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.a

Re: Struts app to be passed a parameter (of some kind)

2004-11-11 Thread John Vincent
App Server is WebLogic 8.1. 

I can try SunOne Application Server also.

On Tomcat, do you configure the app xml files? Or is it configured at the 
server level?

In other words, do I need to check the app server doc or the weblogic*.xml 
or sun-*.xml files doc for the Struts app?

John







Craig McClanahan <[EMAIL PROTECTED]> 
11/11/2004 03:27 PM
Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>


To
Struts Users Mailing List <[EMAIL PROTECTED]>
cc

Subject
Re: Struts app to be passed a parameter (of some kind)






What app server are you running?  The setup to accomplish this is
going to be specific to that app server, if it is possible at all. 
The example I gave, as I stated in the response, was specific to using
Tomcat.

Craig


On Thu, 11 Nov 2004 11:03:45 -0500, John Vincent
<[EMAIL PROTECTED]> wrote:
> I am rather confused here.
> 
> application.xml
> 
> 
>   Abc
>   abc
>   
> 
>   warapp
>   jv1
> 
>   
> 
> 
> allows only one context root.
> 
> web.xml
> 
> 
> action
> org.apache.struts.action.ActionServlet
> .
>   
> 
>   
> action
> *.do
>   
> 
> gives nothing.
> 
> I do not see how I can set multiple URLs for the same Struts app.
> 
> Craig McClanahan <[EMAIL PROTECTED]>
> 11/11/2004 09:33 AM
> Please respond to
> "Struts Users Mailing List" <[EMAIL PROTECTED]>
> 
> To
> Struts Users Mailing List <[EMAIL PROTECTED]>
> cc
> 
> Subject
> Re: Struts app to be passed a parameter (of some kind)
> 
> 
> 
> 
> On Thu, 11 Nov 2004 08:14:12 -0500, John Vincent
> <[EMAIL PROTECTED]> wrote:
> >  Need one Struts app, but must have multiple URLs.
> >
> > Thus
> > http://www.jv.com/company1
> > http://www.jv.com/company2
> 
> Why not just configure your servlet container to treat both context
> paths as the same app?  For example, in Tomcat, you can create two
>  elements with different paths but the same document base
> directory.
> 
> >
> > actually start the same Struts app, say
> >
> > http://www.jv.com/myApp
> >
> > but must "pass" something into the Struts app so that it knows who, or
> > rather, which URL invoked it.
> >
> 
> The request.getContextPath() method would tell your application which
> way it was invoked.
> 
> Craig
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> NOTICE:  This communication may contain confidential, proprietary or
> legally privileged information. It is intended only for the person(s) to
> whom it is addressed.  If you are not an intended recipient, you may not
> use, read, retransmit, disseminate or take any action in reliance upon 
it.
> Please notify the sender that you have received it in error and
> immediately delete the entire communication, including any attachments.
> Towers Perrin does not encrypt and cannot ensure the confidentiality or
> integrity of external e-mail communications and, therefore, cannot be
> responsible for any unauthorized access, disclosure, use or tampering 
that
> may occur during transmission.  This communication is not intended to
> create or modify any obligation, contract or warranty of Towers Perrin,
> unless the firm clearly expresses such an intent.
> 
>

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







NOTICE:  This communication may contain confidential, proprietary or 
legally privileged information. It is intended only for the person(s) to 
whom it is addressed.  If you are not an intended recipient, you may not 
use, read, retransmit, disseminate or take any action in reliance upon it. 
Please notify the sender that you have received it in error and 
immediately delete the entire communication, including any attachments. 
Towers Perrin does not encrypt and cannot ensure the confidentiality or 
integrity of external e-mail communications and, therefore, cannot be 
responsible for any unauthorized access, disclosure, use or tampering that 
may occur during transmission.  This communication is not intended to 
create or modify any obligation, contract or warranty of Towers Perrin, 
unless the firm clearly expresses such an intent.


Re: contrib/struts-shale-mailreader

2004-11-11 Thread BaTien Duong
Hello Craig:
I downloaded struts-src-2004.tar.gz and try to get the 
struts-shale-mailreader program to run. Here are some issues with the build:
   1) The struts-shale was built ok to get shale.jar
   2) The struts-shale-mailreader has issue at the docs target. so I 
make the dist target depends only on the compile target and get the 
successful built with the war file.
   3) Put the war file under tomcat, the example has exception due to 
servlet exception. I checked the build file and correct the servlet path 
(you have servlet-api .jar and reference to servlet.jar). I re build again.
   4) The example has exception of faces. Check its lib, there is no RI 
faces. I copy MyFaces lib and impl in the example lib.
   5) Re run the example, exception is in the attached Standalone_log. 
Hope you can quickly fix these issues and have it compiled with MyFaces 
in the built. Please put it in nightly built. I still need to catch up 
with sub version.

Thanks
BaTien
DBGROUPS

2004-11-11 13:40:58 StandardContext[]Loading root WebApplicationContext
2004-11-11 13:41:04 StandardContext[/struts-shale-mailreader]Exception starting 
filter shale
java.lang.IllegalStateException: No Factories configured for this Application - 
typically this is because a context listener is not setup in your web.xml.
A typical config looks like this;

  
net.sourceforge.myfaces.webapp.StartupServletContextListener


at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:98)
at 
org.apache.shale.faces.ShaleApplicationFilter.getLifecycle(ShaleApplicationFilter.java:146)
at 
org.apache.shale.faces.ShaleApplicationFilter.init(ShaleApplicationFilter.java:124)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
at 
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:79)
at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3698)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at 
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
at 
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:480)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

2004-11-11 14:07:42 StandardContext[]Closing root WebApplicationContext

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

Re: contrib/struts-shale-mailreader

2004-11-11 Thread Craig McClanahan
On Thu, 11 Nov 2004 08:15:00 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Thanks, Craig,
> 
> This allows me to do what I needed to do without taking the day to
> learn this new stuff about subversion right away.
> 
> I assume that the CVS will permanently be out of date?  Why not scrap
> it?  I thought the blurb on this stuff gave the impression that the
> CVS would be kept up to date.

When we switched to Subversion, the CVS repository was frozen as of
that particular date (i.e. anyone who tries to do a commit to that
repository will get a failure).  That being said, there are thousands
of links into that repository (typically through the viewcvs portal)
that would suddenly break if the old repository was physically removed
-- that doesn't seem like a user friendly thing to do, so we didn't.

> 
> Anyone have a suggestion of a quick tutorial on subversion?
> 

For general SVN background, start at 
and read the walk-through chapters of the book -- it's a pretty good
introduction.  For those familiar with CVS, there's even a specialized
chapter on mapping the "CVS way" to the "SVN way" which I found very
helpful.

> Jack

Craig

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



Re: Struts app to be passed a parameter (of some kind)

2004-11-11 Thread Craig McClanahan
What app server are you running?  The setup to accomplish this is
going to be specific to that app server, if it is possible at all. 
The example I gave, as I stated in the response, was specific to using
Tomcat.

Craig


On Thu, 11 Nov 2004 11:03:45 -0500, John Vincent
<[EMAIL PROTECTED]> wrote:
> I am rather confused here.
> 
> application.xml
> 
> 
>   Abc
>   abc
>   
> 
>   warapp
>   jv1
> 
>   
> 
> 
> allows only one context root.
> 
> web.xml
> 
> 
> action
> org.apache.struts.action.ActionServlet
> .
>   
> 
>   
> action
> *.do
>   
> 
> gives nothing.
> 
> I do not see how I can set multiple URLs for the same Struts app.
> 
> Craig McClanahan <[EMAIL PROTECTED]>
> 11/11/2004 09:33 AM
> Please respond to
> "Struts Users Mailing List" <[EMAIL PROTECTED]>
> 
> To
> Struts Users Mailing List <[EMAIL PROTECTED]>
> cc
> 
> Subject
> Re: Struts app to be passed a parameter (of some kind)
> 
> 
> 
> 
> On Thu, 11 Nov 2004 08:14:12 -0500, John Vincent
> <[EMAIL PROTECTED]> wrote:
> >  Need one Struts app, but must have multiple URLs.
> >
> > Thus
> > http://www.jv.com/company1
> > http://www.jv.com/company2
> 
> Why not just configure your servlet container to treat both context
> paths as the same app?  For example, in Tomcat, you can create two
>  elements with different paths but the same document base
> directory.
> 
> >
> > actually start the same Struts app, say
> >
> > http://www.jv.com/myApp
> >
> > but must "pass" something into the Struts app so that it knows who, or
> > rather, which URL invoked it.
> >
> 
> The request.getContextPath() method would tell your application which
> way it was invoked.
> 
> Craig
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> NOTICE:  This communication may contain confidential, proprietary or
> legally privileged information. It is intended only for the person(s) to
> whom it is addressed.  If you are not an intended recipient, you may not
> use, read, retransmit, disseminate or take any action in reliance upon it.
> Please notify the sender that you have received it in error and
> immediately delete the entire communication, including any attachments.
> Towers Perrin does not encrypt and cannot ensure the confidentiality or
> integrity of external e-mail communications and, therefore, cannot be
> responsible for any unauthorized access, disclosure, use or tampering that
> may occur during transmission.  This communication is not intended to
> create or modify any obligation, contract or warranty of Towers Perrin,
> unless the firm clearly expresses such an intent.
> 
>

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



Re: Does Javascript Validation work with mapping path as key?

2004-11-11 Thread Matt Bathje
Niall - some comments inline and other stuff below...
Niall Pemberton wrote:
I'm trying to get javascript validation working using the action mapping's
path as the validation key with Struts 1.2.4.
I don't usually use js (I'm trying to test something) but the generated
javascript doesn't appear to work - from where I'm sitting it looks broken -
can anyone confirm if they have it working or not?
I have the following mapping in my struts config:

 ...

And my jsp has the following form & javascript tags:

 ...


There are three fields defined as 'required' and it genertes a javascript
function called houseTypeAdd_required () - however when I put an alert in
the required.js script it seems to be trying to call function named after
the form rather than the mapping (i.e. myForm_required()) - so its using the
form name rather than the mappings path.
I'm not sure what you are getting at here - from what I can tell from 
the code you posted, the form name and mapping name are the same, so 
either way it shouldn't make a difference (But see my comments below as 
well...)

Where do you expect myForm to come from (or not come from?)
What happens when the javascript validation kicks in? Javascript errors? 
Java errors? Nothing?

Can anyone see what I'm doing wrong or confirm it doesn't work? Below is
relevant detail of the javascript being generated
Thanks
Niall
function validateHouseTypeAdd(form) {
   if (bCancel)
   return true;
   else
   var formValidationResult;
   formValidationResult = validateRequired(form);
   return (formValidationResult == 1);
}
function houseTypeAdd_required () {
   this.a0 = new Array("housetype_code", "[Bundle 1] custom {0} is
required.", new Function ("varName", " return this[varName];"));
   this.a1 = new Array("housetype_short_desc", "[Bundle 1] custom [Bundle 2]
short-desc-msg is required.", new Function ("varName", " return
this[varName];"));
   this.a2 = new Array("housetype_desc", "[Bundle 1] custom [Bundle 1]
description-msg is required.", new Function ("varName", " return
this[varName];"));
}
function validateRequired(form) {
   var isValid = true;
   var focusField = null;
   var i = 0;
   var fields = new Array();
   var formName = form.getAttributeNode("name");
   alert("validateRequired(form): about to call method: " + formName.value +
"_required()");
   oRequired = eval('new ' + formName.value + '_required()');
   for (x in oRequired) {

1.2.4 does indeed always use the form name instead of possibly using the 
action mapping name, check out bugzilla report:
http://issues.apache.org/bugzilla/show_bug.cgi?id=29796
for the bug and reasoning behind the patch.

I coded/tested the patch for that, and it worked fine for me then. I 
also use it on some test sites, and it was working fine for me the last 
time I used it there a week or so ago.

Is it possible we can see the generated html form tag, as well as the 
form bean definition and validator xml definition? I think it would help 
in solving this. Also, a description of exactly what you are seeing 
error wise (and even in your alert) would be helpful.


Matt

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


Re: Does Javascript Validation work with mapping path as key?

2004-11-11 Thread bmf5




One other thing to check, I think name="myForm" has to be type of
ValidatorActionForm, not the usual ValidatorForm.

Bart







   
 "Niall Pemberton" 
   To 
   "Struts Users Mailing List" 
 11/11/2004 02:23  <[EMAIL PROTECTED]>
 PM cc 
   
   Subject 
 Please respond to Does Javascript Validation work 
   "Struts Users   with mapping path as key?   
   Mailing List"   
 <[EMAIL PROTECTED] 
  he.org>  
   
   
   




I'm trying to get javascript validation working using the action mapping's
path as the validation key with Struts 1.2.4.

I don't usually use js (I'm trying to test something) but the generated
javascript doesn't appear to work - from where I'm sitting it looks broken
-
can anyone confirm if they have it working or not?

I have the following mapping in my struts config:


 ...


And my jsp has the following form & javascript tags:


 ...



There are three fields defined as 'required' and it genertes a javascript
function called houseTypeAdd_required () - however when I put an alert in
the required.js script it seems to be trying to call function named after
the form rather than the mapping (i.e. myForm_required()) - so its using
the
form name rather than the mappings path.

Can anyone see what I'm doing wrong or confirm it doesn't work? Below is
relevant detail of the javascript being generated

Thanks

Niall

function validateHouseTypeAdd(form) {
   if (bCancel)
   return true;
   else
   var formValidationResult;
   formValidationResult = validateRequired(form);
   return (formValidationResult == 1);
}
function houseTypeAdd_required () {
   this.a0 = new Array("housetype_code", "[Bundle 1] custom {0} is
required.", new Function ("varName", " return this[varName];"));
   this.a1 = new Array("housetype_short_desc", "[Bundle 1] custom [Bundle
2]
short-desc-msg is required.", new Function ("varName", " return
this[varName];"));
   this.a2 = new Array("housetype_desc", "[Bundle 1] custom [Bundle 1]
description-msg is required.", new Function ("varName", " return
this[varName];"));
}
function validateRequired(form) {
   var isValid = true;
   var focusField = null;
   var i = 0;
   var fields = new Array();
   var formName = form.getAttributeNode("name");
   alert("validateRequired(form): about to call method: " + formName.value
+
"_required()");
   oRequired = eval('new ' + formName.value + '_required()');
   for (x in oRequired) {
   ...



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



Re: [ANN] Eclipse - Struts,Tiles & JSP, FREE Trial

2004-11-11 Thread peter maas
On top of the java pages by sun:
http://java.sun.com/j2se/1.5.0/download.jsp

has been out for a while...
Rolf C. Graulich wrote:
Am Dienstag, 26. Oktober 2004 19:09 schrieb Carlos Chang:
 

[...]NitroX Advertising[...]
   

I just downloaded the Trial, but it say during installation on a Suse 
Linux 9.1, that it needs the Java SDK greater than 1.5. So what does this 
mean? I do not know such a relase of the Java SDK. It doen't install 
cause my SDK is only 1.4.x. Where ist this Version available?

Ist there an Example like the one shown in your video available?
(sorry, if this might be an OT posting!)
 


--
Peter Maas
Application Architect / Streaming
Noterik Multimedia BV
Prins Hendrikkade 120
1011 AM Amsterdam
The Netherlands
Tel: +31 (0)205929966
Fax: +31 (0)204688405
Gsm: +31 (0)624687952
Web: www.noterik.nl
--
Take a look at our streaming solutions: 
http://www.streamedit.com/demo.html

Get firefox: 
http://www.mozilla.org/products/firefox/
---

:wq!

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


Does Javascript Validation work with mapping path as key?

2004-11-11 Thread Niall Pemberton
I'm trying to get javascript validation working using the action mapping's
path as the validation key with Struts 1.2.4.

I don't usually use js (I'm trying to test something) but the generated
javascript doesn't appear to work - from where I'm sitting it looks broken -
can anyone confirm if they have it working or not?

I have the following mapping in my struts config:


 ...


And my jsp has the following form & javascript tags:


 ...



There are three fields defined as 'required' and it genertes a javascript
function called houseTypeAdd_required () - however when I put an alert in
the required.js script it seems to be trying to call function named after
the form rather than the mapping (i.e. myForm_required()) - so its using the
form name rather than the mappings path.

Can anyone see what I'm doing wrong or confirm it doesn't work? Below is
relevant detail of the javascript being generated

Thanks

Niall

function validateHouseTypeAdd(form) {
   if (bCancel)
   return true;
   else
   var formValidationResult;
   formValidationResult = validateRequired(form);
   return (formValidationResult == 1);
}
function houseTypeAdd_required () {
   this.a0 = new Array("housetype_code", "[Bundle 1] custom {0} is
required.", new Function ("varName", " return this[varName];"));
   this.a1 = new Array("housetype_short_desc", "[Bundle 1] custom [Bundle 2]
short-desc-msg is required.", new Function ("varName", " return
this[varName];"));
   this.a2 = new Array("housetype_desc", "[Bundle 1] custom [Bundle 1]
description-msg is required.", new Function ("varName", " return
this[varName];"));
}
function validateRequired(form) {
   var isValid = true;
   var focusField = null;
   var i = 0;
   var fields = new Array();
   var formName = form.getAttributeNode("name");
   alert("validateRequired(form): about to call method: " + formName.value +
"_required()");
   oRequired = eval('new ' + formName.value + '_required()');
   for (x in oRequired) {
   ...



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



Re: [ANN] Eclipse - Struts,Tiles & JSP, FREE Trial

2004-11-11 Thread Rolf C. Graulich
Am Dienstag, 26. Oktober 2004 19:09 schrieb Carlos Chang:
> [...]NitroX Advertising[...]
> 
I just downloaded the Trial, but it say during installation on a Suse 
Linux 9.1, that it needs the Java SDK greater than 1.5. So what does this 
mean? I do not know such a relase of the Java SDK. It doen't install 
cause my SDK is only 1.4.x. Where ist this Version available?

Ist there an Example like the one shown in your video available?

(sorry, if this might be an OT posting!)
-- 
 
GrÃÃe, Rolf

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



Using Forward and Include using RequestProcessor

2004-11-11 Thread Sanjay Choudhary
On Fri, 5 Nov 2004 10:49:25 -0800, Sanjay Choudhary
<[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I have an application which contains 100+ jsp's.  Use case is to
> inject the Javascript conditionally into the JSP's.  Condition is - If
> a cookie is present in the request, inject the Javascript else leave
> it alone.
>
> I started with a simple struts example project for the proof of
> concept.  I thought of a Servlet Filter and I created a filter as
> below
>
> import java.io.IOException;
>
> import javax.servlet.Filter;
> import javax.servlet.FilterChain;
> import javax.servlet.FilterConfig;
> import javax.servlet.RequestDispatcher;
> import javax.servlet.ServletException;
> import javax.servlet.ServletRequest;
> import javax.servlet.ServletResponse;
> import javax.servlet.http.Cookie;
> import javax.servlet.http.HttpServletRequest;
>
> public class SecurePageFilter implements Filter {
>private static final String SECURITY_COOKIE = "ObSSOCookie";
>private static final String SECURITY_JS = "/check.js";
>
>public void init(FilterConfig filterConfig) throws ServletException {
>}
>
>public void destroy() {
>}
>
>public void doFilter(
>ServletRequest oRequest,
>ServletResponse oResponse,
>FilterChain oFilterChain)
>throws IOException, ServletException {
>
>oFilterChain.doFilter(oRequest, oResponse);
>
>HttpServletRequest woRequest = (HttpServletRequest) oRequest;
>Cookie[] aoCookies = woRequest.getCookies();
>String strUrl = woRequest.getRequestURI();
>
>if (strUrl != null
>&& strUrl.endsWith("deleteCookie.jsp")
>|| aoCookies == null)
>return;
>
>for (int i = 0; i < aoCookies.length; i++) {
>Cookie oCookie = aoCookies[i];
>
>if (oCookie.getName().equals(SECURITY_COOKIE)) {
>String strValue = oCookie.getValue();
>if (strValue != null && strValue.length() > 0) {
>RequestDispatcher rd =
> woRequest.getRequestDispatcher(SECURITY_JS);
>rd.include(oRequest, oResponse);
>oResponse.flushBuffer();
>return;
>}
>}
>}
>return;
>} // doFilter
>
> } // SecurePageFilter
>
> My filter is mapped to (*.jsp and *.do) in the web.xml.
>
> This works fine if I have a URI as
> http://localhost:9080/struts-example/welcome.jsp
>
> But this doesn't work if I use the URL
> http://localhost:9080/struts-example/welcome.do
>
> To explore more I downloaded Struts 1.2 source and took a look in
> RequestDispatcher class --> processForward(..) , processInclude(..),
> doForward(..) and doInclude(..) methods.  And off course, process(..)
> method. In the process method , if request is forwarded using the
> RequestDispatcher, which is normally the case in *.do types URI's,
> control is returned back to the servlet without processing the
> 'processInclude'.  I further extended the RequestDispatcher class and
> implemented my own doForward method. This is more or less same as
> Struts implementation but also calls includes. Code is as below :-
>protected void doForward(
>String uri,
>HttpServletRequest request,
>HttpServletResponse response)
>throws IOException, ServletException {
>
>// Unwrap the multipart request, if there is one.
>if (request instanceof MultipartRequestWrapper) {
>request = ((MultipartRequestWrapper) request).getRequest();
>}
>
>RequestDispatcher rd = getServletContext().getRequestDispatcher(uri);
>if (rd == null) {
>response.sendError(
>HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
>getInternal().getMessage("requestDispatcher", uri));
>return;
>}
>rd.forward(request, response);
>   doIncludeJS(request,response);
>}
>
>protected void doIncludeJS(
>HttpServletRequest request,
>HttpServletResponse response)
>throws IOException, ServletException {
>Cookie[] aoCookies = request.getCookies();
>String strUrl = request.getRequestURI();
>
>if (strUrl != null
>&& strUrl.endsWith("deleteCookie.jsp")
>|| aoCookies == null)
>return;
>
>for (int i = 0; i < aoCookies.length; i++) {
>Cookie oCookie = aoCookies[i];
>
>if (oCookie.getName().equals(SECURITY_COOKIE)) {
>String strValue = oCookie.getValue();
>if (strValue != null && strValue.length() > 0) {
>doInclude(SECURITY_JS,request, 
> response);
>break;
>}
>}
>}
>return;
>}
>
> Still to my surprise, JS file did not get injected in the response.( I
> debugged the application do ensure that doInclude(..) method is
> called)
>
> [Q1] - Can we use RequestDis

RE: how to replace return in a string while use nested:write and bean:write

2004-11-11 Thread Shen, Lei

Thanks for your hint.

Essentially I want nest:write and bean:write to smart enough to
convert "ab
c" to "ab\nc" byitself.

nest:write is already be able to convert < to < if you set filter=true.
I am trying to find something similar to convert real return to \n.
I am hoping the convertion list is configurable somewhere.

Lei

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 11, 2004 1:16 PM
To: Struts Users Mailing List
Subject: Re: how to replace return in a string while use nested:write
and bean:write


alert("this message\nwill appear on two lines");

Does that help?

Erik

Shen, Lei wrote:

>Hello, all:
>
>
>I have some code like this:
>
>   data = use bean:write or nested:write here
>   alert(data);
>
>
>
>The problem is that javascript does not allow:
>
>   data ="ab
>   c";
>
>How to replace return in a string while use nested:write and bean:write 
>automatically?
>
>Thanks
>Lei
>
>-
>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]



Re: how to replace return in a string while use nested:write and bean:write

2004-11-11 Thread Erik Weber
alert("this message\nwill appear on two lines");
Does that help?
Erik
Shen, Lei wrote:
Hello, all:
I have some code like this:

data = use bean:write or nested:write here
alert(data);

The problem is that javascript does not allow:
data ="ab
c";
How to replace return in a string while use nested:write and bean:write 
automatically?
Thanks
Lei
-
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]


how to replace return in a string while use nested:write and bean:write

2004-11-11 Thread Shen, Lei


Hello, all:


I have some code like this:

data = use bean:write or nested:write here
alert(data);



The problem is that javascript does not allow:

data ="ab
c";

How to replace return in a string while use nested:write and bean:write 
automatically?

Thanks
Lei

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



RE: session variable in struts

2004-11-11 Thread Daniel Perry
Its the same in struts as in servlets!

The execute method of Action is passes an HttpServletRequest.

Daniel.


> -Original Message-
> From: Milson Fredy Cardona Echeverri [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 17:26
> To: [EMAIL PROTECTED]
> Subject: session variable in struts
>
>
> hi friends
>
> i want to declare a session variable in an action class.
>
> I could to solve it in a servlet class :
> HttpSession session = request.getSession();
> session.setAttribute("variable name","value");
>
> but in struts ¿how do i do it?
>
> thanks in advance
>
> _
> Charla con tus amigos en línea mediante MSN Messenger:
> http://messenger.latam.msn.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]



Re: A new paradigm of Struts development

2004-11-11 Thread Vic
Craig McClanahan wrote:

Struts needs to do something useful in the *application controller*
tier ... the view has been done.
 
Struts is already proved most useful for coming on 5 years and will 
continue to have 
https://equinox.dev.java.net/framework-comparison/WebFrameworks.pdf
pg 21.  )
It also supports many views other than JSP such as Velocity and is view 
agnostic.

I myself don't see that "the view has been done" but don't mind to be 
proved wrong.

This is a bit like jarkara logging. There is logging that comes w/ JDK, 
but people try it and go back to jakarta's logging. This has been 
happing for years and is corporate standard practice.

As far as "application controller", in my world of RiA, say Swing MVC 
Application, my scratch for "Struts" is a disptacher to service request 
coming from JDNC applications. Even w/ "appliction controller" in 
"Swing" I still have a use for Struts.

Jumping ahead, JSF markets well, but even if there was no Struts I do 
not think it's production penetration would be high relative to 
alternatives, but I could be wrong.

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


session variable in struts

2004-11-11 Thread Milson Fredy Cardona Echeverri
hi friends
i want to declare a session variable in an action class.
I could to solve it in a servlet class :
HttpSession session = request.getSession();
session.setAttribute("variable name","value");
but in struts ¿how do i do it?
thanks in advance
_
Charla con tus amigos en línea mediante MSN Messenger: 
http://messenger.latam.msn.com/

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


Re: contrib/struts-shale-mailreader

2004-11-11 Thread Niall Pemberton
I'm using TortoiseSVN - which is really straight forward for any one in a
windoze environment (expecially if you've used TortoiseCVS!):

Its available here:

http://tortoisesvn.tigris.org/

Once you install it theres a pretty reasonable help file to guide your
through the basics

Niall

- Original Message - 
From: "Hubert Rabago" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Dakota Jack"
<[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 4:17 PM
Subject: Re: contrib/struts-shale-mailreader


> Mike, there's http://wiki.apache.org/struts/StrutsMaintenanceSvn and
> that also includes a link to the Subversion Red Book.  If you find
> other ones, could you share by either responding to this thread or
> posting on the wiki?  Thanks.
>
> Hubert
>
> On Thu, 11 Nov 2004 08:15:00 -0800, Dakota Jack <[EMAIL PROTECTED]>
wrote:
> > Thanks, Craig,
> >
> > This allows me to do what I needed to do without taking the day to
> > learn this new stuff about subversion right away.
> >
> > I assume that the CVS will permanently be out of date?  Why not scrap
> > it?  I thought the blurb on this stuff gave the impression that the
> > CVS would be kept up to date.
> >
> > Anyone have a suggestion of a quick tutorial on subversion?
> >
> > Jack
> >
> >
> >
> >
> > On Thu, 11 Nov 2004 06:35:07 -0800, Craig McClanahan
<[EMAIL PROTECTED]> wrote:
> > > You can also get nightly snapshots of the entire Struts SVN repository
from:
> > >
> > >   http://cvs.apache.org/builds/jakarta-struts/nightly/src/
> > >
> > > Craig
> > >
> > >
> > >
> > >
> > > On Thu, 11 Nov 2004 21:40:46 +0800, Peng Tuck
<[EMAIL PROTECTED]> wrote:
> > > > Probably because it's in svn ? Well the link from theserverside.com
> > > > seems to say so. Anyway
> > > > you can read the proposal here:
> > > >
http://svn.apache.org/viewcvs.cgi/*checkout*/struts/trunk/contrib/struts-shale/README.html
> > > >
> > > >
> > > >
> > > > Dakota Jack wrote:
> > > >
> > > > >I got the latest CVS using a command line for jakarta-struts but it
> > > > >did not contain the folder contrib/struts-shale-mailreader which I
> > > > >expected based on a recommendation by Craig.  Is the CVS available
> > > > >from:
> > > > >
> > > > >
> > > > >
> > > > >cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout
jakarta-struts
> > > > >
> > > > >
> > > > >
> > > > >not the newest code?
> > > > >
> > > > >Jack
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> -
> > > > 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]
> > >
> > >
> >
> > --
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be
crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >
> > -
> > 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]



Re: [OT] Re: A new paradigm of Struts development

2004-11-11 Thread Erik Weber
First, thanks Vic for your feedback.
Second, right after I posted, I felt like I might have come across as 
insulting to people on this list with my web apps/browsers remark, 
especially considering that this IS a Struts list. I apologize if I 
offended anyone. I don't mean to undermine people's hard work. I agree 
with some of your points here, and I'll say it again, I do like Struts 
and have from the start. But I long to break free of the constraints of 
the browsers in doing interfaces. And in my opinion JavaScript should 
have become much more than it is by now -- it should be doing to/with IE 
and Netscape/Mozilla the types of things that JDNC can do as a baby.

I consider Struts to be a fine example of design patterns, refactorings, 
best practices, etc., put to good use, but it is not more than that. 
Struts to me didn't try to be more than it needed to be. It simply 
abstracted the 10-30% of what 90% of us (doing web apps) kept doing 
repeatedly but in different ways. The fact still remains that HTML-based 
applications are fundamentally flawed. HTML (and HTTP) were not designed 
with today's application requirements in mind. We are still just 
piggybacking applications on the Web, or with better designs, adapting 
them to the Web, which was designed for document (not logic) exchange. I 
hope for better architectures in layers 5, 6 and 7 (and who knows, maybe 
in the lower layers) in the future that, combined with better and better 
load balancing techniques, will change the landscape and how we think 
about Internet applications (in simpler terms, Internet doesn't have to 
equal Web). For example, imagine "browsing a page" that integrates 
stateful, stateless and streaming connection-based technologies like 
marked-up content rendering, instant messaging, multicast updates and 
streaming file exchanges. Maybe it also supports protocols better suited 
to proprietary LANs at the same time. Who wants to make the interfaces 
to all that happen in a proprietary Web browser? Maybe I'm too idealistic.

I think you and I are actually thinking along the same lines. I've been 
working on my own (albeit simple) "browsers" for a while. It's extremely 
rewarding. The application I'm currently spending most of my time on is 
a Swing client that is backed by a messaging server and (Servlet-based) 
applications running on an application server -- very similar to what 
you are suggesting. It doesn't forsake web apps, it just tries to 
forsake the limitations of the Web.

Erik

Daniel Perry wrote:
To me JDNC seems like a halfway house between webapps and rich client apps.
I personally like the way that webapps work (everything is written for the
server and executed on the server then merely displayed at the client), but
I hate the interface (html - and browser).
The web interface lacks consistency across browsers and (simple) rich gui
components.  It also lacks an event model (ok, so you can use javascript to
catch events and fire off forms/etc - but this isn't very eloquent) - and
lets face it, rich, clever apps need a gui event model.
I have been toying with the idea of an alternative browser - an application
browser which is used to launch remote applications instead of an html
browser.
Basically you have a browser which is designed to display GUI components
(including custom gui components).  User interfaces are specified (xml, or
similar) and it loads them and displays them.  It then processes events, and
events can either be handled locally through a scripting language, or
remotely through an event in the application code.  The application code
itself is running on a server.  Applications are mainly event->action
driven.  Applications have read/write access the user interface.  As a
developer you just code the app and declare the gui.  The user uses a
standard bit of software to access the app.
Daniel.
 

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: 11 November 2004 15:20
To: Struts Users Mailing List
Subject: [OT] Re: A new paradigm of Struts development
Vic, why we would want to continue to write apps for Internet Explorer
and Netscape after discovering a technology like this is beyond me. My
chips are in with you. I have been pushing my web-app minded clients
toward Swing all along, but technologies like Java Web Start and now
JDNC are really going to strengthen my case.
I have a question for you. Sorry if the answer is obvious and I just
haven't read enough.
I have invested a lot in writing custom UI classes, custom paint
methods, custom UI defaults properties, etc., to get my Swing components
looking the way I want (I'm sorry but, changing the background colors,
and other easily-scriptable stuff, doesn't cure Swing's out-of-the-box
ugliness). Also, I am amassing a collection of custom components, such
as self-validating forms and custom JTextPane-based browsers.
In fact, one of my browsers builds layouts based on my own metalanguage
(soon to be XML). It embeds diagrams wit

RE: debugging with Struts

2004-11-11 Thread Paul McCulloch
I think it is actually the source path of the *debug* configuration you are
using. 

I just spent a good 20 minutes figuring this out - I've just upgraded to
1.2, but my debug source was pointing to 1.1 which caused a bit of
confusion.

Paul

> -Original Message-
> From: Adam Hardy [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 15:50
> To: Struts Users Mailing List
> Subject: Re: debugging with Struts
> 
> 
> On 11/11/2004 02:50 PM Yaroslav Novytskyy wrote:
> > Hi all!
> > 
> > Can anyone say how setup debugging in Eclipse 3.0.1 for
> > useing with Struts under Tomcat 5.
> > 
> > Thanks
> > Yaroslav Novytskyy
> 
> If you want to trace through the struts source code, you must 
> link the 
> struts.jar to the src code directory in the project's build config 
> dialog by right clicking on the jar in the list and selecting 
> properties.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.
**


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



Re: contrib/struts-shale-mailreader

2004-11-11 Thread Hubert Rabago
Mike, there's http://wiki.apache.org/struts/StrutsMaintenanceSvn and
that also includes a link to the Subversion Red Book.  If you find
other ones, could you share by either responding to this thread or
posting on the wiki?  Thanks.

Hubert

On Thu, 11 Nov 2004 08:15:00 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Thanks, Craig,
> 
> This allows me to do what I needed to do without taking the day to
> learn this new stuff about subversion right away.
> 
> I assume that the CVS will permanently be out of date?  Why not scrap
> it?  I thought the blurb on this stuff gave the impression that the
> CVS would be kept up to date.
> 
> Anyone have a suggestion of a quick tutorial on subversion?
> 
> Jack
> 
> 
> 
> 
> On Thu, 11 Nov 2004 06:35:07 -0800, Craig McClanahan <[EMAIL PROTECTED]> 
> wrote:
> > You can also get nightly snapshots of the entire Struts SVN repository from:
> >
> >   http://cvs.apache.org/builds/jakarta-struts/nightly/src/
> >
> > Craig
> >
> >
> >
> >
> > On Thu, 11 Nov 2004 21:40:46 +0800, Peng Tuck <[EMAIL PROTECTED]> wrote:
> > > Probably because it's in svn ? Well the link from theserverside.com
> > > seems to say so. Anyway
> > > you can read the proposal here:
> > > http://svn.apache.org/viewcvs.cgi/*checkout*/struts/trunk/contrib/struts-shale/README.html
> > >
> > >
> > >
> > > Dakota Jack wrote:
> > >
> > > >I got the latest CVS using a command line for jakarta-struts but it
> > > >did not contain the folder contrib/struts-shale-mailreader which I
> > > >expected based on a recommendation by Craig.  Is the CVS available
> > > >from:
> > > >
> > > >
> > > >
> > > >cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout jakarta-struts
> > > >
> > > >
> > > >
> > > >not the newest code?
> > > >
> > > >Jack
> > > >
> > > >
> > > >
> > > >
> > >
> > > -
> > > 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]
> >
> >
> 
> --
> "You can't wake a person who is pretending to be asleep."
> 
> ~Native Proverb~
> 
> "Each man is good in His sight. It is not necessary for eagles to be crows."
> 
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> 
> -
> 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]



Re: The Future of Struts Validation

2004-11-11 Thread Hubert Rabago
It's not entirely unusual to see posts on the dev list that belong to
the user list.  This seems to be one of the few that go the other way.
Aside from posting this on the dev list, you can also post this idea
on Bugzilla as an enhancement request.  (Some would say post on
bugzilla first then initiate a discussion on the dev list.)  From
there, you can [optionally] attach patches that implement your ideas
and pray that the committers like your idea/patch enough to commit it
to the core and maintain and support it.

Hubert

On Thu, 11 Nov 2004 21:31:01 +1000, William Ferguson
<[EMAIL PROTECTED]> wrote:
> Now that I've had a year or so or heavy Struts use, I've come to believe that 
> (IMHO) validation within Struts is a little less clear and concise than it 
> could otherwise be with a few small changes.
> 
> Currently, validation is defined by specifying a true/false value for the 
> 'validate' attribute for an ActionMapping, and which validation to perform is 
> defined by either the ActionMapping's (Form) 'name' or 'path' attribute 
> depending on whether the Form extends from ValidatorActionForm or not.
> 
> It seems to me that it would be clearer to introduce a 'validation' attribute 
> into ActionMapping which defines the Id of the validation (if any) to 
> perform. This would supercede the 'validate' attribute and removes the 
> responsibility of identifying the validation target from the combination of 
> the (Form) 'name' attribute and the ActionForm inheritance hierarchy.
> 
> It also allows all the benefits of using (currently) using a 
> ValidatorActionForm to validate based on ActionMapping path, plus those of 
> using Form named mappings, while also allowing the freedom to mix, match and 
> reuse validations across ActionMappings.
> 
> It should be easy to make this new addition entirely backward compatible. Ie 
> If 'validation' attribute is not found then look for current attributes and 
> follow the existing validation path, at least for some deprecation period.
> 
> Once this refactoring has been achieved, it also opens up the possibility of 
> further enhancing the existing validation mechanism. Ie Allowing validations 
> to contain other validations etc. Though I would first start by simplifying 
> the validation definitions, which I also find somewhat non-intuitive at times.
> 
> Anyway, just my 2 cents.
> I'd like to thank the Struts development community for a pretty decent 
> framework, especially those worked on Tiles - it really rocks!
> 
> William Ferguson
> 
>

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



Re: contrib/struts-shale-mailreader

2004-11-11 Thread Dakota Jack
Thanks, Craig,

This allows me to do what I needed to do without taking the day to
learn this new stuff about subversion right away.

I assume that the CVS will permanently be out of date?  Why not scrap
it?  I thought the blurb on this stuff gave the impression that the
CVS would be kept up to date.

Anyone have a suggestion of a quick tutorial on subversion?

Jack


On Thu, 11 Nov 2004 06:35:07 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> You can also get nightly snapshots of the entire Struts SVN repository from:
> 
>   http://cvs.apache.org/builds/jakarta-struts/nightly/src/
> 
> Craig
> 
> 
> 
> 
> On Thu, 11 Nov 2004 21:40:46 +0800, Peng Tuck <[EMAIL PROTECTED]> wrote:
> > Probably because it's in svn ? Well the link from theserverside.com
> > seems to say so. Anyway
> > you can read the proposal here:
> > http://svn.apache.org/viewcvs.cgi/*checkout*/struts/trunk/contrib/struts-shale/README.html
> >
> >
> >
> > Dakota Jack wrote:
> >
> > >I got the latest CVS using a command line for jakarta-struts but it
> > >did not contain the folder contrib/struts-shale-mailreader which I
> > >expected based on a recommendation by Craig.  Is the CVS available
> > >from:
> > >
> > >
> > >
> > >cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout jakarta-struts
> > >
> > >
> > >
> > >not the newest code?
> > >
> > >Jack
> > >
> > >
> > >
> > >
> >
> > -
> > 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]
> 
> 


-- 
"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: Struts app to be passed a parameter (of some kind)

2004-11-11 Thread John Vincent
I am rather confused here.

application.xml

 
  Abc 
  abc
   
 
  warapp 
  jv1
 
  


allows only one context root.

web.xml


action
org.apache.struts.action.ActionServlet
. 
  

  
action
*.do
  

gives nothing.

I do not see how I can set multiple URLs for the same Struts app.







Craig McClanahan <[EMAIL PROTECTED]> 
11/11/2004 09:33 AM
Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>


To
Struts Users Mailing List <[EMAIL PROTECTED]>
cc

Subject
Re: Struts app to be passed a parameter (of some kind)






On Thu, 11 Nov 2004 08:14:12 -0500, John Vincent
<[EMAIL PROTECTED]> wrote:
>  Need one Struts app, but must have multiple URLs.
> 
> Thus
> http://www.jv.com/company1
> http://www.jv.com/company2

Why not just configure your servlet container to treat both context
paths as the same app?  For example, in Tomcat, you can create two
 elements with different paths but the same document base
directory.

> 
> actually start the same Struts app, say
> 
> http://www.jv.com/myApp
> 
> but must "pass" something into the Struts app so that it knows who, or
> rather, which URL invoked it.
> 

The request.getContextPath() method would tell your application which
way it was invoked.

Craig

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







NOTICE:  This communication may contain confidential, proprietary or 
legally privileged information. It is intended only for the person(s) to 
whom it is addressed.  If you are not an intended recipient, you may not 
use, read, retransmit, disseminate or take any action in reliance upon it. 
Please notify the sender that you have received it in error and 
immediately delete the entire communication, including any attachments. 
Towers Perrin does not encrypt and cannot ensure the confidentiality or 
integrity of external e-mail communications and, therefore, cannot be 
responsible for any unauthorized access, disclosure, use or tampering that 
may occur during transmission.  This communication is not intended to 
create or modify any obligation, contract or warranty of Towers Perrin, 
unless the firm clearly expresses such an intent.


Re: [OT] Re: A new paradigm of Struts development

2004-11-11 Thread Vic
Erik Weber wrote:
I have invested a lot in writing custom UI classes, custom paint 
methods, custom UI defaults properties, etc., to get my Swing components 
looking the way I want (I'm sorry but, changing the background colors, 
and other easily-scriptable stuff, doesn't cure Swing's out-of-the-box 
ugliness). Also, I am amassing a collection of custom components, such 
as self-validating forms and custom JTextPane-based browsers.

In fact, one of my browsers builds layouts based on my own metalanguage 
(soon to be XML). It embeds diagrams with captions and draws arrows from 
the captions to the diagrams based on simple coordinates, etc. Seems 
like I was doing JDNC without even really knowing about JDNC. ;)

I do not intend to abandon my current set of GUI devices, but obviously 
I would like to leverage JDNC if it's worth it, not to mention provide 
compatibility. Will JDNC support my own look and feel (or pseudo look 
and feel)? Can it be easily modified to work with my custom components?
https://jdnc.dev.java.net/files/documents/1746/8515/jdnc-0_6-2004_11_04-doc.zip
Above JavaDoc shows that "jx" componets all extend Swing :-)!
So it's just Swing much improved.

I'm not even sure if I should bring up the question of security. Suppose 
I have a custom file chooser. Will there be a sandbox concept like that 
of Applets?

Security:
You kind of have to sign the jars and then it pops up a user box "do you 
accept this ssl?" the 1st time user sees you "page".
This is the weakest point of this "arcitevture".

Applets:
The benefit IMO is that it allows you to use the internet for good 
things (like JNLP networkLauch and update)
but allows you to "BYPASS THE BROWSER" so you do not have 2 sets of 
windowing api, etc.

Ex:
http://www.jext.org/apps/jext.jnlp
I am leaning in releasing my "JDNC binding to hessian dispatcher" to 
open source and  it will suceed only if others contribute.

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


RE: [OT] Re: A new paradigm of Struts development

2004-11-11 Thread Daniel Perry
To me JDNC seems like a halfway house between webapps and rich client apps.

I personally like the way that webapps work (everything is written for the
server and executed on the server then merely displayed at the client), but
I hate the interface (html - and browser).

The web interface lacks consistency across browsers and (simple) rich gui
components.  It also lacks an event model (ok, so you can use javascript to
catch events and fire off forms/etc - but this isn't very eloquent) - and
lets face it, rich, clever apps need a gui event model.

I have been toying with the idea of an alternative browser - an application
browser which is used to launch remote applications instead of an html
browser.

Basically you have a browser which is designed to display GUI components
(including custom gui components).  User interfaces are specified (xml, or
similar) and it loads them and displays them.  It then processes events, and
events can either be handled locally through a scripting language, or
remotely through an event in the application code.  The application code
itself is running on a server.  Applications are mainly event->action
driven.  Applications have read/write access the user interface.  As a
developer you just code the app and declare the gui.  The user uses a
standard bit of software to access the app.

Daniel.

> -Original Message-
> From: Erik Weber [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 15:20
> To: Struts Users Mailing List
> Subject: [OT] Re: A new paradigm of Struts development
>
>
> Vic, why we would want to continue to write apps for Internet Explorer
> and Netscape after discovering a technology like this is beyond me. My
> chips are in with you. I have been pushing my web-app minded clients
> toward Swing all along, but technologies like Java Web Start and now
> JDNC are really going to strengthen my case.
>
> I have a question for you. Sorry if the answer is obvious and I just
> haven't read enough.
>
> I have invested a lot in writing custom UI classes, custom paint
> methods, custom UI defaults properties, etc., to get my Swing components
> looking the way I want (I'm sorry but, changing the background colors,
> and other easily-scriptable stuff, doesn't cure Swing's out-of-the-box
> ugliness). Also, I am amassing a collection of custom components, such
> as self-validating forms and custom JTextPane-based browsers.
>
> In fact, one of my browsers builds layouts based on my own metalanguage
> (soon to be XML). It embeds diagrams with captions and draws arrows from
> the captions to the diagrams based on simple coordinates, etc. Seems
> like I was doing JDNC without even really knowing about JDNC. ;)
>
> I do not intend to abandon my current set of GUI devices, but obviously
> I would like to leverage JDNC if it's worth it, not to mention provide
> compatibility. Will JDNC support my own look and feel (or pseudo look
> and feel)? Can it be easily modified to work with my custom components?
>
> I'm not even sure if I should bring up the question of security. Suppose
> I have a custom file chooser. Will there be a sandbox concept like that
> of Applets?
>
> Thanks,
> Erik
>
>
> Vic wrote:
>
> > Adam Hardy wrote:
> >
> >>
> >> What I want to see in the future for big apps is a DTD or xml schema
> >> that brings JSP code and XHTML mark-up under control. Something that
> >> is easily editable by my editor of choice, using syntax-highlighting
> >> to show me where my XHTML is up the swanny.
> >>
> >
> >
> > Just in case you missed my posts about a great Sun open source project
> > JDNC that will be a part of J26 Standard Edition (Mustang), it does
> > above, one of the reasons that I am "raving" about it, check it out:
> >
> > http://javadesktop.org/jdnc/0_5/docs/tutorial/index.html
> >
> > And I am using it w/ a lot of success. Right now I am just doing the
> > "Swing" extensions, but will tie in UI via XML (and will add code to
> > make it work w/ Hessian SoA, it's trivial binding).
> >
> > My chips are behind JDNC.
> >
> > .V
> >
> >
> > -
> > 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]



Re: debugging with Struts

2004-11-11 Thread Adam Hardy
On 11/11/2004 02:50 PM Yaroslav Novytskyy wrote:
Hi all!
Can anyone say how setup debugging in Eclipse 3.0.1 for
useing with Struts under Tomcat 5.
Thanks
Yaroslav Novytskyy
If you want to trace through the struts source code, you must link the 
struts.jar to the src code directory in the project's build config 
dialog by right clicking on the jar in the list and selecting properties.

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


Re: contrib/struts-shale-mailreader

2004-11-11 Thread Dakota Jack
Never a dull moment. I am sure there must have been a reason for this.

Jack


On Thu, 11 Nov 2004 12:37:56 -, Niall Pemberton
<[EMAIL PROTECTED]> wrote:
> Struts has moved from CVS to subversion - the old cvs repository still
> exists, but its out of date now as its not being maintained.
> 
> http://svn.apache.org/viewcvs.cgi/struts/trunk/?root=Apache-SVN
> 
> http://www.apache.org/dev/version-control.html
> 
> Niall
> 
> 
> 
> - Original Message -
> From: "Dakota Jack" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, November 11, 2004 12:07 PM
> Subject: contrib/struts-shale-mailreader
> 
> > I got the latest CVS using a command line for jakarta-struts but it
> > did not contain the folder contrib/struts-shale-mailreader which I
> > expected based on a recommendation by Craig.  Is the CVS available
> > from:
> >
> >
> >
> > cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout
> jakarta-struts
> >
> >
> >
> > not the newest code?
> >
> > Jack
> >
> >
> > --
> > "You can't wake a person who is pretending to be asleep."
> >
> > ~Native Proverb~
> >
> > "Each man is good in His sight. It is not necessary for eagles to be
> crows."
> >
> > ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
> >
> > -
> > 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]
> 
> 


-- 
"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



Re: About *.do

2004-11-11 Thread Erik Weber
Use path mapping instead of extension mapping on your controller Servlet.
Erik
Koon Yue Lam wrote:
Hi !
How can I access an action of its name instead of its "name.do" ?
eg. localhost/MyApp/login
I don't want the ".do" at all
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]


About *.do

2004-11-11 Thread Koon Yue Lam
Hi !
How can I access an action of its name instead of its "name.do" ?

eg. localhost/MyApp/login
I don't want the ".do" at all

thanks

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



Re: A new paradigm of Struts development

2004-11-11 Thread BaTien Duong
Craig McClanahan wrote:
On Thu, 11 Nov 2004 11:13:57 +, Adam Hardy
<[EMAIL PROTECTED]> wrote:
 

A lightweight framework must be simple to implement, for RAD or for
prototyping or for web newbies. Given a large complicated application,
should an architect choose a lightweight framework? No. She / he must
recognise the limitations of the framework.
   

JSF does not propose to be an application tier controller -- it's
totally about the view tier.  For simple apps, that is enough.  For
complicated apps, feel free to add application tier stuff (as I did in
Shale).
 

JSF seems to be lightweight. It simplifies and speeds up development. So
what limitations does it have? I don't know JSF (I must download it (and
shale)), but it sounds like you've sacrificed the ability to deal with
multiple Command scenarios (submit buttons) on a robust controller.
   

Not correct, but you'll need to catch up on JSF to ujnderstand why.
 

The last page I saw on my previous project had 10 submit buttons. What I
see is developers writing monolithic tracts of code in their Action
classes to handle all Commands at once. E.g. a search page with search
again, back, fwd, begin, end etc.
   

The best practice for JSF would be to bind each submit button to a
separate action method.  If/else chains, or a DispatchAction like
thing, are not necessary.
 

Using hidden input and jsf action listener for pre-proccessing makes the 
framework much more flexible.

BaTien
DBGROUPS
Note that there are cases where you really do want multiple buttons to
invoke the same action.  For example, I'm writing this reply using
GMail, which has a Send button at the top and the bottom of the
textarea that I'm typing in.  Both do the same thing, so they would
both be mapped (if GMail were written using JSF) into the same action
method.
 

I think page-driven development frameworks would exacerbate this problem
unless they clarify with eloquence up-front how to make a clear
seperation of the POST processing from the page preparation required for
the next page.
   

Yep, that is definitely a key point.  Here is why Shale's view
controller helps you do that.  The key point is this:
 The initialization code for any page (no matter how you got there)
 goes in the prepare() method of the corresponding ViewController.
The only thing you should do in the action method for processing a
request is to perform the necessary business transaction (save a
record to the database or whatever), then return the outcome code used
for navigation.  The next page is responsible for taking care of
itself.
Simple enough?
 

Otherwise the uninitiated are always going to write brittle,
hard-to-maintain, hard-to-extend apps.
What I want to see in the future for big apps is a DTD or xml schema
that brings JSP code and XHTML mark-up under control. Something that is
easily editable by my editor of choice, using syntax-highlighting to
show me where my XHTML is up the swanny.
   

You can already edit JSF-including JSP pages in any editor that
understands JSP syntax, but doing so misses out on the extra benefits
you can get from an editor that knows it is editing components.  For
example, Sun Java Studio Creator (the product I'm architect for) knows
you are working with JSF components, and calls the actual renderers at
design time in order to get faithful WSYWIG.  Plus, it has lots of
special design time behavior that makes the developer more productive.
 

If JSF provides some view components that will output decent table-less
XHTML, then I'll jump at it.
   

Feel free to write a few.  That's what JSF is for :-).
Or, use a tool like Creator that defaults to using CSS absolute
positioning with the standard JSF components, so it doesn't need
 elements unless you are really doing a table.
 

Adam
   

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


[OT] Re: A new paradigm of Struts development

2004-11-11 Thread Erik Weber
Vic, why we would want to continue to write apps for Internet Explorer 
and Netscape after discovering a technology like this is beyond me. My 
chips are in with you. I have been pushing my web-app minded clients 
toward Swing all along, but technologies like Java Web Start and now 
JDNC are really going to strengthen my case.

I have a question for you. Sorry if the answer is obvious and I just 
haven't read enough.

I have invested a lot in writing custom UI classes, custom paint 
methods, custom UI defaults properties, etc., to get my Swing components 
looking the way I want (I'm sorry but, changing the background colors, 
and other easily-scriptable stuff, doesn't cure Swing's out-of-the-box 
ugliness). Also, I am amassing a collection of custom components, such 
as self-validating forms and custom JTextPane-based browsers.

In fact, one of my browsers builds layouts based on my own metalanguage 
(soon to be XML). It embeds diagrams with captions and draws arrows from 
the captions to the diagrams based on simple coordinates, etc. Seems 
like I was doing JDNC without even really knowing about JDNC. ;)

I do not intend to abandon my current set of GUI devices, but obviously 
I would like to leverage JDNC if it's worth it, not to mention provide 
compatibility. Will JDNC support my own look and feel (or pseudo look 
and feel)? Can it be easily modified to work with my custom components?

I'm not even sure if I should bring up the question of security. Suppose 
I have a custom file chooser. Will there be a sandbox concept like that 
of Applets?

Thanks,
Erik
Vic wrote:
Adam Hardy wrote:
What I want to see in the future for big apps is a DTD or xml schema 
that brings JSP code and XHTML mark-up under control. Something that 
is easily editable by my editor of choice, using syntax-highlighting 
to show me where my XHTML is up the swanny.


Just in case you missed my posts about a great Sun open source project 
JDNC that will be a part of J26 Standard Edition (Mustang), it does 
above, one of the reasons that I am "raving" about it, check it out:

http://javadesktop.org/jdnc/0_5/docs/tutorial/index.html
And I am using it w/ a lot of success. Right now I am just doing the 
"Swing" extensions, but will tie in UI via XML (and will add code to 
make it work w/ Hessian SoA, it's trivial binding).

My chips are behind JDNC.
.V
-
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]


Re: A new paradigm of Struts development

2004-11-11 Thread BaTien Duong
Craig McClanahan wrote:
Intermixed.
On Tue, 9 Nov 2004 10:47:34 -0800, Dakota Jack <[EMAIL PROTECTED]> wrote:
 

Thanks, Joe,
Some thoughts below:

On Tue, 9 Nov 2004 12:26:22 -0600, Joe Germuska <[EMAIL PROTECTED]> wrote:
   

Aren't Struts and JSF in the end really competitors?  Seems so to me.
I cannot see them merging in any sensible solution.
   

No, I don't think so.  JSF is primarily focused on the view.  Struts
is only partially focused on the view.  I think it's plausible that
they could cooperate, even though I haven't yet decided that that's
the best way forward.  As noted above, I suspect that trying to use
JSF as a complete controller solution would lead to the same kinds of
problems people had in "Model 1" (JSP-centered) development.
 

I may have misunderstood, and I am at a disadvantage because I am
still trying to get a good idea of what JSF is all about, but I
thought that Craig saw any merger between Struts and JSF as a
temporary thing which was fundamentally not a long run arrangement.
   

That's a little too simplistic to represent my opinions.  There are
two fundamentally different worlds to consider -- the thousands of
applications already built on top of Struts, and the thousands of
applications that will be written in the next few years (and are
looking for technologies and architectures to base themselves on).
For existing apps, Struts has always embraced new technologies (see
how JSTL, and in particular the expression language from JSTL 1.0, has
been incorporated).  The basic idea has been to allow existing apps to
incorporate these new technologies, *without* throwing away anything
they've already built.  Indeed, this approach has been one of the
reasons Struts is so popular.  Supporting JSF *just* for its visual
components (in the struts-faces integration library) is no different. 
It would be *irresponsible* for the Struts developers not to embrace
this, and allow existing apps to take advantage of the new generation
of visual components that is emerging, without making you throw away
your Action and ActionForm classes, your client side validation, your
Tiles, and so on.

That being said, there is significant overlap in functionality between
JSF and Struts 1.x -- so much so that it is pretty difficult to
contemplate using the combination in new apps.  For example, which
technology are you going to use for validations?  for page navigation?
Quite frankly, if you don't need the validator framework or tiles
there isn't a tremendous amount of value add in trying to combine the
two technologies (and the MyFaces folks have even removed Tiles from
that equation, because they integrate with it directly).
Struts needs to do something useful in the *application controller*
tier ... the view has been done.
 

This is very well said. Using MyFaces and its tiles integration, the 
need of struts 1.x seems to be redundant.

Struts-shale adds value on top of current technologies with its 
framework of request processing and addresses, in a framework fashion, 
application and dialog controllers. Combining this with IoC framework 
such as Spring, we will have a very clean elegant web application 
framework to work on:
   1) The application is completely configurable with faces-config and 
IoC-config. There is no need of digester and writing your own codes to 
instantiate the beans.
   2) We can separate beans for UI components in faces from 
value-holding objects in IoC contaier and programmatically wire them 
together in a very clean fashion using facilities of underlying frameworks.
   3) One valuable feature that shale can address in a framework 
fashion is a standard way of incremental authentication (challenge) when 
specified by the requested resource.

BaTien
DBGROUPS
 

I don't think that this note by "Vinny" is unimportant.  I like the
idea of something like JSF for the view.  I am not sure I like the
controller architecture which it uses and which, i think, ultimately
is a choice inconsistent with Struts, which I like.
   

Personally, I agree that using JSF simply because it will be
including in J2EE 1.5 (or 5.0) isn't reason enough.  But can you
elaborate on *why* you don't like the controller architecture that
JSF uses, and why it's inconsistent with Struts?
 

I don't understand your idea of a "view controller", Joe.  The "view
controller" is a controller which is not something different from the
Struts "controller" is it?  The controller, from my perspective needs
to be decoupled from the view.  A "view controller" is just another
way of saying, if I understand, that the view and the controller will
be coupled.
   

That's exactly right.  For background, go grab a copy of the "Core
J2EE Patterns" book, and look up the "View Helper" pattern.  That is
exactly what a view controller is doing.  There's one view controller
per page.
 

Ultimately, of course, there has to be some interface between the view
and the controller.  I would wish there were an interface that

Override default locale per application

2004-11-11 Thread Chris Searle

Struts 1.2.4 - running under jboss 3.2

The localization works just fine - if the user has set preferred
languages in the browser.

However - if this is not set the application will use the default
locale of the VM.

This seems to mean (under jboss where the vm is shared amongst apps
AFAIK) that all apps must have the same default locale inherited from
the system - which is a problem here where we need one app to have
English and one to have Norwegian as default:

App 1 has

  app1.properties (which has english text)
  app1_no.properties

App 2 has

  app2.properties (which has norwegian text)
  app2_en.properties
  app2_no.properties

So - if the system locale is english then jboss inherits english and
app2 will use app2_en.properties if nothing is sent from the browser
instead of app2.properties.

I can't see a way to set default locale per application in the config
- is there one?

If not - how would you approach the problem - some kind of override of
one of the struts classes? Would appreciate some hints on what path to
take here :-)

-- 
Chris Searle
[EMAIL PROTECTED]


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



debugging with Struts

2004-11-11 Thread Yaroslav Novytskyy
Hi all!
Can anyone say how setup debugging in Eclipse 3.0.1 for
useing with Struts under Tomcat 5.
Thanks
Yaroslav Novytskyy
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: A new paradigm of Struts development

2004-11-11 Thread Craig McClanahan
On Thu, 11 Nov 2004 11:13:57 +, Adam Hardy
<[EMAIL PROTECTED]> wrote:
> A lightweight framework must be simple to implement, for RAD or for
> prototyping or for web newbies. Given a large complicated application,
> should an architect choose a lightweight framework? No. She / he must
> recognise the limitations of the framework.

JSF does not propose to be an application tier controller -- it's
totally about the view tier.  For simple apps, that is enough.  For
complicated apps, feel free to add application tier stuff (as I did in
Shale).

> 
> JSF seems to be lightweight. It simplifies and speeds up development. So
> what limitations does it have? I don't know JSF (I must download it (and
> shale)), but it sounds like you've sacrificed the ability to deal with
> multiple Command scenarios (submit buttons) on a robust controller.

Not correct, but you'll need to catch up on JSF to ujnderstand why.

> 
> The last page I saw on my previous project had 10 submit buttons. What I
> see is developers writing monolithic tracts of code in their Action
> classes to handle all Commands at once. E.g. a search page with search
> again, back, fwd, begin, end etc.

The best practice for JSF would be to bind each submit button to a
separate action method.  If/else chains, or a DispatchAction like
thing, are not necessary.

Note that there are cases where you really do want multiple buttons to
invoke the same action.  For example, I'm writing this reply using
GMail, which has a Send button at the top and the bottom of the
textarea that I'm typing in.  Both do the same thing, so they would
both be mapped (if GMail were written using JSF) into the same action
method.

> 
> I think page-driven development frameworks would exacerbate this problem
> unless they clarify with eloquence up-front how to make a clear
> seperation of the POST processing from the page preparation required for
> the next page.
> 

Yep, that is definitely a key point.  Here is why Shale's view
controller helps you do that.  The key point is this:

  The initialization code for any page (no matter how you got there)
  goes in the prepare() method of the corresponding ViewController.

The only thing you should do in the action method for processing a
request is to perform the necessary business transaction (save a
record to the database or whatever), then return the outcome code used
for navigation.  The next page is responsible for taking care of
itself.

Simple enough?

> Otherwise the uninitiated are always going to write brittle,
> hard-to-maintain, hard-to-extend apps.
> 
> What I want to see in the future for big apps is a DTD or xml schema
> that brings JSP code and XHTML mark-up under control. Something that is
> easily editable by my editor of choice, using syntax-highlighting to
> show me where my XHTML is up the swanny.

You can already edit JSF-including JSP pages in any editor that
understands JSP syntax, but doing so misses out on the extra benefits
you can get from an editor that knows it is editing components.  For
example, Sun Java Studio Creator (the product I'm architect for) knows
you are working with JSF components, and calls the actual renderers at
design time in order to get faithful WSYWIG.  Plus, it has lots of
special design time behavior that makes the developer more productive.

> 
> If JSF provides some view components that will output decent table-less
> XHTML, then I'll jump at it.

Feel free to write a few.  That's what JSF is for :-).

Or, use a tool like Creator that defaults to using CSS absolute
positioning with the standard JSF components, so it doesn't need
 elements unless you are really doing a table.

> 
> Adam
> 

Craig

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



Re: SV: Pre-populate form

2004-11-11 Thread Jeff Beal
The framework handles it.  Here's a rough sequence of events:
  1) The Struts servlet receives a request for /newinsurance.do
  2) The request processor consults the mapping information and sees 
that there should be an InsuranceBean instance in the request
  3) It checks the standard request attribute for the action form, sees 
that it is empty, and creates a new instance of the InsuranceForm bean, 
*then saves it to the request scope*
  4) The AddInsuranceAction.execute method is called with a reference 
to this newly created bean
  5) AddInsuranceAction sets attributes in this bean (Since Java 
objects are always passed by reference, those values are saved in the 
request-scope -- without any additional developer interaction.)
  6) The request is forwarded to newinsurance.jsp
  7) The Struts HTML tags in newinsurance.jsp look for a request-scoped 
InsuranceBean, and find the one that was created above.  (If there was 
nothing there, they would be responsible for creating a new form.)

HTH, and I hope, also, that it is correct.  I have done this, and I know 
that it works, but I may be a bit off in my explanation.  I don't think 
I am, though.

-- Jeff
Roland Carlsson wrote:
Hi Jeff!
When you say that the newinsurance.jsp "just see it" where do you store
"it"? In request.setAttribute() with some key? Session?
I'm using DynaValidatorBean but I guess that it should work in a simular
way.
Thanks in advance
Roland Carlsson
Den 04-11-11 14.14, skrev "Jeff Beal" <[EMAIL PROTECTED]>:

Every JSP page in my application is going to have two actions associated
with it.  One action will always be called prior to displaying the JSP
page.  The other will be called to process the user's input.  In the
struts-config, both of these actions are configured with the same form
bean.  Thus, when Action 1 is called, it has an instance of the
ActionForm and that instance is already in the appropriate scope, etc.
All I have to do is populate the values and the JSP page can display them.
struts-config.xml:

  
  



In my AddInsuranceAction, I can populate the InsuranceBean with
information from the database and the newinsurance.jsp will "just see it".
-- Jeff
Roland Carlsson wrote:
Hi!
I am looking for a better way to pre-populate my (html)forms when building
to allow the users to edit data from a database.
I know that I can create an populate a DynaValidatorBean but I don't know
where to put it so that I can use it from my (html)from.
Thanks in advance
Roland Carlsson
Ps: The mail-arcive doesn't work, so I appologize if I repost something that
already have been answerd.

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


Re: contrib/struts-shale-mailreader

2004-11-11 Thread Craig McClanahan
You can also get nightly snapshots of the entire Struts SVN repository from:

  http://cvs.apache.org/builds/jakarta-struts/nightly/src/

Craig



On Thu, 11 Nov 2004 21:40:46 +0800, Peng Tuck <[EMAIL PROTECTED]> wrote:
> Probably because it's in svn ? Well the link from theserverside.com
> seems to say so. Anyway
> you can read the proposal here:
> http://svn.apache.org/viewcvs.cgi/*checkout*/struts/trunk/contrib/struts-shale/README.html
> 
> 
> 
> Dakota Jack wrote:
> 
> >I got the latest CVS using a command line for jakarta-struts but it
> >did not contain the folder contrib/struts-shale-mailreader which I
> >expected based on a recommendation by Craig.  Is the CVS available
> >from:
> >
> >
> >
> >cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout jakarta-struts
> >
> >
> >
> >not the newest code?
> >
> >Jack
> >
> >
> >
> >
> 
> -
> 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]



Re: Struts app to be passed a parameter (of some kind)

2004-11-11 Thread Craig McClanahan
On Thu, 11 Nov 2004 08:14:12 -0500, John Vincent
<[EMAIL PROTECTED]> wrote:
>  Need one Struts app, but must have multiple URLs.
> 
> Thus
> http://www.jv.com/company1
> http://www.jv.com/company2

Why not just configure your servlet container to treat both context
paths as the same app?  For example, in Tomcat, you can create two
 elements with different paths but the same document base
directory.

> 
> actually start the same Struts app, say
> 
> http://www.jv.com/myApp
> 
> but must "pass" something into the Struts app so that it knows who, or
> rather, which URL invoked it.
> 

The request.getContextPath() method would tell your application which
way it was invoked.

Craig

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



Re: talking about paradigms

2004-11-11 Thread Craig McClanahan
On Thu, 11 Nov 2004 10:42:27 +0100, Rosenberg, Leon
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> since we started talking about paradigms... how does JSTL and especially
> EL fit into MVC paradigm?
> 

Much of JSTL is clearly about view tier stuff -- things like
conditionals and looping to dynamically include or repeat elements,
are totally related to dynamically creating the markup.  The same
thing can be said of things like the XML manipulation, if you're doing
things like user-specific stylesheet transformations and the like.

Other parts of JSTL (such as the SQL tags) are designed for model 1
style programs, and are not really as directly useful in an MVC style
design.

> Or, the better question, why does struts support EL nowadays, when it
> breaks the paradigm?

The way that Struts supports EL is as a *binding* between view tier
things (the custom tags that are creating the dynamic markup) and the
model tier things (your DAOs or VOs or whatever containing the model
data).  You have to have a binding somewhere ... my experience is that
using binding expressions is the most concise way to say things, and
puts the decision in the hands of the appropriate person (the page
author knows that she is creating the "name" field, and therefore
knows what to bind to.

Interestingly, JSTL's expressions are primarily about "pull" of data
from the model.  JSF, which uses essentially the same paradigm for
binding, also uses the expression to "push" data (after any needed
conversion and validation) back to the model.  Therefore, an
expression like:

  

is used at two different times:

* When the page is rendered, pull the data from the customer bean
  (doing any necessary conversions on the way).

* When the form is submitted, and after any conversions and validations
  have been performed successfully, push the data back to the model.

This binding activity plays pretty much the same role that ActionForm
beans do in Struts, but without the need for an extra class.

> 
> Regards
> 
> Leon
> 
> 

Craig

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



Re: A new paradigm of Struts development

2004-11-11 Thread Vic
Adam Hardy wrote:
What I want to see in the future for big apps is a DTD or xml schema 
that brings JSP code and XHTML mark-up under control. Something that is 
easily editable by my editor of choice, using syntax-highlighting to 
show me where my XHTML is up the swanny.


Just in case you missed my posts about a great Sun open source project 
JDNC that will be a part of J26 Standard Edition (Mustang), it does 
above, one of the reasons that I am "raving" about it, check it out:

http://javadesktop.org/jdnc/0_5/docs/tutorial/index.html
And I am using it w/ a lot of success. Right now I am just doing the 
"Swing" extensions, but will tie in UI via XML (and will add code to 
make it work w/ Hessian SoA, it's trivial binding).

My chips are behind JDNC.
.V
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


How to change Tiles's tab?

2004-11-11 Thread PC Leung
For a page or summary tab, a tab is a label of words.
Can I change it to an image file?
If not, can I add an image file?

Moreover,
there is a purple border after clicking a tab.
Can I change the border color and even remove it?

Thanks

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



SV: Pre-populate form

2004-11-11 Thread Roland Carlsson

Hi Jeff!

When you say that the newinsurance.jsp "just see it" where do you store
"it"? In request.setAttribute() with some key? Session?

I'm using DynaValidatorBean but I guess that it should work in a simular
way.

Thanks in advance
Roland Carlsson

Den 04-11-11 14.14, skrev "Jeff Beal" <[EMAIL PROTECTED]>:

> Every JSP page in my application is going to have two actions associated
> with it.  One action will always be called prior to displaying the JSP
> page.  The other will be called to process the user's input.  In the
> struts-config, both of these actions are configured with the same form
> bean.  Thus, when Action 1 is called, it has an instance of the
> ActionForm and that instance is already in the appropriate scope, etc.
> All I have to do is populate the values and the JSP page can display them.
> 
> struts-config.xml:
>type="webmedx.web.common.actions.AddInsuranceAction"
>  name="InsuranceBean" validate="false" scope="request">
> path="/newinsurance.jsp"
> redirect="false">
>
>  
>type="webmedx.web.common.actions.SaveInsuranceAction"
>  name="InsuranceBean" validate="true" scope="request">
>  
> 
> In my AddInsuranceAction, I can populate the InsuranceBean with
> information from the database and the newinsurance.jsp will "just see it".
> 
> -- Jeff
> 
> 
> Roland Carlsson wrote:
>> Hi!
>> 
>> I am looking for a better way to pre-populate my (html)forms when building
>> to allow the users to edit data from a database.
>> 
>> I know that I can create an populate a DynaValidatorBean but I don't know
>> where to put it so that I can use it from my (html)from.
>> 
>> Thanks in advance
>> Roland Carlsson
>> 
>> Ps: The mail-arcive doesn't work, so I appologize if I repost something that
>> already have been answerd.
> 
> 
> -
> 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]



RE: Help needed on question regarding html:select and html:options...cannot turn off validator

2004-11-11 Thread t t
Hi, David, 
Thanks. I think I know where is the problem after
reading your  last email again. I will try it later.
Tong
--- "David G. Friedman" <[EMAIL PROTECTED]> wrote:

> Tong,
> 
> When you say "automatic validation", do you mean
> client side or server side?
> What class does your ActionForm extend?  What class
> does your Action extend?
> What is your action mapping? What path (the part
> after the
> http://www.whatever.com) is the action?  What are
> html:form and
> html:javascript tags from your invoking page? (i.e.
> the one that submits the
> page).
> 
> Regards,
> David
> 
> -Original Message-
> From: t t [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 10, 2004 8:05 PM
> To: Struts Users Mailing List
> Subject: RE: Help needed on question regarding
> html:select and
> html:options...cannot turn off validator
> 
> 
> Thanks. David. I am still confused by the automatic
> validation. I couldn't turn it off.
> --- "David G. Friedman" <[EMAIL PROTECTED]>
> wrote:
> 
> > Tong,
> >
> > You can change the form's submit action using
> almost
> > any form field type
> > (except hidden) using the onClick or onChange
> > methods.
> >
> > If you have a submit button button, you can do
> this:
> >  > onClick="this.form.action='/save.do';return true;"
> > />
> >
> > To save the button name into a hidden parameter
> such
> > as a hidden field
> > ActionName, you can do this:
> > 
> >  > onClick="this.form.ActionName.value='save';return
> > true;" />
> >  > onClick="this.form.ActionName.value=delete';" />
> >
> > Or even:
> >
> >  > onClick="this.form.ActionName.value=this.value;"
> />
> > (I might be slightly off on the ActionName.value
> > setting property).
> >
> > If you choose to make the onClick invoke a
> function
> > (for performing even
> > more steps than that) and the input was a submit
> > button, remember to NOT do
> > a form.submit() within that JS function - it would
> > cause a double submit
> > when invoked from a submit button.  If it isn't a
> > submit button but some
> > other type of button, you can probably do a
> > form.submit() if it doesn't do
> > it automatically.
> >
> > As for preventing automatic validation in an
> Action,
> > Erik was spot on with
> > validate="false" as an attribute and value in your
> >  mapping.
> > Just invoke the validate method with the
> appropriate
> > arguments for the
> > Action class you're extending.
> >
> > And finally, on your topic of making one select
> > change another select, the
> > only way I know (and did this once, long ago) was
> to
> > set a javascript
> > function to be called by the first one's onClick
> or
> > onChange method.  That
> > function can be passed the this.form object, then
> > get to the second pulldown
> > by name or id, delete every select item, then add
> > each new item.  Creative
> > use of the iterate tag plus javascript can do it,
> or
> > you could find good
> > examples if you google - that's how I learned how
> to
> > do it.
> >
> > Regards,
> > David
> >
> > -Original Message-
> > From: t t [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, November 10, 2004 6:41 PM
> > To: Struts Users Mailing List
> > Subject: Re: Help needed on question regarding
> > html:select and
> > html:options...cannot turn off validator
> >
> >
> > How can I turn off validator? THanks.
> > --- t t <[EMAIL PROTECTED]> wrote:
> >
> > > Or I can set a parameter before executing the
> > added
> > > action.
> > > --- t t <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi, Erik,
> > > > I got an idea. I can insert another action
> > before
> > > > the actual action be executed. And  use
> > javascript
> > > > change a hidden property before executing the
> > > added
> > > > action, then  I can do what i want to do in
> the
> > > > added action. What do you think? I will try it
> > > > later.
> > > > Thanks for your help!
> > > > Tong
> > > >
> > > > Erik Weber <[EMAIL PROTECTED]> wrote:
> > > > JavaScript can change the action URL on the
> fly.
> > > For
> > > > example:
> > > >
> > > >
> > >
> >
>
http://www.willmaster.com/possibilities/archives/wmp20030527001.shtml
> > > >
> > > > However, I'm not sure how compatible this type
> > of
> > > > thing will be with the
> > > > Struts form tag. I've never tried it. I'm
> > > surprised
> > > > others aren't
> > > > speaking up because the "multiple submit"
> > problem
> > > > comes up a lot. If you
> > > > search the archives for "multiple submit
> > buttons"
> > > > you might find other
> > > > ideas.
> > > >
> > > > Erik
> > > >
> > > >
> > > > t t wrote:
> > > >
> > > > >Hi,Erik,
> > > > >I think that helps. I have another question.
> > > > Besides the "action" attribute in html:form,
> is
> > > > anywhere else we can specify another "action"
> > > > corresponding the submission of javascript?
> > > > >Thanks.
> > > > >Tong
> > > > >
> > > > >Erik Weber wrote:
> > > > >There may be other ways or better ways, but
> one
> > > > thing you could do is
> > > > >vary the action URL. You could

Re: contrib/struts-shale-mailreader

2004-11-11 Thread Peng Tuck
Probably because it's in svn ? Well the link from theserverside.com
seems to say so. Anyway
you can read the proposal here:
http://svn.apache.org/viewcvs.cgi/*checkout*/struts/trunk/contrib/struts-shale/README.html
Dakota Jack wrote:
I got the latest CVS using a command line for jakarta-struts but it
did not contain the folder contrib/struts-shale-mailreader which I
expected based on a recommendation by Craig.  Is the CVS available
from:

cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout jakarta-struts

not the newest code?
Jack
 


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


Struts app to be passed a parameter (of some kind)

2004-11-11 Thread John Vincent
 Need one Struts app, but must have multiple URLs.
 
Thus
http://www.jv.com/company1
http://www.jv.com/company2
 
actually start the same Struts app, say
 
http://www.jv.com/myApp
 
but must "pass" something into the Struts app so that it knows who, or 
rather, which URL invoked it.
 
Thoughts:

Write a servlet, handles multiple URLs, init-param set to a unique value 
for each servlet. 
Add a header into the http response object before issuing the redirect.
Redirect to the Struts app.

Where in a Struts app can I pick up the header (or other)?

The Struts app, in web.xml, has a welcome file of logon.jsp. Could I get 
the header here? Doesn't seem to work. 

Any ideas? 
 
John 





NOTICE:  This communication may contain confidential, proprietary or 
legally privileged information. It is intended only for the person(s) to 
whom it is addressed.  If you are not an intended recipient, you may not 
use, read, retransmit, disseminate or take any action in reliance upon it. 
Please notify the sender that you have received it in error and 
immediately delete the entire communication, including any attachments. 
Towers Perrin does not encrypt and cannot ensure the confidentiality or 
integrity of external e-mail communications and, therefore, cannot be 
responsible for any unauthorized access, disclosure, use or tampering that 
may occur during transmission.  This communication is not intended to 
create or modify any obligation, contract or warranty of Towers Perrin, 
unless the firm clearly expresses such an intent.


Re: Pre-populate form

2004-11-11 Thread Jeff Beal
Every JSP page in my application is going to have two actions associated 
with it.  One action will always be called prior to displaying the JSP 
page.  The other will be called to process the user's input.  In the 
struts-config, both of these actions are configured with the same form 
bean.  Thus, when Action 1 is called, it has an instance of the 
ActionForm and that instance is already in the appropriate scope, etc. 
All I have to do is populate the values and the JSP page can display them.

struts-config.xml:

  
  



In my AddInsuranceAction, I can populate the InsuranceBean with 
information from the database and the newinsurance.jsp will "just see it".

-- Jeff
Roland Carlsson wrote:
Hi!
I am looking for a better way to pre-populate my (html)forms when building
to allow the users to edit data from a database.
I know that I can create an populate a DynaValidatorBean but I don't know
where to put it so that I can use it from my (html)from.
Thanks in advance
Roland Carlsson
Ps: The mail-arcive doesn't work, so I appologize if I repost something that
already have been answerd.

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


Re: Indexed Properties, checkbox

2004-11-11 Thread Rafael Cardoso
I might be missunderstood your idea, but here you start navigate with JSP and then go to 
the Action "/DisplayNestedPropertiesAction.do". You can set your checkbox in 
two ways:
if you need to set up all checkboxes to false (or true, or fixed values) on the initialization of the ActionForm, you should use the reset() method of the actionForm.
if you need to set up checkboxes with other "non-fixed" values, you will need to create one action before to set up the ActionForm. In that Action you should instantiate your actionForm, and then populate your property of the checkboxes and then you ActionFoward to the JSP. 

I Hope it helps...
[]´s
Rafael Cardoso


Ryan julius wrote:
Hi, 

I have investigated the indexed properties as follows.
structure of my jsp page:
===

 



"> 






 



ActionForm:
=
public class NestedPropertiesForm extends FWKActionForm{
/**
* 

*/
public NestedPropertiesForm() {
super();
}

/**
* Permet de récupérer la collection "skills" des objets skillBean
*/
protected List skills = new ArrayList();
/**
* Permet de récupérer la collection "skills" des objets skillBean
*/
public List getSkills() {
return skills;
}
public void setSkills(List skills) {
this.skills = skills;
}

/**
* Permet de récupérer dans l'action, l'objet indicé "index" de la liste. 

* @param index
* @return
*/
public SkillBean getSkills(int index) {
// automatically grow List size
while (index >= skills.size()) {
skills.add(new SkillBean());
}
return (SkillBean)skills.get(index);
}

public void reset(ActionMapping actionMapping, HttpServletRequest 
httpServletRequest) {
//I would like to initialize the checkbox properties here to false...
}

public void init(){
skills = new ArrayList();
}
}
embeded Bean:
**
public class SkillBean {

private boolean checkbox;
private String qualification;
private String profession;

/**
* 

*/
public SkillBean() {
super();
// TODO Raccord de constructeur auto-généré
}
/**
* 

*/
public SkillBean(boolean checkBox, String qualif, String profession) {
super();
// TODO Raccord de constructeur auto-généré
this.checkbox = checkBox;
this.qualification = qualif;
this.profession = profession;
}
/**
* @return
*/
public boolean getCheckbox() {
return checkbox;
}
/**
* @return
*/
public String getProfession() {
return profession;
}
/**
* @return
*/
public String getQualification() {
return qualification;
}
/**
* @param string
*/
public void setCheckBox(boolean checkBox) {
this.checkbox = checkBox;
}
/**
* @param string
*/
public void setQualification(String string) {
qualification = string;
}
/**
* @param string
*/
public void setProfession(String string) {
profession = string;
}
}
Action:
=
public class NestedPropertiesAction extends Action{
public ActionForward execute(ActionMapping arg0, 

ActionForm arg1, 

HttpServletRequest arg2, 

HttpServletResponse arg3) throws Exception {
NestedPropertiesForm nestedPropertiesForm = (NestedPropertiesForm)arg1; 

List skillBeanList = createSkillList();
nestedPropertiesForm.setSkills(skillBeanList);
return arg0.findForward("nestedPropertiesPage");
}
}
public static List createSkillList(){
List skillBeanList = new ArrayList();
SkillBean skillBean1 = new SkillBean(false, "Engineer", "Developer");
SkillBean skillBean2 = new SkillBean(true, "practician", "surg");
SkillBean skillBean3 = new SkillBean(false, "Architect", "Maintenance 
Appareil");
skillBeanList.add(skillBean1);
skillBeanList.add(skillBean2);
skillBeanList.add(skillBean3);
return skillBeanList;
}
My questions:
==
Please:
=
1.)Am I missing something in this implementation?
2.) Knowing that the right way of correctly using a checkbox is to initialize 

the checkbox property in the reset method; how can I do this in my actionForm
with the indexProperties?
3.) How can I get only the checked Bean in my action. 

When I select a checkbox, I would like to trigger an action (/ViewTheSkill.do). 
How can I get (ONLY) the corresponding bean in my action? 
ViewTheSkill.execute(). I would like to use this bean for further processing.
public class ViewTheSkillAction extends Action{
public ActionForward execute(ActionMapping arg0, 

ActionForm arg1, 

HttpServletRequest arg2, 

HttpServletResponse arg3) throws Exception {
NestedPropertiesForm nestedPropertiesForm = (NestedPropertiesForm)arg1; 

//HOW CAN I get the checked SkillBean here?
}
}
Thanks very much.

-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !
 


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


Re: contrib/struts-shale-mailreader

2004-11-11 Thread Niall Pemberton
Struts has moved from CVS to subversion - the old cvs repository still
exists, but its out of date now as its not being maintained.

http://svn.apache.org/viewcvs.cgi/struts/trunk/?root=Apache-SVN

http://www.apache.org/dev/version-control.html

Niall

- Original Message - 
From: "Dakota Jack" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 12:07 PM
Subject: contrib/struts-shale-mailreader


> I got the latest CVS using a command line for jakarta-struts but it
> did not contain the folder contrib/struts-shale-mailreader which I
> expected based on a recommendation by Craig.  Is the CVS available
> from:
>
>
>
> cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout
jakarta-struts
>
>
>
> not the newest code?
>
> Jack
>
>
> -- 
> "You can't wake a person who is pretending to be asleep."
>
> ~Native Proverb~
>
> "Each man is good in His sight. It is not necessary for eagles to be
crows."
>
> ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
>
> -
> 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]



Re: Why stick with struts.

2004-11-11 Thread Mark Lowe
On Wed, 10 Nov 2004 21:41:53 -0800, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> A lot of my feelings on this have been posted on another thread, so I
> just want to ask one question from Mark's message.
> 
> On Wed, 10 Nov 2004 10:55:25 +0100, Mark Lowe <[EMAIL PROTECTED]> wrote:
> [snip]
> > As an auxilary point I have no idea why rendering javascript links was
> > considered a good option for commandLink. As its the only means of
> > generating dynamic menus with the standard tags, it ,means that those
> > rancid little spiders that cant read javascript wont be able to index
> > the pages.
> 
> Can you please describe a technique whereby a hyperlink can submit a
> form, *without* using JavaScript?  I'm sure the JSF RI team would be
> happy to implement that; we didn't like having to use JavaScript
> either, but could not identify a solution that met the submission
> requirement.

Craig

Okay submitting a form perhaps not, but having a mechanism where
outputLink or something can call an action/action listener. As things
are there is no provision to be able to simply generate a simple
navigation bar/list of links.

Perhaps allowing commandLink outside a form would, that renders
differently could be one idea. So when  it would render a link. How that link
would render to call the target method in the backing bean I'm not
certain.

The link is still a command. Despite disliking the javascript, I was
prepared to live with it. But there's little I can do if it doesn't
work.

I hope JSF does come through, but as a user I've been stung badly and
as a result less brave in my choices of technology adoption. I didn't
touch JSF for 1.0 to avoid any bleeding edge problems, waited until
1.1 figured I'd live with multipart forms not being supported. But
still ended up getting cut.

Mark


> 
> Note that just composing the correct URL into a hyperlink and doing a
> GET doesn't count -- that won't restore the state of the component
> tree if the application developer is using client side state saving.
> 
> Craig
>

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



contrib/struts-shale-mailreader

2004-11-11 Thread Dakota Jack
I got the latest CVS using a command line for jakarta-struts but it
did not contain the folder contrib/struts-shale-mailreader which I
expected based on a recommendation by Craig.  Is the CVS available
from:



cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic checkout jakarta-struts



not the newest code?

Jack


-- 
"You can't wake a person who is pretending to be asleep."

~Native Proverb~

"Each man is good in His sight. It is not necessary for eagles to be crows."

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

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



SV: Pre-populate form

2004-11-11 Thread Roland Carlsson
Hi Mark!

I belive that there must be a simpler solution to this. I know that I can
creata a DynaActionForm and then pupulate that by calling the set-method. So
shouldn't it be possible to create a DynaActionForm in a "populateAction"
and then put it into a "scope" with a key and then forward to the
(html)form?

Thanks in advance
Roland Carlsson




Den 04-11-11 12.26, skrev "Mark Benussi" <[EMAIL PROTECTED]>:

> Roland,
> 
> I dont know if this solution is not the approved way but I do the following.
> 
> I have a CreateForm which extends the ActionForm. It contains all the
> properties that map to the database and the validation rules.
> 
> I then have an UpdateForm which extends the CreateForm and implements its
> parents validate (If required). It can also hold data above the CreateForm
> such as the key of the data being updated
> 
> When I want to update the data I call an action which does the following.
> 
> BeginUpdateData
> 
> Retrieves the data to be updated.
> 
> Generates an UpdateForm that represents the data.
> 
> Place in the session.
> 
> Then in the UpdateForm reset method.
> 
> I pull the UpdateForm from the session and popluate the data from itself (If
> that makes sense).
> 
> Then you can use the same pages pretty much to updated the data as it will
> be prepoluted and you also have a handle on the data you are updating.
> 
> 
> Original Message Follows
> From: Roland Carlsson <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Pre-populate form
> Date: Thu, 11 Nov 2004 12:07:38 +0100
> 
> Hi!
> 
> I am looking for a better way to pre-populate my (html)forms when building
> to allow the users to edit data from a database.
> 
> I know that I can create an populate a DynaValidatorBean but I don't know
> where to put it so that I can use it from my (html)from.
> 
> Thanks in advance
> Roland Carlsson
> 
> Ps: The mail-arcive doesn't work, so I appologize if I repost something that
> already have been answerd.
> 
> 
> 
> -
> 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]



Indexed Properties, checkbox

2004-11-11 Thread Ryan julius

Hi, 

I have investigated the indexed properties as follows.

structure of my jsp page:

===



 





"> 











 





ActionForm:

=

public class NestedPropertiesForm extends FWKActionForm{

/**

* 

*/

public NestedPropertiesForm() {

super();

}



/**

* Permet de récupérer la collection "skills" des objets skillBean

*/

protected List skills = new ArrayList();

/**

* Permet de récupérer la collection "skills" des objets skillBean

*/

public List getSkills() {

return skills;

}

public void setSkills(List skills) {

this.skills = skills;

}



/**

* Permet de récupérer dans l'action, l'objet indicé "index" de la liste. 

* @param index

* @return

*/

public SkillBean getSkills(int index) {

// automatically grow List size

while (index >= skills.size()) {

skills.add(new SkillBean());

}

return (SkillBean)skills.get(index);

}



public void reset(ActionMapping actionMapping, HttpServletRequest 
httpServletRequest) {

//I would like to initialize the checkbox properties here to false...

}



public void init(){

skills = new ArrayList();

}

}

embeded Bean:

**

public class SkillBean {



private boolean checkbox;

private String qualification;

private String profession;



/**

* 

*/

public SkillBean() {

super();

// TODO Raccord de constructeur auto-généré

}

/**

* 

*/

public SkillBean(boolean checkBox, String qualif, String profession) {

super();

// TODO Raccord de constructeur auto-généré

this.checkbox = checkBox;

this.qualification = qualif;

this.profession = profession;

}

/**

* @return

*/

public boolean getCheckbox() {

return checkbox;

}

/**

* @return

*/

public String getProfession() {

return profession;

}

/**

* @return

*/

public String getQualification() {

return qualification;

}

/**

* @param string

*/

public void setCheckBox(boolean checkBox) {

this.checkbox = checkBox;

}

/**

* @param string

*/

public void setQualification(String string) {

qualification = string;

}

/**

* @param string

*/

public void setProfession(String string) {

profession = string;

}

}

Action:

=

public class NestedPropertiesAction extends Action{

public ActionForward execute(ActionMapping arg0, 

ActionForm arg1, 

HttpServletRequest arg2, 

HttpServletResponse arg3) throws Exception {

NestedPropertiesForm nestedPropertiesForm = (NestedPropertiesForm)arg1; 

List skillBeanList = createSkillList();

nestedPropertiesForm.setSkills(skillBeanList);

return arg0.findForward("nestedPropertiesPage");

}

}

public static List createSkillList(){

List skillBeanList = new ArrayList();

SkillBean skillBean1 = new SkillBean(false, "Engineer", "Developer");

SkillBean skillBean2 = new SkillBean(true, "practician", "surg");

SkillBean skillBean3 = new SkillBean(false, "Architect", "Maintenance 
Appareil");

skillBeanList.add(skillBean1);

skillBeanList.add(skillBean2);

skillBeanList.add(skillBean3);

return skillBeanList;

}

My questions:

==

Please:

=

1.)Am I missing something in this implementation?

2.) Knowing that the right way of correctly using a checkbox is to initialize 

the checkbox property in the reset method; how can I do this in my actionForm

with the indexProperties?

3.) How can I get only the checked Bean in my action. 

When I select a checkbox, I would like to trigger an action (/ViewTheSkill.do). 
How can I get (ONLY) the corresponding bean in my action? 
ViewTheSkill.execute(). I would like to use this bean for further processing.

public class ViewTheSkillAction extends Action{

public ActionForward execute(ActionMapping arg0, 

ActionForm arg1, 

HttpServletRequest arg2, 

HttpServletResponse arg3) throws Exception {

NestedPropertiesForm nestedPropertiesForm = (NestedPropertiesForm)arg1; 

//HOW CAN I get the checked SkillBean here?

}

}

Thanks very much.



-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour 
dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !

RE: Validator - Redirects or Forwards?

2004-11-11 Thread Daniel Perry
It uses forward (otherwise the errors get lost between requests!).

Do you get an error?

Daniel.

> -Original Message-
> From: Yagiz Erkan [mailto:[EMAIL PROTECTED]
> Sent: 11 November 2004 09:34
> To: [EMAIL PROTECTED]
> Subject: Validator - Redirects or Forwards?
>
>
> When the validation fails, does the Validator use "redirect" or "forward"?
> Because I can't see my JSP when the validation fails and I keep
> my JSPs under
> WEB-INF. Do you have an idea what may go wrong?
>
> Thanks,
>
>  - Yagiz -
>
> -
> 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]



indexed property and checkbox (may be newbye question)

2004-11-11 Thread Ryan julius

Hi, 

I have investigated the indexed properties as follows.

structure of my jsp page:

===



 





"> 











 





ActionForm:

=

public class NestedPropertiesForm extends FWKActionForm{

/**

* 

*/

public NestedPropertiesForm() {

super();

}



/**

* Permet de récupérer la collection "skills" des objets skillBean

*/

protected List skills = new ArrayList();

/**

* Permet de récupérer la collection "skills" des objets skillBean

*/

public List getSkills() {

return skills;

}

public void setSkills(List skills) {

this.skills = skills;

}



/**

* Permet de récupérer dans l'action, l'objet indicé "index" de la liste. 

* @param index

* @return

*/

public SkillBean getSkills(int index) {

// automatically grow List size

while (index >= skills.size()) {

skills.add(new SkillBean());

}

return (SkillBean)skills.get(index);

}



public void reset(ActionMapping actionMapping, HttpServletRequest 
httpServletRequest) {

//I would like to initialize the checkbox properties here to false...

}



public void init(){

skills = new ArrayList();

}

}

embeded Bean:

**

public class SkillBean {



private boolean checkbox;

private String qualification;

private String profession;



/**

* 

*/

public SkillBean() {

super();

// TODO Raccord de constructeur auto-généré

}

/**

* 

*/

public SkillBean(boolean checkBox, String qualif, String profession) {

super();

// TODO Raccord de constructeur auto-généré

this.checkbox = checkBox;

this.qualification = qualif;

this.profession = profession;

}

/**

* @return

*/

public boolean getCheckbox() {

return checkbox;

}

/**

* @return

*/

public String getProfession() {

return profession;

}

/**

* @return

*/

public String getQualification() {

return qualification;

}

/**

* @param string

*/

public void setCheckBox(boolean checkBox) {

this.checkbox = checkBox;

}

/**

* @param string

*/

public void setQualification(String string) {

qualification = string;

}

/**

* @param string

*/

public void setProfession(String string) {

profession = string;

}

}

Action:

=

public class NestedPropertiesAction extends Action{

public ActionForward execute(ActionMapping arg0, 

ActionForm arg1, 

HttpServletRequest arg2, 

HttpServletResponse arg3) throws Exception {

NestedPropertiesForm nestedPropertiesForm = (NestedPropertiesForm)arg1; 

List skillBeanList = createSkillList();

nestedPropertiesForm.setSkills(skillBeanList);

return arg0.findForward("nestedPropertiesPage");

}

}

public static List createSkillList(){

List skillBeanList = new ArrayList();

SkillBean skillBean1 = new SkillBean(false, "Engineer", "Developer");

SkillBean skillBean2 = new SkillBean(true, "practician", "surg");

SkillBean skillBean3 = new SkillBean(false, "Architect", "Maintenance 
Appareil");

skillBeanList.add(skillBean1);

skillBeanList.add(skillBean2);

skillBeanList.add(skillBean3);

return skillBeanList;

}

My questions:

==

Please:

=

1.)Am I missing something in this implementation?

2.) Knowing that the right way of correctly using a checkbox is to initialize 

the checkbox property in the reset method; how can I do this in my actionForm

with the indexProperties?

3.) How can I get only the checked Bean in my action. 

When I select a checkbox, I would like to trigger an action (/ViewTheSkill.do). 
How can I get (ONLY) the corresponding bean in my action? 
ViewTheSkill.execute(). I would like to use this bean for further processing.

public class ViewTheSkillAction extends Action{

public ActionForward execute(ActionMapping arg0, 

ActionForm arg1, 

HttpServletRequest arg2, 

HttpServletResponse arg3) throws Exception {

NestedPropertiesForm nestedPropertiesForm = (NestedPropertiesForm)arg1; 

//HOW CAN I get the checked SkillBean here?

}

}

Thanks very much.



-
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour 
dialoguer instantanément avec vos amis.Téléchargez GRATUITEMENT ici !

The Future of Struts Validation

2004-11-11 Thread William Ferguson
Now that I've had a year or so or heavy Struts use, I've come to believe that 
(IMHO) validation within Struts is a little less clear and concise than it 
could otherwise be with a few small changes.

Currently, validation is defined by specifying a true/false value for the 
'validate' attribute for an ActionMapping, and which validation to perform is 
defined by either the ActionMapping's (Form) 'name' or 'path' attribute 
depending on whether the Form extends from ValidatorActionForm or not.

It seems to me that it would be clearer to introduce a 'validation' attribute 
into ActionMapping which defines the Id of the validation (if any) to perform. 
This would supercede the 'validate' attribute and removes the responsibility of 
identifying the validation target from the combination of the (Form) 'name' 
attribute and the ActionForm inheritance hierarchy.

It also allows all the benefits of using (currently) using a 
ValidatorActionForm to validate based on ActionMapping path, plus those of 
using Form named mappings, while also allowing the freedom to mix, match and 
reuse validations across ActionMappings.

It should be easy to make this new addition entirely backward compatible. Ie If 
'validation' attribute is not found then look for current attributes and follow 
the existing validation path, at least for some deprecation period.

Once this refactoring has been achieved, it also opens up the possibility of 
further enhancing the existing validation mechanism. Ie Allowing validations to 
contain other validations etc. Though I would first start by simplifying the 
validation definitions, which I also find somewhat non-intuitive at times.

Anyway, just my 2 cents.
I'd like to thank the Struts development community for a pretty decent 
framework, especially those worked on Tiles - it really rocks!

William Ferguson


RE: Pre-populate form

2004-11-11 Thread Mark Benussi
Roland,
I dont know if this solution is not the approved way but I do the following.
I have a CreateForm which extends the ActionForm. It contains all the 
properties that map to the database and the validation rules.

I then have an UpdateForm which extends the CreateForm and implements its 
parents validate (If required). It can also hold data above the CreateForm 
such as the key of the data being updated

When I want to update the data I call an action which does the following.
BeginUpdateData
Retrieves the data to be updated.
Generates an UpdateForm that represents the data.
Place in the session.
Then in the UpdateForm reset method.
I pull the UpdateForm from the session and popluate the data from itself (If 
that makes sense).

Then you can use the same pages pretty much to updated the data as it will 
be prepoluted and you also have a handle on the data you are updating.

Original Message Follows
From: Roland Carlsson <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Pre-populate form
Date: Thu, 11 Nov 2004 12:07:38 +0100
Hi!
I am looking for a better way to pre-populate my (html)forms when building
to allow the users to edit data from a database.
I know that I can create an populate a DynaValidatorBean but I don't know
where to put it so that I can use it from my (html)from.
Thanks in advance
Roland Carlsson
Ps: The mail-arcive doesn't work, so I appologize if I repost something that
already have been answerd.

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


Re: A new paradigm of Struts development

2004-11-11 Thread Adam Hardy
A lightweight framework must be simple to implement, for RAD or for 
prototyping or for web newbies. Given a large complicated application, 
should an architect choose a lightweight framework? No. She / he must 
recognise the limitations of the framework.

JSF seems to be lightweight. It simplifies and speeds up development. So 
what limitations does it have? I don't know JSF (I must download it (and 
shale)), but it sounds like you've sacrificed the ability to deal with 
multiple Command scenarios (submit buttons) on a robust controller.

The last page I saw on my previous project had 10 submit buttons. What I 
see is developers writing monolithic tracts of code in their Action 
classes to handle all Commands at once. E.g. a search page with search 
again, back, fwd, begin, end etc.

I think page-driven development frameworks would exacerbate this problem 
unless they clarify with eloquence up-front how to make a clear 
seperation of the POST processing from the page preparation required for 
the next page.

Otherwise the uninitiated are always going to write brittle, 
hard-to-maintain, hard-to-extend apps.

What I want to see in the future for big apps is a DTD or xml schema 
that brings JSP code and XHTML mark-up under control. Something that is 
easily editable by my editor of choice, using syntax-highlighting to 
show me where my XHTML is up the swanny.

If JSF provides some view components that will output decent table-less 
XHTML, then I'll jump at it.

Adam
On 11/11/2004 04:55 AM Craig McClanahan wrote:
> I'm afraid you'll have to show me that this outcome is likely before
> I'll believe any generalizations of this kind of statement.  In
> particular, what specific anti-patterns do you think developers will
> fall prey to?
[snip]
> ., it is far from clear to me that the capabilities JSF
> does provide are insufficient by themselves for medium-to-large scale
> applications -- the definition of "lightweight" is going to be
> interesting to identify :-).
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


AW: How to iterate neseted beans?

2004-11-11 Thread sebastian . steinfeld
I found my mistake...

in the tag "html:form" I specified the wrong Form.

Sorry,
Sebastian Steinfeld


-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. November 2004 11:51
An: 'Struts Users Mailing List'
Betreff: AW: How to iterate neseted beans?


Hi Niall,

I tryed, but it doesn't working... 
When I call the page, the getter of the attributes are called and the values
are shown in the input-fields. But when I am pushing the submit button there
is no setter called.

Thanks,
Sebastian Steinfeld


-Ursprüngliche Nachricht-
Von: Niall Pemberton [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. November 2004 11:28
An: Struts Users Mailing List
Betreff: Re: How to iterate neseted beans?


try...


  

  


Niall

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 9:57 AM
Subject: How to iterate neseted beans?


> Hi,
> 
> I want to iterate through a nested bean, it is 3D.
> 
> The first bean contains an ArrayList, of the second bean. 
> Each second bean contains an ArrayList of the third bean.
> Each Third bean contains different attributes.
> 
> I want to print Attributes of the third bean in text-field and the user
> should edit them 
> and committ changes by pushing the submit-button.
> 
> I can call the getter of the attributes in the third bean, but how can I
> make the
> application call the setter?
> 
> 
> This is my code... what should I do?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Can anyone help me?
>  
> 
> mfg Sebastian Steinfeld
> 
> -
> 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]




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



Pre-populate form

2004-11-11 Thread Roland Carlsson
Hi!

I am looking for a better way to pre-populate my (html)forms when building
to allow the users to edit data from a database.

I know that I can create an populate a DynaValidatorBean but I don't know
where to put it so that I can use it from my (html)from.

Thanks in advance
Roland Carlsson

Ps: The mail-arcive doesn't work, so I appologize if I repost something that
already have been answerd.



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



AW: How to iterate neseted beans?

2004-11-11 Thread sebastian . steinfeld
Hi Niall,

I tryed, but it doesn't working... 
When I call the page, the getter of the attributes are called and the values
are shown in the input-fields. But when I am pushing the submit button there
is no setter called.

Thanks,
Sebastian Steinfeld


-Ursprüngliche Nachricht-
Von: Niall Pemberton [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 11. November 2004 11:28
An: Struts Users Mailing List
Betreff: Re: How to iterate neseted beans?


try...


  

  


Niall

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 9:57 AM
Subject: How to iterate neseted beans?


> Hi,
> 
> I want to iterate through a nested bean, it is 3D.
> 
> The first bean contains an ArrayList, of the second bean. 
> Each second bean contains an ArrayList of the third bean.
> Each Third bean contains different attributes.
> 
> I want to print Attributes of the third bean in text-field and the user
> should edit them 
> and committ changes by pushing the submit-button.
> 
> I can call the getter of the attributes in the third bean, but how can I
> make the
> application call the setter?
> 
> 
> This is my code... what should I do?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Can anyone help me?
>  
> 
> mfg Sebastian Steinfeld
> 
> -
> 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]



AW: talking about paradigms

2004-11-11 Thread Rosenberg, Leon


> -Ursprüngliche Nachricht-
> Von: Mark Lowe [mailto:[EMAIL PROTECTED]
> Gesendet: Donnerstag, 11. November 2004 11:04
> An: Struts Users Mailing List
> Betreff: Re: talking about paradigms
> 
> I don't think EL breaks the MVC pattern. Although it leaves you free
> to do so if you so wish. I don't see a world appart from using
> 
> 
> 
> 
> 
> 
> 
> ${person.name}


No, but what about 

 ? 
(not sure about the syntax).


> 
> More to he point the fmt tag lib put the presentation control back in
> the hands of the site builder. Otherwise you end up addressing view
> issues in your actions or even action forms.

And what about database access tags?

It's the same thing, why there are no pointers in java (besides that it's 
meanwhile impossible because of the gc): give the user something which can be 
misused, and he will.

Leon 


> 
> Mark
> 
> On Thu, 11 Nov 2004 10:42:27 +0100, Rosenberg, Leon
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > since we started talking about paradigms... how does JSTL and especially
> > EL fit into MVC paradigm?
> >
> > Or, the better question, why does struts support EL nowadays, when it
> > breaks the paradigm?
> >
> > Regards
> >
> > Leon
> >
> >
> 
> -
> 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]



Re: How to iterate neseted beans?

2004-11-11 Thread Niall Pemberton
try...


  

  


Niall

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 9:57 AM
Subject: How to iterate neseted beans?


> Hi,
> 
> I want to iterate through a nested bean, it is 3D.
> 
> The first bean contains an ArrayList, of the second bean. 
> Each second bean contains an ArrayList of the third bean.
> Each Third bean contains different attributes.
> 
> I want to print Attributes of the third bean in text-field and the user
> should edit them 
> and committ changes by pushing the submit-button.
> 
> I can call the getter of the attributes in the third bean, but how can I
> make the
> application call the setter?
> 
> 
> This is my code... what should I do?
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Can anyone help me?
>  
> 
> mfg Sebastian Steinfeld
> 
> -
> 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]



Re: talking about paradigms

2004-11-11 Thread Mark Lowe
I don't think EL breaks the MVC pattern. Although it leaves you free
to do so if you so wish. I don't see a world appart from using







${person.name}

More to he point the fmt tag lib put the presentation control back in
the hands of the site builder. Otherwise you end up addressing view
issues in your actions or even action forms.

Mark

On Thu, 11 Nov 2004 10:42:27 +0100, Rosenberg, Leon
<[EMAIL PROTECTED]> wrote:
> Hi,
> 
> since we started talking about paradigms... how does JSTL and especially
> EL fit into MVC paradigm?
> 
> Or, the better question, why does struts support EL nowadays, when it
> breaks the paradigm?
> 
> Regards
> 
> Leon
> 
>

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



How to iterate neseted beans?

2004-11-11 Thread sebastian . steinfeld
Hi,

I want to iterate through a nested bean, it is 3D.

The first bean contains an ArrayList, of the second bean. 
Each second bean contains an ArrayList of the third bean.
Each Third bean contains different attributes.

I want to print Attributes of the third bean in text-field and the user
should edit them 
and committ changes by pushing the submit-button.

I can call the getter of the attributes in the third bean, but how can I
make the
application call the setter?


This is my code... what should I do?









Can anyone help me?
 

mfg Sebastian Steinfeld

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



talking about paradigms

2004-11-11 Thread Rosenberg, Leon
Hi,

 

since we started talking about paradigms... how does JSTL and especially
EL fit into MVC paradigm? 

Or, the better question, why does struts support EL nowadays, when it
breaks the paradigm? 

 

Regards

Leon



Re: how to pass values selected in a html select tag to a javascript function when a page loads

2004-11-11 Thread Srilatha Salla
Hi,

I call a javascript function when a option is selected in a drop down list. 
onchange=showTextField(actionselected,index). and display a textfield for some 
options.



I have to call same function when the page loads and display a text field for 
some options which were selected earlier for the same user.

so,how do i call pass the arguments onloading since I have the html select in a 
loop , I mean I have 11 dropdownlists and have to pass the option selected and 
index for each drop down list.

Thanks.
 







Erik Weber <[EMAIL PROTECTED]> wrote: I'm not sure if I understand completely, 
but could how about a 
JavaScript body "onload" call?

Erik


Srilatha Salla wrote:

>Hi,
> 
>In my application I have menu.jsp which has a ligic tag,
> 
>
> 
> 
> 
> 
> 
> 
> '>
> Select A Action
> 
> 
> 
> 
> " style="DISPLAY: none">
> 
> 
> 

> 
> 
> 
> 
> so I have the javascript function -
>
> function showOrHidePhoneNumber(actionselected,index) {
> alert(index);
> alert(actionselected);
> if(actionselected=="Transfer with prompt") {
> document.getElementById(index).style.display = "inline";
> } else if(actionselected=="Transfer without prompt"){
> document.getElementById(index).style.display = "inline";
> }else if(actionselected=="Transfer to operator"){
> document.getElementById(index).style.display = "inline";
> }else {
> document.getElementById(index).style.display = "none";
> }
> }
> which displays the textfield for phoneNumber only when the option selected is 
> "Transfer with prompt/Transfer without prompt/Reach operator", otherwise the 
> textfield for phone number is not displayed.
> 
> This is working fine when i add a menuentry.
> But when I have to come to this page to edit 
> I have to call the  showOrHidePhoneNumber(actionselected,index) 
> function 
> when the page loads and display phonenumber only if the options are as I 
> mentioned above. Please help me figure how out how to do this.
> 
>Thanks,
>Latha.
> 
>
> 
>-
>Do you Yahoo!?
> Check out the new Yahoo! Front Page. www.yahoo.com
> 
>

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





-
Do you Yahoo!?
 Check out the new Yahoo! Front Page. www.yahoo.com

Validator - Redirects or Forwards?

2004-11-11 Thread Yagiz Erkan
When the validation fails, does the Validator use "redirect" or "forward"?
Because I can't see my JSP when the validation fails and I keep my JSPs under
WEB-INF. Do you have an idea what may go wrong?

Thanks,

 - Yagiz -

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



Using non struts-config.xml MessageResource in the Validator

2004-11-11 Thread Christian Bjørnbak
Hi
I'm currently migrating a system from some homemade XML framework to Struts.
The system is an application service provider where lots of companies 
have the own db driven ResourceBundle for i18n.

All the companies use the same struts-config.xml as they all share the 
same Actions, Forms and jsps, and servlet's PathInfo decide which 
company's pages is requested..

The i18n for the texts on the pages is solved by extending the JSTL 
messageTag to use our own ResourceBundle.

Now the problem is the texts used at validation of errors...
I would like to be able to use the Struts Validator, but how do I tell 
the Validator to use a custom ResourceBundle/MessageResource instead of 
the one from struts-config.xml??

I've figured that extending the ValidatorPlugin is the entrence, but I 
can't find where the errors converted to texts..

Any pointers??
/Christian Bjørnbak
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]