RE: XML file reloading in JSP (Caching issue)

2010-05-24 Thread XML User

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...
> 
> 
> 
> 
> 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 
> 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
>&

Re: XML file reloading in JSP (Caching issue)

2010-05-24 Thread XML User

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




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  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-tp28657737p28657737.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-tp28657737p28658007.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



XML file reloading in JSP (Caching issue)

2010-05-24 Thread XML User

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-tp28657737p28657737.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: URL mapping in Struts 2

2008-08-12 Thread XML User


Can you explain me with the code or some hint, how can i do that.?
-- 
View this message in context: 
http://www.nabble.com/URL-mapping-in-Struts-2-tp18945350p18946067.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]



URL mapping in Struts 2

2008-08-12 Thread XML User

Hi,

How can I implement the URL mapping so that our URL will always look like
"www.abc.com/products/toys/acbtoy"  It should not end with something like
abctoy.action OR abctoy.do.

Is there a way for making this happen?
If so then can you please let me know with code?

-- 
View this message in context: 
http://www.nabble.com/URL-mapping-in-Struts-2-tp18945350p18945350.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]