//instead of creating a whole new page would'nt it be easier to populate the changed items
//and use an ajax control to dynamically populate a div tag on the jsp page? <action name="getNodes" class="org.apache.struts2.showcase.ShowAjaxDynamicTreeAction"> <result type="freemarker">/tags/ui/treeExampleAjaxDynamic.ftl</result> </action> package org.apache.struts2.showcase; import org.apache.struts2.showcase.ajax.tree.Category; import com.opensymphony.xwork2.ActionSupport; public class ShowAjaxDynamicTreeAction extends ActionSupport { private int nodeId = 1; public Category getCategory() { return Category.getById(nodeId); } public int getNodeId() { return nodeId; } public void setNodeId(int nodeId) { this.nodeId = nodeId; } } <%...@taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> <html> <head> <title>Showcase - UI Tag Example - Tree Example (Dynamic)</title> <sx:head /> </head> <body> <s:url var="nodesUrl" namespace="/nodecorate" action="getNodes" /> <div style="float:left; margin-right: 50px;"> <sx:tree id="tree" href="%{#nodesUrl}" /> </div> </body> </html> //just supply category and NodeId from from ShowAjaxDynamicTreeAction Action ? Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Mon, 24 May 2010 08:40:39 -0700 > From: patelsame...@yahoo.com > To: user@struts.apache.org > Subject: RE: XML file reloading in JSP (Caching issue) > > > I just did. > > No luck. :-( > > Thanks for the idea. > > > sandeep.furia wrote: > > > > how about if you change the location of the xml file, take it out of > > web-inf and put it under the context root? > > > > SDF/ > > -----Original Message----- > > From: XML User [mailto:patelsame...@yahoo.com] > > Sent: Monday, May 24, 2010 11:16 AM > > To: user@struts.apache.org > > Subject: Re: XML file reloading in JSP (Caching issue) > > > > > > Thanks for quick reply Brian.! > > > > I tried adding new timestamp as parameters which generates new number > > everytime I visit the page. > > > > Even added those headers setting for no cache... > > <meta http-equiv="Cache-Control" content="no-store"/> > > <meta http-equiv="Pragma" content="no-cache"/> > > <meta http-equiv="Expires" content="0"/> > > > > Still it is not getting updated. > > > > > > Brian Thompson-5 wrote: > >> > >> What extra parameters have you added to the request? AFAIK the > >> standard solution to this type of "improper caching" problem is to > >> simply append a random number or a timestamp to the request URL. It's > >> an ugly hack, but it does work even when the headers don't seem to do > >> the trick. > >> > >> Of course, the "Right Way" is to rely on the no-cache headers, so you > >> might want to do a bit more troubleshooting on that front. > >> > >> Hope this helps, > >> > >> -Brian > >> > >> > >> > >> On Mon, May 24, 2010 at 9:44 AM, XML User <patelsame...@yahoo.com> > > wrote: > >>> > >>> Hi, > >>> > >>> I am running into an issue of caching. > >>> > >>> I have a jsp which generates the tree view from an XML file. This XML > >>> file > >>> are loaded when the jsp is loaded. So whenever I add new child to the > >>> tree > >>> view the xml file is updated by action class and the request reloads > > the > >>> jsp > >>> page which in turns reload that updated XML file. > >>> > >>> The issue is everytime it reloads the XML file, it gets from the > >>> temporary > >>> internet file which is not getting updated until I kill the browser > > and > >>> reload it. > >>> > >>> For example. > >>> > >>> For the first time, I have the xml file with content > >>> .Parent 1 > >>> ...Child 1 > >>> ...Child 12 > >>> ...Child 13 > >>> .Parent 2 > >>> ...Child 2 > >>> ...Child 21 > >>> > >>> When I call the action,to show tree then it calls the jsp file which > >>> loads > >>> the XML file and shows the jsp tree which works perfectly. Shows > > complete > >>> tree view based on XML file. > >>> > >>> Then I will add new child "Child 22" into ".Parent 2" then the action > >>> will > >>> be called and that action will update the XML file which is located > > into > >>> "../WEBINF/pages" and returns to the same jsp and reloads jsp which > > also > >>> needs to reloads the updated XML file. > >>> > >>> Now issue is , its not reloading that updated XML file and still > > showing > >>> the > >>> tree without newly added child. When I checked internet temporary > > files, > >>> it > >>> was still old XML file but at "../WEBINF/pages" location, the XML has > >>> been > >>> updated. So I figured out that it is an issue of caching. > >>> > >>> I tried to remove caching with http headers setting > >>> <% > >>> response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 > >>> response.setHeader("Pragma","no-cache"); //HTTP 1.0 > >>> response.setDateHeader ("Expires", 0); //prevents caching at the > > proxy > >>> server > >>> %> > >>> > >>> Also tried with adding extra parameters to change the URL request. > >>> > >>> But still doen't work. > >>> > >>> Anyone has any suggestions, what to do next. > >>> > >>> Thanks for your help. > >>> > >>> Sorry.., If any typos or explained in too much detail. > >>> -- > >>> View this message in context: > >>> > > http://old.nabble.com/XML-file-reloading-in-JSP-%28Caching-issue%29-tp28 > > 657737p28657737.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://old.nabble.com/XML-file-reloading-in-JSP-%28Caching-issue%29-tp28 > > 657737p28658007.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 > > > > Please do not transmit orders or instructions regarding a UBS > > account electronically, including but not limited to e-mail, > > fax, text or instant messaging. The information provided in > > this e-mail or any attachments is not an official transaction > > confirmation or account statement. For your protection, do not > > include account numbers, Social Security numbers, credit card > > numbers, passwords or other non-public information in your e-mail. > > Because the information contained in this message may be privileged, > > confidential, proprietary or otherwise protected from disclosure, > > please notify us immediately by replying to this message and > > deleting it from your computer if you have received this > > communication in error. Thank you. > > > > UBS Financial Services Inc. > > UBS Financial Services Incorporated of Puerto Rico > > UBS AG > > > > > > UBS reserves the right to retain all messages. Messages are protected > > and accessed only in legally justified cases. > > > > --------------------------------------------------------------------- > > 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://old.nabble.com/XML-file-reloading-in-JSP-%28Caching-issue%29-tp28657737p28658294.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 > _________________________________________________________________ The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5