Re: struts2-dojo-plugin problem
I though the examples at http://struts.apache.org/2.0.11.2/docs/ajax-and-javascript-recipes.html would be helpful and didn't want to use all of struts 2.1 until the final release. I'm pretty sure I read somewhere that it was being done... > Why are you trying to do this? > L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/struts2-dojo-plugin-problem-tp19554587p19565198.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 2: How can we save the parameters if we do redirect and not redirect-action
I ended up solving a similiar problem using an Interceptor and saving the parameter Map to the session. session.setAttribute("input_params", request.getParameterMap(); Then in my action I implemented SessionAware and utililized BeanUtils from Jakarta Commons to re-populate the properties in my action class. this.setRequestMap((Map)this.getSession().get("input_parms")); BeanUtils.populate(this, this.getRequestMap(); Hope this helps. srinivasch wrote: > > Hi, > >My issue goes like this, I have a summary page which comes for a search > result, and the user clicks to see summary of any record from the result. > So all the search parameters are existing in the URL. And when we further > hit edit link of the summary record, and again when the user hits cancel > or save, the URL parameters which were forwarded to the summary page wont > exist. I would like to retain the parameters. Appreciate your quick > response > > Here is the snippet of my struts config how I used the result > > > /view.action?linID=${linID} > > -- View this message in context: http://www.nabble.com/Struts-2%3A-How-can-we-save-the-parameters-if-we-do-redirect-and-not-redirect-action-tp19557514p19557768.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]
struts2-dojo-plugin problem
Any idea how to get the struts2-dojo-plugin-2.1.2 with struts 2.0.11? I've tried to put the before the in the struts-dojo-tags.tld with no luck. I'm running resin 3.0. I feel like an idiot. Thanks for any help you can give. ERROR: jar:file:/usr/lib/resin/webapps/hol/WEB-INF/lib/struts2-dojo-plugin-2.1.2.jar!/META-INF/struts-dojo-tags.tld:6: is an unexpected tag (parent starts at 2). Check for duplicate and out-of-order tags. syntax: (@version, @xsi:schemaLocation?, *, ?, ?, , , ?, ?, *, *, *, *, *) -- View this message in context: http://www.nabble.com/struts2-dojo-plugin-problem-tp19554587p19554587.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]
execAndWait delay issue
If I don't use a delay the wait.jsp is displayed on my input and success results. Because I don't want to display the wait.jsp on my input result I'm using a delay. If I use a delay (any length of time) the wait.jsp never displays. Any ideas would be appreciated! Thank you. 500 /actions/wait.jsp /actions/SomeClass-input.jsp /actions/SomeClass-success.jsp -- View this message in context: http://www.nabble.com/execAndWait-delay-issue-tp18832790p18832790.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: Need help with Struts Interceptor/session problem.
newton.dave wrote: > > > I can't overstate enough that I have no idea how your application is > designed--it's possible an interceptor *is* the best way to handle your > needs, but I'm having trouble coming up with a reason why it would be > better > than just using another action, which would also probably eliminate the > problem you're currently experiencing. > > In our situation, some products are free while others are not. There's an interceptor stack for each. All are dynamically generated immediately as an html page or a pdf. An order is only generated for the products that aren't free. For those, once the page is delivered successfully, an order is generated and the customers account (already established) is charged. The BillingInterceptor is only used for the confirmation. Maybe I should call it ConfirmationInterceptor. Does an interceptor make more sense in this case? You've got me thinking. Thanks. -- View this message in context: http://www.nabble.com/Need-help-with-Struts-Interceptor-session-problem.-tp15598155p15600866.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: Need help with Struts Interceptor/session problem.
I've done some pretty extensive troubleshooting, but will try and expand on it. The product is a generated and delivered (as a pdf) right after the user clicks on the Confirm button. I thought that the use of an interceptor for this purpose was ideal, but I'm a Struts novice and far from an expert Java programmer. Can you explain why the use of an interceptor is not the right way to go about this? Thanks! newton.dave wrote: > > --- daveck <[EMAIL PROTECTED]> wrote: >> Sometimes "PARMS" manages to keep its value, and sometimes >> the value disappear. > > I don't see anything immediately obvious; IIRC you had already checked the > session ID to make sure you were always dealing with the same session, > correct? Have you done extensive logging / tracing / etc. to make sure the > value of "PARMS" in the session is getting set *only* when you believe it > should be (this is what I would be most suspicious of first)? > > That said, I'm pretty uncomfortable with this use of an interceptor: is > this > functionality really required across broad swaths of your application? Is > the > order not stored in some application-specific object that could be stored > in > the session (or somewhere else) then retrieved again in a confirmation > action? > > Dave > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Need-help-with-Struts-Interceptor-session-problem.-tp15598155p15599632.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]
Need help with Struts Interceptor/session problem.
Hi, I have a BillingInterceptor that throws up a Confirmation Screen after submitting the input parameters and before processing the action. I am using the session to hold the parameter map so it's available to the action after the user Confirms their purchase. I have confirmed that the "PARMS" is being stored in the session. Sometimes "PARMS" manages to keep its value, and sometimes the value disappear. This seems to have something to do with the weather or the alignment of the stars. I see absolutely no rhyme or reason for why it only works sometimes! I've been struggling with this off and on for weeks. Thanks to those who have tried to help with this issue in the past. Any more ideas would be greatly appreciated! BillingInterceptor.java: public class BillingInterceptor extends AbstractInterceptor implements StrutsStatics { private static final String URL_GOING_TO = "URL_GOING_TO"; public String intercept (ActionInvocation invocation) throws Exception { ActionContext context = invocation.getInvocationContext(); HttpServletRequest request = (HttpServletRequest) context.get(HTTP_REQUEST); HttpSession session = request.getSession(false); if ((request.getParameter("CONFIRM_SCREEN") != null) && (request.getParameter("CONFIRM_SCREEN").equals("TRUE"))) { String urlGoingTo = invocation.getProxy().getNamespace()+ invocation.getProxy().getActionName()+ ".action"; session.setAttribute(URL_GOING_TO, urlGoingTo); session.setAttribute("PARMS", request.getParameterMap()); return "confirm"; } else { Object action = invocation.getAction(); if (action instanceof BillingAware) { if (session.getAttribute("PARMS") != null) { BeanUtils.populate(action, (Map) session.getAttribute("PARMS")); session.setAttribute("PARMS", null); } } return invocation.invoke(); } } } confirm.jsp <%@ taglib prefix="s" uri="/struts-tags"%> Confirm Please confirm purchase. This could take several minutes depending on the request. My interceptor-stack: execute execute -- View this message in context: http://www.nabble.com/Need-help-with-Struts-Interceptor-session-problem.-tp15598155p15598155.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: More sitemesh struts2 problems
SOLVED! By adding the following to decorators.xml. /struts/dojo/* /struts/ajax/* /struts/simple/* daveck wrote: > > sitemesh is taking the content from the first pair of tags in the main.jsp > (my main decorator) and putting it in the > tag of the page it's trying to decorate! > > The first pair of tags could be any html tag (, ,, > etc...). > > The code is in a post I left earlier today. > > Crazy... any help would be appreciated. Feel dumb. > -- View this message in context: http://www.nabble.com/More-sitemesh-struts2-problems-tp15489382p15509846.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: Ajax tabbedPanel and sitemesh problem
Yes. Shortly after I sent this message I added it in. Now I'm having another problem. The contents of the tag of the page being decorated is being replaced with the contents of the first html tag in the decorator. Jeromy Evans - Blue Sky Minds wrote: > > Is it possible your decorator is missing the tag in > its head section? > > daveck wrote: >> It works if I put in the of the html. >> >> >> daveck wrote: >> >>> Hi, >>> I am having problem using an ajax tabbedPanel with sitemesh. >>> If I don't decorate page.jsp, the tabbedPanel works fine. >>> As soon as I decorate it, the in the >>> section of page.jsp doesn't make it through to the final decorated page. >>> As a result, only the html is displayed. >>> Any help would be appreciated. >>> Thank you. >>> David >>> >>> >>> >>> >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15500875.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]
More sitemesh struts2 problems
sitemesh is taking the content from the first pair of tags in the main.jsp (my main decorator) and putting it in the tag of the page it's trying to decorate! The first pair of tags could be any html tag (, ,, etc...). The code is in a post I left earlier today. Crazy... any help would be appreciated. Feel dumb. -- View this message in context: http://www.nabble.com/More-sitemesh-struts2-problems-tp15489382p15489382.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: Ajax tabbedPanel and sitemesh problem
It works if I put in the of the html. daveck wrote: > > Hi, > I am having problem using an ajax tabbedPanel with sitemesh. > If I don't decorate page.jsp, the tabbedPanel works fine. > As soon as I decorate it, the in the > section of page.jsp doesn't make it through to the final decorated page. > As a result, only the html is displayed. > Any help would be appreciated. > Thank you. > David > > > -- View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15484121.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]
Ajax tabbedPanel and sitemesh problem
Hi, I am having problem using an ajax tabbedPanel with sitemesh. If I don't decorate page.jsp, the tabbedPanel works fine. As soon as I decorate it, the in the section of page.jsp doesn't make it through to the final decorated page. As a result, only the html is displayed. Any help would be appreciated. Thank you. David 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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4"> struts-cleanup org.apache.struts2.dispatcher.ActionContextCleanUp sitemesh com.opensymphony.module.sitemesh.filter.PageFilter struts2 org.apache.struts2.dispatcher.FilterDispatcher struts-cleanup /* sitemesh /* struts2 /* org.springframework.web.context.ContextLoaderListener index.jsp decorators.xml: /* main.jsp (main decorator): <%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator"; prefix="decorator" %> <%@ include file="/includes/style.jsp"%> <%@ include file="/includes/header.jsp"%> <%@ include file="/includes/loginStatus.jsp"%> <%@ include file="/includes/navbar.jsp"%> <%@ include file="/includes/footer.jsp"%> page.jsp to be decorated. <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> Cow Quest Tab content here Tab content here Tab content here -- View this message in context: http://www.nabble.com/Ajax-tabbedPanel-and-sitemesh-problem-tp15481642p15481642.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: Losing Session Attributes
In case I wasn't clear... the attribute "PARMS" exists but loses it value. -- View this message in context: http://www.nabble.com/Losing-Session-Attributes-tp15298791p15307254.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: Losing Session Attributes
Laurie Harper wrote: > > > Are you sure? Have you confirmed that the session is the same in both > requests? > Yes, by checking the session id throughout the process. Laurie Harper wrote: > > > getSession(true) will create a session if one doesn't exist on the > request. If the session got lost somehow, this will mask that fault. You > might want to use getSession(false) and add a guard to ensure the > session is really there. > > I've tried this with no luck. Laurie Harper wrote: > >> >> // save input form attributes to session >> session.setAttribute("PARMS", request.getParameterMap()); > > Assuming the session really is the same, I'm guessing this is the > problem. You're saving a reference to a map owned by the current > request. There's no guarantee the underlying HttpServletRequest instance > wont have been reused by the time you try to access the map. > > Try making a copy of the request parameter map and storing that instead. > > Made copy but didn't solve the problem. Map parameterMap - request.getParameterMap(); session.setAttribute("PARMS", parameterMap); Laurie Harper wrote: > > Also, you don't show any code that's removing the data you placed in the > session. Do you have clean-up code you didn't show and, if so, could it > be getting called out of sequence? > I haven't implemented it yet. Anymore thoughts would be very helpful! -- View this message in context: http://www.nabble.com/Losing-Session-Attributes-tp15298791p15306753.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: Losing Session Attributes
I'm losing the quest-input.jsp form attributes. Probably 3 out of 4 times. Session ID remains the same throughout the process. Here is part of my applicationContext.xml I'm not quite sure what you mean by needing to configure in session attributes. mgainty wrote: > > you'll definitely need configure in session attributes as in > > class="org.apache.struts2.spring.interceptor.SessionContextAutowiringInterce > ptor"/> > > which session attributes are you losing? > M-- > -- View this message in context: http://www.nabble.com/Losing-Session-Attributes-tp15298791p15306751.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]
Losing Session Attributes
Hi, I'm looking for some help, or some input on why I might be losing session attributes (Not the session itself). Processing Flow: quest.action --> quest-input.jsp -> quest.action --> MyInterceptor -> confirm.jsp -> question.action --> quest-success.jsp I am setting session attributes in my interceptor to have available following the confirm.jsp. Sometimes the attributes are there and sometimes they're not. There doesn't seem to be any rhyme or reason. Probably something simple I'm overlooking, but if so, I've been overlooking it for two days! Thanks! David MyInterceptor.java: public String intercept (ActionInvocation invocation) throws Exception { final ActionContext context = invocation.getInvocationContext(); HttpServletRequest request = (HttpServletRequest) context.get(HTTP_REQUEST); HttpSession session = request.getSession(true); // check if request is coming form the Confirmation Screen if ((request.getParameter("CONFIRM_SCREEN") != null) && (request.getParameter("CONFIRM_SCREEN").equals("TRUE"))) { String urlGoingTo = invocation.getProxy().getNamespace() + invocation.getProxy().getActionName()+".action"; // save input form attributes to session session.setAttribute("PARMS", request.getParameterMap()); // save the forwarding url for the Confirmation Screen session.setAttribute(URL_GOING_TO, urlGoingTo); return "confirm"; } else { return invocation.invoke(); } } Quest.java: public String execute() throws Exception { if (this.getSession().containsKey("PARMS")) { BeanUtils.populate(this, (Map)this.getSession().get("PARMS")); return SUCCESS; } else { return INPUT; } } quest-input.jsp <%@ taglib prefix="s" uri="/struts-tags" %> " rel="stylesheet" type="text/css" /> confirm.jsp <%@ taglib prefix="s" uri="/struts-tags"%> " rel="stylesheet" type="text/css" /> Please confirm your request. This could take several minutes depending on the request. struts.xml /quest-input.jsp /confirm.jsp /quest-success.jsp /quest-error.jsp -- View this message in context: http://www.nabble.com/Losing-Session-Attributes-tp15298791p15298791.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: Newbie to Struts 2 - Question about Interceptors
I ended up solving the problem using an Interceptor and saving the parameter Map to the session. session.setAttribute("input_params", request.getParameterMap(); Then in my action I implemented SessionAware and utililized BeanUtils from Jakarta Commons to re-populate the properties in my action class. this.setRequestMap((Map)this.getSession().get("input_parms")); BeanUtils.populate(this, this.getRequestMap(); Thank you for your help. David Laurie Harper wrote: > > daveck wrote: >> Hello, >> I need to put up a "Confirmation Screen" in between my input jsp and my >> success jsp. >> >> byproduct.action -> byproduct-input.jsp >> byproduct-input.jsp -> confirm.jsp >> (If yes...) >> confirm.jsp -> byproduct.action >> byproduct.action -> byproduct-success.action >> >> Is there a Struts 2 way to carry the input parameters across the >> confirm.jsp >> so the second call to byproduct.action has access to them? >> >> I've looked at the ChainInterceptor and ActionChaining and have a feeling >> the solution resides there, but could use a little help. I hope I was >> clear >> enough... :) >> >> Thanks! > > The short answer is no, not without intervention from you. You will need > to arrange yourself for the data submitted from byproduct-input.jsp to > be carried over so that it's available to byproduct.action. > > Two ways to do that are: > > 1) place an action between byproduct-input.jsp and confirm.jsp which > saves the submitted data into an object stored in the session, then > retrieve that object in byproduct-success.action > > 2) place hidden fields in confirm.jsp that correspond to the inputs in > byproduct-input.jsp, populating them from the request parameters. Make > sure that confirm.jsp calls byproduct.action using a form submit (not > just a link) so that the data in the hidden inputs gets sent. > > You should probably be submitting byproduct-input.jsp to an action > anyway, so that you can perform validation and/or expose any additional > data that confirm.jsp might need but, other than that, the main thing > affecting which approach you choose is whether you want to use or avoid > the session. > > HTH, > > L. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Newbie-to-Struts-2---Question-about-Interceptors-tp15230274p15231887.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]
Newbie to Struts 2 - Question about Interceptors
Hello, I need to put up a "Confirmation Screen" in between my input jsp and my success jsp. byproduct.action -> byproduct-input.jsp byproduct-input.jsp -> confirm.jsp (If yes...) confirm.jsp -> byproduct.action byproduct.action -> byproduct-success.action Is there a Struts 2 way to carry the input parameters across the confirm.jsp so the second call to byproduct.action has access to them? I've looked at the ChainInterceptor and ActionChaining and have a feeling the solution resides there, but could use a little help. I hope I was clear enough... :) Thanks! -- View this message in context: http://www.nabble.com/Newbie-to-Struts-2---Question-about-Interceptors-tp15230274p15230274.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]