[S2] How to integrate JSF with struts 2?

2007-06-25 Thread Jason Wyatt
I'm confused as to how to integrate a third-party JSF component with our
Struts 2 app.

I've been able to get a the third-party example JSF page working with using
one web.xml file, and our Struts 2 app works with another ordinary web.xml
file, but I can't seem to get both working together using one web.xml file.

The example at http://struts.apache.org/2.x/docs/javaserver-faces.html shows
one way of integrating JSF with Struts 2 - by adding  interceptor-ref
name=jsfStack / to the action definition. 

However, I don't really understand the example... How does the action know
to go to the employee page on success? It seems to be missing something. The
example code:

action name=employee
class=org.apache.struts.action2.showcase.jsf.EmployeeAction
interceptor-ref name=basicStack/
interceptor-ref name=jsfStack/
result name=success type=jsf /
result name=index type=redirect-actionindex/result
/action


The showcase JSF example seems to use another way - by setting up a
javax.faces.webapp.FacesServlet to process all *.action requests. 

This seems quite different to the documented example above, and
counterintuitive... If Faces is processing the actions, then how does the
struts framework get called?


Thanks for any help, regards

Jason


-
Falun Dafa  Truth - Compassion - Forbearance

A mind  body practice under persecution in China

http://www.faluninfo.net












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



Re: [OT] Serious memory leak

2007-06-25 Thread Balazs Michnay
I was wondering about one more thing...
Somewhere I read that the GC can only collect objects that were instantiated 
with the new keyword.
Does it mean the the following two String creations differ when it comes to 
garbage collection?

1) String myString = This is my string;
2) String myString = new String(This is my string);

If the second one can only be garbage collected, this would explain my 
uncollectable char[] objects, because mostly I simply use the 1) version.
If you say this really does count when it comes to garbage collection, I'd 
rewrite my code and see what happens.

Thanks a lot,

  MB.

- Original Message 
From: Christopher Schultz [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Wednesday, June 20, 2007 2:29:29 PM
Subject: Re: [OT] Serious memory leak

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Balazs,

Balazs Michnay wrote:
 Thanks a lot, these changes really did help, now MySQL reports that
 only one connection is used all over the website. I really do
 appreciate your help.

No problem. Another good tip is to set your connection pool size to 1
when working in development (and maybe even test). This will allow your
connection pool to be exhausted any time there is a potential for
deadlock (from the cp, that is).

Good luck,
- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGeR2o9CaO5/Lv0PARAspgAJ4yMYS06yOQ5CLE29ezyf1D5oaLhQCfWXuu
GHdfh1DPw+q/1WXEByma8L4=
=8bHg
-END PGP SIGNATURE-

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








 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

Re: Minimized Window State NOT working

2007-06-25 Thread Nils-Helge Garli

Hi!

To quote the spec:

When a portlet is in MINIMIZED window state, the portlet should only render
minimal output or no output at all.

As I interpret this, it's the responsibility of the portlet to display the
correct content. So you need to do some checking for the window state and
take according action in your portlet.

However, there wasn't much information about the minimized window state in
the spec. I couldn't find any description of the contract between the portal
server's window buttons and the window states, so there might be different
behaviour from server to server. Have you tried deploying to a different
container, for instance pluto?

Nils-H

On 6/25/07, tom tom [EMAIL PROTECTED] wrote:


Hi,

In Struts2 portlets development, It looks to us that
the minimize does not work as expected, When we presss
the minimize button instead of minimizing it shows the
same content.

to my understanding it should not render anything at
all.

We trying this on uPortal.

Can some one else try these things.

Is there any workaround.

Thanks,





8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news

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




Re: [OT] Serious memory leak

2007-06-25 Thread Balazs Michnay
I was wondering about one more thing...
Somewhere I read that the GC can only collect objects that were instantiated 
with the new keyword.
Does it mean the the following two String creations differ when it comes to 
garbage collection?

1) String myString = This is my string;
2) String myString = new String(This is my string);

If
the second one can only be garbage collected, this would explain my
uncollectable char[] objects, because mostly I simply use the 1)
version.
If you say this really does count when it comes to garbage collection, I'd 
rewrite my code and see what happens.

Thanks a lot,

  MB.

- Original Message 
From: Christopher Schultz [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Wednesday, June 20, 2007 2:29:29 PM
Subject: Re: [OT] Serious memory leak

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Balazs,

Balazs Michnay wrote:
 Thanks a lot, these changes really did help, now MySQL reports that
 only one connection is used all over the website. I really do
 appreciate your help.

No problem. Another good tip is to set your connection pool size to 1
when working in development (and maybe even test). This will allow your
connection pool to be exhausted any time there is a potential for
deadlock (from the cp, that is).

Good luck,
- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGeR2o9CaO5/Lv0PARAspgAJ4yMYS06yOQ5CLE29ezyf1D5oaLhQCfWXuu
GHdfh1DPw+q/1WXEByma8L4=
=8bHg
-END PGP SIGNATURE-

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



   
Ready
 for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

RE: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Al Sutton
Just went to look at the full trace and got a;

Forbidden
You don't have permission to access /trace/ on this server.

 

-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED] 
Sent: 25 June 2007 08:34
To: Struts Users Mailing List
Subject: Re: [S2] App generate lot (2GB) of garbage!

Hi,

I've run a profile with yourkit (nice!) on my development platform.
Here is the most important evidence. I've opened three product listings and
a couple of product sheet in my site. Total garbage collected : 234 MB.

Of these 234 MB, 64 are produced by
org.jboss.remoting.transport.socket.ServerThread.run() so they are related
to communication between the business layer and the presentation layer.

Most of the other (156MB) are produced by
com.opensymphony.xwork2.DefaultActionInvocation.invoke() so it's something
related to struts.

Going down the stack trace through interceptors the last class is
org.apache.struts2.dispatcher.StrutsResultSupport.execute
(ActionInvocation) that has 146MB of generated garbage.

Now the interesting part :

These 146MB are divided into :

34MB generated by freemarker.template.Template.process(Object, Writer) 22MB
generated by
com.opensymphony.xwork2.util.OgnlValueStack.findValue(String)
10MB generated by org.eclipse.jdt.internal.compiler.Compiler.compile
(ICompilationUnit[])
7MB generated by freemarker.template.Configuration.getTemplate(String)
6MB generated by org.eclipse.jdt.internal.compiler.Compiler.init
(INameEnvironment, IErrorHandlingPolicy, Map, ICompilerRequestor,
IProblemFactory, boolean)

and a few other with less then 3MB each.

You can find the complete trace on http://www.andreavettori.com/trace/
trace1.html.

Do they seems normal numbers ???
I also don't understand if the difference between 146 and about 90
(=34+22+10+7+6+other small) is produced by
org.apache.struts2.dispatcher.StrutsResultSupport.execute
(ActionInvocation). That's over 50MB!

Now if someone think that this can help solve my problem and understand
where is produced this garbage I can run the same profile on the production
server, maybe for a couple of minutes.

I'm also really interested into knowing if you guys have ever checked gc
collections on your applications... I don't think I'm the only one that
writes garbage producer applications :).

Thank you and please don't leave me alone with this problem!

--
Ing. Andrea Vettori
Consulente per l'Information Technology



-
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: Making Fields editable depending on role

2007-06-25 Thread Pierre Goupil

Thanks a lot !


--
Mon horizon était désormais les pétales courbés,
Ma nouvelle demeure resplendissait de flèches d'herbes folles
Et d'oreillers de pollens odorants.

(Naïmah, le philosophe Fémereif)


Re: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Ing. Andrea Vettori

It's because the complete link ends with trace1.html

The email program truncated the link into two lines...

Thank you!

Il giorno 25/giu/07, alle ore 09:42, Al Sutton ha scritto:


Just went to look at the full trace and got a;

Forbidden
You don't have permission to access /trace/ on this server.



-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 08:34
To: Struts Users Mailing List
Subject: Re: [S2] App generate lot (2GB) of garbage!

Hi,

I've run a profile with yourkit (nice!) on my development platform.
Here is the most important evidence. I've opened three product  
listings and
a couple of product sheet in my site. Total garbage collected : 234  
MB.


Of these 234 MB, 64 are produced by
org.jboss.remoting.transport.socket.ServerThread.run() so they are  
related
to communication between the business layer and the presentation  
layer.


Most of the other (156MB) are produced by
com.opensymphony.xwork2.DefaultActionInvocation.invoke() so it's  
something

related to struts.

Going down the stack trace through interceptors the last class is
org.apache.struts2.dispatcher.StrutsResultSupport.execute
(ActionInvocation) that has 146MB of generated garbage.

Now the interesting part :

These 146MB are divided into :

34MB generated by freemarker.template.Template.process(Object,  
Writer) 22MB

generated by
com.opensymphony.xwork2.util.OgnlValueStack.findValue(String)
10MB generated by org.eclipse.jdt.internal.compiler.Compiler.compile
(ICompilationUnit[])
7MB generated by freemarker.template.Configuration.getTemplate(String)
6MB generated by org.eclipse.jdt.internal.compiler.Compiler.init
(INameEnvironment, IErrorHandlingPolicy, Map, ICompilerRequestor,
IProblemFactory, boolean)

and a few other with less then 3MB each.

You can find the complete trace on http://www.andreavettori.com/trace/
trace1.html.

Do they seems normal numbers ???
I also don't understand if the difference between 146 and about 90
(=34+22+10+7+6+other small) is produced by
org.apache.struts2.dispatcher.StrutsResultSupport.execute
(ActionInvocation). That's over 50MB!

Now if someone think that this can help solve my problem and  
understand
where is produced this garbage I can run the same profile on the  
production

server, maybe for a couple of minutes.

I'm also really interested into knowing if you guys have ever  
checked gc
collections on your applications... I don't think I'm the only one  
that

writes garbage producer applications :).

Thank you and please don't leave me alone with this problem!

--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



Re: Making Fields editable depending on role

2007-06-25 Thread Angelo zerr

Hi,
by default FormView doesn't manage a href. But you can configure it with
displayer-config
http://formview.sourceforge.net/developer-guide.html#How customize FormView
DisplayerConfig
(you can manage it like div)
in your href you set id a id=myId href= .../a

!-- HTML A HREF--
displayer name=a attributesName=id 
behaviour name=INVISIBLE 
replaceElement![CDATA[nbsp;]]/replaceElement
/behaviour  
/displayer

With this config if you set INVISIBLE state to the a href with id myId
it will be replace with nbsp;

Regards Angelo

2007/6/24, Pierre Goupil [EMAIL PROTECTED]:


Hello,

This tool looks great. But can you use it for links too ? I mean, to
display
or hide a link (or anything else) depending upon the role of the user ?
I've
browsed through the doc and it doesn't seem clear.

Cheers,


Pierre



2007/6/24, Archer [EMAIL PROTECTED]:

 Thank you very much for your help...

 Regards
 Viplav Kallepu

 On 6/22/07, Angelo zerr [EMAIL PROTECTED] wrote:
 
  Hi,
  I think you can be interested with FormView
  http://formview.sourceforge.net/which is taglib to manage state of
  your fields (hidden, visible,...). With
  FormView you can manage fields switch user role
  http://formview.sourceforge.net/roles.html
 
  Regards Angelo
 
  2007/6/22, Archer [EMAIL PROTECTED]:
  
   Hi,
  
   I am using struts 1.3.8. I have text fileds in jsp which should be
 made
   editable and non-editable depending on the user role. I used
container
   managed security for implementing the role based  security. Can
anyone
   please help me how to sort out this issue. I am new to security
   implementation.
  
   Thanks
   Archer
  
 



 --
 Regards
 Archer




--
Mon horizon était désormais les pétales courbés,
Ma nouvelle demeure resplendissait de flèches d'herbes folles
Et d'oreillers de pollens odorants.

(Naïmah, le philosophe Fémereif)



Re: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Ing. Andrea Vettori

Hi,

I've run a profile with yourkit (nice!) on my development platform.
Here is the most important evidence. I've opened three product  
listings and a couple of product sheet in my site. Total garbage  
collected : 234 MB.


Of these 234 MB, 64 are produced by  
org.jboss.remoting.transport.socket.ServerThread.run() so they are  
related to communication between the business layer and the  
presentation layer.


Most of the other (156MB) are produced by  
com.opensymphony.xwork2.DefaultActionInvocation.invoke() so it's  
something related to struts.


Going down the stack trace through interceptors the last class is  
org.apache.struts2.dispatcher.StrutsResultSupport.execute 
(ActionInvocation) that has 146MB of generated garbage.


Now the interesting part :

These 146MB are divided into :

34MB generated by freemarker.template.Template.process(Object, Writer)
22MB generated by  
com.opensymphony.xwork2.util.OgnlValueStack.findValue(String)
10MB generated by org.eclipse.jdt.internal.compiler.Compiler.compile 
(ICompilationUnit[])

7MB generated by freemarker.template.Configuration.getTemplate(String)
6MB generated by org.eclipse.jdt.internal.compiler.Compiler.init 
(INameEnvironment, IErrorHandlingPolicy, Map, ICompilerRequestor,  
IProblemFactory, boolean)


and a few other with less then 3MB each.

You can find the complete trace on http://www.andreavettori.com/trace/ 
trace1.html.


Do they seems normal numbers ???
I also don't understand if the difference between 146 and about 90  
(=34+22+10+7+6+other small) is produced by  
org.apache.struts2.dispatcher.StrutsResultSupport.execute 
(ActionInvocation). That's over 50MB!


Now if someone think that this can help solve my problem and  
understand where is produced this garbage I can run the same profile  
on the production server, maybe for a couple of minutes.


I'm also really interested into knowing if you guys have ever checked  
gc collections on your applications... I don't think I'm the only one  
that writes garbage producer applications :).


Thank you and please don't leave me alone with this problem!

--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



ActionDispatcher + Wildcards Problem

2007-06-25 Thread jope

Hi,

the following situation:
I'm using DispatchActions and in my struts-config.xml wildcards for  
the method-parameter.


action path=/Foo/* ... parameter={1}

I also have removed the .do from the URL (changed in the web.xml), so  
that I can call an action method like this:


/Foo/bar

and it calls the bar-method from the FooDispatchAction.
Now I want to create a BaseAction from which all DispatchActions  
extends. The BaseAction extends Action and looks like this:


public class BaseAction extends Action {

protected ActionDispatcher dispatcher = new ActionDispatcher(this,  
ActionDispatcher.Dispatch:Flavor);


public ActionForward execute(Actionmapping mapping.. ) throws Exception {
   return dispatcher.execute(mapping  );
}

}

But now I have tho problem, that I got the error message, that the  
Request [/Foo/bar] does not contain handler parameter named 'bar'.
I've recognized that the method getMethodName, which I've called in  
every DispatchAction to get the method-parameter isn't called anymore.


Does anybody knows how to solve this problem?

Thanks in advance

jope




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



RE: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Al Sutton
Your trace is at too higher level. Can you put a fully expanded copy of your
trace that goes down to the leaf methods.

At the moment your trace just shows that somewhere in the call stack under
some collection of conditions which are unknown to us the method and all
it's calls are generating lots of objects. What I'd like to see is the tree
expanded so I can see which methods are causing the gc'ed objects to be
created, because without your whole application running it's extremely
difficult to see the execution paths used to and thus determine which
methods are causing the problem. findValue in itself does not create
objects, so please post the fully expanded tree.
 

-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED] 
Sent: 25 June 2007 08:34
To: Struts Users Mailing List
Subject: Re: [S2] App generate lot (2GB) of garbage!

Hi,

I've run a profile with yourkit (nice!) on my development platform.
Here is the most important evidence. I've opened three product listings and
a couple of product sheet in my site. Total garbage collected : 234 MB.

Of these 234 MB, 64 are produced by
org.jboss.remoting.transport.socket.ServerThread.run() so they are related
to communication between the business layer and the presentation layer.

Most of the other (156MB) are produced by
com.opensymphony.xwork2.DefaultActionInvocation.invoke() so it's something
related to struts.

Going down the stack trace through interceptors the last class is
org.apache.struts2.dispatcher.StrutsResultSupport.execute
(ActionInvocation) that has 146MB of generated garbage.

Now the interesting part :

These 146MB are divided into :

34MB generated by freemarker.template.Template.process(Object, Writer) 22MB
generated by
com.opensymphony.xwork2.util.OgnlValueStack.findValue(String)
10MB generated by org.eclipse.jdt.internal.compiler.Compiler.compile
(ICompilationUnit[])
7MB generated by freemarker.template.Configuration.getTemplate(String)
6MB generated by org.eclipse.jdt.internal.compiler.Compiler.init
(INameEnvironment, IErrorHandlingPolicy, Map, ICompilerRequestor,
IProblemFactory, boolean)

and a few other with less then 3MB each.

You can find the complete trace on http://www.andreavettori.com/trace/
trace1.html.

Do they seems normal numbers ???
I also don't understand if the difference between 146 and about 90
(=34+22+10+7+6+other small) is produced by
org.apache.struts2.dispatcher.StrutsResultSupport.execute
(ActionInvocation). That's over 50MB!

Now if someone think that this can help solve my problem and understand
where is produced this garbage I can run the same profile on the production
server, maybe for a couple of minutes.

I'm also really interested into knowing if you guys have ever checked gc
collections on your applications... I don't think I'm the only one that
writes garbage producer applications :).

Thank you and please don't leave me alone with this problem!

--
Ing. Andrea Vettori
Consulente per l'Information Technology



-
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] How to integrate JSF with struts 2?

2007-06-25 Thread Don Brown

How the JSF integration works is we decompose the JSF Lifecycle object
into its phases and store each in a Struts 2 Interceptor.  Therefore,
the request enters the Struts 2 FilterDispatcher like normal, then if
the action mapping includes the JSF interceptors (like it does in your
example by including the jsfStack), the request will go through the
JSF phases.  The page displayed, employee.jsp, is determined using
normal JSF means (taking the action name and appending a .jsp).
Even that might be configurable, though I couldn't say for sure.

Don

On 6/25/07, Jason Wyatt [EMAIL PROTECTED] wrote:

I'm confused as to how to integrate a third-party JSF component with our
Struts 2 app.

I've been able to get a the third-party example JSF page working with using
one web.xml file, and our Struts 2 app works with another ordinary web.xml
file, but I can't seem to get both working together using one web.xml file.

The example at http://struts.apache.org/2.x/docs/javaserver-faces.html shows
one way of integrating JSF with Struts 2 - by adding  interceptor-ref
name=jsfStack / to the action definition.

However, I don't really understand the example... How does the action know
to go to the employee page on success? It seems to be missing something. The
example code:

action name=employee
class=org.apache.struts.action2.showcase.jsf.EmployeeAction
interceptor-ref name=basicStack/
interceptor-ref name=jsfStack/
result name=success type=jsf /
result name=index type=redirect-actionindex/result
/action


The showcase JSF example seems to use another way - by setting up a
javax.faces.webapp.FacesServlet to process all *.action requests.

This seems quite different to the documented example above, and
counterintuitive... If Faces is processing the actions, then how does the
struts framework get called?


Thanks for any help, regards

Jason


-
Falun Dafa  Truth - Compassion - Forbearance

A mind  body practice under persecution in China

http://www.faluninfo.net












-
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] App generate lot (2GB) of garbage!

2007-06-25 Thread Al Sutton
First thing I'd suggest; Turn off debug mode! It seems a chunk of the
Gced objects are coming from preparing strings for log statements which are
only activated when debug mode is on (for example;
Com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyValue(Map,
Object, Object) accounts for 5% of Gced objects, of which nearly the entire
5% comes from StringBuilter and Log4JLoggerdebug which are only used when
debug mode is on).

Secondly it does seem as though there's anything wildly wrong here, there
aren't any single methods which have large Gced object counts indicating
there isn't a big bottleneck (yes, some show 30+%, but that's fairly evenly
divided between the methods called by the 30+% method), which leads me to
one question, how much data are you trying to output? Can you do a Save
Source and tell me the size of the HTML file generated?, can you also
provide the call tree with a call count so we can see how many times the
methods are being executed?

Thanks,

Al.

 

-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED] 
Sent: 25 June 2007 09:35
To: Struts Users Mailing List
Subject: Re: [S2] App generate lot (2GB) of garbage!


Il giorno 25/giu/07, alle ore 09:50, Al Sutton ha scritto:

 Your trace is at too higher level. Can you put a fully expanded copy 
 of your trace that goes down to the leaf methods.

Done. It's on traceall.html. I expanded only the two most garbage producing
top call.

Thank you

--
Ing. Andrea Vettori
Consulente per l'Information Technology



-
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] App generate lot (2GB) of garbage!

2007-06-25 Thread Ing. Andrea Vettori


Il giorno 25/giu/07, alle ore 11:21, Al Sutton ha scritto:

First thing I'd suggest; Turn off debug mode! It seems a chunk  
of the
Gced objects are coming from preparing strings for log statements  
which are

only activated when debug mode is on (for example;
Com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyValu 
e(Map,
Object, Object) accounts for 5% of Gced objects, of which nearly  
the entire
5% comes from StringBuilter and Log4JLoggerdebug which are only  
used when

debug mode is on).


How ??? devMode is already false in struts.xml

I've noticed that's a lot of log4j calls but don't know if they can  
be removed!


Thanks




Secondly it does seem as though there's anything wildly wrong here,  
there
aren't any single methods which have large Gced object counts  
indicating
there isn't a big bottleneck (yes, some show 30+%, but that's  
fairly evenly
divided between the methods called by the 30+% method), which leads  
me to
one question, how much data are you trying to output? Can you do a  
Save

Source and tell me the size of the HTML file generated?, can you also
provide the call tree with a call count so we can see how many  
times the

methods are being executed?

Thanks,

Al.



-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 09:35
To: Struts Users Mailing List
Subject: Re: [S2] App generate lot (2GB) of garbage!


Il giorno 25/giu/07, alle ore 09:50, Al Sutton ha scritto:


Your trace is at too higher level. Can you put a fully expanded copy
of your trace that goes down to the leaf methods.


Done. It's on traceall.html. I expanded only the two most garbage  
producing

top call.

Thank you

--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



Re: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Ing. Andrea Vettori


Il giorno 25/giu/07, alle ore 09:50, Al Sutton ha scritto:

Your trace is at too higher level. Can you put a fully expanded  
copy of your

trace that goes down to the leaf methods.


Done. It's on traceall.html. I expanded only the two most garbage  
producing top call.


Thank you

--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



How come paramsPrepareParamsStack isn't the default stack?

2007-06-25 Thread David Harland
It seems to me that for the majority or senarios you would want
paramsPrepareParamsStack to be the default stack. One thing we have
noticed with this as our default and devMode turned on is that we get
errors with pages with checkboxs because the checkbox interceptor is
being called after the params interceptor. 

Is there any good reason why we can not move the checkbox inteceptor up
near the top of the stack, call the params interceptor once after the
checkbox interceptor but before the prepare interceptor and remove the
second params interceptor all together.

Thanks

Dave.

__
Ufi Limited 
Registered in England No.  3980770 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

learndirect Solutions Ltd 
Registered in England No. 5081669 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

UFI Charitable Trust 
Registered in England No.  3658378 
Registered Charity No.  1081028 
Registered Office:  Dearing House, 1 Young Street, Sheffield, S1 4UP 

This email has been scanned by the MessageLabs Email Security System.

__

Re: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Ing. Andrea Vettori

Ok

I changed the jboss configuration. I think it would be helpful to put  
an advice on the performance page of struts. If using jboss you  
should limit the debug string production with


   category name=com.opensymphony
  priority value=INFO/
   /category

   category name=ognl
  priority value=INFO/
   /category

   category name=freemarker
  priority value=INFO/
   /category


on log4j.xml

org.apache is already present in the default configuration.

I'll now try to profile the production server for a longer time and  
keep you informed.


Thank you



Il giorno 25/giu/07, alle ore 12:06, Al Sutton ha scritto:


The relevant piece of code is;

if (LOG.isDebugEnabled()) {
LOG.debug(Entering nullPropertyValue [target=+target+,
property=+property+]);
}

So the check is always present, but if the check is true (i.e.  
debug is on)
it also has to build the log message from the components in the  
debug call
(i.e. create Entering nullPropertyValue [target=, then add the  
variable
target, then add the string , property=, then add the variable  
property,

then add the character ]), which is what the StringBuilder is doing.

If the check is false, the call is not made, and the string doesn't  
need to
be built, and hence no StringBuilder will be created, hence you'll  
see a

drop of over 5% in your Gced object count for exactly the same test.

-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 10:36
To: Al Sutton
Subject: Re: [S2] App generate lot (2GB) of garbage!

I'm using jboss...

I'll try to find the configuration.

Just curious :
so in the source code the production of that strings are on a  
condition that

check the log4j configuration ?
This mean that the overhead of checking the condition is always  
present ?


Il giorno 25/giu/07, alle ore 11:33, Al Sutton ha scritto:


Are you using log4j in your app or your appserver (e.g. Jetty uses
it)?

If so look for a log4j.properties file which turns debug mode on with
a line similar to;

log4j.rootLogger=DEBUG

-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 10:28
To: Struts Users Mailing List; Al Sutton
Subject: Re: [S2] App generate lot (2GB) of garbage!


Il giorno 25/giu/07, alle ore 11:21, Al Sutton ha scritto:

First thing I'd suggest; Turn off debug mode! It seems a  
chunk of
the Gced objects are coming from preparing strings for log  
statements

which are only activated when debug mode is on (for example;
Com.opensymphony.xwork2.util.InstantiatingNullHandler.nullPropertyVa 
l

u
e(Map,
Object, Object) accounts for 5% of Gced objects, of which nearly the
entire 5% comes from StringBuilter and Log4JLoggerdebug which are
only used when debug mode is on).


How ??? devMode is already false in struts.xml

I've noticed that's a lot of log4j calls but don't know if they  
can be

removed!

Thanks




Secondly it does seem as though there's anything wildly wrong here,
there aren't any single methods which have large Gced object counts
indicating there isn't a big bottleneck (yes, some show 30+%, but
that's fairly evenly divided between the methods called by the 30+%
method), which leads me to one question, how much data are you  
trying

to output? Can you do a Save Source and tell me the size of the
HTML file generated?, can you also provide the call tree with a call
count so we can see how many times the methods are being executed?

Thanks,

Al.



-Original Message-
From: Ing. Andrea Vettori [mailto:[EMAIL PROTECTED]
Sent: 25 June 2007 09:35
To: Struts Users Mailing List
Subject: Re: [S2] App generate lot (2GB) of garbage!


Il giorno 25/giu/07, alle ore 09:50, Al Sutton ha scritto:

Your trace is at too higher level. Can you put a fully expanded  
copy

of your trace that goes down to the leaf methods.


Done. It's on traceall.html. I expanded only the two most garbage
producing top call.

Thank you

--
Ing. Andrea Vettori
Consulente per l'Information Technology



 
-

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]



--
Ing. Andrea Vettori
Consulente per l'Information Technology





--
Ing. Andrea Vettori
Consulente per l'Information Technology





--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



RE: email within action

2007-06-25 Thread Raghupathy, Gurumoorthy
Sending email involves a lot of processing 

If I was you then I would rather use JMS to send emails (so that you can
send email asynchronously)... 

Your action send a message to a JMS server to send email with details
and then that's it... 

The MDB bean will scan the queue and then send the email one by one ... 

Regards
Guru


-Original Message-
From: Chris Pat [mailto:[EMAIL PROTECTED] 
Sent: 25 June 2007 12:35
To: Struts Users Mailing List
Subject: email within action

Hello
Is it possible to send an email within an action?  How/What are the
issues?  Is this scalable?  How does it play with the framework and
multiple simultaneous clients?  Any insight would be appreciated.  

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



email within action

2007-06-25 Thread Chris Pat
Hello
Is it possible to send an email within an action?  How/What are the issues?  Is 
this scalable?  How does it play with the framework and multiple simultaneous 
clients?  Any insight would be appreciated.  


Re: email within action

2007-06-25 Thread Oguz Kologlu
yes, The main issue will response times if you a send emails  
synchronously ( if you can you send async). Async will definitely  
scale better since the client isn't blocking a thread for nothing.  
Simultaneous clients should be no problem as long as you follow the  
same threading rules as everything else shared vars etc.


For high loads you should use messaging. There's a ton of stuff on  
the net about async programming but it really depends on your  
environment. For a full JEE setup I'd probably use a Message Driven  
Bean. What sort of volume are you looking at and what's the environment?


Oz


On 25/06/2007, at 9:35 PM, Chris Pat wrote:


Hello
Is it possible to send an email within an action?  How/What are the  
issues?  Is this scalable?  How does it play with the framework and  
multiple simultaneous clients?  Any insight would be appreciated.



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



Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Instance must not be null (Spring+Struts+Hibernate)

2007-06-25 Thread GEDA

Hi guys. I cannot understand this problem and its driving me crazy. Can you
please take a look at the errors stack ? Thank you very much :

SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor':
Cannot create inner bean '(inner bean)' of type
[org.springframework.transaction.interceptor.TransactionInterceptor] while
setting bean property 'transactionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.IllegalArgumentException:
Instance must not be null
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.IllegalArgumentException:
Instance must not be null
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.IllegalArgumentException:
Instance must not be null
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'entityManagerFactory' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed; nested exception is java.lang.IllegalArgumentException: Instance
must not be null
Caused by: java.lang.IllegalArgumentException: Instance must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at
org.springframework.util.ClassUtils.getAllInterfaces(ClassUtils.java:696)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.createEntityManagerFactoryProxy(AbstractEntityManagerFactoryBean.java:272)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:260)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
at

Re: [S2] Cannot make XML Validation work for aliased action mapping

2007-06-25 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:

 Hi,
 
 I'm using
 
   struts-core-2.0.8 j4 distribution,
   struts2-spring-plugin-j4-2.0.6,
   and corresponding j4 distribution jars,
 
 
 I have an action with several methods. I use each
 method as an action mapping and I want
 to use different validation.xml files for each
 action mapping.
 
 In the documentation, AFAIU, it says that using the
 [actionname]_[methodname]-validation.xml in the same
 package with the action class should
 work to accomplish this type of validation. But I
 could't succeed to make the validation
 work.
 
 Anybody has an idea? Thanks for any replies.
 
 My configuration follows:
 
 stockin.jsp
 
 s:form method=POST namespace=secure
   s:if test=%{documentDetail == null ||
 documentDetail.size == 0}
 s:textfield label=documentNumber
 required=true
   name=documentNumber /
 s:datetimepicker required=true
 label=invoiceDate displayWeeks=5
   name=invoiceDate
 displayFormat=dd.MM. /
 s:submit label=Retrieve Invoice
 value=Retrieve Invoice
   action=Stockin_retrieveInvoice
 /
   /s:if
   s:actionerror label=errors /
 /s:form
 
 Stockin_retrieveInvoice-validation.xml :

Is that a typo?

While this is still a bit unclear to me (and I think
wrong), you may need to name the XML file something
like:

Stockin-Stockin_retrieveInvoice-validation.xml.

The alias filename component may want the name of
the action (action.../'s name attribute value).

d.



  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


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



Re: email within action

2007-06-25 Thread Oguz Kologlu


On 25/06/2007, at 10:33 PM, Chris Pat wrote:


Hello
How can I send the email asynchronously? My timeframe is the  
lifecycle of the action and my browser session.
Well you will probably not be doing the emailing async but rather  
firing off an async request to send an email ( eg send hello world  
to this list of 1000 recipients) and response to the client (ie  
browser) that the emails are going out. You really don't have to wait  
for an email to be sent since email is a store and forward mechanism  
anyway with no guaranteed delivery.


You probably need to read up a little on messaging. As Guru also said  
a JMS server would meet your needs.


There's generally a JMS server built into most app servers or you can  
plug one in if it doesn't have one. A good list at:


http://mule.codehaus.org/display/MULE/Configuring+Jms

I've used ActiveMQ before and it's quite stable/reliable. It's run  
for a few months without problems (though not under heavy load), YMMV.


HTH
Oz


  Can I really get a mail session and send from within an action?   
Doesnt that assume I am threading the process?  When would this  
breakdown?  At 100/hr or 1000/hr?  Thank you.


Oguz Kologlu [EMAIL PROTECTED] wrote: yes, The main issue  
will response times if you a send emails

synchronously ( if you can you send async). Async will definitely
scale better since the client isn't blocking a thread for nothing.
Simultaneous clients should be no problem as long as you follow the
same threading rules as everything else shared vars etc.

For high loads you should use messaging. There's a ton of stuff on
the net about async programming but it really depends on your
environment. For a full JEE setup I'd probably use a Message Driven
Bean. What sort of volume are you looking at and what's the  
environment?


Oz


On 25/06/2007, at 9:35 PM, Chris Pat wrote:


Hello
Is it possible to send an email within an action?  How/What are the
issues?  Is this scalable?  How does it play with the framework and
multiple simultaneous clients?  Any insight would be appreciated.



-
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] OptionTransferSelect in 2.0.8

2007-06-25 Thread Julien Leonard

Hi all,
In 2.0.6, I used optiontransfertselect with Long params like this :



s:optiontransferselect
leftTitle=%{getText('saving.input.countries.available')}
rightTitle=%{getText('saving.input.countries.selected')}
doubleList=saving.countries
doubleListKey=id
doubleListValue=%{getText(i18nKey)}
doubleName=selectedCountries
doubleId=saveSaving_selectedCountries
id=saveSaving_availableCountries
list=availableCountries
listKey=id
listValue=%{getText(i18nKey)}
allowUpDownOnLeft=false
allowUpDownOnRight=false
allowUpDownOnRight=false/s:optiontransferselect


in my action I have this :

private ListLong selectedCountries = new LinkedListLong();
public ListLong getSelectedCountries()
{
return selectedCountries;
}


public void setSelectedCountries( ListLong selectedCountries )
{
this.selectedCountries = selectedCountries;
}

In  2.0.6, it was good. But in 2.0.8 have a
java.lang.ClassCastException: java.lang.String when I want to acces to
the selectedCountries List.
In fact struts inject a xworkList typed as String.
Is it a bug of 2.0.8 ?
Can I resolve it?

Julien

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



[S2] Cannot make XML Validation work for aliased action mapping

2007-06-25 Thread Birkan_Duman
Hi,

I'm using

  struts-core-2.0.8 j4 distribution,
  struts2-spring-plugin-j4-2.0.6,
  and corresponding j4 distribution jars,


I have an action with several methods. I use each method as an action mapping 
and I want
to use different validation.xml files for each action mapping.

In the documentation, AFAIU, it says that using the
[actionname]_[methodname]-validation.xml in the same package with the action 
class should
work to accomplish this type of validation. But I could't succeed to make the 
validation
work.

Anybody has an idea? Thanks for any replies.

My configuration follows:

stockin.jsp

s:form method=POST namespace=secure
  s:if test=%{documentDetail == null || documentDetail.size == 0}
s:textfield label=documentNumber required=true
  name=documentNumber /
s:datetimepicker required=true label=invoiceDate 
displayWeeks=5
  name=invoiceDate displayFormat=dd.MM. /
s:submit label=Retrieve Invoice value=Retrieve Invoice
  action=Stockin_retrieveInvoice /
  /s:if
  s:actionerror label=errors /
/s:form

Stockin_retrieveInvoice-validation.xml :

!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork Validator 1.0//EN
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
validators
  field name=invoiceDate
field-validator type=required
  messageinvoiceDate required!/message
/field-validator
  /field
  field name=documentNumber
field-validator type=requiredstring
  messagedocumentNumber required!/message
/field-validator
  /field
/validators

 struts.xml

action name=Stockin_retrieveInvoice class=Stockin
  method=retrieveInvoice
  interceptor-ref name=scope
param name=sessiondocumentDetail/param
param name=autoCreateSessiontrue/param
  /interceptor-ref
  interceptor-ref name=webValidationStack/interceptor-ref
  result name=input/WEB-INF/pages/jsp/stockin.jsp/result
  result name=success
/WEB-INF/pages/jsp/stockin.jsp
  /result
/action

bean -config in spring.xml

bean name=Stockin
class=com.cci.fefo2.web.s2.Stockin scope=prototype
/bean

and Stockin.java

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import com.cci.fefo2.service.ArticleMasterService;
import com.cci.fefo2.service.StockInService;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author bduman
 *
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class Stockin extends ActionSupport{
  private DateFormat df = new SimpleDateFormat(ddMM);

  private String documentNumber;

  private Date invoiceDate;

  private List salesDetail;

  private List documentDetail;

  private StockInService stockInService;

  private ArticleMasterService articleMasterService;



  public String input() throws Exception {
System.out.println(Stockin.input());
invoiceDate = df.parse(02052007);
documentNumber = 01F28826842;
documentDetail = null;
salesDetail = null;
return Action.INPUT;
  }
  public String forward() throws Exception{
return Action.SUCCESS;
  }

  public String detail() throws Exception{
return detail;
  }

  public String cancel() throws Exception {
documentDetail = null;
return Action.INPUT;
  }

  public String retrieveInvoice() throws Exception {
System.out.println(Stockin.retrieveInvoice());
documentDetail = stockInService.getInvoiceDetails(01, 317,
2007, 05, documentNumber, invoiceDate);
return Action.SUCCESS;
  }

  public String save() throws Exception {
System.out.println(Stockin.doSave());
//TODO save stock in to DB
return Action.SUCCESS;
  }

  /*
   * (non-Javadoc)
   *
   * @see com.opensymphony.xwork2.ActionSupport#execute()
   */
  public String execute() throws Exception {
System.out.println(Stockin.execute());
return super.execute();
  }

  /**
   * @return Returns the documentDetail.
   */
  public List getDocumentDetail() {
return documentDetail;
  }

  /**
   * @param documentDetail
   *The documentDetail to set.
   */
  public void setDocumentDetail(List documentDetail) {
this.documentDetail = documentDetail;
  }

  /**
   * @return Returns the documentNumber.
   */
  public 

Re: email within action

2007-06-25 Thread Chris Pat
Hello
How can I send the email asynchronously? My timeframe is the lifecycle of the 
action and my browser session.Can I really get a mail session and send from 
within an action?  Doesnt that assume I am threading the process?  When would 
this breakdown?  At 100/hr or 1000/hr?  Thank you.

Oguz Kologlu [EMAIL PROTECTED] wrote: yes, The main issue will response times 
if you a send emails  
synchronously ( if you can you send async). Async will definitely  
scale better since the client isn't blocking a thread for nothing.  
Simultaneous clients should be no problem as long as you follow the  
same threading rules as everything else shared vars etc.

For high loads you should use messaging. There's a ton of stuff on  
the net about async programming but it really depends on your  
environment. For a full JEE setup I'd probably use a Message Driven  
Bean. What sort of volume are you looking at and what's the environment?

Oz


On 25/06/2007, at 9:35 PM, Chris Pat wrote:

 Hello
 Is it possible to send an email within an action?  How/What are the  
 issues?  Is this scalable?  How does it play with the framework and  
 multiple simultaneous clients?  Any insight would be appreciated.


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




RE: email within action

2007-06-25 Thread Raghupathy, Gurumoorthy
Nope that is not possible with JMS ... you may wish to use web services
  have a look at axis2 from apache  

RMI / WEBSERVICES are synchronous while JMS is not 

Regards
Guru

-Original Message-
From: Chris Pat [mailto:[EMAIL PROTECTED] 
Sent: 25 June 2007 14:30
To: Struts Users Mailing List
Subject: Re: email within action

Hi
Thank you.  This was quite enlightening and gets me in the correct
direction.  Being a newbie, I am unabashed to ask another associated
question.  Can one use JMS as a replacement for RMI?  I am looking for a
very lightweight api to just allow a client to call an objects method on
the server deployed on tomcat5x.

Oguz Kologlu [EMAIL PROTECTED] wrote: 
On 25/06/2007, at 10:33 PM, Chris Pat wrote:

 Hello
 How can I send the email asynchronously? My timeframe is the  
 lifecycle of the action and my browser session.
Well you will probably not be doing the emailing async but rather  
firing off an async request to send an email ( eg send hello world  
to this list of 1000 recipients) and response to the client (ie  
browser) that the emails are going out. You really don't have to wait  
for an email to be sent since email is a store and forward mechanism  
anyway with no guaranteed delivery.

You probably need to read up a little on messaging. As Guru also said  
a JMS server would meet your needs.

There's generally a JMS server built into most app servers or you can  
plug one in if it doesn't have one. A good list at:

http://mule.codehaus.org/display/MULE/Configuring+Jms

I've used ActiveMQ before and it's quite stable/reliable. It's run  
for a few months without problems (though not under heavy load), YMMV.

HTH
Oz


   Can I really get a mail session and send from within an action?   
 Doesnt that assume I am threading the process?  When would this  
 breakdown?  At 100/hr or 1000/hr?  Thank you.

 Oguz Kologlu  wrote: yes, The main issue  
 will response times if you a send emails
 synchronously ( if you can you send async). Async will definitely
 scale better since the client isn't blocking a thread for nothing.
 Simultaneous clients should be no problem as long as you follow the
 same threading rules as everything else shared vars etc.

 For high loads you should use messaging. There's a ton of stuff on
 the net about async programming but it really depends on your
 environment. For a full JEE setup I'd probably use a Message Driven
 Bean. What sort of volume are you looking at and what's the  
 environment?

 Oz


 On 25/06/2007, at 9:35 PM, Chris Pat wrote:

 Hello
 Is it possible to send an email within an action?  How/What are the
 issues?  Is this scalable?  How does it play with the framework and
 multiple simultaneous clients?  Any insight would be appreciated.


 -
 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: email within action

2007-06-25 Thread Chris Pat
Hi
Thank you.  This was quite enlightening and gets me in the correct direction.  
Being a newbie, I am unabashed to ask another associated question.  Can one use 
JMS as a replacement for RMI?  I am looking for a very lightweight api to just 
allow a client to call an objects method on the server deployed on tomcat5x.

Oguz Kologlu [EMAIL PROTECTED] wrote: 
On 25/06/2007, at 10:33 PM, Chris Pat wrote:

 Hello
 How can I send the email asynchronously? My timeframe is the  
 lifecycle of the action and my browser session.
Well you will probably not be doing the emailing async but rather  
firing off an async request to send an email ( eg send hello world  
to this list of 1000 recipients) and response to the client (ie  
browser) that the emails are going out. You really don't have to wait  
for an email to be sent since email is a store and forward mechanism  
anyway with no guaranteed delivery.

You probably need to read up a little on messaging. As Guru also said  
a JMS server would meet your needs.

There's generally a JMS server built into most app servers or you can  
plug one in if it doesn't have one. A good list at:

http://mule.codehaus.org/display/MULE/Configuring+Jms

I've used ActiveMQ before and it's quite stable/reliable. It's run  
for a few months without problems (though not under heavy load), YMMV.

HTH
Oz


   Can I really get a mail session and send from within an action?   
 Doesnt that assume I am threading the process?  When would this  
 breakdown?  At 100/hr or 1000/hr?  Thank you.

 Oguz Kologlu  wrote: yes, The main issue  
 will response times if you a send emails
 synchronously ( if you can you send async). Async will definitely
 scale better since the client isn't blocking a thread for nothing.
 Simultaneous clients should be no problem as long as you follow the
 same threading rules as everything else shared vars etc.

 For high loads you should use messaging. There's a ton of stuff on
 the net about async programming but it really depends on your
 environment. For a full JEE setup I'd probably use a Message Driven
 Bean. What sort of volume are you looking at and what's the  
 environment?

 Oz


 On 25/06/2007, at 9:35 PM, Chris Pat wrote:

 Hello
 Is it possible to send an email within an action?  How/What are the
 issues?  Is this scalable?  How does it play with the framework and
 multiple simultaneous clients?  Any insight would be appreciated.


 -
 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] Serious memory leak

2007-06-25 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Balazs,

Balazs Michnay wrote:
 Somewhere I read that the GC can only collect objects that were 
 instantiated with the new keyword.

That's an odd way of putting it. The garbage collector only works with
the heap. Since in Java nearly everything is on the heap (or, rather, it
appears that everything is on the heap, which is all you really need to
know), the garbage collector basically cleans up everything.

 Does it mean the the following two String creations differ when it
 comes to garbage collection?
 
 1) String myString = This is my string;
 2) String myString = new String(This is my string);
 
 If the second one can only be garbage collected, this would explain
 my uncollectable char[] objects, because mostly I simply use the 1)
 version.
 
 If you say this really does count when it comes to garbage
 collection, I'd rewrite my code and see what happens.

Well, you're introduced an odd concept into the discussion: the Java
class file constant pool. When you compile a string into a class file
(in this case, This is my string), the compiler puts the UTF-8
representation of it into a part of the class file itself. When line 1
of your code executes, no constructor is called... the java bytecode
primitive ldc (load constant) is called which returns the String
object directly.

In the case of line #2, a new String object is allocated, the constant
is loaded, and then the constructor String.init(String) is called.

You can see this yourself by compiling this simple class and then
decompiling it:

$ cat StringTest.java

public class StringTest
{
public void s1()
{
String s1 = This is a String;
}
public void s2()
{
String s2 = new String(This is a String);
}
}

$ javac StringTest.java
$ javap -c StringTest
Compiled from StringTest.java
public class StringTest extends java.lang.Object{
public StringTest();
  Code:
   0:   aload_0
   1:   invokespecial   #1; //Method java/lang/Object.init:()V
   4:   return

public void s1();
  Code:
   0:   ldc #2; //String This is a String
   2:   astore_1
   3:   return

public void s2();
  Code:
   0:   new #3; //class java/lang/String
   3:   dup
   4:   ldc #2; //String This is a String
   6:   invokespecial   #4; //Method
java/lang/String.init:(Ljava/lang/String;)V
   9:   astore_1
   10:  return

}

In the examples you have given, I'm not entirely sure what the role of
the GC is when it comes to constants loaded from the constant pool. The
class file format contains only the UTF-8 representation of the String,
so at some point a String object /must/ be constructed in memory. You'd
have to do some more research into the JVM specification to see how
constant Strings are handled.

You probably shouldn't have lots of string constants that contain a
/lot/ of text. Maybe 400 characters or so ought to be fine (say, a
semi-complex SQL query), but if you are talking about tons of text, you
might want to read that kind of thing out of a file.

Hope that helps,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGf73U9CaO5/Lv0PARAvsGAJ97ZDUpN4bhtfjE1w+/sm8tNxYp6gCgtxGt
CCIkTDuPsGGgMFmYfnh5nz0=
=DdN4
-END PGP SIGNATURE-

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



Re: email within action

2007-06-25 Thread Oguz Kologlu
Depends on what you want to do really. As Guru points out you can use  
Web Services though that can grow unwieldy. For something light and  
pretty straightforward you may just want to use JSON (javascript  
object notation) or Xml HttpRequests. Have a look at the showcase  
project in S2 on how to use the Dojo toolkit.


Oz


On 25/06/2007, at 11:29 PM, Chris Pat wrote:


Hi
Thank you.  This was quite enlightening and gets me in the correct  
direction.  Being a newbie, I am unabashed to ask another  
associated question.  Can one use JMS as a replacement for RMI?  I  
am looking for a very lightweight api to just allow a client to  
call an objects method on the server deployed on tomcat5x.


Oguz Kologlu [EMAIL PROTECTED] wrote:
On 25/06/2007, at 10:33 PM, Chris Pat wrote:


Hello
How can I send the email asynchronously? My timeframe is the
lifecycle of the action and my browser session.

Well you will probably not be doing the emailing async but rather
firing off an async request to send an email ( eg send hello world
to this list of 1000 recipients) and response to the client (ie
browser) that the emails are going out. You really don't have to wait
for an email to be sent since email is a store and forward mechanism
anyway with no guaranteed delivery.

You probably need to read up a little on messaging. As Guru also said
a JMS server would meet your needs.

There's generally a JMS server built into most app servers or you can
plug one in if it doesn't have one. A good list at:

http://mule.codehaus.org/display/MULE/Configuring+Jms

I've used ActiveMQ before and it's quite stable/reliable. It's run
for a few months without problems (though not under heavy load), YMMV.

HTH
Oz



  Can I really get a mail session and send from within an action?
Doesnt that assume I am threading the process?  When would this
breakdown?  At 100/hr or 1000/hr?  Thank you.

Oguz Kologlu  wrote: yes, The main issue
will response times if you a send emails
synchronously ( if you can you send async). Async will definitely
scale better since the client isn't blocking a thread for nothing.
Simultaneous clients should be no problem as long as you follow the
same threading rules as everything else shared vars etc.

For high loads you should use messaging. There's a ton of stuff on
the net about async programming but it really depends on your
environment. For a full JEE setup I'd probably use a Message Driven
Bean. What sort of volume are you looking at and what's the
environment?

Oz


On 25/06/2007, at 9:35 PM, Chris Pat wrote:


Hello
Is it possible to send an email within an action?  How/What are the
issues?  Is this scalable?  How does it play with the framework and
multiple simultaneous clients?  Any insight would be appreciated.



-
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: [S2] Cannot make XML Validation work for aliased action mapping

2007-06-25 Thread Birkan_Duman
Hi Dave,

Thank you very much for your help,

You're right, obviously my fault.

I renamed the validation file to  
Stockin-Stockin_retrieveInvoice-validation.xml and it
works now.

Unfortunately, I have a new issue,

I have another validation.xml that started to work now with the same correction 
you
supplied  in my config. When I submit the form,  interceptor intercepts the 
action method
and displays the errors, But the remaining interceptors continue to process the 
request
(e.g scope interceptor), and  action method save() is also called and inserts 
the record
to the list , instead of interrupting the remaining process.

I'm new to interceptors but nearly everything in place in the configuration and 
really
cannot point out the problem.

Any idea?


Here again my corresp. config:


UpdateStockinDetail-UpdateStockinDetail_save-validation.xml
!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork Validator 1.0//EN
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
validators
  field name=movement.units
field-validator type=required
  messagemovement.prodDate required!/message
/field-validator
  /field
  field name=movement.prodDate
field-validator type=required
  messagemovement.prodDate required!/message
/field-validator
  /field
  field name=movement.stockPlace
field-validator type=required
  messagemovement.stockPlace required!/message
/field-validator
  /field
/validators

updatestockindetails.jsp

s:form method=POST namespace=secure
  s:hidden name=invoiceViewIndex/s:hidden
  s:textfield required=true label=movement.units
name=movement.units/s:textfield
  s:datetimepicker label=movement.prodDate name=movement.prodDate
displayFormat=dd.MM. displayWeeks=5 required=true /
  s:textfield required=true label=movement.stockPlace
name=movement.stockPlace/s:textfield
  s:submit value=Submit action=UpdateStockinDetail_save/s:submit
/s:form

action-mapping

action name=UpdateStockinDetail_save
  class=UpdateStockinDetail method=save
  interceptor-ref name=scope
param name=session
documentDetail,movementList,invoiceView,invoiceViewIndex /param
param name=autoCreateSessiontrue/param
  /interceptor-ref
  interceptor-ref name=webValidationStack/interceptor-ref
  result name=input
/WEB-INF/pages/jsp/updatestockindetail.jsp
  /result
  result name=success
/WEB-INF/pages/jsp/updatestockindetail.jsp
  /result
/action


interceptor definition


interceptors
  interceptor-stack name=webStack
interceptor-ref name=exception /
interceptor-ref name=alias /
interceptor-ref name=servletConfig /
interceptor-ref name=prepare /
interceptor-ref name=i18n /
interceptor-ref name=chain /
interceptor-ref name=debugging /
interceptor-ref name=profiling /
interceptor-ref name=checkbox /
interceptor-ref name=staticParams /
interceptor-ref name=params
  param name=excludeParamsdojo\..*/param
/interceptor-ref
interceptor-ref name=conversionError /
  /interceptor-stack
  interceptor-stack name=webValidationStack
interceptor-ref name=webStack /
interceptor-ref name=validation
  param name=excludeMethods
input,back,cancel,browse
  /param
/interceptor-ref
  /interceptor-stack
/interceptors
default-interceptor-ref name=webStack /


and finally the action


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.apache.commons.collections.CollectionUtils;
import org.apache.struts2.interceptor.ParameterAware;

import com.cci.fefo2.db.beans.Movement;
import com.cci.fefo2.db.beans.view.InvoiceView;
import com.cci.fefo2.service.ArticleMasterService;
import com.cci.fefo2.service.StockInService;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;

/**
 * @author bduman
 *
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class UpdateStockinDetail extends ActionSupport implements
ParameterAware{
  private Map parameters;

  

Re: Parameter interception

2007-06-25 Thread stanlick

I have a PayrollAction class that extends BaseAction which has an id field.
PayrollAction also contains a bean that contains an id field.  The id fields
are the Hibernate PKs.  My BaseAction
extends ActionSupport implements SessionAware, ModelDriven, Preparable.  I
have carefully observed the following behavior.  When a request is made of
PayrollAction with a parameter id=20, the following jsp displays 20 for both
fields:

   payrollUpdate.id: s:property value=payrollUpdate.id /br
   id: s:property value=id /br

If I set a breakpoint and change the id in the bean inside PayrollAction,
both fields display the updated value!  It is as though id and
payrollUpdate.id are the same!  My PayrollAction class has a
getPayrollUpdate() method that returns the PayrollUpdate bean.  This seems
very strange.






On 6/24/07, Dave Newton [EMAIL PROTECTED] wrote:


--- [EMAIL PROTECTED] wrote:
 If I call an action with an id=20 parameter and that
 action contains both a field called id and a bean
 that contains an id field, both fields are being set

 to 20. Does the parameter setter logic set
 everything on the action object hierarchy that it
can
 find with the same name?

I don't think so; that could take an indeterminate
amount of time.

I just wrote an Action with a Long id field and an
object that has a Long id field; if I pass in an id=5
just the Action's id field gets set. If I implement
ModelDriven then just the object's id field is set.

Are you using the default stack?

d.






Get your own web address.
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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





--
Scott
[EMAIL PROTECTED]


Re: [S2] Cannot make XML Validation work for aliased action mapping

2007-06-25 Thread Birkan_Duman
I found out the problem. I missed the note at the documentation about validation
interceptor .

For those who may have the problem at past or in future,

Note that this has nothing to do with the com.opensymphony.xwork2.Validateable 
interface
and simply adds error messages to the action. The workflow of the action 
request does not
change due to this interceptor. Rather, this interceptor is often used in 
conjuction with
the workflow interceptor.


Sorry for inconvenience,
Birkan




  
 [EMAIL PROTECTED]  


  
 06/25/2007 05:02 PM
   To 
 Struts Users Mailing List
  
 user@struts.apache.org   
  
Please respond to   
   cc 
  Struts Users Mailing 
  
  List 
  Subject 
 user@struts.apache.org Re: [S2] Cannot make XML 
Validation work for 
aliased action mapping 
  

  

  

  

  

  

  




Hi Dave,

Thank you very much for your help,

You're right, obviously my fault.

I renamed the validation file to  
Stockin-Stockin_retrieveInvoice-validation.xml and it
works now.

Unfortunately, I have a new issue,

I have another validation.xml that started to work now with the same correction 
you
supplied  in my config. When I submit the form,  interceptor intercepts the 
action method
and displays the errors, But the remaining interceptors continue to process the 
request
(e.g scope interceptor), and  action method save() is also called and inserts 
the record
to the list , instead of interrupting the remaining process.

I'm new to interceptors but nearly everything in place in the configuration and 
really
cannot point out the problem.

Any idea?


Here again my corresp. config:


UpdateStockinDetail-UpdateStockinDetail_save-validation.xml
!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork Validator 1.0//EN
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
validators
  field name=movement.units
field-validator type=required
  messagemovement.prodDate required!/message
/field-validator
  /field
  field name=movement.prodDate
field-validator type=required
  messagemovement.prodDate required!/message
/field-validator
  /field
  field name=movement.stockPlace
field-validator type=required
  messagemovement.stockPlace required!/message
/field-validator
  /field
/validators

updatestockindetails.jsp

s:form method=POST namespace=secure
  s:hidden name=invoiceViewIndex/s:hidden
  s:textfield required=true label=movement.units
name=movement.units/s:textfield
  s:datetimepicker label=movement.prodDate name=movement.prodDate
displayFormat=dd.MM. displayWeeks=5 required=true /
  s:textfield required=true label=movement.stockPlace
name=movement.stockPlace/s:textfield
  s:submit value=Submit action=UpdateStockinDetail_save/s:submit
/s:form

action-mapping

action name=UpdateStockinDetail_save
  class=UpdateStockinDetail method=save
  interceptor-ref name=scope
param name=session
documentDetail,movementList,invoiceView,invoiceViewIndex /param
param name=autoCreateSessiontrue/param
  /interceptor-ref
  interceptor-ref name=webValidationStack/interceptor-ref
  result name=input
/WEB-INF/pages/jsp/updatestockindetail.jsp
  /result
  result name=success
/WEB-INF/pages/jsp/updatestockindetail.jsp
  /result
/action


interceptor definition


interceptors
  interceptor-stack name=webStack
interceptor-ref name=exception /
 

Re: Parameter interception

2007-06-25 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 s:property value=payrollUpdate.id/
 s:property value=id /br

If you've implemented ModelDriven and it's returning
the payrollUpdate, then this would be expected
behavior: ModelDriven puts the model on the stack so
its properties are available w/o prefixing.

d.



   

Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, 
photos  more. 
http://mobile.yahoo.com/go?refer=1GNXIC

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



Re: display table

2007-06-25 Thread Zarar Siddiqi


This is more a displaytag question than a Struts one really but make sure
you have the IText jar in your classpath and that you've setup your
displaytag filter correctly (which should be the case since your other
exports are working)

Zarar



abhi_kaul wrote:
 
 Hi!
 I am using display table as follows :
  display:table  width=100%
 name=sessionScope.headerfooterList sort=list pagesize=10
 requestURI=../../../../../displayHeaderFooter.do?actionRequested=displa
 yHeaderFooter export=true 
  
 Everything is working fine except the pdf export. The document keeps
 opening indefinitely even upto around 200MB when the data is very small
 and still does not open.
 All the other exports are working perfectly fine.
 Please help me out.
 Thanks
 Abhi
 
 

-- 
View this message in context: 
http://www.nabble.com/display-table-tf3976433.html#a11289299
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: Parameter interception

2007-06-25 Thread stanlick

Alright!  Now we are getting somewhere.  Do you know what the code would
look like to get the id off the action?

Scott

On 6/25/07, Dave Newton [EMAIL PROTECTED] wrote:


--- [EMAIL PROTECTED] wrote:
 s:property value=payrollUpdate.id/
 s:property value=id /br

If you've implemented ModelDriven and it's returning
the payrollUpdate, then this would be expected
behavior: ModelDriven puts the model on the stack so
its properties are available w/o prefixing.

d.






Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail,
news, photos  more.
http://mobile.yahoo.com/go?refer=1GNXIC

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





--
Scott
[EMAIL PROTECTED]


AutoCompleter doesn't keeps value.

2007-06-25 Thread Felipe Rodrigues

Hi Guys,

This time I'm trying to make a autocompleter component keep its value when
its property comes populated from action.

input dojoType=struts:ComboBox
name=autoCompleterKey
keyName=autoCompleter
dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
searchType=startstring
dropdownHeight=100
autoComplete=true
loadOnType=true
loadMinimum=1
visibleDownArrow=true
style=width: 149px;/

If I type some value and choose that, this value is getting into the action,
but if I have this value from the action, when loading the jsp page, then
autocompleter doesn't keeps tha value.

Any suggestion?


Thanks,

Felipe
-- 
View this message in context: 
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
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: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Instance must not be null (Spring+Struts+Hibernate)

2007-06-25 Thread GEDA

Anybody ?
-- 
View this message in context: 
http://www.nabble.com/Invocation-of-init-method-failed--nested-exception-is-java.lang.IllegalArgumentException%3A-Instance-must-not-be-null-%28Spring%2BStruts%2BHibernate%29-tf3975798.html#a11290271
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: AutoCompleter doesn't keeps value.

2007-06-25 Thread Musachy Barroso

Are you setting the value with the value attribute?

musachy

On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



Hi Guys,

This time I'm trying to make a autocompleter component keep its value when
its property comes populated from action.

input dojoType=struts:ComboBox
name=autoCompleterKey
keyName=autoCompleter
dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
searchType=startstring
dropdownHeight=100
autoComplete=true
loadOnType=true
loadMinimum=1
visibleDownArrow=true
style=width: 149px;/

If I type some value and choose that, this value is getting into the
action,
but if I have this value from the action, when loading the jsp page, then
autocompleter doesn't keeps tha value.

Any suggestion?


Thanks,

Felipe
--
View this message in context:
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
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


Re: AutoCompleter doesn't keeps value.

2007-06-25 Thread Felipe Rodrigues

No,

Using keyName. I'll confirm, but I think I've already tried use value.




Musachy Barroso wrote:
 
 Are you setting the value with the value attribute?
 
 musachy
 
 On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi Guys,

 This time I'm trying to make a autocompleter component keep its value
 when
 its property comes populated from action.

 input dojoType=struts:ComboBox
 name=autoCompleterKey
 keyName=autoCompleter
 dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
 searchType=startstring
 dropdownHeight=100
 autoComplete=true
 loadOnType=true
 loadMinimum=1
 visibleDownArrow=true
 style=width: 149px;/

 If I type some value and choose that, this value is getting into the
 action,
 but if I have this value from the action, when loading the jsp page, then
 autocompleter doesn't keeps tha value.

 Any suggestion?


 Thanks,

 Felipe
 --
 View this message in context:
 http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290418
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: AutoCompleter doesn't keeps value.

2007-06-25 Thread Felipe Rodrigues

Doesn't work even if I set value with value or key attribute.
So weird.

Any other suggestion?


[]'s

Felipe


Felipe Rodrigues wrote:
 
 No,
 
 Using keyName. I'll confirm, but I think I've already tried use value.
 
 
 
 
 Musachy Barroso wrote:
 
 Are you setting the value with the value attribute?
 
 musachy
 
 On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi Guys,

 This time I'm trying to make a autocompleter component keep its value
 when
 its property comes populated from action.

 input dojoType=struts:ComboBox
 name=autoCompleterKey
 keyName=autoCompleter
 dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
 searchType=startstring
 dropdownHeight=100
 autoComplete=true
 loadOnType=true
 loadMinimum=1
 visibleDownArrow=true
 style=width: 149px;/

 If I type some value and choose that, this value is getting into the
 action,
 but if I have this value from the action, when loading the jsp page,
 then
 autocompleter doesn't keeps tha value.

 Any suggestion?


 Thanks,

 Felipe
 --
 View this message in context:
 http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
 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
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290611
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: AutoCompleter doesn't keeps value.

2007-06-25 Thread Musachy Barroso

Are you using the href attribute to load the values using AJAX?

musachy

On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



Doesn't work even if I set value with value or key attribute.
So weird.

Any other suggestion?


[]'s

Felipe


Felipe Rodrigues wrote:

 No,

 Using keyName. I'll confirm, but I think I've already tried use value.




 Musachy Barroso wrote:

 Are you setting the value with the value attribute?

 musachy

 On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi Guys,

 This time I'm trying to make a autocompleter component keep its value
 when
 its property comes populated from action.

 input dojoType=struts:ComboBox
 name=autoCompleterKey
 keyName=autoCompleter
 dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
 searchType=startstring
 dropdownHeight=100
 autoComplete=true
 loadOnType=true
 loadMinimum=1
 visibleDownArrow=true
 style=width: 149px;/

 If I type some value and choose that, this value is getting into the
 action,
 but if I have this value from the action, when loading the jsp page,
 then
 autocompleter doesn't keeps tha value.

 Any suggestion?


 Thanks,

 Felipe
 --
 View this message in context:

http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
 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





--
View this message in context:
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290611
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


Re: AutoCompleter doesn't keeps value.

2007-06-25 Thread Felipe Rodrigues

Found it...
Looking at Dojo attributes I found initialValue attribute.

My bad guys,

Thanks anyway.


Felipe


Felipe Rodrigues wrote:
 
 Doesn't work even if I set value with value or key attribute.
 So weird.
 
 Any other suggestion?
 
 
 []'s
 
 Felipe
 
 
 Felipe Rodrigues wrote:
 
 No,
 
 Using keyName. I'll confirm, but I think I've already tried use value.
 
 
 
 
 Musachy Barroso wrote:
 
 Are you setting the value with the value attribute?
 
 musachy
 
 On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi Guys,

 This time I'm trying to make a autocompleter component keep its value
 when
 its property comes populated from action.

 input dojoType=struts:ComboBox
 name=autoCompleterKey
 keyName=autoCompleter
 dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
 searchType=startstring
 dropdownHeight=100
 autoComplete=true
 loadOnType=true
 loadMinimum=1
 visibleDownArrow=true
 style=width: 149px;/

 If I type some value and choose that, this value is getting into the
 action,
 but if I have this value from the action, when loading the jsp page,
 then
 autocompleter doesn't keeps tha value.

 Any suggestion?


 Thanks,

 Felipe
 --
 View this message in context:
 http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
 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
 
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290665
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: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Ing. Andrea Vettori


I'll now try to profile the production server for a longer time and  
keep you informed.




Unfortunately the garbage is still produced. But I can't profile the  
production server because the profiler crashes!


Can anyone suggest a product to get the complete allocation object  
list ?


Maybe in the meantime the yourkit guys resolve the problem but I  
really want to leave this problem behind as soon as possibile!


Thank you


--
Ing. Andrea Vettori
Consulente per l'Information Technology



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



when did Struts become a top-level Apache project?

2007-06-25 Thread Bill Johnson
I was wondering if anyone knows when Struts became a
top-level Apache project instead of being simply a
Jakarta project subproject. I'm looking for the month
and year this happened. Management wants to know. Long
story.

-Bill


  

Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel 
and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 


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



Re: AutoCompleter doesn't keeps value.

2007-06-25 Thread Felipe Rodrigues

Yes.
But I'm using dataURL, because I could not deal if autoLayout of ajax
componentes, so I'm using the dojo code direct, as you can see in this code:

input dojoType=struts:ComboBox
 name=autoCompleterKey
 keyName=autoCompleter
 initalValue=${autoCompleter}
 dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
 searchType=startstring
 dropdownHeight=100
 autoComplete=true
 loadOnType=true
 loadMinimum=1
 visibleDownArrow=true
 style=width: 149px;/


dataURL = href
and initialValue = nameValue

Regards,


Felipe



Musachy Barroso wrote:
 
 Are you using the href attribute to load the values using AJAX?
 
 musachy
 
 On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Doesn't work even if I set value with value or key attribute.
 So weird.

 Any other suggestion?


 []'s

 Felipe


 Felipe Rodrigues wrote:
 
  No,
 
  Using keyName. I'll confirm, but I think I've already tried use value.
 
 
 
 
  Musachy Barroso wrote:
 
  Are you setting the value with the value attribute?
 
  musachy
 
  On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:
 
 
  Hi Guys,
 
  This time I'm trying to make a autocompleter component keep its value
  when
  its property comes populated from action.
 
  input dojoType=struts:ComboBox
  name=autoCompleterKey
  keyName=autoCompleter
  dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
  searchType=startstring
  dropdownHeight=100
  autoComplete=true
  loadOnType=true
  loadMinimum=1
  visibleDownArrow=true
  style=width: 149px;/
 
  If I type some value and choose that, this value is getting into the
  action,
  but if I have this value from the action, when loading the jsp page,
  then
  autocompleter doesn't keeps tha value.
 
  Any suggestion?
 
 
  Thanks,
 
  Felipe
  --
  View this message in context:
 
 http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
  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
 
 
 
 

 --
 View this message in context:
 http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290611
 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
 
 

-- 
View this message in context: 
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11291056
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: when did Struts become a top-level Apache project?

2007-06-25 Thread Wendy Smoak

On 6/25/07, Bill Johnson [EMAIL PROTECTED] wrote:

I was wondering if anyone knows when Struts became a
top-level Apache project instead of being simply a
Jakarta project subproject. I'm looking for the month
and year this happened. Management wants to know. Long
story.


Looks like the proposal for a top-level Struts project was approved at
the March 2004 ASF Board meeting:

http://www.apache.org/foundation/records/minutes/2004/board_minutes_2004_03_17.txt

HTH,
--
Wendy

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



Re: AutoCompleter doesn't keeps value.

2007-06-25 Thread Musachy Barroso

Oh, ok, I thought that was the generated html :)

musachy

On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



Yes.
But I'm using dataURL, because I could not deal if autoLayout of ajax
componentes, so I'm using the dojo code direct, as you can see in this
code:

input dojoType=struts:ComboBox
 name=autoCompleterKey
 keyName=autoCompleter
 initalValue=${autoCompleter}
 dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
 searchType=startstring
 dropdownHeight=100
 autoComplete=true
 loadOnType=true
 loadMinimum=1
 visibleDownArrow=true
 style=width: 149px;/


dataURL = href
and initialValue = nameValue

Regards,


Felipe



Musachy Barroso wrote:

 Are you using the href attribute to load the values using AJAX?

 musachy

 On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Doesn't work even if I set value with value or key attribute.
 So weird.

 Any other suggestion?


 []'s

 Felipe


 Felipe Rodrigues wrote:
 
  No,
 
  Using keyName. I'll confirm, but I think I've already tried use
value.
 
 
 
 
  Musachy Barroso wrote:
 
  Are you setting the value with the value attribute?
 
  musachy
 
  On 6/25/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:
 
 
  Hi Guys,
 
  This time I'm trying to make a autocompleter component keep its
value
  when
  its property comes populated from action.
 
  input dojoType=struts:ComboBox
  name=autoCompleterKey
  keyName=autoCompleter
  dataUrl=/Mutuo2/PlantelVarietal!listVars.action?
  searchType=startstring
  dropdownHeight=100
  autoComplete=true
  loadOnType=true
  loadMinimum=1
  visibleDownArrow=true
  style=width: 149px;/
 
  If I type some value and choose that, this value is getting into
the
  action,
  but if I have this value from the action, when loading the jsp
page,
  then
  autocompleter doesn't keeps tha value.
 
  Any suggestion?
 
 
  Thanks,
 
  Felipe
  --
  View this message in context:
 

http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290103
  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
 
 
 
 

 --
 View this message in context:

http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11290611
 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



--
View this message in context:
http://www.nabble.com/AutoCompleter-doesn%27t-keeps-value.-tf3977359.html#a11291056
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


Re: when did Struts become a top-level Apache project?

2007-06-25 Thread Haroon Rafique
On Today at 9:46am, BJ=Bill Johnson [EMAIL PROTECTED] wrote:

BJ I was wondering if anyone knows when Struts became a top-level Apache 
BJ project instead of being simply a Jakarta project subproject. I'm 
BJ looking for the month and year this happened. Management wants to 
BJ know. Long story.
BJ 
BJ -Bill

http://www.apachenews.org/archives/000182.html
March 2004

Later,
--
Haroon Rafique
[EMAIL PROTECTED]


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



Re: [S2] App generate lot (2GB) of garbage!

2007-06-25 Thread Martin Gainty

(Tomcat specific) LambdaProbe
http://www.lambdaprobe.org/d/index.htm

A number of Memory Profiler Utilities available here
http://www.java-source.net/open-source/profilers

HTH
M-
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

- Original Message - 
From: Ing. Andrea Vettori [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Cc: Al Sutton [EMAIL PROTECTED]
Sent: Monday, June 25, 2007 12:40 PM
Subject: Re: [S2] App generate lot (2GB) of garbage!




I'll now try to profile the production server for a longer time and  
keep you informed.




Unfortunately the garbage is still produced. But I can't profile the  
production server because the profiler crashes!


Can anyone suggest a product to get the complete allocation object  
list ?


Maybe in the meantime the yourkit guys resolve the problem but I  
really want to leave this problem behind as soon as possibile!


Thank you


--
Ing. Andrea Vettori
Consulente per l'Information Technology



-
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: when did Struts become a top-level Apache project?

2007-06-25 Thread Bill Johnson
Thanks a bunch. I realized after I posted it that I
hadn't checked Google first. What I found on Google is
confirmed by what you posted. Perfect.

I am having trouble finding 2 more dates that I need.
Perhaps someone out there knows the answer.

When (month/year) did 0.92 of WebWork get released by
Rickard Oberg?

When (month/2003) did the WebWork 2.0 roadmap that
proposed to break out xwork into it's own project get
created? I know it was in 2003, but need to get a
specific month.

-Bill



--- Wendy Smoak [EMAIL PROTECTED] wrote:

 On 6/25/07, Bill Johnson [EMAIL PROTECTED] wrote:
  I was wondering if anyone knows when Struts became
 a
  top-level Apache project instead of being simply a
  Jakarta project subproject. I'm looking for the
 month
  and year this happened. Management wants to know.
 Long
  story.
 
 Looks like the proposal for a top-level Struts
 project was approved at
 the March 2004 ASF Board meeting:
 

http://www.apache.org/foundation/records/minutes/2004/board_minutes_2004_03_17.txt
 
 HTH,
 -- 
 Wendy
 

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



   

Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

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



Re: when did Struts become a top-level Apache project?

2007-06-25 Thread Dave Newton
--- Bill Johnson [EMAIL PROTECTED] wrote:
 When (month/year) did 0.92 of WebWork get released
 by Rickard Oberg?
 
 When (month/2003) did the WebWork 2.0 roadmap that
 proposed to break out xwork into it's own project
 get created? I know it was in 2003, but need to get
a
 specific month.

Wow.

I don't know the answer to the question, but my eyes
are tearing up a bit in [em|sym]pathy.

d.



   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz
 

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



Re: [S2] login action w/FORM authentication?

2007-06-25 Thread Jon Wilmoth
To add a little more context...The login action loads the login.jsp just fine 
when called directly, but doesn't work when invoked by the servlet container.  
Instead I see the following in the Tomcat log:

Jun-25-2007 10:31:30:865 AM, PDT [DEBUG] 
(org.apache.catalina.authenticator.FormAuthenticator) - Save request in session 
'930B154E1AD9BFB1283165CD888441EF'
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - servletPath=/login.action, 
pathInfo=null, queryString=null, name=null
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) -  Path Based Forward
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) -  Disabling the response for 
futher output

I tried configuring the app to go directly to the login jsp page, but the 
struts2 tags throw the following NullPointer:

Jun-25-2007 10:36:03:552 AM, PDT [ERROR] 
(org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mywebapp].[jsp])
 - Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
 at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
 at 
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
 at 
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
 at org.apache.jsp.login_jsp._jspx_meth_s2ib_005furl_005f0(login_jsp.java:503)
 at org.apache.jsp.login_jsp._jspService(login_jsp.java:111)

If this is off topic and I should post this to the Tomcat user list please let 
me know...it just seems to me that other S2 users may have this same question.

- Original Message 
From: Jon Wilmoth [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Sunday, June 24, 2007 9:21:02 PM
Subject: [S2] login action w/FORM authentication?


Is it possible to use an action as the webapp's login page?  I've tried the 
following web.xml/struts.xml entries with S2.0.8  Tomcat 5.5.23, but get a 404 
The requested resource (/mywebapp/login.action) is not available message.

login-config
auth-methodFORM/auth-method
form-login-config
form-login-page/login.action/form-login-page
form-error-page/loginFailure.action/form-error-page
/form-login-config
/login-config 

action name=login
result/login.jsp/result
/action

Subclass LookupDispatchAction

2007-06-25 Thread Xavier Vanderstukken

Good morning,

I need to subclass the LookupDispatchAction to write a
BaseLookupDispatchAction to centralize the UserRole check of my
application (etc.).

I try the following piece of code :

public abstract class BaseLookupAction extends LookupDispatchAction {

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

try{
   //Check des users puis


ActionForward 
succes=super.execute(mapping,form,request,response);
return succes;
}
catch(Exception ex)
{
ex.printStackTrace();
ActionMessages errors = new ActionMessages();
ActionMessage error = new 
ActionMessage(error.fatal);
errors.add(ActionErrors.GLOBAL_MESSAGE,error);
saveErrors(request, errors);
return mapping.findForward(error);
}


The problem with that code is that I can not use my CustomErrorHandler
because the signature of the execute method does not throw an
exception.

So I must catch it and manually forward to an error page.

Is there a better way to do that?
}


Struts 2 and using frames

2007-06-25 Thread Session A Mwamufiya
Hello,

Has anyone experienced using HTML frames with a struts 2 app?  I'm trying to do 
just that, but my result page after a successful login doesn't find the pages 
for the frames.  Here's the result page code:

%@ taglib prefix=s uri=/struts-tags %
html
  head
titleZen Server Main View/title
  /head
  frameset cols=200,*
frame src=/pages/smart_member/FeatureOptions.jsp name=Options 
noresize
frame src=/pages/smart_member/Welcome.jsp name=Display noresize
  /frameset
/html

It's pretty straight forward, but I'm not sure whether I'm missing something 
here. Also, given that struts 2 actions use result pages to display the content 
of the action, how could I go about sending action properties to a page within 
a frame when the result page is one that sets the frameset?

Thanks,
Session


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



Re: [S2] login action w/FORM authentication?

2007-06-25 Thread Ian Roughley
yes - it is definitely possible.  The thing to remember is that if you 
are using struts2 tags (which I'm pretty sure you are), you need to 
redirect through an action first so the value stack is available to the tag.


/Ian

Jon Wilmoth wrote:


To add a little more context...The login action loads the login.jsp just fine 
when called directly, but doesn't work when invoked by the servlet container.  
Instead I see the following in the Tomcat log:

Jun-25-2007 10:31:30:865 AM, PDT [DEBUG] 
(org.apache.catalina.authenticator.FormAuthenticator) - Save request in session 
'930B154E1AD9BFB1283165CD888441EF'
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - servletPath=/login.action, 
pathInfo=null, queryString=null, name=null
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) -  Path Based Forward
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) -  Disabling the response for 
futher output

I tried configuring the app to go directly to the login jsp page, but the 
struts2 tags throw the following NullPointer:

Jun-25-2007 10:36:03:552 AM, PDT [ERROR] 
(org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mywebapp].[jsp])
 - Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
at 
org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
at 
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
at org.apache.jsp.login_jsp._jspx_meth_s2ib_005furl_005f0(login_jsp.java:503)
at org.apache.jsp.login_jsp._jspService(login_jsp.java:111)

If this is off topic and I should post this to the Tomcat user list please let 
me know...it just seems to me that other S2 users may have this same question.

- Original Message 
From: Jon Wilmoth [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Sunday, June 24, 2007 9:21:02 PM
Subject: [S2] login action w/FORM authentication?


Is it possible to use an action as the webapp's login page?  I've tried the 
following web.xml/struts.xml entries with S2.0.8  Tomcat 5.5.23, but get a 404 
The requested resource (/mywebapp/login.action) is not available message.

login-config
   auth-methodFORM/auth-method
   form-login-config
   form-login-page/login.action/form-login-page
   form-error-page/loginFailure.action/form-error-page
   /form-login-config
   /login-config 


action name=login
   result/login.jsp/result
/action
 



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



Re: Subclass LookupDispatchAction

2007-06-25 Thread Niall Pemberton

On 6/25/07, Xavier Vanderstukken [EMAIL PROTECTED] wrote:

Good morning,

I need to subclass the LookupDispatchAction to write a
BaseLookupDispatchAction to centralize the UserRole check of my
application (etc.).

I try the following piece of code :

public abstract class BaseLookupAction extends LookupDispatchAction {

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

try{
//Check des users puis


ActionForward 
succes=super.execute(mapping,form,request,response);
return succes;
}
catch(Exception ex)
{
ex.printStackTrace();
ActionMessages errors = new ActionMessages();
ActionMessage error = new 
ActionMessage(error.fatal);
errors.add(ActionErrors.GLOBAL_MESSAGE,error);
saveErrors(request, errors);
return mapping.findForward(error);
}


The problem with that code is that I can not use my CustomErrorHandler
because the signature of the execute method does not throw an
exception.


I checked LookupDispatchAction and it does declare Exception as being
thrown on the execute method - so I don't understand why you're having
a problem - what version of Struts are you using?

Niall


So I must catch it and manually forward to an error page.

Is there a better way to do that?
}



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



RE: Struts 2 and using frames

2007-06-25 Thread Wesley Wannemacher
I'm going to guess that your web-app is not called '/pages' and that URL
is relative to your context root. Here is how this page should probably
look - 

%@ taglib prefix=s uri=/struts-tags % html
  head
titleZen Server Main View/title
  /head
  frameset cols=200,*
frame src=s:url
value=/pages/smart_member/FeatureOptions.jsp/ name=Options
noresize
frame src=s:url value=/pages/smart_member/Welcome.jsp/
name=Display noresize
  /frameset
/html 

But, I think the general consensus is that you should make your JSPs
actions. This way you could use other struts features in them later...
In that case, your page would probably look like this - 

%@ taglib prefix=s uri=/struts-tags % html
  head
titleZen Server Main View/title
  /head
  frameset cols=200,*
frame src=s:url action=FeatureOptions
namespace=/pages/smart_member / name=Options noresize
frame src=s:url action=Welcome
namespace=/pages/smart_member / name=Display noresize
  /frameset
/html

Of course, I did not test a lick of that code, so hopefully you get the
idea (even if there are errors).

-Wes
 
-Original Message-
From: Session A Mwamufiya [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 1:51 PM
To: Struts Users Mailing List
Subject: Struts 2 and using frames

Hello,

Has anyone experienced using HTML frames with a struts 2 app?  I'm
trying to do just that, but my result page after a successful login
doesn't find the pages for the frames.  Here's the result page code:

%@ taglib prefix=s uri=/struts-tags % html
  head
titleZen Server Main View/title
  /head
  frameset cols=200,*
frame src=/pages/smart_member/FeatureOptions.jsp
name=Options noresize
frame src=/pages/smart_member/Welcome.jsp name=Display
noresize
  /frameset
/html

It's pretty straight forward, but I'm not sure whether I'm missing
something here. Also, given that struts 2 actions use result pages to
display the content of the action, how could I go about sending action
properties to a page within a frame when the result page is one that
sets the frameset?

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



RE: Struts 2 and using frames

2007-06-25 Thread Session Mwamufiya
This was great help Wes, thanks a million.

Session A. Mwamufiya
Carnegie Mellon University
MBA | Tepper School of Business
MSE (software eng.) | School of Computer Science
T: (412) 508-5455 | [EMAIL PROTECTED]

-Original Message-
From: Wesley Wannemacher [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 3:05 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 and using frames

I'm going to guess that your web-app is not called '/pages' and that URL
is relative to your context root. Here is how this page should probably
look - 

%@ taglib prefix=s uri=/struts-tags % html
  head
titleZen Server Main View/title
  /head
  frameset cols=200,*
frame src=s:url
value=/pages/smart_member/FeatureOptions.jsp/ name=Options
noresize
frame src=s:url value=/pages/smart_member/Welcome.jsp/
name=Display noresize
  /frameset
/html 

But, I think the general consensus is that you should make your JSPs
actions. This way you could use other struts features in them later...
In that case, your page would probably look like this - 

%@ taglib prefix=s uri=/struts-tags % html
  head
titleZen Server Main View/title
  /head
  frameset cols=200,*
frame src=s:url action=FeatureOptions
namespace=/pages/smart_member / name=Options noresize
frame src=s:url action=Welcome
namespace=/pages/smart_member / name=Display noresize
  /frameset
/html

Of course, I did not test a lick of that code, so hopefully you get the
idea (even if there are errors).

-Wes
 
-Original Message-
From: Session A Mwamufiya [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 25, 2007 1:51 PM
To: Struts Users Mailing List
Subject: Struts 2 and using frames

Hello,

Has anyone experienced using HTML frames with a struts 2 app?  I'm
trying to do just that, but my result page after a successful login
doesn't find the pages for the frames.  Here's the result page code:

%@ taglib prefix=s uri=/struts-tags % html
  head
titleZen Server Main View/title
  /head
  frameset cols=200,*
frame src=/pages/smart_member/FeatureOptions.jsp
name=Options noresize
frame src=/pages/smart_member/Welcome.jsp name=Display
noresize
  /frameset
/html

It's pretty straight forward, but I'm not sure whether I'm missing
something here. Also, given that struts 2 actions use result pages to
display the content of the action, how could I go about sending action
properties to a page within a frame when the result page is one that
sets the frameset?

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




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



struts.configuration.classpath.defaultPagePrefix not working?

2007-06-25 Thread Michael Fink
Hi!
I've tried to add struts.configuration.classpath.defaultPagePrefix in my
struts.properties. But it didn't change anything.
I tried this because I want to move my jsp-Pages into a special folder which
is protected by Tomcat to prevent any direct access to my jsp-Files.

I tried:

struts.configuration.classpath.defaultPagePrefix=/jsp
struts.configuration.classpath.defaultPagePrefix=jsp
struts.configuration.classpath.defaultPagePrefix=/jsp/

Nothing worked ... who can help?

Michael


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



Re: Implementing wizard like interface in struts

2007-06-25 Thread semaj

It's been a week; have not found any solutions... any idea guys!!

semaj wrote:
 
 Hi there,
 
 May be someone has already solved this problem. I need to implement a
 wizard like page flow in my strut web application.
 
 This is what I've done:
 1. Created one big action form and put it in session scope.
 2. Created action class extending DispatchAction
 3. Created several jsps.
 
 I successfully implemented the logic with previous, next, finish, and
 cancel button. I removed the action form from session if the user clicks
 cancel or finish buttons. The only problem i'm having is how to remove the
 action form from session if the user navigates to other pages from menu
 bar (without clicking cancel or finish buttons).
 
 The other problem I'm having is how to navigate the user to first step if
 he/she directly types the url of other subsequent pages.
 
 I think i'm not the first person to face this problem. someone must have
 already implemented this. Any hint will be greatly appreciated!!
 
 There are different third party plugins for struts wizard. Do they solve
 my problems?
 
 Thanks,
 semaj
 
 

-- 
View this message in context: 
http://www.nabble.com/Implementing-wizard-like-interface-in-struts-tf3954707.html#a11294298
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: Implementing wizard like interface in struts

2007-06-25 Thread Ian Roughley
An interceptor, especially useful if the wizard is the only code in a 
specific directory.


/Ian

semaj wrote:


It's been a week; have not found any solutions... any idea guys!!

semaj wrote:
 


Hi there,

May be someone has already solved this problem. I need to implement a
wizard like page flow in my strut web application.

This is what I've done:
1. Created one big action form and put it in session scope.
2. Created action class extending DispatchAction
3. Created several jsps.

I successfully implemented the logic with previous, next, finish, and
cancel button. I removed the action form from session if the user clicks
cancel or finish buttons. The only problem i'm having is how to remove the
action form from session if the user navigates to other pages from menu
bar (without clicking cancel or finish buttons).

The other problem I'm having is how to navigate the user to first step if
he/she directly types the url of other subsequent pages.

I think i'm not the first person to face this problem. someone must have
already implemented this. Any hint will be greatly appreciated!!

There are different third party plugins for struts wizard. Do they solve
my problems?

Thanks,
semaj


   



 



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



Re: Implementing wizard like interface in struts

2007-06-25 Thread semaj

I didn't get the picture what you are trying to say...

Ian Roughley wrote:
 
 An interceptor, especially useful if the wizard is the only code in a 
 specific directory.
 
 /Ian
 
 semaj wrote:
 
It's been a week; have not found any solutions... any idea guys!!

semaj wrote:
  

Hi there,

May be someone has already solved this problem. I need to implement a
wizard like page flow in my strut web application.

This is what I've done:
1. Created one big action form and put it in session scope.
2. Created action class extending DispatchAction
3. Created several jsps.

I successfully implemented the logic with previous, next, finish, and
cancel button. I removed the action form from session if the user clicks
cancel or finish buttons. The only problem i'm having is how to remove
the
action form from session if the user navigates to other pages from menu
bar (without clicking cancel or finish buttons).

The other problem I'm having is how to navigate the user to first step if
he/she directly types the url of other subsequent pages.

I think i'm not the first person to face this problem. someone must have
already implemented this. Any hint will be greatly appreciated!!

There are different third party plugins for struts wizard. Do they solve
my problems?

Thanks,
semaj





  

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

-- 
View this message in context: 
http://www.nabble.com/Implementing-wizard-like-interface-in-struts-tf3954707.html#a11294504
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: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Instance must not be null (Spring+Struts+Hibernate)

2007-06-25 Thread Laurie Harper
This is a Spring issue, not Struts. It looks like you have something 
missing or mis-configured in your String applicationContext.xml 
configuration file. Review that and, if you can't find the problem, ask 
on the Spring forums -- and make sure to include the relevant parts of 
your config file so they can tell you what's wrong with it.


L.

GEDA wrote:

Hi guys. I cannot understand this problem and its driving me crazy. Can you
please take a look at the errors stack ? Thank you very much :

SEVERE: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name
'org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor':
Cannot create inner bean '(inner bean)' of type
[org.springframework.transaction.interceptor.TransactionInterceptor] while
setting bean property 'transactionInterceptor'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.IllegalArgumentException:
Instance must not be null
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '(inner bean)': Cannot resolve reference to bean
'transactionManager' while setting bean property 'transactionManager';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.IllegalArgumentException:
Instance must not be null
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'transactionManager' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
'entityManagerFactory' while setting bean property 'entityManagerFactory';
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'entityManagerFactory' defined in
ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of
init method failed; nested exception is java.lang.IllegalArgumentException:
Instance must not be null
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'entityManagerFactory' defined in ServletContext
resource [/WEB-INF/applicationContext.xml]: Invocation of init method
failed; nested exception is java.lang.IllegalArgumentException: Instance
must not be null
Caused by: java.lang.IllegalArgumentException: Instance must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at
org.springframework.util.ClassUtils.getAllInterfaces(ClassUtils.java:696)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.createEntityManagerFactoryProxy(AbstractEntityManagerFactoryBean.java:272)
at
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:260)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1201)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1171)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at

Re: Implementing wizard like interface in struts

2007-06-25 Thread Ian Roughley
My mistake, are you using s1 or s2?  I was providing an s2 solution, but 
on further inspection you may have been asking about s1.


/Ian

semaj wrote:


I didn't get the picture what you are trying to say...

Ian Roughley wrote:
 

An interceptor, especially useful if the wizard is the only code in a 
specific directory.


/Ian

semaj wrote:

   


It's been a week; have not found any solutions... any idea guys!!

semaj wrote:


 


Hi there,

May be someone has already solved this problem. I need to implement a
wizard like page flow in my strut web application.

This is what I've done:
1. Created one big action form and put it in session scope.
2. Created action class extending DispatchAction
3. Created several jsps.

I successfully implemented the logic with previous, next, finish, and
cancel button. I removed the action form from session if the user clicks
cancel or finish buttons. The only problem i'm having is how to remove
   


the
 


action form from session if the user navigates to other pages from menu
bar (without clicking cancel or finish buttons).

The other problem I'm having is how to navigate the user to first step if
he/she directly types the url of other subsequent pages.

I think i'm not the first person to face this problem. someone must have
already implemented this. Any hint will be greatly appreciated!!

There are different third party plugins for struts wizard. Do they solve
my problems?

Thanks,
semaj


  

   




 


-
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] OptionTransferSelect in 2.0.8

2007-06-25 Thread Felipe Rodrigues

HI,
I'm having a similar problem.
My action only get's the really selected(Highlighted) values of
doubleSelect. If I don't click in at least one, I get an null object in the
list inside my action.

did anything changed?

Tahnks,

Felipe


Julien Leonard wrote:
 
 Hi all,
 In 2.0.6, I used optiontransfertselect with Long params like this :
 
 
 
 s:optiontransferselect
 leftTitle=%{getText('saving.input.countries.available')}
 rightTitle=%{getText('saving.input.countries.selected')}
 doubleList=saving.countries
 doubleListKey=id
 doubleListValue=%{getText(i18nKey)}
 doubleName=selectedCountries
 doubleId=saveSaving_selectedCountries
 id=saveSaving_availableCountries
 list=availableCountries
 listKey=id
 listValue=%{getText(i18nKey)}
 allowUpDownOnLeft=false
 allowUpDownOnRight=false
 allowUpDownOnRight=false/s:optiontransferselect
 
 
 in my action I have this :
 
 private ListLong selectedCountries = new LinkedListLong();
 public ListLong getSelectedCountries()
 {
   return selectedCountries;
 }
 
   
 public void setSelectedCountries( ListLong selectedCountries )
 {
   this.selectedCountries = selectedCountries;
 }
 
 In  2.0.6, it was good. But in 2.0.8 have a
 java.lang.ClassCastException: java.lang.String when I want to acces to
 the selectedCountries List.
 In fact struts inject a xworkList typed as String.
 Is it a bug of 2.0.8 ?
 Can I resolve it?
 
 Julien
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/-S2--OptionTransferSelect-in-2.0.8-tf3975978.html#a11296304
Sent from the Struts - User mailing list archive at Nabble.com.


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



Struts Layout

2007-06-25 Thread Prashant Desai
Is struts layout package present in struts 2 ? what was the latest version that 
it was supported in ?
do they have layout examples for struts 2 ? if not, are they using jsf for 
layout in struts2 ?
_
Make every IM count. Download Windows Live Messenger and join the i’m 
Initiative now. It’s free.  
http://im.live.com/messenger/im/home/?source=TAGWL_June07

Preparable, Type conversion and parameter

2007-06-25 Thread Mansour
I am trying to extract an int in the prepare method. I am not able to 
cast it.  This is an example of what I am trying to do:




Map parameters = ActionContext.getContext().getParameters();
Integer task_id  = (Integer)  parameters.get(task.id);

I wanna try to avoid using Type conversion.
This didn't work either:

int task_id  = Integer.parseInt( parameters.get(task.id).toString()) ;

Do I have to use type conversion even for primitive types?

Any idea?
  




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



Re: Preparable, Type conversion and parameter

2007-06-25 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote:
 I am trying to extract an int in the prepare method.
 I am not able to cast it.  This is an example of
what
 I am trying to do:
 
 Map parameters =
 ActionContext.getContext().getParameters();
 Integer task_id  = (Integer) 
 parameters.get(task.id);
 
 I wanna try to avoid using Type conversion.

Um, why?

 This didn't work either:
 
 int task_id  = Integer.parseInt(
 parameters.get(task.id).toString()) ;
 
 Do I have to use type conversion even for primitive
 types?
 
 Any idea?

Yes, look up what the parameters map actually
contains.

Normally when reporting an error like this you'd show
the typecast exception you're getting, which should
provide a clue as to why it isn't working, as an array
of a type can't be converted to a single instance of a
type.

There are quicker ways of finding answers to these
questions than posting to the group!

d.



   

Be a better Heartthrob. Get better relationship answers from someone who knows. 
Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=listsid=396545433

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



Re: Implementing wizard like interface in struts

2007-06-25 Thread Michael Jouravlev

Try this: http://downloads.sourceforge.net/struts/dialogs-samples-2.0.war
I am sorry the online demos are not working at this moment. When you
start this demo app, select New User Signup Wizard link on that
start page, then check out the wizard. Notice, that the URL does not
change after you submit a request, also you can reload a page anytime,
also you cannot directly navigate to a specific page of a wizard,
which ensures that the user interface and wizard state machine are
kept in sync.

The wizard uses Easy Wizard classes (net.jspcontrols.wizard.* ), you
don't have to use them, but they simplify things. The source code for
Easy Wizard if you need it can be found at:
http://downloads.sourceforge.net/struts/dialogs-2.0.zip This archive
contains the same sample application as well along with build files.
Some docs on Easy Wizard can be found at:
https://easywizard.dev.java.net/

Michael.

On 6/25/07, semaj [EMAIL PROTECTED] wrote:


It's been a week; have not found any solutions... any idea guys!!

semaj wrote:

 Hi there,

 May be someone has already solved this problem. I need to implement a
 wizard like page flow in my strut web application.

 This is what I've done:
 1. Created one big action form and put it in session scope.
 2. Created action class extending DispatchAction
 3. Created several jsps.

 I successfully implemented the logic with previous, next, finish, and
 cancel button. I removed the action form from session if the user clicks
 cancel or finish buttons. The only problem i'm having is how to remove the
 action form from session if the user navigates to other pages from menu
 bar (without clicking cancel or finish buttons).

 The other problem I'm having is how to navigate the user to first step if
 he/she directly types the url of other subsequent pages.

 I think i'm not the first person to face this problem. someone must have
 already implemented this. Any hint will be greatly appreciated!!

 There are different third party plugins for struts wizard. Do they solve
 my problems?

 Thanks,
 semaj



--
View this message in context: 
http://www.nabble.com/Implementing-wizard-like-interface-in-struts-tf3954707.html#a11294298
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: Preparable, Type conversion and parameter

2007-06-25 Thread Mansour

Dave Newton wrote:

--- Mansour [EMAIL PROTECTED] wrote:
  

I am trying to extract an int in the prepare method.
I am not able to cast it.  This is an example of


what
  

I am trying to do:

Map parameters =
ActionContext.getContext().getParameters();
Integer task_id  = (Integer) 
parameters.get(task.id);


For this one:

SEVERE: Servlet.service() for servlet default threw exception
java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to 
java.lang.Integer

   at action.TaskAction.prepare(TaskAction.java:62)
   at 
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:118)
   at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)



I wanna try to avoid using Type conversion.



Um, why?

  

This didn't work either:

int task_id  = Integer.parseInt(
parameters.get(task.id).toString()) ;

parameters.get(task.id).toString() evaluates to   (java.lang.String) 
[Ljava.lang.String;@434ff9




Do I have to use type conversion even for primitive
types?

Any idea?



Yes, look up what the parameters map actually
contains.

Normally when reporting an error like this you'd show
the typecast exception you're getting, which should
provide a clue as to why it isn't working, as an array
of a type can't be converted to a single instance of a
type.

There are quicker ways of finding answers to these
questions than posting to the group!

  
Like what. Please tell me a place where I can get this resolved. :) You 
think I didn't look ? Sometimes programmers get stuck with a problem 
that looks simple to others. No one knows everything, Dave !

d.



   

Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. 
http://answers.yahoo.com/dir/?link=listsid=396545433


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



Tiles exeption after upgrading from Struts 2.0.6 to 2.0.8

2007-06-25 Thread Roberto Nunnari

Hello everybody.

I'm trying to upgrade my webapp from Struts 2.0.6 to 2.0.8

I'm using the Tiles-plugin and with the new version
when I request a page it throws exeptions.
The stacktrace is too long to be
posted here but the exeptions start like this:

26-giu-2007 00:36:00 org.apache.tiles.jsp.context.JspTilesRequestContext 
include

GRAVE: JSPException while including path '/WEB-INF/tiles/content/home.jsp'.
javax.servlet.jsp.JspException: ServletException while including page.
at org.apache.tiles.jsp.context.JspUtil.doInclude(JspUtil.java:98)



26-giu-2007 00:36:02 org.apache.tiles.jsp.taglib.RoleSecurityTagSupport 
doEndTag
GRAVE: IO Error executing tag: JSPException while including path 
'/WEB-INF/tiles/content/home.jsp'. ServletException while including page.
java.io.IOException: JSPException while including path 
'/WEB-INF/tiles/content/home.jsp'. ServletException while including page.
at 
org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:91)




26-giu-2007 00:36:02 org.apache.tiles.jsp.taglib.RenderTagSupport doCatch
GRAVE: Error during rendering
javax.servlet.jsp.JspException: IO Error executing tag: JSPException 
while including path '/WEB-INF/tiles/content/home.jsp'. ServletException 
while including page.
at 
org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:85)



Also, I had to change my tiles.xml put tags to put-attribute, like
this:

before:
definition name=userList extends=mainLayout
put name=title value=UsersList /
put name=body value=/WEB-INF/tiles/content/userList.jsp /
/definition

after:
definition name=userList extends=mainLayout
put-attribute name=title value=UsersList /
put-attribute name=body 
value=/WEB-INF/tiles/content/userList.jsp /

/definition


Any idea?
Thank you.

--
Robi

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



BigInteger and BigDecimal Properties Issue

2007-06-25 Thread Mark Menard
I have an action with a property of type BigDecimal, that is initialized, so
it has a value:

Public class myAction {
   BigDecimal myBigDecimal = new BigDecimal (1.1);

   ...
}

I have a form with the following:

s:textfield name=myBigDecimal /

The issue is if I blank out the value, myBigDecimal still retains the 1.1
value in the action.

I have dug into OGNL and it seems to me like it is not setting the value
null because when it tries to create a new BigDecimal with the  string it
throws a NumberFormatException. (cf: ognl.OgnlOps.bigDecValue() ) (Strangely
enough this does not propagate up to show as an error on the form.)

Now, if I change the type to Double, and leave the input on the form blank,
the value stays blank, and is null in my debug log. (Looking at
ognl.OglOps.doubleValue() it ought to be 0.0, but it's null.)

Questions:

When a field is a java.lang.Number, and the input is blank, should null be
set on the property?

Looking at ognl.OgnlOps.doubleValue() for a 0 length string it should be
returning 0.0, why is it null?

Opinion:

I think that if a field is submitted as the  String from the browser the
field should be set null if it is a java.lang.Number.

Thanks,

Mark

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



Re: [S2] OptionTransferSelect in 2.0.8

2007-06-25 Thread Adam Ruggles
Something broke between 2.0.6 and 2.0.8 when posting collections.  You 
will need to create a conversions properties file for your action.  I've 
logged a bug but I haven't had any feed back on it yet.


Felipe Rodrigues wrote:

HI,
I'm having a similar problem.
My action only get's the really selected(Highlighted) values of
doubleSelect. If I don't click in at least one, I get an null object in the
list inside my action.

did anything changed?

Tahnks,

Felipe


Julien Leonard wrote:
  

Hi all,
In 2.0.6, I used optiontransfertselect with Long params like this :



s:optiontransferselect
leftTitle=%{getText('saving.input.countries.available')}
rightTitle=%{getText('saving.input.countries.selected')}
doubleList=saving.countries
doubleListKey=id
doubleListValue=%{getText(i18nKey)}
doubleName=selectedCountries
doubleId=saveSaving_selectedCountries
id=saveSaving_availableCountries
list=availableCountries
listKey=id
listValue=%{getText(i18nKey)}
allowUpDownOnLeft=false
allowUpDownOnRight=false
allowUpDownOnRight=false/s:optiontransferselect


in my action I have this :

private ListLong selectedCountries = new LinkedListLong();
public ListLong getSelectedCountries()
{
return selectedCountries;
}


public void setSelectedCountries( ListLong selectedCountries )
{
this.selectedCountries = selectedCountries;
}

In  2.0.6, it was good. But in 2.0.8 have a
java.lang.ClassCastException: java.lang.String when I want to acces to
the selectedCountries List.
In fact struts inject a xworkList typed as String.
Is it a bug of 2.0.8 ?
Can I resolve it?

Julien

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






  




Re: Preparable, Type conversion and parameter

2007-06-25 Thread Dave Newton
--- Mansour [EMAIL PROTECTED] wrote:
 Like what. Please tell me a place where I can get
 this resolved. :) You think I didn't look?

I'm not really sure. This is pretty basic HTTP /
HttpServletRequest stuff. (That was a clue... as was
the exception.) 

If each key is mapped to a String array, then it would
make more sense to try casting the first element of
that array (assuming you know you have only one entry)
rather than the entire array.

I'm still not sure why you're actively trying to avoid
type conversion, though, particularly since it
actually takes effort to do so.

 No one knows everything, Dave !

Steve Jobs does; just ask him.

d.



   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz
 

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



Re: Minimized Window State NOT working

2007-06-25 Thread tom tom
 
 When a portlet is in MINIMIZED window state, the
 portlet should only render
 minimal output or no output at all.

Ealier we were using struts-bridge for portlet
development, there it was showing no output for the
MINIMIZED window state, also I have seen lot of other
portlet development strategies where it shows nothing
for the minimized window state.

 As I interpret this, it's the responsibility of the
 portlet to display the
 correct content. So you need to do some checking for
 the window state and
 take according action in your portlet.

I DONT THINK this is possible, The reason is as
follows.

In S2 when I submit a form (not a HREF) it goes to an
action and there after forward to a JSP, Now being in
the same page if I switch between modes, it does not
go the action class but shows the content probably
from cache or already rendered content, Due to this
reason how can I check for the Window State in the
corresponding action class.





 
 However, there wasn't much information about the
 minimized window state in
 the spec. I couldn't find any description of the
 contract between the portal
 server's window buttons and the window states, so
 there might be different
 behaviour from server to server. 

We have different portlet development strategies
working fine with uPortal, hence this is nothing to do
with the uPortal or any other portal container.



Please let me know if any way around for this.
This should be a common problem to anyone, Can we
enforce it to hit the action class for each switch
between windows states so that in the portet we can do
something.

Thanks





   

Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mailp=summer+activities+for+kidscs=bz
 

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



S2 - How do I ...

2007-06-25 Thread Ray Clough

How do I get the Struts properties from within my application.  What I am
looking for is to read the property struts.custom.i18n.resources, which is
defined in the 'struts.properties' file, so that I can get the
ResourceBundle names.  I guess that there is a Struts Properties object
which can be referenced and read, the question is how.

Also, although this is not a Struts question, how do I resolve the suffix on
a ResourceBundle to the language name?

Thanks,
- Ray Clough
-- 
View this message in context: 
http://www.nabble.com/S2---How-do-I-...-tf3980139.html#a11298949
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: [S2] login action w/FORM authentication?

2007-06-25 Thread Jon Wilmoth
Well I've been able to prove it's possible with S1.  I added a struts 1 action 
to log when it was called and forward to a s1 based login.jsp and changed the 
web.xml to form-login-page/login.action/form-login-page.  

Is it possible that the architectural change to filters instead of servlets 
requires some sort of special configuration with container managed 
authentication?  Is it only tomcat that requires a special struts2 
configuration?

- Original Message 
From: Ian Roughley [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Monday, June 25, 2007 11:08:41 AM
Subject: Re: [S2] login action w/FORM authentication?


yes - it is definitely possible.  The thing to remember is that if you 
are using struts2 tags (which I'm pretty sure you are), you need to 
redirect through an action first so the value stack is available to the tag.

/Ian

Jon Wilmoth wrote:

To add a little more context...The login action loads the login.jsp just fine 
when called directly, but doesn't work when invoked by the servlet container.  
Instead I see the following in the Tomcat log:

Jun-25-2007 10:31:30:865 AM, PDT [DEBUG] 
(org.apache.catalina.authenticator.FormAuthenticator) - Save request in 
session '930B154E1AD9BFB1283165CD888441EF'
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) - servletPath=/login.action, 
pathInfo=null, queryString=null, name=null
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) -  Path Based Forward
Jun-25-2007 10:31:33:053 AM, PDT [DEBUG] 
(org.apache.catalina.core.ApplicationDispatcher) -  Disabling the response for 
futher output

I tried configuring the app to go directly to the login jsp page, but the 
struts2 tags throw the following NullPointer:

Jun-25-2007 10:36:03:552 AM, PDT [ERROR] 
(org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/mywebapp].[jsp])
 - Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
 at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:58)
 at 
 org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:52)
 at 
 org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:49)
 at org.apache.jsp.login_jsp._jspx_meth_s2ib_005furl_005f0(login_jsp.java:503)
 at org.apache.jsp.login_jsp._jspService(login_jsp.java:111)

If this is off topic and I should post this to the Tomcat user list please let 
me know...it just seems to me that other S2 users may have this same question.

- Original Message 
From: Jon Wilmoth [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Sunday, June 24, 2007 9:21:02 PM
Subject: [S2] login action w/FORM authentication?


Is it possible to use an action as the webapp's login page?  I've tried the 
following web.xml/struts.xml entries with S2.0.8  Tomcat 5.5.23, but get a 
404 The requested resource (/mywebapp/login.action) is not available message.

login-config
auth-methodFORM/auth-method
form-login-config
form-login-page/login.action/form-login-page
form-error-page/loginFailure.action/form-error-page
/form-login-config
/login-config 

action name=login
result/login.jsp/result
/action
  


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



Custom filter - Is this possible

2007-06-25 Thread tom tom
Hi,

Can some one let us know, how to define a Custom
filter which would do what the
org.apache.struts2.dispatcher.FilterDispatcher does
but in addition it checks a Cetain attribute (e.g.
Window State) and shows nothing if a certain criteria
is met.

Is this something possible.? or How can I have
pluggable such configuration which does what I want
but also preserving the functionality.

Thanks,


   

Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php

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



Struts2 xslt can't work under oc4j

2007-06-25 Thread chenshibing
Struts2 xslt can’t work under oc4j, and get the following exception:

 

javax.xml.transform.TransformerException: XML-22101: (Fatal Error) DOMSource 
node as this type not supported.

 at 
oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:883)

 at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:463)

 at 
org.apache.struts2.views.xslt.XSLTResult.execute(XSLTResult.java:355)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:343)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

 at 
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:213)

 at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)

 at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

 at 
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)

 at 
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)

 at 
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)

 at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

 at 
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)

 at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

 at 
com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:161)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)

 at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

 at 
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)

 at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

 at 
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)

 at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

 at 
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:207)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:219)

 at 
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:218)

 at 
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)

 at 
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:216)

 at 
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)

 at 

Re: Implementing wizard like interface in struts

2007-06-25 Thread semaj

Hey Michael,

Thank you for your reply. I would like to ask you one more question. Will it
remove the form from the session if the user navigates to some other pages
by clicking one of the menu items? Let's say the user is in sign up wizard,
fills out first and second steps, but he changes his mind and clicks on the
menu items to go to other pages without completing the wizard operation.
Will the easy wizard remove the form from session?

Thank you,
semaj


Michael Jouravlev wrote:
 
 Try this: http://downloads.sourceforge.net/struts/dialogs-samples-2.0.war
 I am sorry the online demos are not working at this moment. When you
 start this demo app, select New User Signup Wizard link on that
 start page, then check out the wizard. Notice, that the URL does not
 change after you submit a request, also you can reload a page anytime,
 also you cannot directly navigate to a specific page of a wizard,
 which ensures that the user interface and wizard state machine are
 kept in sync.
 
 The wizard uses Easy Wizard classes (net.jspcontrols.wizard.* ), you
 don't have to use them, but they simplify things. The source code for
 Easy Wizard if you need it can be found at:
 http://downloads.sourceforge.net/struts/dialogs-2.0.zip This archive
 contains the same sample application as well along with build files.
 Some docs on Easy Wizard can be found at:
 https://easywizard.dev.java.net/
 
 Michael.
 
 On 6/25/07, semaj [EMAIL PROTECTED] wrote:

 It's been a week; have not found any solutions... any idea guys!!

 semaj wrote:
 
  Hi there,
 
  May be someone has already solved this problem. I need to implement a
  wizard like page flow in my strut web application.
 
  This is what I've done:
  1. Created one big action form and put it in session scope.
  2. Created action class extending DispatchAction
  3. Created several jsps.
 
  I successfully implemented the logic with previous, next, finish, and
  cancel button. I removed the action form from session if the user
 clicks
  cancel or finish buttons. The only problem i'm having is how to remove
 the
  action form from session if the user navigates to other pages from menu
  bar (without clicking cancel or finish buttons).
 
  The other problem I'm having is how to navigate the user to first step
 if
  he/she directly types the url of other subsequent pages.
 
  I think i'm not the first person to face this problem. someone must
 have
  already implemented this. Any hint will be greatly appreciated!!
 
  There are different third party plugins for struts wizard. Do they
 solve
  my problems?
 
  Thanks,
  semaj
 
 

 --
 View this message in context:
 http://www.nabble.com/Implementing-wizard-like-interface-in-struts-tf3954707.html#a11294298
 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]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Implementing-wizard-like-interface-in-struts-tf3954707.html#a11299698
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: Implementing wizard like interface in struts

2007-06-25 Thread semaj

yes, Ian. I'm looking for solution on Struts 1.3.8


Ian Roughley wrote:
 
 My mistake, are you using s1 or s2?  I was providing an s2 solution, but 
 on further inspection you may have been asking about s1.
 
 /Ian
 
 semaj wrote:
 
I didn't get the picture what you are trying to say...

Ian Roughley wrote:
  

An interceptor, especially useful if the wizard is the only code in a 
specific directory.

/Ian

semaj wrote:



It's been a week; have not found any solutions... any idea guys!!

semaj wrote:
 

  

Hi there,

May be someone has already solved this problem. I need to implement a
wizard like page flow in my strut web application.

This is what I've done:
1. Created one big action form and put it in session scope.
2. Created action class extending DispatchAction
3. Created several jsps.

I successfully implemented the logic with previous, next, finish, and
cancel button. I removed the action form from session if the user
clicks
cancel or finish buttons. The only problem i'm having is how to remove


the
  

action form from session if the user navigates to other pages from menu
bar (without clicking cancel or finish buttons).

The other problem I'm having is how to navigate the user to first step
if
he/she directly types the url of other subsequent pages.

I think i'm not the first person to face this problem. someone must
have
already implemented this. Any hint will be greatly appreciated!!

There are different third party plugins for struts wizard. Do they
solve
my problems?

Thanks,
semaj


   



 

  

-
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/Implementing-wizard-like-interface-in-struts-tf3954707.html#a11299730
Sent from the Struts - User mailing list archive at Nabble.com.


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



Validation DTD error 2.08

2007-06-25 Thread Zoran Avtarovski
I upgraded from 2.06 to 2.08 the other day expecting that such a minor
version update would be seamless, but ...

I get the following error on my validated forms:

Freemarker Template Error
Method public java.util.List
org.apache.struts2.components.Form.getValidators(java.lang.String) threw an
exception when invoked on [EMAIL PROTECTED]
The problematic instruction:
--
== list tag.getValidators(${tagName}) as validator [on line 23, column 9
in template/xhtml/form-close-validate.ftl]
 in include /${parameters.templateDir}/xhtml/form-close-validate.ftl [on
line 3, column 1 in template/xhtml/form-close.ftl]
--

The DTD I use for my validation files is :
!DOCTYPE validators PUBLIC 

 -//OpenSymphony Group//XWork Validator 1.0.2//EN 

http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;

I had a look in the migration notes and there was nothing obvious I could
see. I've included the validation file and detailed stack trace below but I
can't see where its going wrong. Just to be clear this was working fine with
2.06. I even went back to 2.06 and again it works fine.

Z.

!DOCTYPE validators PUBLIC 

-//OpenSymphony Group//XWork Validator 1.0.2//EN 

http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;

validators
  
field name=user.userName
field-validator type=requiredstring
  message key=error.field.empty

  /message
/field-validator
  /field
  field name=user.password
  field-validator type=requiredstring
 
message key=error.field.empty
/message
  /field-validator
/field
  field name=user.firstName
  field-validator type=requiredstring
message key=error.field.empty
/message
  /field-validator
/field
field name=user.lastName
  field-validator type=requiredstring
message key=error.field.empty
/message
  /field-validator
/field
  field name=user.email
field-validator type=requiredstring  short-circuit=true
  message key=error.field.empty/
/field-validator
field-validator type=email
  message key=error.email.invalid/
/field-validator
  /field

/validators


Java backtrace for programmers:
--
freemarker.template.TemplateModelException: Method public java.util.List
org.apache.struts2.components.Form.getValidators(java.lang.String) threw an
exception when invoked on [EMAIL PROTECTED]
at 
freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:87)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:160)
at freemarker.core.Environment.visit(Environment.java:351)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:95)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.include(Environment.java:1375)
at freemarker.core.Include.accept(Include.java:155)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:196)
at freemarker.core.Environment.process(Environment.java:176)
at freemarker.template.Template.process(Template.java:232)
at 
org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTempla
te(FreemarkerTemplateEngine.java:148)
at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
at org.apache.struts2.components.UIBean.end(UIBean.java:484)
at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSuppor
t.java:43)
at 
org.apache.jsp.WEB_002dINF.pages.formUser_jsp._jspx_meth_s_005fform_005f2(fo
rmUser_jsp.java:779)
at 
org.apache.jsp.WEB_002dINF.pages.formUser_jsp._jspx_meth_s_005felse_005f0(fo
rmUser_jsp.java:683)
at 
org.apache.jsp.WEB_002dINF.pages.formUser_jsp._jspService(formUser_jsp.java:
128)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
84)
at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 

[S2] Template testing

2007-06-25 Thread Mark P Ashworth

Good Day,

Is there a way to test how a tag like lt;formgt;lt;textfield
/gt;lt;/formgt; will be processed by a custom theme. I would like to get
all of the theme processing done during development instead of integration
time with the actual pages.

Regards,
Mark P Ashworth
http://www.connext.co.za
-- 
View this message in context: 
http://www.nabble.com/-S2--Template-testing-tf3980644.html#a11300285
Sent from the Struts - User mailing list archive at Nabble.com.


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