Re: Return to previous page without javascript

2009-06-26 Thread Stefano Tranquillini
Not really. i usued the tiles and i've some problem. i've in mind an idea:
- keep track inside a jsp of the current page (is possible from jsp to put
the url inside the session?, i tried and i fell, no one thing work )
- each action, when success, return to an action that perform a redirect
(but how?, i thought about forward, but is not struts style).



On Sun, Jun 21, 2009 at 11:22, Girish Naik girish.n...@gmail.com wrote:

 Is this issue solved?

 Can we do something like
 this
 http://www.velocityreviews.com/forums/t131347-struts-requestprocessor-override.html
 

 Regards,
 -
 Girish Naik
 Mobile:-+91-09740091638
 girish.n...@gmail.com
 Henny Youngman
 http://www.brainyquote.com/quotes/authors/h/henny_youngman.html
 - I told the doctor I broke my leg in two places. He told me to quit
 going
 to those places.

 On Mon, Jun 15, 2009 at 8:11 PM, Stefano Tranquillini 
 stefano.tranquill...@gmail.com wrote:

  I tried to use request and URI but:
  - i'm not able to have some result from this command.
  - how can i set this value inside the session from a jsp.
 
  thanks.
 
 
 
  --
  Stefano
 




-- 
Stefano


Re: Pre setAttribute for a form

2009-06-26 Thread Nils-Helge Garli Hegvik
Don't have any more ideas, but generally, the message cannot find
bean in any scope means exactly what it says: The bean is not in a
scope where it can be found. Which means that either it is set in
request scope, and attempted to be used in a different request
(typically what happens when you do a redirect), or that it has not
been set at all. Also, keep in mind that the request/response cycle is
a little bit different in a portlet than in a regular web application,
so you might have to re-think what you're trying to do.

Nils-H

On Thu, Jun 25, 2009 at 10:05 AM, Sam Wunswun2...@gmail.com wrote:
 Like I have said before, if I manually navigated to the
 RedirectHellpForm page , then reload the first page (RedirectForm),
 and press the Submit button from the RedirectForm, it can find the
 name of RedirectHelpForm.
 My questions is how can I setAttribute(RedirectHelpForm ...) before
 navigated to the RedirectHelpForm page??

 thanks
 Sam

 On Thu, Jun 25, 2009 at 5:17 PM, Sam Wunswun2...@gmail.com wrote:
 I just tried your suggestion,
 it doesn't work.
 The page flow is:
 RedirectAction - RedirectHelpAction - RedirectStep3Action

 Here is the RedirectAction.java file:

 import org.apache.commons.logging.LogFactory;

 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletConfig;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;

 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;

 /** @struts.action name=RedirectForm path=/struts_redirect_portlet/input
  * attribute=redirectForm
  * scope=session
  * input=/portlet/struts_redirect_portlet/input.jsp
  *
  * @struts.action-forward name=input
 path=/portlet/struts_redirect_portlet/input.jsp redirect=false
  * @struts.action-forward name=help
 path=/portlet/struts_redirect_portlet/help.jsp redirect=false
  */
 public class RedirectAction extends PortletAction {

        public ActionForward execute(
                        ActionMapping mapping, ActionForm form,
 HttpServletRequest req,
                        HttpServletResponse res)
                throws Exception {

                RedirectForm redirectForm = (RedirectForm) form;

                String comment = redirectForm.getComment().trim();
               if ( comment.length()  0) {
                  return mapping.findForward(help);
                }

                  return mapping.findForward(input);

        }


        public ActionForward render(
                        ActionMapping mapping, ActionForm form,
 PortletConfig config,
                        RenderRequest req, RenderResponse res)
                throws Exception {

                return mapping.findForward(input);
        }
 }

 Here is the RedirectHelpAction.java file:

 import javax.servlet.http.HttpServletResponse;

 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletConfig;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;

 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;

  /***
  * @struts.action name=RedirectHelpForm 
 path=/struts_redirect_portlet/help
  * attribute=redirectHelpForm
  * scope=session
  * input=/portlet/struts_redirect_portlet/help.jsp
  * @struts.action-forward name=help
 path=/portlet/struts_redirect_portlet/help.jsp redirect=false
  * @struts.action-forward name=step3
 path=/portlet/struts_redirect_portlet/step3.jsp redirect=false
  */

 public class RedirectHelpAction extends PortletAction {

        public ActionForward execute(
                        ActionMapping mapping, ActionForm form,
 HttpServletRequest req,
                        HttpServletResponse res)
                throws Exception {
                RedirectHelpForm redirectHelpForm = (RedirectHelpForm) form;
                req.getSession().setAttribute(RedirectHelpForm,
 redirectHelpForm);

                String name = redirectHelpForm.getName().trim();
               if ( name.length()  0) {
                  return mapping.findForward(step3);
                }

               return mapping.findForward(help);
        }

        public ActionForward render(
                        ActionMapping mapping, ActionForm form,
 PortletConfig config,
                        RenderRequest req, RenderResponse res)
                throws Exception {

                return mapping.findForward(help);
        }
 }


 On Thu, Jun 25, 2009 at 3:47 PM, Nils-Helge Garli
 Hegviknil...@gmail.com wrote:
 Did you try request.getSession().setAttribute(RedirectHelpForm,
 redirectHelpForm)?

 Nils-H

 On Thu, Jun 25, 2009 at 7:14 AM, Sam Wunswun2...@gmail.com wrote:
 How to do that with session?
 I am currently setting it in the execute() and render method with the
 following code:
 req.setAttribute(RedirectHelpForm,  

Re: Pre setAttribute for a form

2009-06-26 Thread Sam Wun
yah, this is old school answers. :D
I have resolved the problem already by applying old school technique. :D


On Fri, Jun 26, 2009 at 6:21 PM, Nils-Helge Garli
Hegviknil...@gmail.com wrote:
 Don't have any more ideas, but generally, the message cannot find
 bean in any scope means exactly what it says: The bean is not in a
 scope where it can be found. Which means that either it is set in
 request scope, and attempted to be used in a different request
 (typically what happens when you do a redirect), or that it has not
 been set at all. Also, keep in mind that the request/response cycle is
 a little bit different in a portlet than in a regular web application,
 so you might have to re-think what you're trying to do.

 Nils-H

 On Thu, Jun 25, 2009 at 10:05 AM, Sam Wunswun2...@gmail.com wrote:
 Like I have said before, if I manually navigated to the
 RedirectHellpForm page , then reload the first page (RedirectForm),
 and press the Submit button from the RedirectForm, it can find the
 name of RedirectHelpForm.
 My questions is how can I setAttribute(RedirectHelpForm ...) before
 navigated to the RedirectHelpForm page??

 thanks
 Sam

 On Thu, Jun 25, 2009 at 5:17 PM, Sam Wunswun2...@gmail.com wrote:
 I just tried your suggestion,
 it doesn't work.
 The page flow is:
 RedirectAction - RedirectHelpAction - RedirectStep3Action

 Here is the RedirectAction.java file:

 import org.apache.commons.logging.LogFactory;

 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletConfig;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;

 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;

 /** @struts.action name=RedirectForm path=/struts_redirect_portlet/input
  * attribute=redirectForm
  * scope=session
  * input=/portlet/struts_redirect_portlet/input.jsp
  *
  * @struts.action-forward name=input
 path=/portlet/struts_redirect_portlet/input.jsp redirect=false
  * @struts.action-forward name=help
 path=/portlet/struts_redirect_portlet/help.jsp redirect=false
  */
 public class RedirectAction extends PortletAction {

        public ActionForward execute(
                        ActionMapping mapping, ActionForm form,
 HttpServletRequest req,
                        HttpServletResponse res)
                throws Exception {

                RedirectForm redirectForm = (RedirectForm) form;

                String comment = redirectForm.getComment().trim();
               if ( comment.length()  0) {
                  return mapping.findForward(help);
                }

                  return mapping.findForward(input);

        }


        public ActionForward render(
                        ActionMapping mapping, ActionForm form,
 PortletConfig config,
                        RenderRequest req, RenderResponse res)
                throws Exception {

                return mapping.findForward(input);
        }
 }

 Here is the RedirectHelpAction.java file:

 import javax.servlet.http.HttpServletResponse;

 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletConfig;
 import javax.portlet.RenderRequest;
 import javax.portlet.RenderResponse;

 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;

  /***
  * @struts.action name=RedirectHelpForm 
 path=/struts_redirect_portlet/help
  * attribute=redirectHelpForm
  * scope=session
  * input=/portlet/struts_redirect_portlet/help.jsp
  * @struts.action-forward name=help
 path=/portlet/struts_redirect_portlet/help.jsp redirect=false
  * @struts.action-forward name=step3
 path=/portlet/struts_redirect_portlet/step3.jsp redirect=false
  */

 public class RedirectHelpAction extends PortletAction {

        public ActionForward execute(
                        ActionMapping mapping, ActionForm form,
 HttpServletRequest req,
                        HttpServletResponse res)
                throws Exception {
                RedirectHelpForm redirectHelpForm = (RedirectHelpForm) form;
                req.getSession().setAttribute(RedirectHelpForm,
 redirectHelpForm);

                String name = redirectHelpForm.getName().trim();
               if ( name.length()  0) {
                  return mapping.findForward(step3);
                }

               return mapping.findForward(help);
        }

        public ActionForward render(
                        ActionMapping mapping, ActionForm form,
 PortletConfig config,
                        RenderRequest req, RenderResponse res)
                throws Exception {

                return mapping.findForward(help);
        }
 }


 On Thu, Jun 25, 2009 at 3:47 PM, Nils-Helge Garli
 Hegviknil...@gmail.com wrote:
 Did you try request.getSession().setAttribute(RedirectHelpForm,
 redirectHelpForm)?

 Nils-H

 On Thu, Jun 25, 2009 at 7:14 AM, 

Re: Error when deploying portlets beside a normal Struts2 web app?

2009-06-26 Thread Nils-Helge Garli Hegvik
It should be fixed now in trunk. Let me now if it works or not.

Nils-H

On Wed, Jun 24, 2009 at 6:01 PM, phillips1021bphill...@ku.edu wrote:

 I added to the Jira bug report another example application that demonstrates
 the problem.  The example application is a simple Struts 2 (using 2.1.6)
 application that has both normal actions and Portlet actions.

 You can also download this example application (an archive of an Eclipse
 Dynamic Web Project that uses Maven) at
 http://www.brucephillips.name/struts/StrutsExample.zip.

 Unzip the example application and the open a command window.  Navigate to
 where you unzipped the application.

 Run mvn clean at the command prompt

 Run mvn jetty:run at the command prompt

 When you see the message [INFO] Started Jetty Server open your web browser
 and navigate to

 http://localhost:8080/StrutsExample/index.jsp

 Click on link for normal Struts 2 action and you should see Hello from
 Struts 2

 Click on link for Hello from portlet action and you should see Hello from
 Struts 2

 Click on link for Run Run a normal Struts 2 action that loads a JSP with a
 search form built using s:form tag and you'll get the exception discussed
 earlier.

 Type control C in the command prompt window to stop Jetty server

 Edit the pom.xml file:
   Change the Struts 2 to version 2.0.11
   Comment out the dependency on struts2-portlet-plugin

 Save the pom.xml file

 In command window run mvn clean and then mvn jetty:run

 When you see the message [INFO] Started Jetty Server open your web browser
 and navigate to

 http://localhost:8080/StrutsExample/index.jsp

 Click on link for normal Struts 2 action and you should see Hello from
 Struts 2

 Click on link for Hello from portlet action and you should see Hello from
 Struts 2

 Click on link for Run Run a normal Struts 2 action that loads a JSP with a
 search form built using s:form tag and you'll see the simple search form
 built using the s:form tag

 Click on the link Click here to start the search form example as a portlet
 and you'll also see the simple search form

 It seems that the s:form tag is causing a problem when using the
 struts2-portlet-plugin version 2.1.6 with struts 2 core version 2.1.6.

 We hope this is fixed in the upcoming release of version 2.1.7 as we would
 like to use the current release of Struts 2 to build web applications that
 can be used as standalone applications and as portlet within a portlet
 container.



 --
 View this message in context: 
 http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p24187641.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts1 or Struts2

2009-06-26 Thread musomesa
SInce you are comited to a re-write, go for it.
Chris







-Original Message-
From: Mitchell, Steven steven.mitch...@umb.com
To: Struts Users Mailing List user@struts.apache.org
Sent: Thu, Jun 25, 2009 5:17 pm
Subject: RE: Struts1 or Struts2



Chris,

My opinion is that you will take an initial productivity hit while the
team gets accustomed to the new JSP tags.  That is what took me the
longest. I also switched from Tiles to SiteMesh, which like much better.
My recommendation is to pick one person to do the first small, benchmark
application and then have that person mentor the rest of your team.

I went ahead and converted a couple of Struts 1 applications to Struts
2.  There is no business justification to do so, but it was an excellent
learning exercise.

The main thing I noticed when I converted my Struts 1 actions to Struts
2 was that they were much cleaner with Struts 2.  I standardized the
basic layout of my actions.

public String save() throws Exception {
  checkForActionErrors();
  if ( !hasActionErrors() ) {
   checkForFieldErrors();
   if ( !hasFieldErrors() ) {
  // do CRUD stuff here...
  return SUCCESS;
   }
prepare(); //re-populate stuff in Request scope
return INPUT;
   }
}
return ERROR;
}

Go for it!

Steve Mitchell
http://www.ByteworksInc.com
-Original Message-
From: CRANFORD, CHRIS [mailto:chris.cranf...@setech.com] 
Sent: Thursday, June 25, 2009 3:29 PM
To: user@struts.apache.org
Subject: Struts1 or Struts2


My company has used Struts1.1 and Struts1.2 for the development of our
widely used customer portal web application environment.  Recently, the
company has decided to migrate to a new back office solution and as a
part of this project, our customer portal application is needing to be
rewritten as well.  In an effort to remain on the latest and greatest
technology stacks, I am considering Struts2 (specifically 2.1.6) versus
staying on the Struts1.2 framework.  

Is there a huge benefit in moving to Struts2 for my development team?  
Will less development/configuration/maintenance be required?  


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For a
dditional commands, e-mail: user-h...@struts.apache.org


--
NOTICE:  This electronic mail message and any attached files are confidential.  
The information is exclusively for the use of the individual or entity intended 
as the recipient.  If you are not the intended recipient, any use, copying, 
printing, reviewing, retention, disclosure, distribution or forwarding of the 
message or any attached file is not authorized and is strictly prohibited.  If 
you have received this electronic mail message in error, please advise the 
sender by reply electronic mail immediately and permanently delete the original 
transmission, any attachments and any copies of this message from your computer 
system. Thank you.

==


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



cannot download 2.1.7

2009-06-26 Thread Angel Segarra
I can't find 2.1.7 anywhere for download, even though the download now 
button says 2.1.7, the main site still has 2.1.6 as the latest release.

Am I missing something?

Thanks,
Angel


Somos verde. Piense antes de imprimir.

AVISO DE CONFIDENCIALIDAD
Si usted ha recibido este email por error, favor de notificar 
inmediatamente al remitente a la dirección mostrada en este email. Esta 
transmisión puede contener información confidencial. Esta información es 
para el uso del individuo(s) o de la entidad a los cuales se intento 
dirigir. Favor de eliminarlo de sus archivos si usted no es el recipiente 
previsto. Gracias por su cumplimiento.

CONFIDENTIALITY NOTICE
If you have received this email in error, please immediately notify the 
sender by email at the address shown. This email transmission may contain 
confidential information. This information is intended only for use of the 
individual(s) or entity to whom it is intended. Please delete it from your 
files if you are not the intended recipient. Thank you for your 
compliance.

Re: Exceptions thrown by constructor different from those thown by execute() ?

2009-06-26 Thread musomesa
I see your point that there has to be some design to handle? that contingency
(exceptions coming from the constructor) but with so many opportunities for
us to do things via interceptors I would let the framework have a total monopoly
on the constructors. 

Essentially we (application developers) should be into
how the action behaves rather than how it comes into being.

But I do see your point that for completeness there has to be some definite
behavior that takes place if the exception is thrown.
Chris


-Original Message-
From: Jan T. Kim j@uea.ac.uk
To: Struts Users Mailing List user@struts.apache.org
Sent: Thu, Jun 25, 2009 9:05 am
Subject: Re: Exceptions thrown by constructor different from those thown by 
execute() ?



Dear Chris,

On Thu, Jun 25, 2009 at 08:23:30AM -0400, musom...@aol.com wrote:
 
  I am with the devs on this one -- typically the constructor of an object 
whose life cycle is managed by 
 the framework is off limits -- you wouldn't write code to throw exceptions 
from a servlet or
 EJB etc.

I agree that from an EJB provider's angle its quite possible to argue
that session bean's constructors shouldn't throw exceptions. From an
application assembler's perspective, though, I'd expect that a global
exception mapping would handle all exceptions of the specified class,
regardless of whether they are thrown by constructors or other methods
(and regardless of whether the exception is considered legitimate or
reasonable).

Best regards, Jan

 
  
 
 -Original Message-
 From: Wes Wannemacher w...@wantii.com
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Tue, Jun 23, 2009 9:03 am
 Subject: Re: Exceptions thrown by constructor different from those thown by  
execute() ?
 
 
 
 
 
 
 
 
 
 
 On Tue, Jun 23, 2009 at 8:50 AM, Jim Kileyjhki...@summa-tech.com wrote:
 [...]
  From a philosophical perspective, though -- no clue, I don't have a lot of
  insight into why the devs make all the decisions they make.
 
 [...]
 
 The decisions I make are usually heavily weighted by how impressed
 girls will be :)
 
 I would go against adding security via exceptions thrown by a
 constructor. In the default ObjectFactory for xwork, the flow for
 creating instances of classes is pretty easy to follow. The exception
 handling is deferred to callers (as evidenced by the various throws
 Exception qualifiers on the methods). The main reason I would be
 against it is that you aren't the one calling new on the classes. I
 can appreciate what you are trying to do, so file a JIRA and when we
 have time to investigate, we could probably implement it, but to solve
 your problem, the best bet is an interceptor.
 
 -Wes
 
 -- 
 Wes Wannemacher
 Author - Struts 2 In Pr
actice
 Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
 http://www.manning.com/wannemacher
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 
 
 
  
 

-- 
 +- Jan T. Kim ---+
 | email: j@uea.ac.uk |
 | WWW:   http://www.cmp.uea.ac.uk/people/jtk |
 *-=  hierarchical systems are for files, not for humans  =-*

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




canncellable with isCanncelled()

2009-06-26 Thread Sam Wun
Hi,

There are 3 buttons on the jsp web page, first one is submit (sign
in), another one is Cancel, the third one is something else. I used
html:cancel for the Cancel and something else.
I also included this.isCancelled() conditional check in the execute()
method; as well as included canecellable=true in the action path
in the struts-config.xml file.
But I don't know why the this.isCancelled() method doesn't returned
true in the execute() method.

Here is the code:

 # cat struts-config.xml
?xml version=1.0 encoding=UTF-8?
!DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD
Struts Configuration 1.3//EN
http://jakarta.apache.org/struts/dtds/struts-config_1_3.dtd;

action-mappings
action path=/onlinepayment_portlet/sign_in
type=com.ip6networks.onlinepayment.portlet.SignInAction
name=SignInForm scope=session validate=true cancellable=true
input=/portlet/onlinepayment_portlet/sign_in.jsp
forward name=sign_in
path=/portlet/onlinepayment_portlet/sign_in.jsp/forward
forward name=personal_details
path=/portlet/onlinepayment_portlet/personal_details.jsp/forward
exception key=errors.cancel
type=org.apache.struts.action.InvalidCancelException
path=/portlet/onlinepayment_portlet/fool.jsp/exception
/action
...

SignInAction.java:

public ActionForward execute(
ActionMapping mapping, ActionForm form,
HttpServletRequest req,
HttpServletResponse res)
throws Exception {

SignInForm signinForm = (SignInForm) form;
   req.getSession().setAttribute(SignInForm, signinForm);
PersonalDetailForm personalDetailForm = new
PersonalDetailForm();
   req.getSession().setAttribute(PersonalDetailForm,
personalDetailForm);

String email_address = signinForm.getEmailAddress().trim();
String password = signinForm.getPassword().trim();
if ( this.isCancelled( req ) )
{
System.out.println( About to forward the cancel! );
return mapping.findForward( formTest.cancel );
}
..

sign_in.jsp:
...
html:submit property=sign_in
bean:message key=button.sign_in /
/html:submit

html:cancel property=new_visitor
bean:message key=button.new_visitor /
/html:cancel

html:cancel property=cancel_checkout
bean:message key=button.cancel_checkout /
/html:cancel

Your help is much appreciated.
Thanks
Sam

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



S2.1.6 problem with devMode

2009-06-26 Thread Greg Lindholm
When I set devMode to true I get the exception below.
Struts 2.1.6, Tomcat 5.5, starting Tomcat from within Eclipse.
If devMode is false all works fine.
Anyone have any ideas?

2009-06-26 10:21:06,250 INFO
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
Parsing configuration file [struts-default.xml]
2009-06-26 10:21:06,442 INFO
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
Unable to locate configuration files of the name struts-plugin.xml, skipping
2009-06-26 10:21:06,443 INFO
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
Parsing configuration file [struts-plugin.xml]
2009-06-26 10:21:06,531 INFO
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
Parsing configuration file [struts.xml]
2009-06-26 10:21:06,544 INFO
com.opensymphony.xwork2.config.impl.DefaultConfiguration:31 - Overriding
property struts.i18n.reload - old value: false new value: true
2009-06-26 10:21:06,544 INFO
com.opensymphony.xwork2.config.impl.DefaultConfiguration:31 - Overriding
property struts.configuration.xml.reload - old value: false new value: true
2009-06-26 10:21:06,549 INFO
org.apache.struts2.config.BeanSelectionProvider:31 - Loading global messages
from AdminResources
2009-06-26 10:21:06,918 ERROR
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nxm]:3639 -
Exception starting filter struts2
java.lang.NullPointerException
at
com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
at
com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
at
org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
at
com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
at
org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
at
org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77)
at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at
org.apache.catalina.core.StandardService.start(StandardService.java:448)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Jun 26, 2009 10:21:11 AM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jun 26, 2009 10:21:11 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/nxm] startup failed due to previous errors


How to set a file name using a header in the response?

2009-06-26 Thread Jim Collings
%response.setHeader(Content-Disposition, attachment;
filename=\filename_${fromDate}-${toDate}.doc\); %

The above is what I currently  have but I think there is a new way to
do it that doesn't involve using a scriptlet. Also, the fromDate and
toDate items don't work. I've tried quoting them but I'm not sure I
got it right. They are used later on in the document, so I know I am
getting them.

I've tried these two combinations for quoting:

%response.setHeader(Content-Disposition, attachment;
filename=\filename_${fromDate}-${toDate}.doc\); %
Results in a file named: filename_${fromDate}-${toDate}.doc

%response.setHeader(Content-Disposition, attachment;
filename=\filename_\${fromDate}\-\${toDate}\.doc\); %
Results in a file named: filename_.doc

Clues?


Jim C.

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: S2.1.6 problem with devMode

2009-06-26 Thread Musachy Barroso
yeah, known bug, it is fixed in trunk and will be in 2.1.7

musachy

On Fri, Jun 26, 2009 at 7:28 AM, Greg Lindholmgreg.lindh...@gmail.com wrote:
 When I set devMode to true I get the exception below.
 Struts 2.1.6, Tomcat 5.5, starting Tomcat from within Eclipse.
 If devMode is false all works fine.
 Anyone have any ideas?

 2009-06-26 10:21:06,250 INFO
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
 Parsing configuration file [struts-default.xml]
 2009-06-26 10:21:06,442 INFO
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
 Unable to locate configuration files of the name struts-plugin.xml, skipping
 2009-06-26 10:21:06,443 INFO
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
 Parsing configuration file [struts-plugin.xml]
 2009-06-26 10:21:06,531 INFO
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider:31 -
 Parsing configuration file [struts.xml]
 2009-06-26 10:21:06,544 INFO
 com.opensymphony.xwork2.config.impl.DefaultConfiguration:31 - Overriding
 property struts.i18n.reload - old value: false new value: true
 2009-06-26 10:21:06,544 INFO
 com.opensymphony.xwork2.config.impl.DefaultConfiguration:31 - Overriding
 property struts.configuration.xml.reload - old value: false new value: true
 2009-06-26 10:21:06,549 INFO
 org.apache.struts2.config.BeanSelectionProvider:31 - Loading global messages
 from AdminResources
 2009-06-26 10:21:06,918 ERROR
 org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/nxm]:3639 -
 Exception starting filter struts2
 java.lang.NullPointerException
    at
 com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
    at
 com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
    at
 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
    at
 org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
    at
 com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
    at
 com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
    at
 org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
    at
 org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77)
    at
 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49)
    at
 org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
    at
 org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
    at
 org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:78)
    at
 org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
    at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
 org.apache.catalina.core.StandardService.start(StandardService.java:448)
    at
 org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
 Jun 26, 2009 10:21:11 AM org.apache.catalina.core.StandardContext start
 SEVERE: Error filterStart
 Jun 26, 2009 10:21:11 AM org.apache.catalina.core.StandardContext start
 SEVERE: Context [/nxm] startup failed due to previous errors




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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Performance issues in showcase sample struts 2.1.6 application

2009-06-26 Thread Daniel Guryca
Hi,

I have just deployed included showcase sample application on to my tomcat 6.

I'm very amazed how SLOWLY it runs.
I'm looking for a framework for my company and Struts 2 seems very good to
me (I have a previous experience with grails which is good for smaller
applications but too unstable and bugy for bigger apps)  but how about
the Struts 2 performance ?

I would expect much much better results (similar simple pages with stripes
or even grails almost fly - 700 and more req/s) !!

I was running these on my dual core a...@2.1 Ghz using apache bench.

ab -c 10 -n 1000 '
http://localhost:8080/struts2-showcase-2.1.6/skill/edit.action'
13 req/s


ab -c 10 -n 1000 '
http://localhost:8080/struts2-showcase-2.1.6/showcase.action'
19/ req/s

Performance for other pages is also very very poor.

What am I doing wrong ?

Is Struts 2 really so horribly slow ?

Thank you.

regards
Daniel


Getting undefined error on ajax call

2009-06-26 Thread Praveen . V . Kumar
Hi,

I'm using struts 2.1.6, struts2-dojo-plugin-2.1.6.jar, xwork-2.1.2, freemarker 
2.3.13, ognl 2.6.11 and jboss 5.0.1.

In ftl, I am making ajax call in sx.a tag as shown below.

@s.url id=sort namespace=${parameters.nameSpace} action=Sort
@s.param name=sortBy${tmpSortMethodName?trim}/@s.param
@s.param name=sortTypedesc/@s.param
/@s.url
@sx.a href=${sort} key=${tmpColumnName} targets=content
@s.text name=${tmpColumnName}/img src=@s.url 
value=/images/sortAsc.gif/ alt=@s.text name=app.sortBy/: @s.text 
name=${tmpColumnName}/
title=@s.text name=app.sortBy/: @s.text name=${tmpColumnName}/ 
class=arrowWhite align=texttop/
/@sx.a

I have added %@ taglib prefix=sx uri=/struts-dojo-tags %
and   sx:head debug=true cache=false compressed=false /

But still I am getting the undefined error in the screen and Parameters: 
Invalid chunk ignored in the server.

Please help in resolving this issue.

Thanks
Praveen


Re: [S2] Can't setBufferSize on StreamResult from action configuration (Struts2 2.1.6)

2009-06-26 Thread Dale Newfield

Francisco José Aquino García wrote:

  result type=stream
param name=contentType${mimeType}/param
param name=contentLength${length}/param
param name=contentDispositioninline; filename=${fileName}/param
param name=inputNameinputStream/param
param name=bufferSize${buffSize}/param
param name=allowCachingfalse/param
  /result
/action


The result doesn't evaluate bufferSize.  You can't put in OGNL there.


I've been peeking a little into
org.apache.struts2.dispatcher.StreamResult, and it indeed has a
property bufferSize of type int, but looks like OGNL keeps on
hammering a non-existent String one.


${buffSize} is a String.


By the way, I also can't get the point of contentLengh being String.


Did you notice where that string is explicitly parsed to extract a real 
value?


  198   // Set the content length
  199   if (contentLength != null) {
  200   String _contentLength = 
conditionalParse(contentLength, invocation);

  201   int _contentLengthAsInt = -1;
  202   try {
  203   _contentLengthAsInt = 
Integer.parseInt(_contentLength);

  204   if (_contentLengthAsInt = 0) {
  205 
oResponse.setContentLength(_contentLengthAsInt);

  206   }
  207   }
  208   catch(NumberFormatException e) {
  209   log.warn(failed to recongnize 
+_contentLength+ as a number, contentLength header will not be set, e);

  210   }
  211   }

-Dale


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Performance issues in showcase sample struts 2.1.6 application

2009-06-26 Thread Daniel Guryca
I have found that devMode was set to true .. so I changed it to false.

Now I'm getting something around 140 req/s which is much better but
still somewhat slow.

What more can I set to make it run faster ?

My current settings are listed below:


struts.mapper.alwaysSelectFullNamespace true
struts.url.includeParams none
struts.freemarker.templatesCache false
struts.dispatcher.parametersWorkaround false
struts.multipart.maxSize 2097152
struts.freemarker.mru.max.strong.size 100
struts.ognl.allowStaticMethodAccess false
struts.codebehind.defaultPackage person
struts.serve.static true
struts.enable.DynamicMethodInvocation true
struts.serve.static.browserCache false
struts.tag.altSyntax true
struts.freemarker.wrapper.altMap true
struts.multipart.parser jakarta
struts.i18n.reload false
actionPackages org.apache.struts2.showcase.person
struts.objectFactory.spring.autoWire name
struts.xslt.nocache false
struts.action.extension action,,
struts.velocity.configfile velocity.properties
struts.custom.i18n.resources globalMessages
allowStaticMethodAccess false
struts.url.http.port 80
struts.velocity.contexts
struts.configuration.xml.reload false
struts.objectFactory.spring.useClassCache true
struts.url.https.port 443
devMode false
struts.devMode false
struts.ui.templateDir template
struts.enable.SlashesInActionNames false
struts.velocity.toolboxlocation
struts.objectFactory spring
struts.freemarker.manager.classname customFreemarkerManager
struts.ui.templateSuffix ftl
struts.objectFactory.spring.autoWire.alwaysRespect false
struts.codebehind.pathPrefix /
struts.multipart.saveDir
struts.ui.theme xhtml
struts.i18n.encoding UTF-8
struts.freemarker.beanwrapperCache false


regards
Daniel

On Fri, Jun 26, 2009 at 5:35 PM, Daniel Guryca dun...@gmail.com wrote:

 Hi,

 I have just deployed included showcase sample application on to my tomcat 6.

 I'm very amazed how SLOWLY it runs.
 I'm looking for a framework for my company and Struts 2 seems very good to me 
 (I have a previous experience with grails which is good for smaller 
 applications but too unstable and bugy for bigger apps)  but how about 
 the Struts 2 performance ?

 I would expect much much better results (similar simple pages with stripes or 
 even grails almost fly - 700 and more req/s) !!

 I was running these on my dual core a...@2.1 Ghz using apache bench.

 ab -c 10 -n 1000 
 'http://localhost:8080/struts2-showcase-2.1.6/skill/edit.action'
 13 req/s


 ab -c 10 -n 1000 
 'http://localhost:8080/struts2-showcase-2.1.6/showcase.action'
 19/ req/s

 Performance for other pages is also very very poor.

 What am I doing wrong ?

 Is Struts 2 really so horribly slow ?

 Thank you.

 regards
 Daniel

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Dynamic value supplied s:text name in struts 2

2009-06-26 Thread Graham Down
Well I got it resolved.  The rtexprvalue was set to false in the TLD file. 
Once set to true the following worked:


JSP:
%
String productTypeI18nKey = product.type.list. + productType;
%
s:text name=%=productTypeI18nKey%/

Graham
- Original Message - 
From: gd...@jslss.com

To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, June 25, 2009 6:02 PM
Subject: Re: Dynamic value supplied s:text name in struts 2



Correction on this question.

With Struts1 the following would work:


JSP:
%
String productType = [get the productType from the form]
String productTypeI18nKey = product.type.list. + productType;
%
bean:message key=%=productTypeI18nKey%/


With the Struts2, how would I do the same.  I've tried:


JSP:
%
String productTypeI18nKey = product.type.list. + productType;
%
s:text name=%=productTypeI18nKey%/


When I execute the above JSP, I get the following error
According to TLD or attribute directive in tag file, attribute name does
not accept any expressions

How do I supply a dynamic value as a key for the s:text tag?


Thanks in advance,
Graham





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org 




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts Taglibs

2009-06-26 Thread CRANFORD, CHRIS
In our Struts1 implementation, we leveraged various tag libraries such
as:

struts-logic
struts-logic-el
struts-html
struts-html-el
struts-bean
struts-bean-el
struts-nested

When migrating to struts2, are any of these taglibs still available or
have they been replaced with newer components?  

A majority of our taglib use will be with core jstl taglibs such as

c:forEach
c:if
c:choose
c:set 

But we sometimes have uses for the other libraries as well.

Thanks
Chris



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



problem with spring plugin autowiring result tags

2009-06-26 Thread Angel D. Segarra

Specifically I am trying out the JasperReports tutorial, everything works fine 
untile I include the Spring plugin, now it stops working because apparently 
it's trying to autowire the result/ tags. I have no beans declared in Spring 
and the class atribute of the action is pointing to a full class name. 

Any pointers as to what I can do?

Thanks,
Angel 


  

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Performance issues in showcase sample struts 2.1.6 application

2009-06-26 Thread Daniel Guryca
Anybody ?

Daniel

On Fri, Jun 26, 2009 at 5:54 PM, Daniel Gurycadun...@gmail.com wrote:
 I have found that devMode was set to true .. so I changed it to false.

 Now I'm getting something around 140 req/s which is much better but
 still somewhat slow.

 What more can I set to make it run faster ?

 My current settings are listed below:


 struts.mapper.alwaysSelectFullNamespace true
 struts.url.includeParams none
 struts.freemarker.templatesCache false
 struts.dispatcher.parametersWorkaround false
 struts.multipart.maxSize 2097152
 struts.freemarker.mru.max.strong.size 100
 struts.ognl.allowStaticMethodAccess false
 struts.codebehind.defaultPackage person
 struts.serve.static true
 struts.enable.DynamicMethodInvocation true
 struts.serve.static.browserCache false
 struts.tag.altSyntax true
 struts.freemarker.wrapper.altMap true
 struts.multipart.parser jakarta
 struts.i18n.reload false
 actionPackages org.apache.struts2.showcase.person
 struts.objectFactory.spring.autoWire name
 struts.xslt.nocache false
 struts.action.extension action,,
 struts.velocity.configfile velocity.properties
 struts.custom.i18n.resources globalMessages
 allowStaticMethodAccess false
 struts.url.http.port 80
 struts.velocity.contexts
 struts.configuration.xml.reload false
 struts.objectFactory.spring.useClassCache true
 struts.url.https.port 443
 devMode false
 struts.devMode false
 struts.ui.templateDir template
 struts.enable.SlashesInActionNames false
 struts.velocity.toolboxlocation
 struts.objectFactory spring
 struts.freemarker.manager.classname customFreemarkerManager
 struts.ui.templateSuffix ftl
 struts.objectFactory.spring.autoWire.alwaysRespect false
 struts.codebehind.pathPrefix /
 struts.multipart.saveDir
 struts.ui.theme xhtml
 struts.i18n.encoding UTF-8
 struts.freemarker.beanwrapperCache false


 regards
 Daniel

 On Fri, Jun 26, 2009 at 5:35 PM, Daniel Guryca dun...@gmail.com wrote:

 Hi,

 I have just deployed included showcase sample application on to my tomcat 6.

 I'm very amazed how SLOWLY it runs.
 I'm looking for a framework for my company and Struts 2 seems very good to 
 me (I have a previous experience with grails which is good for smaller 
 applications but too unstable and bugy for bigger apps)  but how about 
 the Struts 2 performance ?

 I would expect much much better results (similar simple pages with stripes 
 or even grails almost fly - 700 and more req/s) !!

 I was running these on my dual core a...@2.1 Ghz using apache bench.

 ab -c 10 -n 1000 
 'http://localhost:8080/struts2-showcase-2.1.6/skill/edit.action'
 13 req/s


 ab -c 10 -n 1000 
 'http://localhost:8080/struts2-showcase-2.1.6/showcase.action'
 19/ req/s

 Performance for other pages is also very very poor.

 What am I doing wrong ?

 Is Struts 2 really so horribly slow ?

 Thank you.

 regards
 Daniel


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: cannot download 2.1.7

2009-06-26 Thread Dave Newton

Angel Segarra wrote:
I can't find 2.1.7 anywhere for download, even though the download now 
button says 2.1.7, the main site still has 2.1.6 as the latest release.


Am I missing something?


No, but we are.

Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: How to set a file name using a header in the response?

2009-06-26 Thread Dave Newton

Jim Collings wrote:

%response.setHeader(Content-Disposition, attachment;
filename=\filename_${fromDate}-${toDate}.doc\); %

The above is what I currently  have but I think there is a new way to
do it that doesn't involve using a scriptlet. Also, the fromDate and
toDate items don't work. I've tried quoting them but I'm not sure I
got it right. They are used later on in the document, so I know I am
getting them.


AFAIK you can't use EL inside a scriptlet.

If you're streaming the result back with a stream result set that 
information in the result configuration.


Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Getting undefined error on ajax call

2009-06-26 Thread Dave Newton

Praveen.V.Kumar wrote:

In ftl, I am making ajax call in sx.a tag as shown below.

@s.url id=sort namespace=${parameters.nameSpace} action=Sort
@s.param name=sortBy${tmpSortMethodName?trim}/@s.param
@s.param name=sortTypedesc/@s.param
/@s.url
@sx.a href=${sort} key=${tmpColumnName} targets=content
@s.text name=${tmpColumnName}/img src=@s.url value=/images/sortAsc.gif/ alt=@s.text 
name=app.sortBy/: @s.text name=${tmpColumnName}/
title=@s.text name=app.sortBy/: @s.text name=${tmpColumnName}/ class=arrowWhite 
align=texttop/
/@sx.a

I have added %@ taglib prefix=sx uri=/struts-dojo-tags %
and   sx:head debug=true cache=false compressed=false /


You're adding that to what? A Freemarker page? That's JSP 
syntax--meaningless to Freemarker.


http://struts.apache.org/2.x/docs/freemarker.html

Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Struts Taglibs

2009-06-26 Thread Dave Newton

CRANFORD, CHRIS wrote:

In our Struts1 implementation, we leveraged various tag libraries such
as:

struts-logic
struts-logic-el
struts-html
struts-html-el
struts-bean
struts-bean-el
struts-nested

When migrating to struts2, are any of these taglibs still available or
have they been replaced with newer components?  


http://struts.apache.org/2.x/docs/tag-reference.html

Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: problem with spring plugin autowiring result tags

2009-06-26 Thread Dave Newton

Angel D. Segarra wrote:
Specifically I am trying out the JasperReports tutorial, everything works fine untile I include the Spring plugin, now it stops working because apparently it's trying to autowire the result/ tags. I have no beans declared in Spring and the class atribute of the action is pointing to a full class name. 


Any pointers as to what I can do?


You could post the configuration that's causing the problem, and tell us 
what version of Struts you're using. I'm using S2/Spring/JR with no issues.


Dave

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: problem with spring plugin autowiring result tags

2009-06-26 Thread Angel D. Segarra

Thanks for the reply.

My bad, I do have a bean defined, missed since I have my contexts separated. I 
have bean with id 'dataSource' in spring and it's trying to autowire it into 
the dataSource of the JR result. I suppose this is expected but I was confused 
as to what gets auto wired or not, I changed the bean id in Spring and now it's 
using the value I supplied to the result. 


Is there a way to avoid wiring for anything other than actions? 

Thanks,
Angel

--- On Fri, 6/26/09, Dave Newton newton.d...@yahoo.com wrote:

 From: Dave Newton newton.d...@yahoo.com
 Subject: Re: problem with spring plugin autowiring result tags
 To: Struts Users Mailing List user@struts.apache.org
 Date: Friday, June 26, 2009, 5:18 PM
 Angel D. Segarra wrote:
  Specifically I am trying out the JasperReports
 tutorial, everything works fine untile I include the Spring
 plugin, now it stops working because apparently it's trying
 to autowire the result/ tags. I have no beans
 declared in Spring and the class atribute of the action is
 pointing to a full class name. 
  Any pointers as to what I can do?
 
 You could post the configuration that's causing the
 problem, and tell us what version of Struts you're using.
 I'm using S2/Spring/JR with no issues.
 
 Dave
 
 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org
 
 


  

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Performance issues in showcase sample struts 2.1.6 application

2009-06-26 Thread Musachy Barroso
You might want to start here:
http://struts.apache.org/2.x/docs/performance-tuning.html

musachy

On Fri, Jun 26, 2009 at 12:57 PM, Daniel Gurycadun...@gmail.com wrote:
 Anybody ?

 Daniel

 On Fri, Jun 26, 2009 at 5:54 PM, Daniel Gurycadun...@gmail.com wrote:
 I have found that devMode was set to true .. so I changed it to false.

 Now I'm getting something around 140 req/s which is much better but
 still somewhat slow.

 What more can I set to make it run faster ?

 My current settings are listed below:


 struts.mapper.alwaysSelectFullNamespace true
 struts.url.includeParams none
 struts.freemarker.templatesCache false
 struts.dispatcher.parametersWorkaround false
 struts.multipart.maxSize 2097152
 struts.freemarker.mru.max.strong.size 100
 struts.ognl.allowStaticMethodAccess false
 struts.codebehind.defaultPackage person
 struts.serve.static true
 struts.enable.DynamicMethodInvocation true
 struts.serve.static.browserCache false
 struts.tag.altSyntax true
 struts.freemarker.wrapper.altMap true
 struts.multipart.parser jakarta
 struts.i18n.reload false
 actionPackages org.apache.struts2.showcase.person
 struts.objectFactory.spring.autoWire name
 struts.xslt.nocache false
 struts.action.extension action,,
 struts.velocity.configfile velocity.properties
 struts.custom.i18n.resources globalMessages
 allowStaticMethodAccess false
 struts.url.http.port 80
 struts.velocity.contexts
 struts.configuration.xml.reload false
 struts.objectFactory.spring.useClassCache true
 struts.url.https.port 443
 devMode false
 struts.devMode false
 struts.ui.templateDir template
 struts.enable.SlashesInActionNames false
 struts.velocity.toolboxlocation
 struts.objectFactory spring
 struts.freemarker.manager.classname customFreemarkerManager
 struts.ui.templateSuffix ftl
 struts.objectFactory.spring.autoWire.alwaysRespect false
 struts.codebehind.pathPrefix /
 struts.multipart.saveDir
 struts.ui.theme xhtml
 struts.i18n.encoding UTF-8
 struts.freemarker.beanwrapperCache false


 regards
 Daniel

 On Fri, Jun 26, 2009 at 5:35 PM, Daniel Guryca dun...@gmail.com wrote:

 Hi,

 I have just deployed included showcase sample application on to my tomcat 6.

 I'm very amazed how SLOWLY it runs.
 I'm looking for a framework for my company and Struts 2 seems very good to 
 me (I have a previous experience with grails which is good for smaller 
 applications but too unstable and bugy for bigger apps)  but how about 
 the Struts 2 performance ?

 I would expect much much better results (similar simple pages with stripes 
 or even grails almost fly - 700 and more req/s) !!

 I was running these on my dual core a...@2.1 Ghz using apache bench.

 ab -c 10 -n 1000 
 'http://localhost:8080/struts2-showcase-2.1.6/skill/edit.action'
 13 req/s


 ab -c 10 -n 1000 
 'http://localhost:8080/struts2-showcase-2.1.6/showcase.action'
 19/ req/s

 Performance for other pages is also very very poor.

 What am I doing wrong ?

 Is Struts 2 really so horribly slow ?

 Thank you.

 regards
 Daniel


 -
 To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
 For additional commands, e-mail: user-h...@struts.apache.org





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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Error when deploying portlets beside a normal Struts2 web app?

2009-06-26 Thread phillips1021

Nils-H

Thank you for fixing this issue so quickly.

I was able to check out from subversion the Struts 2 trunk using

   svn checkout http://svn.apache.org/repos/asf/struts/struts2/trunk 

The struts2-core 2.1.8-SNAPSHOT was created by mvn install just fine.

However I got the following error when doing the mvn install on the
struts2-portlet-plugin

[ERROR] BUILD FAILURE
[INFO]

[INFO] Compilation failure
C:\struts2\trunk\plugins\portlet\src\main\java\org\apache\struts2\portlet\servle
t\PortletServletContext.java:[42,7]
org.apache.struts2.portlet.servlet.PortletSe
rvletContext is not abstract and does not override abstract method
getContextPat
h() in javax.servlet.ServletContext


C:\struts2\trunk\plugins\portlet\src\main\java\org\apache\struts2\portlet\servle
t\PortletServletContext.java:[42,7]
org.apache.struts2.portlet.servlet.PortletSe
rvletContext is not abstract and does not override abstract method
getContextPat
h() in javax.servlet.ServletContext


So I could not build and install the 2.1.8-SNAPSHOT of the
struts2-portlet-plugin.

Bruce

It should be fixed now in trunk. Let me now if it works or not.

Nils-H



-- 
View this message in context: 
http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p24227671.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Error when deploying portlets beside a normal Struts2 web app?

2009-06-26 Thread phillips1021

Nils-H

  Ignore my previous reply.  I was able to get the struts2-portlet-plugin
2.1.8-SNAPSHOT to build successfully and install into my local maven
repository.

  I tested the 2.1.8-SNAPSHOT in my example applications and everything
worked very well.

  Thanks again.  We look forward to the 2.1.8 release.


-- 
View this message in context: 
http://www.nabble.com/Error-when-deploying-portlets-beside-a-normal-Struts2-web-app--tp23981728p24228017.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org