Does ActionForward preserve the request?
I'm using Struts 1. In my execute method, I have a clause that looks like String path = new String("/appGroupsAdmin.do?addAppGroup=Add+New+Group&submitted=submitted&task=add&appName=" + URLEncoder.encode(appName)); return new ActionForward(path); I want the query string variables to be the only request parameters set upon forwarding. Does that necessarily happen? If not, how can I make it so? Thanks, - Dave -- View this message in context: http://www.nabble.com/Does-ActionForward-preserve-the-request--tp21608479p21608479.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
How do I add a paramter to the request and forward?
Hi, I'm using Struts 2. I am fairly new to Struts and wondered how I would set this up. What I want to do is when someone types in "mydomain.com/context_path/flow.do", something on the server side catches the request, and a parameter with name="token", value="123" to the request, and then forwards the request to "/jsp/start.jsp". How do I do this using the struts framework? Thanks, - Dave -- View this message in context: http://www.nabble.com/How-do-I-add-a-paramter-to-the-request-and-forward--tp22082233p22082233.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
Trouble with an action mapping
Hi, I'm using Struts 2. I have this action-mapping ... I first visit my page, http://localhost:7005/re/jsp/pcAccountLookup.jsp, which submits a form to "/re/pcFlow.do". Unfortunately, this is when I get a 404 error. What is wrong with the above or what steps can I take to troubleshoot this error? Thanks, - Dave -- View this message in context: http://www.nabble.com/Trouble-with-an-action-mapping-tp22234833p22234833.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
Struts 2 question about validation and forwarding
Hi, If request validation fails, how can I forward the user to a different page than that from which they came? The scenario is that an external web site is going to invoke our site with something like "/ourForm.do?param1=xxx¶m2=" and if their parameters are not valid, we want to forward them to another page on our site. Thanks for your help, - Dave -- View this message in context: http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250708.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: Struts 2 question about validation and forwarding
But it seems like the "ActionErrors validate" method from my ActionForm class is called, fails, and my execute handler is not called. Is there a way in the struts-config.xml file that I can set up a foward upon validation failure? This is what my struts action is currently ... - Dave Jim Kiley wrote: > > Just have the result of the input() method return them to a different page > under that condition. > > On Fri, Feb 27, 2009 at 12:41 PM, laredotornado > wrote: > >> >> Hi, >> >> If request validation fails, how can I forward the user to a different >> page >> than that from which they came? The scenario is that an external web >> site >> is going to invoke our site with something like >> "/ourForm.do?param1=xxx¶m2=" and if their parameters are not >> valid, >> we want to forward them to another page on our site. >> >> Thanks for your help, - Dave >> >> -- >> View this message in context: >> http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250708.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 >> >> > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > > -- View this message in context: http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250852.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: Struts 2 question about validation and forwarding
Hi, I only want to forward if validation fails -- i.e. don't need to run the "execute" method. But I don't know how to set that up in my struts-config.xml file (or some other file if that's what's needed). How do I do that? Or is the only way to do this is as David Newton suggested -- moving validation into my execute method and forwarding appropriately. Thanks, - Dave Burton Rhodes wrote: > > Exactly. If validation fails, execute will not be called by design. > Since all you want to do is forward, you shouldn't need to run your > execute method. The forwarding will take place in your struts.xml file > as previously suggested. > > If you need to execute code regardless of the validation, look into > the prepare method. > > On 2/27/09, laredotornado wrote: >> >> But it seems like the "ActionErrors validate" method from my ActionForm >> class >> is called, fails, and my execute handler is not called. Is there a way >> in >> the struts-config.xml file that I can set up a foward upon validation >> failure? >> >> This is what my struts action is currently ... >> >> > type="com.myco.regui.struts.accounts.AccountsAction" >> scope="request" >> name="REAccountLookUpBean" >> validate="true"> >> >> >> - Dave >> >> >> Jim Kiley wrote: >>> >>> Just have the result of the input() method return them to a different >>> page >>> under that condition. >>> >>> On Fri, Feb 27, 2009 at 12:41 PM, laredotornado >>> wrote: >>> >>>> >>>> Hi, >>>> >>>> If request validation fails, how can I forward the user to a different >>>> page >>>> than that from which they came? The scenario is that an external web >>>> site >>>> is going to invoke our site with something like >>>> "/ourForm.do?param1=xxx¶m2=" and if their parameters are not >>>> valid, >>>> we want to forward them to another page on our site. >>>> >>>> Thanks for your help, - Dave >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250708.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 >>>> >>>> >>> >>> >>> -- >>> Jim Kiley >>> Technical Consultant | Summa >>> [p] 412.258.3346 [m] 412.445.1729 >>> http://www.summa-tech.com >>> >>> >> >> -- >> View this message in context: >> http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22250852.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 >> >> > > -- > Sent from my mobile device > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Struts-2-question-about-validation-and-forwarding-tp22250708p22289465.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
Struts 1: Why is ActionServlet unavailable?
Hi, I'm using Struts 1 with Weblogic 9.2.2 (Java 1.5), running on my local Win XP machine. I'm getting this error when trying to deploy my WAR in my Weblogic logs ... <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1236353508999> at org.apache.struts.action.ActionServlet.init(ActionServlet.java:368) at javax.servlet.GenericServlet.init(GenericServlet.java:256) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:278) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:507) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1715) at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1692) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1612) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2750) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:889) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:333) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:26) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:154) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80) at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:181) at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:358) at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:52) at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:186) at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30) at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233) at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169) at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123) at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173) at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89) at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) I have no idea what this means, how to correct, or what extra information I can give you to help me troubleshoot. Any thoughts are appreciated, - Dave -- View this message in context: http://www.nabble.com/Struts-1%3A-Why-is-ActionServlet-unavailable--tp22375179p22375179.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
How can I tell if Struts is finding my messages file?
Hi, I'm using Struts 1. In my ActionForm's validate method, I have a section of code ... final ActionMessage am = new ActionMessage("error.accountNum.wrong.length"); errors.add(ACCOUNT_NUM_PARAM_NAME,am); My question is how can I verify that the property "error.accountNum.wrong.length" is found in my message resource file? Is there a way I can get the value of the property, "error.accountNum.wrong.length" within my validate method? Thanks, - Dave -- View this message in context: http://www.nabble.com/How-can-I-tell-if-Struts-is-finding-my-messages-file--tp22481715p22481715.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
How do I execute this action servlet on startup?
Hi, I'm using Struts 1.3 on WebLogic 9.2.2. I have this defined in my struts-config.xml file: This servlet takes no parameters. How do I get this to run upon application startup? Thanks, - Dave -- View this message in context: http://www.nabble.com/How-do-I-execute-this-action-servlet-on-startup--tp22828237p22828237.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: How do I execute this action servlet on startup?
Hi, I'm looking into this plug-in idea, and although it forces you to define an "init" method, it is not a servlet so how do you call it's init method upon application startup? - Dave Nils-Helge Garli wrote: > > Maybe you can achieve what you want with a PlugIn: > http://struts.apache.org/1.3.10/userGuide/building_controller.html#plugin_classes > > Nils-H > > On Wed, Apr 1, 2009 at 4:49 PM, laredotornado > wrote: >> >> Hi, >> >> I'm using Struts 1.3 on WebLogic 9.2.2. I have this defined in my >> struts-config.xml file: >> >> > type="com.myco.regui.struts.refresh.RefreshAction" >> scope="request" >> validate="false"> >> >> >> This servlet takes no parameters. How do I get this to run upon >> application >> startup? >> >> Thanks, - Dave >> -- >> View this message in context: >> http://www.nabble.com/How-do-I-execute-this-action-servlet-on-startup--tp22828237p22828237.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 > > > -- View this message in context: http://www.nabble.com/How-do-I-execute-this-action-servlet-on-startup--tp22828237p22856368.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: How do I execute this action servlet on startup?
Turns out you don't have to add anything to your web.xml file since Struts automatically loads all elements upon startup and invokes their "init" methods. So problem has been solved. Thanks to all, - Antonio Petrelli-3 wrote: > > 2009/4/2 laredotornado : >> I'm looking into this plug-in idea, and although it forces you to define >> an >> "init" method, it is not a servlet so how do you call it's init method >> upon >> application startup? > > Specify the "load-on-startup" element: > http://edocs.bea.com/wls/docs61/webapp/web_xml.html#1016508 > > Antonio > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/How-do-I-execute-this-action-servlet-on-startup--tp22828237p22857721.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
Making two URLs map to the same action
Hi, I'm using Struts 1.3 with WebLogic 9.2.2. I would like my URL http://mydomain.com/context-path/refresh to do the same thing, or at least point to the same place that http://mydomain.com/context-path/refresh.do goes. How can I set this up? Thanks, - Dave -- View this message in context: http://www.nabble.com/Making-two-URLs-map-to-the-same-action-tp22874227p22874227.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
How do I turn off debug statements when using MockStrutsTestCase with JUnit?
Hi, I'm using the latest version of MockStrutsTestCase to test my Struts 1.3 application. I'm using Ant 1.6. I have Ant Junit tasks that look like ... but when I run my test case, my result outfile contains all these lines like: DEBUG [main] (Digester.java:1436) - New match='web-app/servlet/init-param' I think this might have something to do with MockStrutsTestCase. Anyone know how to turn debugging off? Thanks, - Dave -- View this message in context: http://www.nabble.com/How-do-I-turn-off-debug-statements-when-using-MockStrutsTestCase-with-JUnit--tp23339681p23339681.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
struts 2 -- The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter.
Hi, I'm trying to migrate my app from struts 1 to struts 2. On a particular JSP page, I get this error The page generated an error: Exception: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location] I can't find anything in my server error log files. Below is my web.xml and struts.xml files. Any ideas how I can troubleshoot this? Thanks, - Dave ===Begin web.xml == http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> TransactionFilter com.myco.regui.servlets.filters.TransactionFilter TransactionFilter /* struts-filter org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter stuts-filter /* 65 index.html End web.xml == ===Begin struts.xml = http://struts.apache.org/dtds/struts-2.0.dtd";> jsp/pcredirect.jsp jsp/pcAccountLookupError.jsp jsp/hhredirect.jsp jsp/hhError.jsp jsp/pcAccountLookup.jsp End struts.xml== -- View this message in context: http://www.nabble.com/struts-2The-Struts-dispatcher-cannot-be-found.-This-is-usually-caused-by-using-Struts-tags-without-the-associated-filter.-tp24150745p24150745.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: struts 2 -- The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter.
Regarding ... > Also, is there any reason why you are changing the interceptor stack? You don't have validation and workflow, which seems a bit odd... I do want to validate requests submitted to "pcFlow.do" (the action). I thought interceptors were the way to do it. My interceptor class is called "AccountsInterceptor". What is the proper way? All the tutorials suggest you have to create a custom interceptor stack. Thanks, - Dave Wes Wannemacher wrote: > > Are you accessing a JSP page with struts tags in it by going directly > to the JSP ? For instance, you should be hitting a URL similar to the > following (based on the config you sent) - > > http://yourserver:8080/contextRoot/pcFlow.action > > Then, depending on what the return value of > com.myco.regui.struts.accounts.AccountsAction.execute(), you will see > one of the JSPs you mapped as results. > > Also, is there any reason why you are changing the interceptor stack? > You don't have validation and workflow, which seems a bit odd... > > -Wes > > On Mon, Jun 22, 2009 at 12:27 PM, laredotornado > wrote: >> >> Hi, >> >> I'm trying to migrate my app from struts 1 to struts 2. On a particular >> JSP >> page, I get this error >> >> The page generated an error: Exception: >> The Struts dispatcher cannot be found. This is usually caused by using >> Struts tags without the associated filter. Struts tags are only usable >> when >> the request has passed through its servlet filter, which initializes the >> Struts dispatcher needed for this tag. - [unknown location] >> >> I can't find anything in my server error log files. Below is my web.xml >> and >> struts.xml files. Any ideas how I can troubleshoot this? Thanks, - Dave >> >> ===Begin web.xml == >> >> >> http://java.sun.com/xml/ns/j2ee"; >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; >> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; >> version="2.4"> >> >> >> TransactionFilter >> >> com.myco.regui.servlets.filters.TransactionFilter >> >> >> TransactionFilter >> /* >> >> >> >> struts-filter >> >> >> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter >> >> >> >> stuts-filter >> /* >> >> >> >> 65 >> >> >> >> index.html >> >> >> >> >> End web.xml == >> >> ===Begin struts.xml = >> >> > "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" >> "http://struts.apache.org/dtds/struts-2.0.dtd";> >> >> >> >> > /> >> >> >> >> >> >> >> >> > class="com.myco.regui.struts.accounts.AccountsInterceptor"> >> > name="AccountsInterceptorStack"> >> >> >> >> >> >> >> > name="SimpleInterceptor"> >> >> >> > name="AccountsInterceptorStack"> >> >> >> > class="com.myco.regui.struts.accounts.AccountsAction"> >> jsp/pcredirect.jsp >> > name="failure">jsp/pcAccountLookupError.jsp >> >> >> > class="com.myco.regui.struts.accounts.AccountsAction"> >> jsp/hhredirect.jsp >> jsp/hhError.jsp >> >> >> > class="com.myco.regui.struts.logout.LogoutAction"> >> jsp/pcAccountLookup.jsp >> >> >> >> >> End struts.xml== >> -- >> View this message in context: >> http://www.nabble.com/struts-2The-Struts-dispatcher-cannot-be-found.-This-is-usually-caused-by-using
What is Struts 2 equivalent of PlugIn?
Hi, I'm migrating my app from struts 1 to Struts 2. In my Struts 1 app, I had this class ... public class RefreshAction extends Action implements PlugIn { ... } and this in my struts-config.xml file ... So how do I convert this to Struts 2? There doesn't seem to be a support for "plug-in". My goal is to develop an action class that I can also invoke automatically upon application startup. Thanks, - Dave -- View this message in context: http://www.nabble.com/What-is-Struts-2-equivalent-of-PlugIn--tp24167571p24167571.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
Blocked trying to get lock: org.apache.log4j.spi.RootLogger
Hi, We are using WebLogic 9.2.2 with Java 1.5. The application is written using Struts 1.3 and log4j 1.2.15. We found a number of errors that looked like below in our managed server's .out file. Any ideas what might be a cause or how to troubleshoot further? Our sys admin sadly did not preserve a thread dump: <[STUCK] ExecuteThread: '148' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "604" seconds working on the request "Http Request: /myapp/hhFlow.do", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace: Thread-135888 "[STUCK] ExecuteThread: '148' for queue: 'weblogic.kernel.Default (self-tuning)'" { -- Blocked trying to get lock: org.apache.log4j.spi.rootlog...@151f325[fat lock] org.apache.log4j.Category.callAppenders(Category.java:188) org.apache.log4j.Category.forcedLog(Category.java:379) org.apache.log4j.Category.log(Category.java:840) org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:109) org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176) org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:303) org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176) org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:272) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1903) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) javax.servlet.http.HttpServlet.service(HttpServlet.java:736) javax.servlet.http.HttpServlet.service(HttpServlet.java:851) weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224) weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108) weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:198) weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41) com.myco.regui.servlets.filters.TransactionFilter.doFilter(TransactionFilter.java:23) weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41) weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201) weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:308) weblogic.security.service.SecurityManager.runAs(SecurityManager.java:117) weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1938) weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1860) weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1327) weblogic.work.ExecuteThread.execute(ExecuteThread.java:206) weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Thanks for any feedback, - Dave -- View this message in context: http://www.nabble.com/Blocked-trying-to-get-lock%3A-org.apache.log4j.spi.RootLogger-tp24293804p24293804.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: Blocked trying to get lock: org.apache.log4j.spi.RootLogger
Here is my contribution to the good of humanity. The below problem went away when we increased the number of file descriptors available to our WebLogic managic server process from 1024 to 65K. - Dave laredotornado wrote: > > Hi, We are using WebLogic 9.2.2 with Java 1.5. The application is written > using Struts 1.3 and log4j 1.2.15. We found a number of errors that > looked like below in our managed server's .out file. Any ideas what might > be a cause or how to troubleshoot further? Our sys admin sadly did not > preserve a thread dump: > > > <[STUCK] ExecuteThread: '148' for queue: 'weblogic.kernel.Default > (self-tuning)' has been busy for "604" seconds working on the request > "Http Request: /myapp/hhFlow.do", which is more than the configured time > (StuckThreadMaxTime) of "600" seconds. Stack trace: > Thread-135888 "[STUCK] ExecuteThread: '148' for queue: > 'weblogic.kernel.Default (self-tuning)'" blocked, priority=1, DAEMON> { > -- Blocked trying to get lock: > org.apache.log4j.spi.rootlog...@151f325[fat lock] > org.apache.log4j.Category.callAppenders(Category.java:188) > org.apache.log4j.Category.forcedLog(Category.java:379) > org.apache.log4j.Category.log(Category.java:840) > > org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:109) > > org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48) > org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176) > > org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:303) > org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176) > > org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:272) > > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1903) > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) > javax.servlet.http.HttpServlet.service(HttpServlet.java:736) > javax.servlet.http.HttpServlet.service(HttpServlet.java:851) > > weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224) > > weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108) > > weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:198) > weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) > > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41) > > com.myco.regui.servlets.filters.TransactionFilter.doFilter(TransactionFilter.java:23) > > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41) > > weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3201) > > weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:308) > > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:117) > > weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1938) > > weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1860) > > weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1327) > weblogic.work.ExecuteThread.execute(ExecuteThread.java:206) > weblogic.work.ExecuteThread.run(ExecuteThread.java:173) > > Thanks for any feedback, - Dave > -- View this message in context: http://www.nabble.com/Blocked-trying-to-get-lock%3A-org.apache.log4j.spi.RootLogger-tp24293804p24535802.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
Cleaner way to create this page?
Hi, I'm using Struts 1.3. I have this in my JSP page ... <% final RoutingEnginePropertiesMgr rePropMgr = RoutingEnginePropertiesMgr.getInstance(); if (rePropMgr.isUseCaptcha()) { %> https://api-secure.recaptcha.net/challenge?k=<%= rePropMgr.getCaptchaPublicKey() %>"> <% } // if %> Is there a cleaner way to write this that avoids using scriptlets? Thanks for any advice, - Dave -- View this message in context: http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683147p24683147.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: Cleaner way to create this page?
A couple of things ... 1. Struts tag libraries wouldn't apply here, right? I'm trying to do some conditional if logic and I don't see which of the Struts libraries would fit. I'm using Struts 1.3. 2. You mention to put this, "<%= rePropMgr.getCaptchaPublicKey() %>" in the ActionForm, but I need this output to the client side because the script src requires that information. Knowing that, any other advice there? Thanks , - Dave Kawczynski, David wrote: > > Write a taglib or put a getCaptchaPublicKey() method in the > ActionForm, and use struts taglibs. > >> -Original Message- >> From: laredotornado [mailto:laredotorn...@gmail.com] >> Sent: Monday, July 27, 2009 11:51 AM >> To: user@struts.apache.org >> Subject: Cleaner way to create this page? >> >> >> Hi, >> >> I'm using Struts 1.3. I have this in my JSP page ... >> >> <% >> final RoutingEnginePropertiesMgr rePropMgr = >> RoutingEnginePropertiesMgr.getInstance(); >> if (rePropMgr.isUseCaptcha()) { >> %> >> > src="<a rel="nofollow" href="https://api-secure.recaptcha.net/challenge?k=">https://api-secure.recaptcha.net/challenge?k=</a><%= >> rePropMgr.getCaptchaPublicKey() %>"> >> <% >> } // if >> %> >> >> Is there a cleaner way to write this that avoids using scriptlets? >> >> Thanks for any advice, - Dave >> -- >> View this message in context: >> http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683 > 147p24683147.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 >> >> > Notice: This e-mail message, together with any attachments, contains > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, > New Jersey, USA 08889), and/or its affiliates (which may be known > outside the United States as Merck Frosst, Merck Sharp & Dohme or > MSD and in Japan, as Banyu - direct contact information for affiliates is > available at http://www.merck.com/contact/contacts.html) that may be > confidential, proprietary copyrighted and/or legally privileged. It is > intended solely for the use of the individual or entity named on this > message. If you are not the intended recipient, and have received this > message in error, please notify us immediately by reply e-mail and > then delete it from your system. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Cleaner-way-to-create-this-page--tp24683147p24683970.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
Struts date tag?
Hi, Using pre-Struts 2, is there a tag that will create a date (month, day, and year)? What would I need to do in the ActionForm? In other words, it seems like the ActionForm can only deal with String and boolean member fields. Thanks, - Dave -- View this message in context: http://www.nabble.com/Struts-date-tag--tp19171360p19171360.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is the struts way to create a navigation menu?
Hi, Using pre-Struts 2, what is the preferred method of creating a navigation menu? I have something that looks like this -- http://screencast.com/t/xmVBY9Te and the desire is that as I click on each nav item it takes me to my page of choice while styling the current menu selection differently. Thanks, - Dave -- View this message in context: http://www.nabble.com/What-is-the-struts-way-to-create-a-navigation-menu--tp19188594p19188594.html 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: Struts date tag?
Hi, I am asking if there is a tag which will create separate HTML form inputs for month, day and year. Thanks, - Dave Laurie Harper wrote: > > laredotornado wrote: >> Hi, >> >> Using pre-Struts 2, is there a tag that will create a date (month, day, >> and >> year)? What would I need to do in the ActionForm? In other words, it >> seems > > I'm not sure I understand; are you asking if there is a tag which will > create separate HTML form inputs for month, day and year? Or just > whether there is a tag which will allow editing of an action form > property of type Date? > >> like the ActionForm can only deal with String and boolean member fields. > > For Struts 1, the ActionForm fields should generally be just boolean, > String or collections (arrays/lists) of same, so that erroneous user > input can be preserved and re-displayed for correction. It's up to you > to handle type conversion from bool/string in the ActionForm to whatever > your model or business objects expect. You *can* use other data types, > but that generally leads to more problems than it solves. > > L. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Struts-date-tag--tp19171360p19189269.html 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: What is the struts way to create a navigation menu?
Fair enough. Here's how I'm doing it now. Definitely interested in any thoughts for cleaning up this mess, optimizing and using Struts 1 to the fullest. The variable "allowedTasks" is a Vector of Strings representing what the user can do within the app. -1 ? "menuLinkSelected" : "menuLink" %>" href="<%=request.getContextPath()%>/jsp/main.jsp"/> <% if(allowedTasks!=null && allowedTasks.contains(IMConstants.taskAdmin) || allowedTasks.contains(IMConstants.taskManageApps)) { %> -1 ? "menuLinkSelected" : "menuLink" %>" href="<%=request.getContextPath()%>/applicationsAdmin.do"/> <% } if(allowedTasks!=null && allowedTasks.contains(IMConstants.taskAdmin) || allowedTasks.contains(IMConstants.taskManageRoles)) { %> -1 ? "menuLinkSelected" : "menuLink" %>" href="<%=request.getContextPath()%>/rolesAdmin.do"/> <% } if(allowedTasks!=null && allowedTasks.contains(IMConstants.taskAdmin) || allowedTasks.contains(IMConstants.taskManageGroups)) { %> -1 ? "menuLinkSelected" : "menuLink" %>" href="<%=request.getContextPath()%>/appGroupsAdmin.do"/> <% } %> - Dave laredotornado wrote: > > Hi, > > Using pre-Struts 2, what is the preferred method of creating a navigation > menu? I have something that looks like this -- > http://screencast.com/t/xmVBY9Te and the desire is that as I click on each > nav item it takes me to my page of choice while styling the current menu > selection differently. > > Thanks, - Dave > -- View this message in context: http://www.nabble.com/What-is-the-struts-way-to-create-a-navigation-menu--tp19188594p19190159.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I create a conditionally disabled button?
Hi, I'm using Struts 1. I'm trying to clean up some code and make it into a proper Struts form. How do I create a button whose disabled attribute is set to true or false depending on a certain condition on my page? (The condition is if the variable "endCount" is less than the variable "maxCount") Right now I have <% } if(endCount "> <% } else { %> "> <% } %> Thanks, - Dave -- View this message in context: http://www.nabble.com/How-do-I-create-a-conditionally-disabled-button--tp19205159p19205159.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Loading message resources properties from a database
Hi, I'm using Struts 1. We want to load our message resources properties, currently defined in our struts-config.xml file: from a database. Now of course, they are in a file called "MessageResources.properties". What is the proper way to do this? Thanks, - Dave -- View this message in context: http://www.nabble.com/Loading-message-resources-properties-from-a-database-tp19290916p19290916.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Why doesn't struts evaluate the Java code?
Hi, I'm using Struts 1.1 on WebLogic 9.2.2. I have this tag " size="20" maxlength="50" readonly="<%= exists %>" /> but when my JSP is rendered, the expression, "<%= (newUser != null ? newUser.getNewName() : "") %>" actually appears in the browser. Anyone know how to make the actual value of the expression appear? oddly, if I have everything renders fine. - Dave -- View this message in context: http://www.nabble.com/Why-doesn%27t-struts-evaluate-the-Java-code--tp20505588p20505588.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How do I generate an ID attribute with my text field
Hi, I have this hidden field which is causing me compilation errors because "forceId" is not recognized as an attribute. How do I create a struts hidden field so that an ID is generated in addition to the name attribute? Thanks, - Dave -- View this message in context: http://www.nabble.com/How-do-I-generate-an-ID-attribute-with-my-text-field-tp20545762p20545762.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What is the Struts way to construct this menu?
Hi, I have a single select menu on my search page. What is the struts way to construct this menu such that when the user is redirected to this search page, the menu is pre-selected with what they selected from the original search? Thanks, - Dave Exactly Matches Contains Starts With Ends With -- View this message in context: http://www.nabble.com/What-is-the-Struts-way-to-construct-this-menu--tp20797547p20797547.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Invalid path was requested
Hi, I'm using Struts 1 and trying to figure out the mysterious world of forwarding. I have String path = new String("/npsim/appGroupsAdmin.do?addAppGroup=Add+New+Group&submitted=submit&task=add&appName=" + URLEncoder.encode(appName)); return new ActionForward(path); but when this code is invoked, I get the error "Invalid path was requested". I can cut and paste the above (substituting in the appropriate variable for "appName") and it will come up in my browser. What am I doing wrong here? Thanks, - Dave -- View this message in context: http://www.nabble.com/Invalid-path-was-requested-tp21020377p21020377.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: Invalid path was requested
Thanks for your example. It helped me realize that when I edited my path so that it was relative to the context path of my app, instead of cutting and pasting everything after the domain, everything worked just fine. - Dave Paweł Wielgus wrote: > > Hi Dave, > i have almost the same code and it works, > > ActionForward forward = new > ActionForward("/remoteAccess.do?server=irqpa&entry=potentialCost" > + "&idExtraCostType=" + ExtraCostType.MEDICAL_TEST.getOrdinal()); > return forward; > > But i also have such one: > ActionForward forward = new ActionForward(); > > forward.setPath("/temp/representative/request/"+representativeForm.getActionTarget()+"/view.do"); > forward.setContextRelative(originalForward.getContextRelative()); > forward.setName(originalForward.getName()); > forward.setRedirect(originalForward.getRedirect()); > return forward; > > But i use some ancient s1 version. > > So firstly You can try without URLEncoder.encode(appName), > then you can add printing constructed string and pasting it into browser, > maybe some typo? > > Best greetings, > Paweł Wielgus. > > > 2008/12/15 laredotornado : >> >> Hi, >> >> I'm using Struts 1 and trying to figure out the mysterious world of >> forwarding. I have >> >>String path = new >> String("/npsim/appGroupsAdmin.do?addAppGroup=Add+New+Group&submitted=submit&task=add&appName=" >> + URLEncoder.encode(appName)); >>return new ActionForward(path); >> >> but when this code is invoked, I get the error "Invalid path was >> requested". >> I can cut and paste the above (substituting in the appropriate variable >> for >> "appName") and it will come up in my browser. What am I doing wrong >> here? >> >> Thanks, - Dave >> -- >> View this message in context: >> http://www.nabble.com/Invalid-path-was-requested-tp21020377p21020377.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 >> >> > > -- View this message in context: http://www.nabble.com/Invalid-path-was-requested-tp21020377p21043835.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