Re: struts2 issue- not retaining..

2007-10-03 Thread Zarar Siddiqi
Yeah, you're going to have to load them every time.  You could store
the collections in session or application scope if that's feasible but
other than that you don't really have a choice.  Alternately, I think
the cleanest way of doing this might be to make an Ajax call to load
the third selection instead of reloading your page by submitting to
the action again.

If you choose to call the action every time, you can have your action
implement the Preparable interface where you can do the collection
initialization in the prepare() method.

Zarar

On 10/3/07, Jose4u <[EMAIL PROTECTED]> wrote:
>
> In my jsp file i have threecombo boxes.  1 & 2 needs to be loaded
> from the db and the 3rd needs to loaded based on the (2)second combo box
> selection. I have implemented in such a way that in my action i have 3
> collection objects. Intially b4 moving to jsp iam loading two collection
> object values from the db and in the jsp on change event of the (2)second
> list  box i am calling the action class again and loading the third
> collection object with values but my problem is the previous two collection
> object is null. do i need to load the previous two collection objects every
> time on calling the action class? Please provide me the solution how to
> implement in struts2.
>
> Thanks in advance
> joseph
> --
> View this message in context: 
> http://www.nabble.com/struts2-%3Cs%3Aselect%3E-issue--not-retaining..-tf4565452.html#a13031516
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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



struts2 issue- not retaining..

2007-10-03 Thread Jose4u

In my jsp file i have threecombo boxes.  1 & 2 needs to be loaded
from the db and the 3rd needs to loaded based on the (2)second combo box
selection. I have implemented in such a way that in my action i have 3
collection objects. Intially b4 moving to jsp iam loading two collection
object values from the db and in the jsp on change event of the (2)second
list  box i am calling the action class again and loading the third
collection object with values but my problem is the previous two collection
object is null. do i need to load the previous two collection objects every
time on calling the action class? Please provide me the solution how to
implement in struts2. 

Thanks in advance 
joseph
-- 
View this message in context: 
http://www.nabble.com/struts2-%3Cs%3Aselect%3E-issue--not-retaining..-tf4565452.html#a13031516
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: Inheritance within form beans

2007-10-03 Thread Kothari, Kailash
You're right about letting users edit these attributes - they don't.

The reality is that the form bean is used to hold a lot more than form
data, it also holds info that's typically stored in the session.

I have to do some thinking about simplifying this like you said..

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 03, 2007 3:47 PM
To: Struts Users Mailing List
Subject: Re: Inheritance within form beans

On 10/3/07, Kothari, Kailash <[EMAIL PROTECTED]> wrote:
> Ok, that's quite interesting..
>
> I think I just need to find a efficient way of doing the deep copy 
> because my parent class has thousands of attributes in all including 
> nested attributes..

Hmm "thousands" of attributes? I doubt you are letting the user edit all
of them? Obviously I don' t know your user requirements, but wouldn't
you only need to copy over things the user can edit? Is it really 'that'
much stuff (including 'that' much nested stuff) they are actually
editing? Just curious. Maybe there is a way to simplify this a bit?

-
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 debug mode

2007-10-03 Thread Stephen Boudreaux
I've found that Eclipse can be confusing when you want to attach the
source of a library. Namely, you can't right click a library and
select properties when in the J2EE view. You can go to the Java view
and go there to attach the source there. If you are still having
mysterious issues, you might want to consider jumping onto Eclipse
Europa (3.3) WTP (I think they made it alot easier to get set up), or
alternatively use the Red Hat Developer Studio (which is Eclipse 3.3
plus WTP plus several other plugins).

On 10/3/07, João Vieira da Luz <[EMAIL PROTECTED]> wrote:
> in order to go third party classes you must have source attached those third
> party jars or you could use jad plugin (http://jadclipse.sourceforge.net/).
>
>
>
> On 10/2/07, Viplav Kallepu <[EMAIL PROTECTED]> wrote:
> >
> > Thanks for the reply.. when I put breakpoints in my action class and start
> > the server in debugging mode and run my application in browser.. its
> > stopping at the breakpoint and not going forward(It is showing it in the
> > debug console)..I feel it is not able to find the source files as in
> > .deployables donot contain source files.. Can anyone help me sorting out
> > this..
> >
> > On 10/2/07, João Vieira da Luz <[EMAIL PROTECTED]> wrote:
> > >
> > > Remote debugging is the keyword. WTP already supports that.
> > >
> > > On 10/2/07, Viplav Kallepu <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I am using struts 1.3.8 with eclipse 3.1 (wtp) and tomcat 5.5.  Can
> > > anyone
> > > > please tell me how to enable debugging in it like we debug the core
> > java
> > > > application in eclipse. I googled it but the I wasn't able to find a
> > > > single
> > > > correct solution to try (I cant use myeclipse because I have to use
> > > > eclipse
> > > > in my work).
> > > >
> > > > --
> > > > Regards
> > > > Viplav Kallepu
> > > >
> > >
> >
> >
> >
> > --
> > Regards
> > Viplav Kallepu
> >
>

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



Re: Struts debug mode

2007-10-03 Thread João Vieira da Luz
in order to go third party classes you must have source attached those third
party jars or you could use jad plugin (http://jadclipse.sourceforge.net/).



On 10/2/07, Viplav Kallepu <[EMAIL PROTECTED]> wrote:
>
> Thanks for the reply.. when I put breakpoints in my action class and start
> the server in debugging mode and run my application in browser.. its
> stopping at the breakpoint and not going forward(It is showing it in the
> debug console)..I feel it is not able to find the source files as in
> .deployables donot contain source files.. Can anyone help me sorting out
> this..
>
> On 10/2/07, João Vieira da Luz <[EMAIL PROTECTED]> wrote:
> >
> > Remote debugging is the keyword. WTP already supports that.
> >
> > On 10/2/07, Viplav Kallepu <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi,
> > >
> > > I am using struts 1.3.8 with eclipse 3.1 (wtp) and tomcat 5.5.  Can
> > anyone
> > > please tell me how to enable debugging in it like we debug the core
> java
> > > application in eclipse. I googled it but the I wasn't able to find a
> > > single
> > > correct solution to try (I cant use myeclipse because I have to use
> > > eclipse
> > > in my work).
> > >
> > > --
> > > Regards
> > > Viplav Kallepu
> > >
> >
>
>
>
> --
> Regards
> Viplav Kallepu
>


Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-10-03 Thread Dave Newton
I don't know enough about Maven to be able to help you
much, but it may be as simple as clearing your repo
cache (or whatever it's called). I am building from
trunk with the below change w/o any difficulty, at
least as of about a week ago.

--- chengas123 <[EMAIL PROTECTED]> wrote:

> 
> If this is a known issue, why doesn't someone commit
> the change?  I
> understand this is the development branch, but it's
> a pretty critical issue
> to not be able to build the project.  Among other
> things, it has to be a
> deterrent in attracting new developers.
> If I make that change I get:
> [WARNING] Unable to load parent project from
> repository: Could not find
> the model file 'C:\struts2\..\pom.xml'. for project
> unknown
> And then later on it actually tries to compile, but
> gets dozens of
> compilation errors.  The first of which is: 
>
>
C:\struts2\core\src\main\java\org\apache\struts2\components\Debug.java:[25,46]
> package com.opensymphony.xwork2.util.reflection does
> not exist
> 
> 
> 
> newton.dave wrote:
> > 
> > IIRC there is still an issue with trunk regarding
> the
> > opensymphony id; it's something like
> > "xwork.opensymphony.com" and needs to be just
> > "opensymphony"... um...
> > 
> > Index: core/pom.xml
> >
>
===
> > --- core/pom.xml(revision 580129)
> > +++ core/pom.xml(working copy)
> > @@ -55,7 +55,7 @@
> >  
> >  
> >  
> > -   
> > com.opensymphony.xwork
> > +   
> > opensymphony
> > 
> > xwork
> > 
> > 2.1-SNAPSHOT
> > 
> > sources
> > @@ -289,7 +289,7 @@
> > 
> >  
> >  
> > -   
> com.opensymphony.xwork
> > +opensymphony
> >  xwork
> >  2.1-SNAPSHOT
> >  
> > 
> > --- chengas123 <[EMAIL PROTECTED]>
> wrote:
> > 
> >> 
> >> Ok.  I tried downloading from SVN, but got a
> build
> >> error.  Maven could not
> >> find xwork-2.1-SNAPSHOT-sources.jar.  I had to
> >> download it manually from
> >> maven.opensymphony.com.  However, despite
> following
> >> the instruction maven
> >> was giving me I could not figure out how to build
> >> the project with the
> >> manual download.
> >> 
> >> -Ben
> >> 
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13029359
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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



Re: Inheritance within form beans

2007-10-03 Thread Rick Reumann
On 10/3/07, Kothari, Kailash <[EMAIL PROTECTED]> wrote:
> Ok, that's quite interesting..
>
> I think I just need to find a efficient way of doing the deep copy
> because my parent class has thousands of attributes in all including
> nested attributes..

Hmm "thousands" of attributes? I doubt you are letting the user edit
all of them? Obviously I don' t know your user requirements, but
wouldn't you only need to copy over things the user can edit? Is it
really 'that' much stuff (including 'that' much nested stuff) they are
actually editing? Just curious. Maybe there is a way to simplify this
a bit?

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



Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-10-03 Thread chengas123

If this is a known issue, why doesn't someone commit the change?  I
understand this is the development branch, but it's a pretty critical issue
to not be able to build the project.  Among other things, it has to be a
deterrent in attracting new developers.
If I make that change I get:
[WARNING] Unable to load parent project from repository: Could not find
the model file 'C:\struts2\..\pom.xml'. for project unknown
And then later on it actually tries to compile, but gets dozens of
compilation errors.  The first of which is: 
   
C:\struts2\core\src\main\java\org\apache\struts2\components\Debug.java:[25,46]
package com.opensymphony.xwork2.util.reflection does not exist



newton.dave wrote:
> 
> IIRC there is still an issue with trunk regarding the
> opensymphony id; it's something like
> "xwork.opensymphony.com" and needs to be just
> "opensymphony"... um...
> 
> Index: core/pom.xml
> ===
> --- core/pom.xml(revision 580129)
> +++ core/pom.xml(working copy)
> @@ -55,7 +55,7 @@
>  
>  
>  
> -   
> com.opensymphony.xwork
> +   
> opensymphony
> 
> xwork
> 
> 2.1-SNAPSHOT
> 
> sources
> @@ -289,7 +289,7 @@
> 
>  
>  
> -com.opensymphony.xwork
> +opensymphony
>  xwork
>  2.1-SNAPSHOT
>  
> 
> --- chengas123 <[EMAIL PROTECTED]> wrote:
> 
>> 
>> Ok.  I tried downloading from SVN, but got a build
>> error.  Maven could not
>> find xwork-2.1-SNAPSHOT-sources.jar.  I had to
>> download it manually from
>> maven.opensymphony.com.  However, despite following
>> the instruction maven
>> was giving me I could not figure out how to build
>> the project with the
>> manual download.
>> 
>> -Ben
>> 
> 

-- 
View this message in context: 
http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13029359
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: Inheritance within form beans

2007-10-03 Thread Kothari, Kailash
Ok, that's quite interesting..

I think I just need to find a efficient way of doing the deep copy
because my parent class has thousands of attributes in all including
nested attributes..

Thanks ! 

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 03, 2007 2:37 PM
To: Struts Users Mailing List
Subject: Re: Inheritance within form beans

On 10/3/07, Kothari, Kailash <[EMAIL PROTECTED]> wrote:
> Thanks a lot Rick. That gives me a new area to explore.
>
> The BeanUtils method - BeanUtils.copyProperties(Object target, Object
> src) - does give me a shallow copy of an object, Im trying to figure 
> out how to get a deep copy..

I might be the only one that does this, but I have all my form beans
extend an abstract  BaseActionForm that has these two methods:

public void populateValueObject(Object obj) throws
IllegalAccessException, InvocationTargetException {
 BeanUtils.copyProperties(obj, this);
}
public void populateForm(Object obj) throws
IllegalAccessException, InvocationTargetException {
 BeanUtils.copyProperties(this, obj);
}

The default behavior is nothing interesting - for example in a
setUpFormForEdit method in an Action:

public ActionForward setUpFormForEdit(...) {
  EmployeeForm eForm = (EmployeeForm)form;
  Employee employee = serviceLayer.getEmployee(someID);
  eForm.popluateForm( employee );
}

Similar thing on the way out   :

public ActionForward doEdit(...) {
  EmployeeForm eForm = (EmployeeForm)form;
  Employee employee = new Emloyee();
  eForm.populateValueObject( employee );
  serviceLayer.doUpdate(employee);
}

Where it becomes more interesting is when you have cases where BeanUtils
can't do everything. For example, I've had cases where if certain items
in a form were checked, it would alter what I do the resulting
ValueObject and same thing the other way.  In a more common sense,
sometimes people might have a form with a month, date, and year form
fields but ultimately your value object just needs a single "date."  I
found it nicer in these cases then to just override those base class
methods and make sure my form and value object is populated correctly
there instead of doing all that mess in my Action class.

In your case this is where you'd do your deep copy stuff

YourCustomActionForm extends YourBaseBeanActionForm {

public void populateForm(Object obj)   {
 //maybe first get a base shallow copy of some things
 //BeanUtils.copy or call super.populateForm(obj)

 //now do your custom deep copy stuff as needed }

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



JFreeChart Plugin

2007-10-03 Thread Phil404

There has been a little discussion recently about the JFreeChart plugin on
JIRA.  The issue is that the plugin defines a package in its
struts-plugin.xml which does not extend struts-default.  Therefore
JFreeChart actions cannot (without seemingly unnecessary extra work), for
example, have parameters passed to them.  The developer is concerned about
breaking code by making the change to the struts-plugin.xml to extend
struts-default.  Anyone have any opinions?

Phil

In detail, I would like the current struts-plugin.xml:




 
 
 150
 200
 
 


 

to be changed to:




 
 
 150
 200
 
 


 
-- 
View this message in context: 
http://www.nabble.com/JFreeChart-Plugin-tf4564647.html#a13028788
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Tiles 2 setup with Struts2

2007-10-03 Thread Emi Lu



here's the example:


...


see? it's enough that your packages extend tiles-default.


It works as well! That's nice! Thank you Robi.


I did:
===
[1] deleted




from struts.xml



[2] updated struts.xml:

from


to




I hope "tiles-default" supports/extends all default struts2 setup, right?

I mean, if package extends "tiles-default", all struts2 properties such as
  Menu
  /Success.jsp 
  /Logon.jsp   
  /Logon.jsp
  and other parameters will still work.

Cheers!










Emi Lu wrote:

Thank you very much !

It works!


Following Your comments, I did:


=

  org.apache.struts
  struts2-tiles-plugin
  ${version.tiles}
  compile


   to web.xml


the above looks like maven stuff.. shouldn't be in web.xml


Deleted from web.xml



[2] 
  class="org.apache.struts2.views.tiles.TilesResult"/>



  to the struts.xml file's package section


you could also extends tiles definition instead


May I get an example? Is it for java action class extends tiles or 
web.xml file update, would you tell me how?


For now, I did not change this section.



[3]
   
  TileHelloWorld
   

to the struts.xml file


ok


no change.



[4]   
  
  

   to tiles-defs.xml (this file is saved under /WEB-INF/)

   For struts2, where and how to notify the system to load the 
titles-defs.xml? I suppose that the system will find this file 
auto-matically?


that should be in WEB-INF/tiles.xml and not tiles-defs.xml
unless you include it..


rename to tile.xml; now the file is loaded auto-matically :)






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



Re: Inheritance within form beans

2007-10-03 Thread Rick Reumann
On 10/3/07, Kothari, Kailash <[EMAIL PROTECTED]> wrote:
> Thanks a lot Rick. That gives me a new area to explore.
>
> The BeanUtils method - BeanUtils.copyProperties(Object target, Object
> src) - does give me a shallow copy of an object, Im trying to figure out
> how to get a deep copy..

I might be the only one that does this, but I have all my form beans
extend an abstract  BaseActionForm that has these two methods:

public void populateValueObject(Object obj) throws
IllegalAccessException, InvocationTargetException {
 BeanUtils.copyProperties(obj, this);
}
public void populateForm(Object obj) throws IllegalAccessException,
InvocationTargetException {
 BeanUtils.copyProperties(this, obj);
}

The default behavior is nothing interesting - for example in a
setUpFormForEdit method in an Action:

public ActionForward setUpFormForEdit(...) {
  EmployeeForm eForm = (EmployeeForm)form;
  Employee employee = serviceLayer.getEmployee(someID);
  eForm.popluateForm( employee );
}

Similar thing on the way out   :

public ActionForward doEdit(...) {
  EmployeeForm eForm = (EmployeeForm)form;
  Employee employee = new Emloyee();
  eForm.populateValueObject( employee );
  serviceLayer.doUpdate(employee);
}

Where it becomes more interesting is when you have cases where
BeanUtils can't do everything. For example, I've had cases where if
certain items in a form were checked, it would alter what I do the
resulting ValueObject and same thing the other way.  In a more common
sense, sometimes people might have a form with a month, date, and year
form fields but ultimately your value object just needs a single
"date."  I found it nicer in these cases then to just override those
base class methods and make sure my form and value object is populated
correctly there instead of doing all that mess in my Action class.

In your case this is where you'd do your deep copy stuff

YourCustomActionForm extends YourBaseBeanActionForm {

public void populateForm(Object obj)   {
 //maybe first get a base shallow copy of some things
 //BeanUtils.copy or call super.populateForm(obj)

 //now do your custom deep copy stuff as needed
}

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



Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-10-03 Thread Dave Newton
IIRC there is still an issue with trunk regarding the
opensymphony id; it's something like
"xwork.opensymphony.com" and needs to be just
"opensymphony"... um...

Index: core/pom.xml
===
--- core/pom.xml(revision 580129)
+++ core/pom.xml(working copy)
@@ -55,7 +55,7 @@
 
 
 
-   
com.opensymphony.xwork
+   
opensymphony

xwork

2.1-SNAPSHOT

sources
@@ -289,7 +289,7 @@

 
 
-com.opensymphony.xwork
+opensymphony
 xwork
 2.1-SNAPSHOT
 

--- chengas123 <[EMAIL PROTECTED]> wrote:

> 
> Ok.  I tried downloading from SVN, but got a build
> error.  Maven could not
> find xwork-2.1-SNAPSHOT-sources.jar.  I had to
> download it manually from
> maven.opensymphony.com.  However, despite following
> the instruction maven
> was giving me I could not figure out how to build
> the project with the
> manual download.
> 
> -Ben
> 
> 
> 
> Musachy Barroso wrote:
> > 
> > I don't think it is on the snapshots.
> > 
> > musachy
> > 
> > On 10/3/07, chengas123
> <[EMAIL PROTECTED]> wrote:
> >>
> >> I found some error messages buried in my log
> file.  It seems 2.1 is not
> >> working for me because Dojo was moved to a plugin
> which I do not have. 
> >> Is
> >> there anyway to get a compiled version of this
> plugin?  Or do I have to
> >> download 2.1 from source control and compile it
> myself?
> >>
> >> Thanks,
> >> Ben
> >>
> > 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13028025
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


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



Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-10-03 Thread chengas123

Ok.  I tried downloading from SVN, but got a build error.  Maven could not
find xwork-2.1-SNAPSHOT-sources.jar.  I had to download it manually from
maven.opensymphony.com.  However, despite following the instruction maven
was giving me I could not figure out how to build the project with the
manual download.

-Ben



Musachy Barroso wrote:
> 
> I don't think it is on the snapshots.
> 
> musachy
> 
> On 10/3/07, chengas123 <[EMAIL PROTECTED]> wrote:
>>
>> I found some error messages buried in my log file.  It seems 2.1 is not
>> working for me because Dojo was moved to a plugin which I do not have. 
>> Is
>> there anyway to get a compiled version of this plugin?  Or do I have to
>> download 2.1 from source control and compile it myself?
>>
>> Thanks,
>> Ben
>>
> 

-- 
View this message in context: 
http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13028025
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Tiles 2 setup with Struts2

2007-10-03 Thread Roberto Nunnari

Hi Emi.

here's the example:


...


see? it's enough that your packages extend tiles-default.

Best regards.

--
Robi


Emi Lu wrote:

Thank you very much !

It works!


Following Your comments, I did:


=

  org.apache.struts
  struts2-tiles-plugin
  ${version.tiles}
  compile


   to web.xml


the above looks like maven stuff.. shouldn't be in web.xml


Deleted from web.xml



[2] 
  class="org.apache.struts2.views.tiles.TilesResult"/>



  to the struts.xml file's package section


you could also extends tiles definition instead


May I get an example? Is it for java action class extends tiles or 
web.xml file update, would you tell me how?


For now, I did not change this section.



[3]
   
  TileHelloWorld
   

to the struts.xml file


ok


no change.



[4]   
  
  

   to tiles-defs.xml (this file is saved under /WEB-INF/)

   For struts2, where and how to notify the system to load the 
titles-defs.xml? I suppose that the system will find this file 
auto-matically?


that should be in WEB-INF/tiles.xml and not tiles-defs.xml
unless you include it..


rename to tile.xml; now the file is loaded auto-matically :)




When I tried to access this page from URL, I always get the following 
exception (tomcat5.5.23):

javax.servlet.ServletException: TileHelloWorld
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) 
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) 


No such errors anymore, and I got my tiles pages displayed successfuly!

Thank you again!



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



Set namespace value in ServletActionRedirectResult in @Result annotation

2007-10-03 Thread rcauler

Hi,

How I can set the namespace value in ServletActionRedirectResult in @Result
annotation?

I try:

@Result( name = "success", value = "view", params = { "namespace",
"/myNamespace" }, type = ServletActionRedirectResult.class )

But the namespace is ignored.

[]'s

Rodrigo C. A.

-- 
View this message in context: 
http://www.nabble.com/Set-namespace-value-in-ServletActionRedirectResult-in-%40Result-annotation-tf4564272.html#a13027496
Sent from the Struts - User mailing list archive at Nabble.com.


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



RE: Inheritance within form beans

2007-10-03 Thread Kothari, Kailash
Thanks a lot Rick. That gives me a new area to explore.

The BeanUtils method - BeanUtils.copyProperties(Object target, Object
src) - does give me a shallow copy of an object, Im trying to figure out
how to get a deep copy..

Thanks !
Kailash. 

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 03, 2007 7:21 AM
To: Struts Users Mailing List
Subject: Re: Inheritance within form beans

On 10/2/07, Kothari, Kailash <[EMAIL PROTECTED]> wrote:
> Thaks Rick.
>
> This will give me an instance of the parent bean OR the child bean.
>
> What I need is a child bean pre populated with data from the parent 
> bean.

Ok, so just get ParentBean and then populate your subclassed bean...


public SomActionMethod()  {

 BaseFormBean beanFromSession =
(BaseFormBean)session.getAttribute(mappingName);

 CurrentFormSubClass myForm = (CurrentFormSubClass)form;

   BeanUtils.porpulate( myForm, beanFromSession );

 //done, now your myForm is populated with the one from the session
}

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

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



[s2] redisplay page after validation failed

2007-10-03 Thread Jiang, Jane (NIH/NCI) [C]
I have a page that has some dynamic contents that is not part of the
form that is being submitted.  When validation fails after the form is
submitted, I lost the dynamic contents.  I use tiles and the result
"input" is defined as type "tiles" that points back to the same page.
Is there a way get around the problem?  Is there a result type that
allows me to keep the original request parameters.  If not, what is the
best way to reload the page?

Many thanks for your help,

Jane



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



Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-10-03 Thread Musachy Barroso
I don't think it is on the snapshots.

musachy

On 10/3/07, chengas123 <[EMAIL PROTECTED]> wrote:
>
> I found some error messages buried in my log file.  It seems 2.1 is not
> working for me because Dojo was moved to a plugin which I do not have.  Is
> there anyway to get a compiled version of this plugin?  Or do I have to
> download 2.1 from source control and compile it myself?
>
> Thanks,
> Ben
>
>
>
> chengas123 wrote:
> >
> > Thank you all for your responses.  I apologize that mine is so delayed.  I
> > am going to try using 2.1 with the cache attribute and see what the
> > difference is.  It sounds like it should be a major improvement.  I
> > believe the problem was that it was requesting so many files and it
> > appeared the browser waited until the previous had finished before
> > requesting the next, so the latency was through the roof.  Having only one
> > or two files should be a huge improvement.
> > I downloaded the  http://people.apache.org/builds/struts/nightlies/2.x/
> > nightlies .  Do I need struts2-api in addition to struts2-core?  Either
> > way, I am presented with only a blank white screen when I try to use the
> > new libraries in places of the 2.0.9 library.  Is there anything else I
> > would need to change to use 2.1?
> >
> > Thanks,
> > Ben
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13026612
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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



Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-10-03 Thread chengas123

I found some error messages buried in my log file.  It seems 2.1 is not
working for me because Dojo was moved to a plugin which I do not have.  Is
there anyway to get a compiled version of this plugin?  Or do I have to
download 2.1 from source control and compile it myself?

Thanks,
Ben



chengas123 wrote:
> 
> Thank you all for your responses.  I apologize that mine is so delayed.  I
> am going to try using 2.1 with the cache attribute and see what the
> difference is.  It sounds like it should be a major improvement.  I
> believe the problem was that it was requesting so many files and it
> appeared the browser waited until the previous had finished before
> requesting the next, so the latency was through the roof.  Having only one
> or two files should be a huge improvement.
> I downloaded the  http://people.apache.org/builds/struts/nightlies/2.x/
> nightlies .  Do I need struts2-api in addition to struts2-core?  Either
> way, I am presented with only a blank white screen when I try to use the
> new libraries in places of the 2.0.9 library.  Is there anything else I
> would need to change to use 2.1?
> 
> Thanks,
> Ben
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13026612
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [ANN] Three Struts Tutorials or Presentations at ApacheCon US 2007 Atlanta GA

2007-10-03 Thread Ted Husted
On 10/3/07, Pavel Sapozhnikov <[EMAIL PROTECTED]> wrote:
> Hi Ted I actually have two questions
>
> First I decided to TRY to contribute to Struts2 so I already have SVN
> project in my eclipse (MyEclipse) so thats all set so all I want is just
> some actual work to do or TRY to do.

The place to start is the How to Help FAQ, and then the open Jira
tickets. All the development discussions take place on the dev mailing
list.

 * http://struts.apache.org/helping.html

> Second about this ApacheCon...will the power point or pdf slides be
> available after the conference has ended?

I don't believe that the conference folk post them, but I post all of
my training materials at StrutsUniversity.org (once they are ready!).

 * http://www.StrutsUniversity.org/

-- HTH, Ted



>
> Thanks
> Pavel
>
> On 10/3/07, Ted Husted <[EMAIL PROTECTED]> wrote:
> >
> > Just a reminder that there will be several presentations of direct
> > interest to Struts developers at ApacheCon US 2007 Atlanta GA,
> > November 12-16.
> >
> > * http://apachecon.com/multi/index.html
> >
> > Struts Courses (you must pre-register to attend!)
> >
> >* Migrating to Ajax (Ted Husted), 12 Nov @10a (five-hour training
> > course)
> >* Using Groovy with Struts 2 (Mark Menard), 13 Nov @10a (five-hour
> > training course)
> >
> > Struts Presentation
> >
> >* Go Light with Apache Struts 2 and REST (Don Brown), 15 Nov
> > @5:30p (one-hour presentation)
> >
> > Also of interest (among many others!):
> >
> >* Apache Roller and Blogs as a Web Development Platform (Dave
> > Johnson), 14 Nov @10:30a (one hour presentation)
> >* Apache Harmony - Building Java SE in Open source (Geir Magnusson
> > Jr.), 14 Nov @4:30p (one hour presentation)
> >* Comparing Java Web Frameworks (Matt Raible), 15 Nov @9a (one
> > hour presentation)
> >
> > If you've been following dev@, you also know that several Struts
> > committers will be in Atlanta GA for the convention this year.
> >
> > Hope to see you there!
> >
> > -Ted.
> > 
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Pavel Sapozhnikov
> xFact, Inc
> [EMAIL PROTECTED]

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



Re: Tiles 2 setup with Struts2

2007-10-03 Thread Emi Lu

At least for now I have loaded Tiles 2 successfully without BeanUtils
and Digester jars :)


It's impossible, digester is needed to read XML files.


I forgot the tiles jars that I downloaded few days ago :(

Sorry!


The full jar lists I had:

commons-beanutils-1.7.0.jar
commons-digester-1.8.jar
commons-logging-1.0.4.jar
jstl-1.1.2.jar
standard-1.1.2.jar
struts2-tiles-plugin-2.0.9.jar
tiles-core-2.0.4.jar
xwork-2.0.4.jar
freemarker-2.3.8.jar
ognl-2.6.11.jar
struts2-core-2.0.9.jar
tiles-api-2.0.4.jar
tiles-jsp-2.0.4.jar





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



Re: Tiles 2 setup with Struts2

2007-10-03 Thread Antonio Petrelli
2007/10/3, Emi Lu <[EMAIL PROTECTED]>:
> At least for now I have loaded Tiles 2 successfully without BeanUtils
> and Digester jars :)

It's impossible, digester is needed to read XML files.

Antonio

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



Re: [s2] Struts head tag KILLS (> 10s) page load time

2007-10-03 Thread chengas123

Thank you all for your responses.  I apologize that mine is so delayed.  I am
going to try using 2.1 with the cache attribute and see what the difference
is.  It sounds like it should be a major improvement.  I believe the problem
was that it was requesting so many files and it appeared the browser waited
until the previous had finished before requesting the next, so the latency
was through the roof.  Having only one or two files should be a huge
improvement.
I downloaded the  http://people.apache.org/builds/struts/nightlies/2.x/
nightlies .  Do I need struts2-api in addition to struts2-core?  Either way,
I am presented with only a blank white screen when I try to use the new
libraries in places of the 2.0.9 library.  Is there anything else I would
need to change to use 2.1?

Thanks,
Ben



Don Brown wrote:
> 
> Oh, ok, so this is something that we can do once and every user
> doesn't have to do it manually for their application?  Then yes, let's
> make the cache flag true by default.  If the user wants to trim down
> the profile, they can, but at least they'll get way better performance
> out of the box.
> 
> Don
> 
> On 9/25/07, Musachy Barroso <[EMAIL PROTECTED]> wrote:
>> The cache attribute is available on 2.1, and is documented on the head
>> tag:
>>
>> http://struts.apache.org/2.x/docs/dojo-head.html
>>
>> We could definitely make it a default, which it isn't now.
>>
>> The issue to automate the custom profile build is here:
>>
>> https://issues.apache.org/struts/browse/WW-2131
>>
>> right now I build the custom profile and upload the files by hand.
>> Help to get this done with maven would be appreciated.
>>
>> musachy
> 

-- 
View this message in context: 
http://www.nabble.com/-s2--Struts-head-tag-KILLS-%28%3E-10s%29-page-load-time-tf4490390.html#a13024548
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Accessing a row in a table on a JSP page.

2007-10-03 Thread JohnLangan

Thanks Nikhil and rickcr for the suggestions.

I have resolved the problem by creating a form within the iterator so that
each row is a separate form. Each row (form) uses the same ActionForm and
Action and returns the row specific info. This works for what we want as
only one row on the page will ever be selected. 

John.


JohnLangan wrote:
> 
> I call the database and create an ArrayList of beans to hold the data.
> Using JSTL I iterate over the list
> to display the data in an html table inside a form in a JSP page.
> 
> 
> 
> I can give each row a number using ${row.index}
> 
> The last but one column is a Struts html:select that allows the user to
> select what they want to do next. The last column contains a button to
> press to implement the selected action. So far so good.
> 
> My problem is that in whichever row the button is pressed it always acts
> on the data in the first row.
> I have tried several ways including indexed properties or using an
> ActionForm with an array of beans so each row is a copy of the bean, but I
> cannot get the action to act on the required row.   
> 
> Is there a way in Struts for the action to know in which row the button
> was pressed? Apart from the html:select dropdown all the other values
> required for the action are hidden values. 
> 
> Thanks in advance for any help with this.
> 
> John.
> 

-- 
View this message in context: 
http://www.nabble.com/Accessing-a-row-in-a-table-on-a-JSP-page.-tf4555354.html#a13024543
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Tiles 2 setup with Struts2

2007-10-03 Thread Emi Lu



You also need to add the jars that tiles requires:

copy the Tiles dependencies JARs:
  * Jakarta Commons BeanUtils 1.7.0 or above;
  * Jakarta Commons Digester 1.8 or above;
  * Jakarta Commons Logging (at least API) 1.1 or above

http://tiles.apache.org/getting_started.html



I believed in struts2 + Tiles 2 docs:
> > http://struts.apache.org/2.x/docs/tiles-plugin.html

saying that it is good enough to download and install:
http://repo1.maven.org/maven2/org/apache/struts/struts2-tiles-plugin/2.0.9/

For struts 2, would I still need BeanUtils, Digester?

At least for now I have loaded Tiles 2 successfully without BeanUtils 
and Digester jars :)



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



Re: Tiles 2 setup with Struts2

2007-10-03 Thread Emi Lu

Thank you very much !

It works!


Following Your comments, I did:


=

  org.apache.struts
  struts2-tiles-plugin
  ${version.tiles}
  compile


   to web.xml


the above looks like maven stuff.. shouldn't be in web.xml


Deleted from web.xml


[2] 

  class="org.apache.struts2.views.tiles.TilesResult"/>



  to the struts.xml file's package section


you could also extends tiles definition instead


May I get an example? Is it for java action class extends tiles or 
web.xml file update, would you tell me how?


For now, I did not change this section.


[3] 


   
  TileHelloWorld
   

to the struts.xml file


ok


no change.


[4] 
  

  
  

   to tiles-defs.xml (this file is saved under /WEB-INF/)

   For struts2, where and how to notify the system to load the 
titles-defs.xml? I suppose that the system will find this file 
auto-matically?


that should be in WEB-INF/tiles.xml and not tiles-defs.xml
unless you include it..


rename to tile.xml; now the file is loaded auto-matically :)




When I tried to access this page from URL, I always get the following 
exception (tomcat5.5.23):

javax.servlet.ServletException: TileHelloWorld
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) 
org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) 

No such errors anymore, and I got my tiles pages displayed successfuly!

Thank you again!



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



Re: RE : RE : Struts Application is not working

2007-10-03 Thread aum strut
I m getting the follwing exception in Tomcat

 Root Cause -
java.lang.ClassNotFoundException: org.apache.struts.action.ActionServlet
 at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1340)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(
WebappClassLoader.java:1189)
 at org.apache.catalina.core.StandardWrapper.loadServlet(
StandardWrapper.java:964)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
 at org.apache.catalina.core.StandardContext.loadOnStartup(
StandardContext.java:4013)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java
:4357)
 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:585)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

Action Class
*

public* *class* RegisterAction *extends* Action{

*public* ActionForward execute(ActionForm form,ActionMapping
mapping,HttpServletRequest request,HttpServletResponse
response)*throws*Exception{

*

return* (mapping.findForward("success"));

}

}
Rest i have already pastedmy struts-config file.Please tell me where i am
wrong
:(


On 10/3/07, Ezequiel Puig <[EMAIL PROTECTED]> wrote:
>
> Uppps,
> That's for Struts 2.
>
> -Message d'origine-
> De: Ezequiel Puig
> Envoyé: mercredi 3 octobre 2007 16:53
> À: Struts Users Mailing List
> Objet: RE : Struts Application is not working
>
> Hi,
>
> Take a look at: http://struts.apache.org/2.x/docs/simple-setup.html. There
> you will find the minimum configuration.
>
> Regards,
>
> Ezequiel.
>
> -Message d'origine-
> De: Rick Reumann [mailto:[EMAIL PROTECTED]
> Envoyé: mercredi 3 octobre 2007 16:42
> À: Struts Users Mailing List
> Objet: Re: Struts Application is not working
>
> There are a ton of things that can cause the obscure error you are
> witnessing. You have to make sure the doctype definitions are correct
> as well for web.xml and struts-config. I'd start with a working
> example web.xml and struts-config (maybe the example app struts comes
> with - and then start swapping in your stuff.)
>
> On 10/3/07, aum strut <[EMAIL PROTECTED]> wrote:
> > 1 antlr
> > 2 commons-beanutils
> > 3 commons-digester
> > 4 commons-fileupload
> > 5 commons-logging
> > 6  commons-validator
> > 7 jakarta-oro
> > 8 struts
> >
> >
> > These are the jar flies in the lib folder
> >
> >
> > On 10/3/07, Dave Newton <[EMAIL PROTECTED]> wrote:
> > >
> > > At first glance it seems okay; maybe somebody else
> > > will chime in. What library / jar files do you have in
> > > WEB-INF/lib?
> > >
> > > d.
> > >
> > > --- aum strut <[EMAIL PROTECTED]> wrote:
> > >
> > > > hi dave i m pasting my struts-config file for the
> > > > refrence.and as par the
> > > > dependencies i have used myeclipse as developing
> > > > enviornment so it might be
> > > > possible that there is something wrong as i
> > > > downloaded an example in warfile
> > > > form and when i deploy it in tomcat it worked fine
> > > > but when i put my class
> > > > files and configuredthe struts-config file according
> > > > to my application it
> > > > stoped working.All this has put me in a strange
> > > > condition as i haven't
> > > > changed any library file.
> > > >
> > > > below is my struts config file..
> > > >
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > >  > > > type="aum.struts.actionform.RegisterForm"/>
> > > >
> > > > 
> > > >
> > > > 
> > > 

Re: [Struts 2] : Zero Configuraiton : some feedback

2007-10-03 Thread cilquirm


I use Zero Conf and codebehind a lot, and I think they're both incredibly
useful.  especially in this newer world of convention over configuration,
etc...  When I have a package hierarchy all set up, i don't feel the need to
muck with struts.xml, because I can get directly down to coding. 

There are cases where you have to go back to struts.xml ( like wildcarding,
and being able to customize and manage interceptor refs ) , and that needs
some looking into.  

In my opinion, ZeroConf and Codebehind need to be together, and available as
a plugin, because they work so well together. This is sort of where the
smart-urls plugin  ( a great piece of work, too ) comes in.  Maybe effort
should be placed into that to plump that up and 'robusticate it' ( as my
co-worker likes to say )

In my perception of the near-future world, some additions to zc/cb or
smart-urls . some flex-json style ability for the json plugin, a bit of
guice and warp, and you've got a very easy development cycle.

-a






Zarar Siddiqi wrote:
> 
> I think the Zero Configuration idea is a nice idea but the
> implementation is far from sufficient and will probably get better
> over time (hopefully).  The problem mainly is with the limit of
> annotations.  There are things that can be  represented in struts.xml
> that have no chance of being represented via action annotations.  For
> example, package interceptors, global results, multiple execute
> methods in the same action etc. etc.
> 
> Even if you do manage to represent what you want in annotations as you
> have, it quickly turns ugly and you end up wondering why you're even
> bothering mucking up your nice and clean action bean with stuff like
> contentType, text/xml and paths to FTLs.  struts.xml is a very
> powerful little method of making your actions behave any which way you
> want and I'd even prefer it over annotations unless you're doing
> something very, very basic.
> 
> The other issue I think is the lack of the "convention over
> configuration" philosophy being used.  For example, if you have have
> an action called myAction, there's no reason why by default it
> shouldn't look like for something like myAction_success.jsp and
> myAction_input.jsp instead of having this specified by the user.  This
> idea can be extended to interceptors, global results etc.  I'm just
> blurting out what's on the top of my head but there are many more ways
> to make Zero Config better.
> 
> Thanks,
> Zarar
> 
> 
> On 10/2/07, Sami Dalouche <[EMAIL PROTECTED]> wrote:
>> Hi,
>>
>> On http://struts.apache.org/2.x/docs/release-notes-209.html, I can
>> read : "Please help us test these brave new features. Feedback
>> appreciated".
>>
>> So, here is some feedback about Zero configuration :
>>
>> - the feature is pretty cool, though not much documented. For instance,
>> it was not obvious to me what the "params" parameter meant in the
>> @Result annotation, and I had to dig into the source code to understand
>> that odd indexes where the keys and even ones where the values...
>>
>> So, a freemarker view that would return XML would be described as
>> @Results( { @Result(name = "success", value =
>> "/WEB-INF/views/blabla.ftl", type = FreemarkerResult.class, params = {
>> "contentType", "text/xml" }) })
>>
>> - I have been looking for a way to specify the default package, but it
>> looks like I have to manually copy / paste the following line for my
>> actions to use the "default" package settings :
>> @ParentPackage("default")
>>
>> - And last, I am experiencing some weird problems... Basically, 9 times
>> out of 10, everything is fine, but sometimes, for no particular reason,
>> the @ParentPackage("default") line in my actions seem to have no effect
>> and the zero-conf Actions use the struts provided default stack, not the
>> one that I defined in my default package.. (either the web application
>> boots correctly and works for its whole uptime, or it doesn't work at
>> all. When it doesn't work, the only way to get it working it by
>> rebooting the web application).
>>
>> I have absolutely no idea about the reasons that could cause that...
>> Have you heard of anything similar before ?
>>
>> Regards,
>> Sami Dalouche
>>
>>
>> -
>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Struts-2--%3A-Zero-Configuraiton-%3A-some-feedback-tf4557863.html#a13023475
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [ANN] Three Struts Tutorials or Presentations at ApacheCon US 2007 Atlanta GA

2007-10-03 Thread Pavel Sapozhnikov
Hi Ted I actually have two questions

First I decided to TRY to contribute to Struts2 so I already have SVN
project in my eclipse (MyEclipse) so thats all set so all I want is just
some actual work to do or TRY to do.

Second about this ApacheCon...will the power point or pdf slides be
available after the conference has ended?

Thanks
Pavel

On 10/3/07, Ted Husted <[EMAIL PROTECTED]> wrote:
>
> Just a reminder that there will be several presentations of direct
> interest to Struts developers at ApacheCon US 2007 Atlanta GA,
> November 12-16.
>
> * http://apachecon.com/multi/index.html
>
> Struts Courses (you must pre-register to attend!)
>
>* Migrating to Ajax (Ted Husted), 12 Nov @10a (five-hour training
> course)
>* Using Groovy with Struts 2 (Mark Menard), 13 Nov @10a (five-hour
> training course)
>
> Struts Presentation
>
>* Go Light with Apache Struts 2 and REST (Don Brown), 15 Nov
> @5:30p (one-hour presentation)
>
> Also of interest (among many others!):
>
>* Apache Roller and Blogs as a Web Development Platform (Dave
> Johnson), 14 Nov @10:30a (one hour presentation)
>* Apache Harmony - Building Java SE in Open source (Geir Magnusson
> Jr.), 14 Nov @4:30p (one hour presentation)
>* Comparing Java Web Frameworks (Matt Raible), 15 Nov @9a (one
> hour presentation)
>
> If you've been following dev@, you also know that several Struts
> committers will be in Atlanta GA for the convention this year.
>
> Hope to see you there!
>
> -Ted.
> 
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Pavel Sapozhnikov
xFact, Inc
[EMAIL PROTECTED]


[ANN] Three Struts Tutorials or Presentations at ApacheCon US 2007 Atlanta GA

2007-10-03 Thread Ted Husted
Just a reminder that there will be several presentations of direct
interest to Struts developers at ApacheCon US 2007 Atlanta GA,
November 12-16.

 * http://apachecon.com/multi/index.html

Struts Courses (you must pre-register to attend!)

   * Migrating to Ajax (Ted Husted), 12 Nov @10a (five-hour training course)
   * Using Groovy with Struts 2 (Mark Menard), 13 Nov @10a (five-hour
training course)

Struts Presentation

   * Go Light with Apache Struts 2 and REST (Don Brown), 15 Nov
@5:30p (one-hour presentation)

Also of interest (among many others!):

   * Apache Roller and Blogs as a Web Development Platform (Dave
Johnson), 14 Nov @10:30a (one hour presentation)
   * Apache Harmony - Building Java SE in Open source (Geir Magnusson
Jr.), 14 Nov @4:30p (one hour presentation)
   * Comparing Java Web Frameworks (Matt Raible), 15 Nov @9a (one
hour presentation)

If you've been following dev@, you also know that several Struts
committers will be in Atlanta GA for the convention this year.

Hope to see you there!

-Ted.


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



Re: ActionForward is not workinh

2007-10-03 Thread aum strut
thks Ted.

But what i came to know is some thing different initially i thought that it
is the action servlet  which is not working but when i saw the log file of
tomcat it is showing me the exception CallsNotFound and the class is
AcionServlet.

I cross checked the configuration flies but thay are correct.even ljar files
are up to the standard even when i tried to configure the another
application which i downloaded from the web (And it was running ok) i again
found the same exception.

Now oi m really confused wat might be the cause of the Exception..:(
1

On 10/3/07, Ted Husted <[EMAIL PROTECTED]> wrote:
>
> It looks like the execute method is misspelled as "excute".
>
> If you are using a modern IDE, it should show the "execute" method as
> overriding the one provided by the base Struts Action class.
>
> For Struts 1 development, MyEclipse 6 has some excellent tools that
> can help you get started.
>
> This is less important, since you were consistent, but the usual
> English spelling of "sucess" is "success".
>
> -- HTH, Ted
> 
>
>
> On 10/2/07, aum strut <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > i am new to the struts,i am developing a struts based small application
> for
> > loggin and then to forward the control to the sucess.html if loggin
> succeed
> > else to failure.
> > my index form is being displayed ok.but when i submittedthe form it is
> > showing the blank page.
> > the criteria for the success is that the passord fields should
> match.below i
> > am pasting the code og Action class and struts-config.xml.Please help me
> so
> > that i can get my confusion clear
> >
> > // Struts-config
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >  >
> > type="aum.struts.action.RegisterAction"
> >
> > name="registerForm">
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> > // Action calss
> > *
> >
> > public* *class* RegisterAction *extends* Action{
> >
> > *public* ActionForward excute(ActionForm form,ActionMapping
> > mapping,HttpServletRequest request,HttpServletResponse
> > response)*throws*Exception{
> >
> > ActionForward forward=*null*;
> >
> > // cast the form to RegisterForm
> >
> >
> >
> > RegisterForm rForm=(RegisterForm)form;
> >
> > String userName= rForm.getUserName();
> >
> > String password1=rForm.getPassword1();
> >
> > String password2=rForm.getPassword2();
> >
> > System.*out*.println("i am in action");
> >
> > // Checking for both password
> >
> >
> >
> > *if*(password1.equals(password2)){
> >
> > System.*out*.println("inside password check");
> >
> > forward=mapping.findForward("sucess");
> >
> > *return* forward;
> >
> > }
> >
> > *else
> >
> > *
> >
> > {
> >
> > forward=mapping.findForward("failure");
> >
> > *return* forward;
> >
> > }
> >
> > }
> >
> > }
> >
> > Any help in this regard will be much appriciated
> >
> >
> >
> > Regards,
> >
> > Umesh
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: execAndWait interceptor and Tiles problem ..

2007-10-03 Thread Giovanni Azua

hi Antonio,

It works like a dream! :)))

Non ho visto quella, ma adesso funziona a posto :)

Grazie mille ancora ed buena serata,

saluti,
Giovanni

Antonio Petrelli wrote:

2007/10/3, Giovanni Azua <[EMAIL PROTECTED]>:
You have no meta refresh, just add:
"/>
  


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



Re: ActionForward is not workinh

2007-10-03 Thread Ted Husted
It looks like the execute method is misspelled as "excute".

If you are using a modern IDE, it should show the "execute" method as
overriding the one provided by the base Struts Action class.

For Struts 1 development, MyEclipse 6 has some excellent tools that
can help you get started.

This is less important, since you were consistent, but the usual
English spelling of "sucess" is "success".

-- HTH, Ted



On 10/2/07, aum strut <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> i am new to the struts,i am developing a struts based small application for
> loggin and then to forward the control to the sucess.html if loggin succeed
> else to failure.
> my index form is being displayed ok.but when i submittedthe form it is
> showing the blank page.
> the criteria for the success is that the passord fields should match.below i
> am pasting the code og Action class and struts-config.xml.Please help me so
> that i can get my confusion clear
>
> // Struts-config
>
> 
>
> 
>
> 
>
> 
>
> 
>
> 
> type="aum.struts.action.RegisterAction"
>
> name="registerForm">
>
> 
>
> 
>
> 
>
> 
>
> 
>
> // Action calss
> *
>
> public* *class* RegisterAction *extends* Action{
>
> *public* ActionForward excute(ActionForm form,ActionMapping
> mapping,HttpServletRequest request,HttpServletResponse
> response)*throws*Exception{
>
> ActionForward forward=*null*;
>
> // cast the form to RegisterForm
>
>
>
> RegisterForm rForm=(RegisterForm)form;
>
> String userName= rForm.getUserName();
>
> String password1=rForm.getPassword1();
>
> String password2=rForm.getPassword2();
>
> System.*out*.println("i am in action");
>
> // Checking for both password
>
>
>
> *if*(password1.equals(password2)){
>
> System.*out*.println("inside password check");
>
> forward=mapping.findForward("sucess");
>
> *return* forward;
>
> }
>
> *else
>
> *
>
> {
>
> forward=mapping.findForward("failure");
>
> *return* forward;
>
> }
>
> }
>
> }
>
> Any help in this regard will be much appriciated
>
>
>
> Regards,
>
> Umesh

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



Re: [OT] Ajax recommendations for use with Struts1.1

2007-10-03 Thread Ted Husted
I actually did a lot of work with the DataTable. Again, what I liked
best is that I could follow the source, and extend it. For example, we
created a composite Find/List/Edit/View widget that let us set a list
of fields, field-types, labels, and validators in the JavaScript, and
get a complete CRUD widget in return. There's an early version here:

 * http://yazaar.org/examples/dataform/tutorial-tabview.html

There's no hard-coding of HTML forms here at all, just some settings
in the JavaScript

 * http://yazaar.org/examples/dataform/tutorial-data.js

The example includes static data, but, of course, in production, we
get it from the database. Same difference though. We just pass back a
list via JSON in the same format.

My team is on hiatus now, but when we get back, I'd like to update the
example with the final version.

-Ted.

On 10/3/07, Rick Reumann <[EMAIL PROTECTED]> wrote:
> On 10/3/07, Rick Reumann <[EMAIL PROTECTED]> wrote:
> >
> >
> > Going to check out YUI now.
>
> So far I haven't been too impressed with their data table models (they
> seem pretty basic, not bad but I don't scrollable tables, movable
> columns, etc, but maybe I'm missing it):
> http://developer.yahoo.com/yui/examples/datatable/index.html
>
> Compared to what you get with extjs. For example, I really like this grid
>
> http://extjs.com/deploy/ext/examples/grid/paging.html
>
> You can see more of the examples here
> http://extjs.com/deploy/ext/docs/index.html
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
HTH, Ted 

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



Re: execAndWait interceptor and Tiles problem ..

2007-10-03 Thread Antonio Petrelli
2007/10/3, Giovanni Azua <[EMAIL PROTECTED]>:
> 
> 
> 
>  content="text/html; charset=iso-8859-1" />
> 
> 
> @import "css/screen.css";
> @import "css/main.css";
> @import "css/menu.css";
> 
> 
>


You have no meta refresh, just add:
"/>

> Muchas gracias por adelantado!

I am Italian, not Spanish :-) Anyway I understood it ;-)

Antonio

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



Re: [OT] Ajax recommendations for use with Struts1.1

2007-10-03 Thread Frank W. Zammetti
I plan on using extjs for the last chapter of the book I'm currently
writing as it impressed me quite a bit as well... I won't be using the
AJAX functionality, but as far as widgets go, looks very promising.

To Ted's point though, I haven't checked out the source code... YUI
absolutely has some of the most well-written Javascript you'll find
anywhere... I consider myself quite competent in client-side coding, but
there are some libraries out there that I've had to hack that give me a
headache trying to follow, but YUI doesn't suffer from that in the least. 
Clean, well-documented, as Ted said, a pleasure to deal with whether you
have to modify it or not (I do wish the widgets were more full-featured
and, frankly, cooler-looking, but there's something to be said for
simplicity too).

Frank

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
 (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
 (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
 Supplying the wheel, so you don't have to reinvent it!

On Wed, October 3, 2007 11:35 am, Rick Reumann wrote:
> On 10/3/07, Ted Husted <[EMAIL PROTECTED]> wrote:
>
>> Just to chime in late ... an Ajax library that does well the sort of
>> things Frank is describing is the Yahoo User Interface (YUI) Library.
>> Reading the source for the YUI library is an absolute pleasure!
>
> Thanks Ted, I'll have to check that out. Right now, I was thinking of
> going with extjs for some things. http://extjs.com/  Pretty neat
> stuff.
>
> Going to check out YUI now.
>
> -
> 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] Ajax recommendations for use with Struts1.1

2007-10-03 Thread Rick Reumann
On 10/3/07, Rick Reumann <[EMAIL PROTECTED]> wrote:
>
>
> Going to check out YUI now.

So far I haven't been too impressed with their data table models (they
seem pretty basic, not bad but I don't scrollable tables, movable
columns, etc, but maybe I'm missing it):
http://developer.yahoo.com/yui/examples/datatable/index.html

Compared to what you get with extjs. For example, I really like this grid

http://extjs.com/deploy/ext/examples/grid/paging.html

You can see more of the examples here
http://extjs.com/deploy/ext/docs/index.html

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



Re: Struts Popup window with session param

2007-10-03 Thread Diego Ezquerro
wow, i'm feeling so stupid. i realized that just in this moment.
thank you.
 
Diego Ezquerro Bailac
Asturias, Spain

- Mensaje original 
De: Dave Newton <[EMAIL PROTECTED]>
Para: Struts Users Mailing List 
Enviado: miércoles, 3 de octubre, 2007 17:09:12
Asunto: Re: Struts Popup window with session param

IIRC somebody asked why you couldn't just access the
session parameter in the action rather than sending it
as a request parameter. What was the answer to that
question?

d.

--- Diego Ezquerro <[EMAIL PROTECTED]> wrote:

> Hi to everybody.
> 
> I have a problem with a JSP page, I think this is a
> stupid question but I was hours searching the
> Internet and found nothing.
> 
> What i wanna do is to pre-process a session
> attribute and then show a popup window with the
> result.
> My code is as follows:
> 
> 
OnClick="window.open('./fillTrazability.do?param1=srd_tree',
> '', false); return false;">Set Trazability
> 
> "srd_tree" is a session attribute and this doesn't
> work.
> 
> Then i tried this:
> 
>  href="#"
>
OnClick="window.open('./fillTrazability.do?param1=<%=
> session.getAttribute("srd_tree") %>',
> '', false); return false;">Set Trazability
> 
> and the result is a Scripting elements (<%!,
>   
> Is there any way to do this using struts tags??
> All that i want is to pass that session attribute
> (it isn't a String) to fillTrazability action class.
> 
> I've tried too:
> 
> 
>  href="#"
>
OnClick="window.open('./fillTrazability.do?param1=tree',
> '', false); return false;">Set Trazability
> 
> obtaining no results.
> 
> Anyone can help me??
> 
> Thanks a lot.
> 
>  
> Diego Ezquerro Bailac
> Asturias, Spain
> 
> 
> 
> 
> 
> 
> 
> 
>   
> ¡Sé un mejor fotógrafo!
> Perfecciona tu técnica y encuentra las mejores fotos
> en:
> 
>
http://telemundo.yahoo.com/promos/mejorfotografo.html
> 
> 
> 
> 
> 
>  
>

> ¡Sé un mejor besador!
> Comparte todo lo que sabes sobre besos. 
> 
> http://telemundo.yahoo.com/promos/mejorbesador.html


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








  

¡Sé un mejor ambientalista!
Encuentra consejos para cuidar el lugar donde vivimos.   
http://telemundo.yahoo.com/promos/mejorambientalista.html

Re: [OT] Ajax recommendations for use with Struts1.1

2007-10-03 Thread Rick Reumann
On 10/3/07, Ted Husted <[EMAIL PROTECTED]> wrote:

> Just to chime in late ... an Ajax library that does well the sort of
> things Frank is describing is the Yahoo User Interface (YUI) Library.
> Reading the source for the YUI library is an absolute pleasure!

Thanks Ted, I'll have to check that out. Right now, I was thinking of
going with extjs for some things. http://extjs.com/  Pretty neat
stuff.

Going to check out YUI now.

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



Re: execAndWait interceptor and Tiles problem ..

2007-10-03 Thread Giovanni Azua

hola antonio,

Please find all the information below.

Muchas gracias por adelantado!

regards,
Giovanni

The tiles definition is:

*

 
 

*

The requestWait.jsp page is:

*
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>



   We are processing your request. Please wait.

You can click this link to ">refresh

*
The layout.jsp template is:

*
<%@ taglib uri="http://tiles.apache.org/tags-tiles"; prefix="tiles" %>
<%@ taglib prefix="s" uri="/struts-tags" %>


   
   
   
   
   
   @import "css/screen.css";
   @import "css/main.css";
   @import "css/menu.css";
   
  
  


   
   
  
   

   
   
   
  
  
 
   

   


*

Antonio Petrelli wrote:

2007/10/3, Giovanni Azua <[EMAIL PROTECTED]>:
  

a) Using tiles the delaySleepInterval is ignored and the wait page never
refreshes i.e. when SimulationRunAction completes it is never redirected
to success result.




Can you post the Tiles definition and the JSP page in which you put the meta
refresh?

Antonio

  


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



Re: Struts Popup window with session param

2007-10-03 Thread Antonio Petrelli
2007/10/3, Diego Ezquerro <[EMAIL PROTECTED]>:
>
> All that i want is to pass that session attribute (it isn't a String) to
> fillTrazability action class.



Since it is a session-scoped attribute, why don't you read it directly in
your destination page, without passing any parameter?

Antonio


Re: execAndWait interceptor and Tiles problem ..

2007-10-03 Thread Antonio Petrelli
2007/10/3, Giovanni Azua <[EMAIL PROTECTED]>:
>
> a) Using tiles the delaySleepInterval is ignored and the wait page never
> refreshes i.e. when SimulationRunAction completes it is never redirected
> to success result.


Can you post the Tiles definition and the JSP page in which you put the meta
refresh?

Antonio


Re: Struts Popup window with session param

2007-10-03 Thread Dave Newton
IIRC somebody asked why you couldn't just access the
session parameter in the action rather than sending it
as a request parameter. What was the answer to that
question?

d.

--- Diego Ezquerro <[EMAIL PROTECTED]> wrote:

> Hi to everybody.
> 
> I have a problem with a JSP page, I think this is a
> stupid question but I was hours searching the
> Internet and found nothing.
> 
> What i wanna do is to pre-process a session
> attribute and then show a popup window with the
> result.
> My code is as follows:
> 
> 
OnClick="window.open('./fillTrazability.do?param1=srd_tree',
> '', false); return false;">Set Trazability
> 
> "srd_tree" is a session attribute and this doesn't
> work.
> 
> Then i tried this:
> 
>  href="#"
>
OnClick="window.open('./fillTrazability.do?param1=<%=
> session.getAttribute("srd_tree") %>',
> '', false); return false;">Set Trazability
> 
> and the result is a Scripting elements (<%!,
>   
> Is there any way to do this using struts tags??
> All that i want is to pass that session attribute
> (it isn't a String) to fillTrazability action class.
> 
> I've tried too:
> 
> 
>  href="#"
>
OnClick="window.open('./fillTrazability.do?param1=tree',
> '', false); return false;">Set Trazability
> 
> obtaining no results.
> 
> Anyone can help me??
> 
> Thanks a lot.
> 
>  
> Diego Ezquerro Bailac
> Asturias, Spain
> 
> 
> 
> 
> 
> 
> 
> 
>   
> ¡Sé un mejor fotógrafo!
> Perfecciona tu técnica y encuentra las mejores fotos
> en:
> 
>
http://telemundo.yahoo.com/promos/mejorfotografo.html
> 
> 
> 
> 
> 
>  
>

> ¡Sé un mejor besador!
> Comparte todo lo que sabes sobre besos. 
> 
> http://telemundo.yahoo.com/promos/mejorbesador.html


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



Struts Popup window with session param

2007-10-03 Thread Diego Ezquerro
Hi to everybody.

I have a problem with a JSP page, I think this is a stupid question but I was 
hours searching the Internet and found nothing.

What i wanna do is to pre-process a session attribute and then show a popup 
window with the result.
My code is as follows:

Set Trazability

"srd_tree" is a session attribute and this doesn't work.

Then i tried this:

',
'', false); return false;">Set Trazability

and the result is a Scripting elements (<%!, 
Set Trazability

obtaining no results.

Anyone can help me??

Thanks a lot.

 
Diego Ezquerro Bailac
Asturias, Spain








  
¡Sé un mejor fotógrafo!
Perfecciona tu técnica y encuentra las mejores fotos en:

http://telemundo.yahoo.com/promos/mejorfotografo.html





  

¡Sé un mejor besador!
Comparte todo lo que sabes sobre besos.  
http://telemundo.yahoo.com/promos/mejorbesador.html

RE : RE : Struts Application is not working

2007-10-03 Thread Ezequiel Puig
Uppps,
That's for Struts 2.

-Message d'origine-
De : Ezequiel Puig 
Envoyé : mercredi 3 octobre 2007 16:53
À : Struts Users Mailing List
Objet : RE : Struts Application is not working

Hi,

Take a look at: http://struts.apache.org/2.x/docs/simple-setup.html. There you 
will find the minimum configuration.

Regards,

Ezequiel.

-Message d'origine-
De : Rick Reumann [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 3 octobre 2007 16:42
À : Struts Users Mailing List
Objet : Re: Struts Application is not working

There are a ton of things that can cause the obscure error you are
witnessing. You have to make sure the doctype definitions are correct
as well for web.xml and struts-config. I'd start with a working
example web.xml and struts-config (maybe the example app struts comes
with - and then start swapping in your stuff.)

On 10/3/07, aum strut <[EMAIL PROTECTED]> wrote:
> 1 antlr
> 2 commons-beanutils
> 3 commons-digester
> 4 commons-fileupload
> 5 commons-logging
> 6  commons-validator
> 7 jakarta-oro
> 8 struts
>
>
> These are the jar flies in the lib folder
>
>
> On 10/3/07, Dave Newton <[EMAIL PROTECTED]> wrote:
> >
> > At first glance it seems okay; maybe somebody else
> > will chime in. What library / jar files do you have in
> > WEB-INF/lib?
> >
> > d.
> >
> > --- aum strut <[EMAIL PROTECTED]> wrote:
> >
> > > hi dave i m pasting my struts-config file for the
> > > refrence.and as par the
> > > dependencies i have used myeclipse as developing
> > > enviornment so it might be
> > > possible that there is something wrong as i
> > > downloaded an example in warfile
> > > form and when i deploy it in tomcat it worked fine
> > > but when i put my class
> > > files and configuredthe struts-config file according
> > > to my application it
> > > stoped working.All this has put me in a strange
> > > condition as i haven't
> > > changed any library file.
> > >
> > > below is my struts config file..
> > >
> > >
> > > 
> > >
> > > 
> > >
> > >  > > type="aum.struts.actionform.RegisterForm"/>
> > >
> > > 
> > >
> > > 
> > >
> > >  > >
> > > type="aum.struts.action.RegisterAction"
> > >
> > > name="registerForm">
> > >
> > >  > > redirect="true"/>
> > >
> > >  > > redirect="true"/>
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > > Regards,
> > > Umesh
> > >
> > >
> > > On 10/3/07, Dave Newton <[EMAIL PROTECTED]>
> > > wrote:
> > > >
> > > > --- aum strut <[EMAIL PROTECTED]> wrote:
> > > > > thks ajay for helping me out but can u point out
> > > > > watcan be the cause of this error as pari know i
> > > > have
> > > > > configured the appliocation correctly...
> > > >
> > > > Without your struts config file we can't help very
> > > > much -- *something* is wrong with either your
> > > library
> > > > dependencies, a configuration file, etc. otherwise
> > > it
> > > > would work, no?
> > > >
> > > > d.
> > > >
> > > >
> > > >
> > >
> > -
> > > > 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]
> >
> >
>


-- 
Rick

-
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] Ajax recommendations for use with Struts1.1

2007-10-03 Thread Ted Husted
On 9/20/07, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> I think that *can* be true if you aren't careful.  The thing that I've
> found people tend to mess up when doing RIA development is that they think
> they need to do things differently than they would if it was a plain
> webapp.  We put in place some relatively simple standards early on and
> they helped immensely.  Things like commenting in the same style as Java,
> always doing everything in an object-oriented way, i.e., create Javascript
> classes for everything and no global-scoped Javascript except where truly
> necessary, develop in Firefox and test in IE (and we gave our developers a
> couple of Firefox tools, Firebug chief among them, to use), and so on.  We
> wound up with, overall, decent code.  Not perfect, but not nearly as bad
> as some other heavily client-based webapps I've seen, and not nearly as
> bad as it could have been given the complexity of the app and the relative
> inexperience in the new technologies of the team.


Just to chime in late ... an Ajax library that does well the sort of
things Frank is describing is the Yahoo User Interface (YUI) Library.
Reading the source for the YUI library is an absolute pleasure!

Earlier this year, my team shipped a .NET application using the JSON
RPC architecture that Frank describes, except that we use Jayrock and
Spring. We used JSON to call from the YUI Ajax pages to "plain old
objects" on the server, that in turn called out to our business logic
and data access layer (classic business facade). Very elegant, very
effective. Though, we did have to reinvent a wheel or two.

What I like about YUI is that I can actually understand (and patch)
the source. I have trouble following the "bouncing ball" in some other
Ajax libraries.

Right now, Struts 2.0 uses Dojo behind the scenes to Ajaxify some of
the tags. But all that has been reduced to a plugin for Struts 2.1,
which opens the door for alternate plugins that use other libraries.
There is already a YUI plugin in the repository, but it only supports
a couple of tags so far.

-Ted.

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



RE : Struts Application is not working

2007-10-03 Thread Ezequiel Puig
Hi,

Take a look at: http://struts.apache.org/2.x/docs/simple-setup.html. There you 
will find the minimum configuration.

Regards,

Ezequiel.

-Message d'origine-
De : Rick Reumann [mailto:[EMAIL PROTECTED] 
Envoyé : mercredi 3 octobre 2007 16:42
À : Struts Users Mailing List
Objet : Re: Struts Application is not working

There are a ton of things that can cause the obscure error you are
witnessing. You have to make sure the doctype definitions are correct
as well for web.xml and struts-config. I'd start with a working
example web.xml and struts-config (maybe the example app struts comes
with - and then start swapping in your stuff.)

On 10/3/07, aum strut <[EMAIL PROTECTED]> wrote:
> 1 antlr
> 2 commons-beanutils
> 3 commons-digester
> 4 commons-fileupload
> 5 commons-logging
> 6  commons-validator
> 7 jakarta-oro
> 8 struts
>
>
> These are the jar flies in the lib folder
>
>
> On 10/3/07, Dave Newton <[EMAIL PROTECTED]> wrote:
> >
> > At first glance it seems okay; maybe somebody else
> > will chime in. What library / jar files do you have in
> > WEB-INF/lib?
> >
> > d.
> >
> > --- aum strut <[EMAIL PROTECTED]> wrote:
> >
> > > hi dave i m pasting my struts-config file for the
> > > refrence.and as par the
> > > dependencies i have used myeclipse as developing
> > > enviornment so it might be
> > > possible that there is something wrong as i
> > > downloaded an example in warfile
> > > form and when i deploy it in tomcat it worked fine
> > > but when i put my class
> > > files and configuredthe struts-config file according
> > > to my application it
> > > stoped working.All this has put me in a strange
> > > condition as i haven't
> > > changed any library file.
> > >
> > > below is my struts config file..
> > >
> > >
> > > 
> > >
> > > 
> > >
> > >  > > type="aum.struts.actionform.RegisterForm"/>
> > >
> > > 
> > >
> > > 
> > >
> > >  > >
> > > type="aum.struts.action.RegisterAction"
> > >
> > > name="registerForm">
> > >
> > >  > > redirect="true"/>
> > >
> > >  > > redirect="true"/>
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > > Regards,
> > > Umesh
> > >
> > >
> > > On 10/3/07, Dave Newton <[EMAIL PROTECTED]>
> > > wrote:
> > > >
> > > > --- aum strut <[EMAIL PROTECTED]> wrote:
> > > > > thks ajay for helping me out but can u point out
> > > > > watcan be the cause of this error as pari know i
> > > > have
> > > > > configured the appliocation correctly...
> > > >
> > > > Without your struts config file we can't help very
> > > > much -- *something* is wrong with either your
> > > library
> > > > dependencies, a configuration file, etc. otherwise
> > > it
> > > > would work, no?
> > > >
> > > > d.
> > > >
> > > >
> > > >
> > >
> > -
> > > > 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]
> >
> >
>


-- 
Rick

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



execAndWait interceptor and Tiles problem ..

2007-10-03 Thread Giovanni Azua

hi,

I have the struts.xml definition as shown below that uses execAndWait 
interceptor and Tiles. The problem is that either:


a) Using tiles the delaySleepInterval is ignored and the wait page never 
refreshes i.e. when SimulationRunAction completes it is never redirected 
to success result.
b) Not using tiles the execAndWait interceptor works fine just display 
the default unformatted text that does not comply with our company's Web 
theme.


Please suggest a possible solution or otherwise where can I file a bug?

class="com.sag.optimizer.ui.web.action.simulation.SimulationRunAction">



  1000
 1000

webui.requestWait
webui.simulationReport
webui.requestFailed
 


regards,
Giovanni

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



Re: Struts Application is not working

2007-10-03 Thread Rick Reumann
There are a ton of things that can cause the obscure error you are
witnessing. You have to make sure the doctype definitions are correct
as well for web.xml and struts-config. I'd start with a working
example web.xml and struts-config (maybe the example app struts comes
with - and then start swapping in your stuff.)

On 10/3/07, aum strut <[EMAIL PROTECTED]> wrote:
> 1 antlr
> 2 commons-beanutils
> 3 commons-digester
> 4 commons-fileupload
> 5 commons-logging
> 6  commons-validator
> 7 jakarta-oro
> 8 struts
>
>
> These are the jar flies in the lib folder
>
>
> On 10/3/07, Dave Newton <[EMAIL PROTECTED]> wrote:
> >
> > At first glance it seems okay; maybe somebody else
> > will chime in. What library / jar files do you have in
> > WEB-INF/lib?
> >
> > d.
> >
> > --- aum strut <[EMAIL PROTECTED]> wrote:
> >
> > > hi dave i m pasting my struts-config file for the
> > > refrence.and as par the
> > > dependencies i have used myeclipse as developing
> > > enviornment so it might be
> > > possible that there is something wrong as i
> > > downloaded an example in warfile
> > > form and when i deploy it in tomcat it worked fine
> > > but when i put my class
> > > files and configuredthe struts-config file according
> > > to my application it
> > > stoped working.All this has put me in a strange
> > > condition as i haven't
> > > changed any library file.
> > >
> > > below is my struts config file..
> > >
> > >
> > > 
> > >
> > > 
> > >
> > >  > > type="aum.struts.actionform.RegisterForm"/>
> > >
> > > 
> > >
> > > 
> > >
> > >  > >
> > > type="aum.struts.action.RegisterAction"
> > >
> > > name="registerForm">
> > >
> > >  > > redirect="true"/>
> > >
> > >  > > redirect="true"/>
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > > Regards,
> > > Umesh
> > >
> > >
> > > On 10/3/07, Dave Newton <[EMAIL PROTECTED]>
> > > wrote:
> > > >
> > > > --- aum strut <[EMAIL PROTECTED]> wrote:
> > > > > thks ajay for helping me out but can u point out
> > > > > watcan be the cause of this error as pari know i
> > > > have
> > > > > configured the appliocation correctly...
> > > >
> > > > Without your struts config file we can't help very
> > > > much -- *something* is wrong with either your
> > > library
> > > > dependencies, a configuration file, etc. otherwise
> > > it
> > > > would work, no?
> > > >
> > > > d.
> > > >
> > > >
> > > >
> > >
> > -
> > > > 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]
> >
> >
>


-- 
Rick

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



Re: Accessing a row in a table on a JSP page.

2007-10-03 Thread Rick Reumann
On 10/2/07, JohnLangan <[EMAIL PROTECTED]> wrote:
>
> I call the database and create an ArrayList of beans to hold the data. Using
> JSTL I iterate over the list
> to display the data in an html table inside a form in a JSP page.
>
> 
> 
> I can give each row a number using ${row.index}
>
> The last but one column is a Struts html:select that allows the user to
> select what they want to do next. The last column contains a button to press
> to implement the selected action. So far so good.
>
> My problem is that in whichever row the button is pressed it always acts on
> the data in the first row.

You can do what you want, but you have to be careful when working on
items in a collection  like that based off the index. Personally, I'd
like to work off some unique id that represents that item and do
another lookup of it when I get to my Action.

For example...

   
   ${foo.name}
   


Now, when the user clicks that link(or you can make it a button also),
you go to Action and look up tthe item from the db again and set up
the form to display for the user to edit on the next page.

If you want to use the collection approach. You have to first fix a few things.
First off using 
will be VERY bad.  Imagine you display your list after the above, now
you pick the 3rd item. How do you plan to get the 3rd item again? Are
you going to call that lmdao.getListinManagerData again in your action
and then pick the 3rd index? For one, the list might have changed so
now you are editing the wrong one, and also, why get the whole list
again? If you go that route your much better using the approach I
showed. The list index approach will work if you first put that list
in session scope BEFORE you go to your page and then you'd just do

//no c:set - use the session scoped list...

   ${item.name}


Now you have the index when you click on the link so in your next
action you can pull the list out of session scope and then get the
item. (Again, I'm not a huge fan of this approach - mainly because now
you just stuffed a large collection in the session that really doesn't
need to be there. Approach one doesn't have this problem.)

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



Re: Inheritance within form beans

2007-10-03 Thread Rick Reumann
On 10/2/07, Kothari, Kailash <[EMAIL PROTECTED]> wrote:
> Thaks Rick.
>
> This will give me an instance of the parent bean OR the child bean.
>
> What I need is a child bean pre populated with data from the parent
> bean.

Ok, so just get ParentBean and then populate your subclassed bean...


public SomActionMethod()  {

 BaseFormBean beanFromSession =
(BaseFormBean)session.getAttribute(mappingName);

 CurrentFormSubClass myForm = (CurrentFormSubClass)form;

   BeanUtils.porpulate( myForm, beanFromSession );

 //done, now your myForm is populated with the one from the session
}

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



Re: Struts Application is not working

2007-10-03 Thread aum strut
1 antlr
2 commons-beanutils
3 commons-digester
4 commons-fileupload
5 commons-logging
6  commons-validator
7 jakarta-oro
8 struts


These are the jar flies in the lib folder


On 10/3/07, Dave Newton <[EMAIL PROTECTED]> wrote:
>
> At first glance it seems okay; maybe somebody else
> will chime in. What library / jar files do you have in
> WEB-INF/lib?
>
> d.
>
> --- aum strut <[EMAIL PROTECTED]> wrote:
>
> > hi dave i m pasting my struts-config file for the
> > refrence.and as par the
> > dependencies i have used myeclipse as developing
> > enviornment so it might be
> > possible that there is something wrong as i
> > downloaded an example in warfile
> > form and when i deploy it in tomcat it worked fine
> > but when i put my class
> > files and configuredthe struts-config file according
> > to my application it
> > stoped working.All this has put me in a strange
> > condition as i haven't
> > changed any library file.
> >
> > below is my struts config file..
> >
> >
> > 
> >
> > 
> >
> >  > type="aum.struts.actionform.RegisterForm"/>
> >
> > 
> >
> > 
> >
> >  >
> > type="aum.struts.action.RegisterAction"
> >
> > name="registerForm">
> >
> >  > redirect="true"/>
> >
> >  > redirect="true"/>
> >
> > 
> >
> > 
> >
> > 
> > Regards,
> > Umesh
> >
> >
> > On 10/3/07, Dave Newton <[EMAIL PROTECTED]>
> > wrote:
> > >
> > > --- aum strut <[EMAIL PROTECTED]> wrote:
> > > > thks ajay for helping me out but can u point out
> > > > watcan be the cause of this error as pari know i
> > > have
> > > > configured the appliocation correctly...
> > >
> > > Without your struts config file we can't help very
> > > much -- *something* is wrong with either your
> > library
> > > dependencies, a configuration file, etc. otherwise
> > it
> > > would work, no?
> > >
> > > d.
> > >
> > >
> > >
> >
> -
> > > 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 Application is not working

2007-10-03 Thread Dave Newton
At first glance it seems okay; maybe somebody else
will chime in. What library / jar files do you have in
WEB-INF/lib?

d.

--- aum strut <[EMAIL PROTECTED]> wrote:

> hi dave i m pasting my struts-config file for the
> refrence.and as par the
> dependencies i have used myeclipse as developing
> enviornment so it might be
> possible that there is something wrong as i
> downloaded an example in warfile
> form and when i deploy it in tomcat it worked fine
> but when i put my class
> files and configuredthe struts-config file according
> to my application it
> stoped working.All this has put me in a strange
> condition as i haven't
> changed any library file.
> 
> below is my struts config file..
> 
> 
> 
> 
> 
> 
>  type="aum.struts.actionform.RegisterForm"/>
> 
> 
> 
> 
> 
>  
> type="aum.struts.action.RegisterAction"
> 
> name="registerForm">
> 
>  redirect="true"/>
> 
>  redirect="true"/>
> 
> 
> 
> 
> 
> 
> Regards,
> Umesh
> 
> 
> On 10/3/07, Dave Newton <[EMAIL PROTECTED]>
> wrote:
> >
> > --- aum strut <[EMAIL PROTECTED]> wrote:
> > > thks ajay for helping me out but can u point out
> > > watcan be the cause of this error as pari know i
> > have
> > > configured the appliocation correctly...
> >
> > Without your struts config file we can't help very
> > much -- *something* is wrong with either your
> library
> > dependencies, a configuration file, etc. otherwise
> it
> > would work, no?
> >
> > d.
> >
> >
> >
>
-
> > 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 Application is not working

2007-10-03 Thread aum strut
hi dave i m pasting my struts-config file for the refrence.and as par the
dependencies i have used myeclipse as developing enviornment so it might be
possible that there is something wrong as i downloaded an example in warfile
form and when i deploy it in tomcat it worked fine but when i put my class
files and configuredthe struts-config file according to my application it
stoped working.All this has put me in a strange condition as i haven't
changed any library file.

below is my struts config file..























Regards,
Umesh


On 10/3/07, Dave Newton <[EMAIL PROTECTED]> wrote:
>
> --- aum strut <[EMAIL PROTECTED]> wrote:
> > thks ajay for helping me out but can u point out
> > watcan be the cause of this error as pari know i
> have
> > configured the appliocation correctly...
>
> Without your struts config file we can't help very
> much -- *something* is wrong with either your library
> dependencies, a configuration file, etc. otherwise it
> would work, no?
>
> d.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: Formatting Flaot and Double Values

2007-10-03 Thread Slattery, Tim - BLS
>  I want to format float and double values like this ##,###.## 
> eg 45,000.09  Is there any tag that will do this for me or 
> any global property to do this



Defaults to "number" type, which separates groups of three digits
according to the Locale (commas, on this side of the pond).

--
Tim Slattery
[EMAIL PROTECTED]


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



Re: Session scoped ActionForm causing strange behaviour

2007-10-03 Thread Antonio Petrelli
2007/10/3, Ramita Gambhir <[EMAIL PROTECTED]>:
>
> Is there any way I can refresh the values in the Form object?



What do you exactly mean with "refresh"?


I read
> somewhere reset() function is not called in session scoped forms. If I
> call
> reset(), can it help?


Probably, but you have to override it to clear your properties in your
ActionForm class.

Antonio


Formatting Flaot and Double Values

2007-10-03 Thread vamsi
Hi all,

 I want to format float and double values like this ##,###.## eg 45,000.09
 Is there any tag that will do this for me or any global property to do this

thanks,
Regards
Vamsi krishna

Re: Accessing a row in a table on a JSP page.

2007-10-03 Thread Nikhil Walvekar
Hi,

You can try using javascript, on button submit call a function which will
set row-index to a hidden field and which will be submitted with form. On
server side you can use this field to identify the row.

Regards,
Nikhil

On 10/2/07, JohnLangan <[EMAIL PROTECTED]> wrote:
>
>
> I call the database and create an ArrayList of beans to hold the data.
> Using
> JSTL I iterate over the list
> to display the data in an html table inside a form in a JSP page.
>
> 
> 
> I can give each row a number using ${row.index}
>
> The last but one column is a Struts html:select that allows the user to
> select what they want to do next. The last column contains a button to
> press
> to implement the selected action. So far so good.
>
> My problem is that in whichever row the button is pressed it always acts
> on
> the data in the first row.
> I have tried several ways including indexed properties or using an
> ActionForm with an array of beans so each row is a copy of the bean, but I
> cannot get the action to act on the required row.
>
> Is there a way in Struts for the action to know in which row the button
> was
> pressed? Apart from the html:select dropdown all the other values required
> for the action are hidden values.
>
> Thanks in advance for any help with this.
>
> John.
> --
> View this message in context:
> http://www.nabble.com/Accessing-a-row-in-a-table-on-a-JSP-page.-tf4555354.html#a13000517
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Nikhil


JCaptcha + Struts problem

2007-10-03 Thread alee amin
Hi,

I am using JCaptcha for captcha features. It is working fine. I have this
code in CaptchaServlet and this code save the captcha in request


public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {

ImageCaptcha pixCaptcha = factory.getImageCaptcha();
BufferedImage bi = pixCaptcha.getImageChallenge();
resp.setContentType("image/jpg");
JPEGImageEncoder jpegEncoder = JPEGCodec.createJPEGEncoder(
resp.getOutputStream());

jpegEncoder.encode(bi);
resp.flushBuffer();

req.getSession().setAttribute("pixCaptcha", pixCaptcha);
}


Now, i get this captcha in form Action from req and validate it etc.

In that form i set the following header for the JSP page


response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setDateHeader ("Expires", 0); //pr


So that my captcha does not remain in cache. Now there is one issue. If i
keep the page open for 10-15 minutes and after that i submit it, the
actionform does not find any captcha (ok fine - make sense). The page is
re-displayed but it display with the LAST CAPTCHA (it does not generate the
new one) or at least generate the new one but does not show it.

So what coould be possible modification should i made so that my PAGE
GURANTEE to show the new CAPTCHA IMAGE each time it loads (F5 or CTRL + F5).

-alee
-- 
Muhammad Ali
http://techboard.wordpress.com
Software Engineer - E2ESP
muhammadaliamin(at)gmail(dot)com


Re: Look for Tutorials for Struts2 + Tiles2

2007-10-03 Thread stanlick
I noticed the other day that the tiles plugin link says drop the plugin and
go.  It specifically says there is nothing else to do!  Realizing this is
the way plugins are supposed to "plug in," the page sounds great.  However,
with the tiles plugin, you have to drop a few tiles* jars in addition, which
aren't mentioned.  I would rather see the tiles plugin "finished" rather
than talk about the exception to this plugin.

Scott

On 10/2/07, Dave Newton <[EMAIL PROTECTED]> wrote:
>
> --- Emi Lu <[EMAIL PROTECTED]> wrote:
> > May I know where to find tutorials for "struts 2 +
> > Tiles 2" ?
>
> http://struts.apache.org/2.x/docs/tiles-plugin.html
> http://tiles.apache.org/tutorial/index.html
>
> The S2 plugin link *may* be somewhat dated; if there
> are changes needed please follow up and / or comment
> on the Wiki page.
>
> Tiles itself has its own mailing list for
> tiles-specific questions.
>
> http://tiles.apache.org/mail.html
>
> d.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Scott
[EMAIL PROTECTED]


Re: Struts Application is not working

2007-10-03 Thread Dave Newton
--- aum strut <[EMAIL PROTECTED]> wrote:
> thks ajay for helping me out but can u point out
> watcan be the cause of this error as pari know i
have
> configured the appliocation correctly...

Without your struts config file we can't help very
much -- *something* is wrong with either your library
dependencies, a configuration file, etc. otherwise it
would work, no?

d.


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



Own TextProvider implementation for validation

2007-10-03 Thread Anton Pussep
I would like to use an own i18n system with the validation provided by
Struts 2 and XWork 2. The action-validation.xml will contain keys as
messages and those keys should be used in order to retrieve the messages
from my i18n system. There seems to be a TextProvider interface, thus I
could probably create an own implementation of it and set my own
TextProvider in TextProviderFactory? But I am also wondering if Struts
also provides something similar, since ActionSupport also implements
TextProvider, so is the action used as a TextProvider by the validation
interceptor?

Best,
Anton

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



Re: Session scoped ActionForm causing strange behaviour

2007-10-03 Thread Ramita Gambhir

Hi Antonio,

Thanks a lot for the reply :-)

I need to put the form into session to make it work with DWR(I had some
requirement). This part I cannot change.

Is there any way I can refresh the values in the Form object? I read
somewhere reset() function is not called in session scoped forms. If I call
reset(), can it help?

Thanks,
Ramita


Antonio Petrelli-3 wrote:
> 
> 2007/10/3, Ramita Gambhir <[EMAIL PROTECTED]>:
>>
>> I integrated Struts with Ajax using DWR. For that I had to put the
>> ActionForm in session scope.
> 
> 
> 
> Why do you need to put it into session?
> 
> Now I am facing a strange problem.
>>
>> When I change some values in the form, they are saved(marshalled)
>> properly
>> at the backend(an XML file). But in the JSP, it shows old values only.
>> I suspect this is happening because of session scoped ActionForm.
> 
> 
> Your suspect is right! The action form is persisted across the requests.
> 
> 
> What's the basic difference between request-scoped and session-scoped form
>> objects?
> 
> 
> 
> That session scoped form objects are stored in session, so you don't clear
> it after the end of the request.
> 
> Immediate help is needed...
> 
> 
> You get immediate help only if you pay someone... :-)
> 
> Antonio
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Session-scoped-ActionForm-causing-strange-behaviour-tf4560983.html#a13016861
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: Session scoped ActionForm causing strange behaviour

2007-10-03 Thread Antonio Petrelli
2007/10/3, Ramita Gambhir <[EMAIL PROTECTED]>:
>
> I integrated Struts with Ajax using DWR. For that I had to put the
> ActionForm in session scope.



Why do you need to put it into session?

Now I am facing a strange problem.
>
> When I change some values in the form, they are saved(marshalled) properly
> at the backend(an XML file). But in the JSP, it shows old values only.
> I suspect this is happening because of session scoped ActionForm.


Your suspect is right! The action form is persisted across the requests.


What's the basic difference between request-scoped and session-scoped form
> objects?



That session scoped form objects are stored in session, so you don't clear
it after the end of the request.

Immediate help is needed...


You get immediate help only if you pay someone... :-)

Antonio


Session scoped ActionForm causing strange behaviour

2007-10-03 Thread Ramita Gambhir

Hi all,
 
I integrated Struts with Ajax using DWR. For that I had to put the
ActionForm in session scope.
Now I am facing a strange problem.

When I change some values in the form, they are saved(marshalled) properly
at the backend(an XML file). But in the JSP, it shows old values only.
I suspect this is happening because of session scoped ActionForm. Its taking
values from the existing Form object in the session. And its not
unmarshalling it everytime.
So what can I do to resolve this problem? Any pointers??
What's the basic difference between request-scoped and session-scoped form
objects?

Immediate help is needed...

Thanks a lot in advance.

Regards,
Ramita
-- 
View this message in context: 
http://www.nabble.com/Session-scoped-ActionForm-causing-strange-behaviour-tf4560983.html#a13016312
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [OT]Re: Exadel Studio is showing Evalution version Expired why?

2007-10-03 Thread Dave Newton
exadel.com?

--- AJAY KUMAR UPPALAPATI <[EMAIL PROTECTED]> wrote:

> where can i get help regarding this can u guide me.
> thanQ
> 
> 
> On 10/3/07, Nuwan Chandrasoma <[EMAIL PROTECTED]>
> wrote:
> >
> > This is not related to struts.
> >
> > msg2ajay wrote:
> > > Hello friends,
> > >
> > > I just downloaded ExadelStudio 4.0.4 for Eclipse
> 3.2.2 .But when i tried
> > to
> > > do Struts project, i am geting a message as
> Evalution Version Expired.
> > Why
> > > it is showing like that.
> > >
> > > ThanQ in Adv,
> > > Ajay
> > >
> >
> >
> >
>
-
> > 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 Application is not working

2007-10-03 Thread aum strut
thks ajay for helping me out but can u point out watcan be the cause of this
error as pari know i have configured the appliocation correctly...

On 10/3/07, AJAY KUMAR UPPALAPATI <[EMAIL PROTECTED]> wrote:
>
> hello friend,
>  I am also not having that much experience so why dont u
> try this url.
>
> http://www.michael-thomas.com/tech/apache/struts/struts_first_steps.htm
>
> this url contains Apache link and from there u download one sturts binary
> file (suppose if u r doing struts1.3.8>
> struts-1.3.8\apps\struts-blank-1.3.8.war
>
> u just deploy this file and u can proceed with this example...
>
>
> On 10/3/07, umeshawasthi <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hi All,
> > I am new to struts,i have developed a small application but it is not
> > running,it is displaying the index page correctly but not forwarding the
> > request.i developed the application using my eclipse.when i checked the
> > tomcat log file it is showing the exception that it is not able to find
> > the
> > ActionServlet class,where as i have configured the struts-config classs
> > correctly in the web.xml file i m also pasting the content of the
> web.xml
> > file.Please help me to find out the error.
> >
> > 
> > action
> > org.apache.struts.action.ActionServlet
> > 
> > config
> > /WEB-INF/struts-config.xml
> > 
> > 2
> > 
> >
> >
> > 
> > 
> > action
> > *.do
> > 
> >
> > Regards,
> > Umesh
> > --
> > View this message in context:
> >
> http://www.nabble.com/Struts-Application-is-not-working-tf4560069.html#a13013599
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>