• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts tiles framework not action in URL

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, I need help in Struts tiles framework. How to make loading jsp in the URL is not recorded action, ie page is loaded and is in action, and when it restarts the browser sends a request to the server, it is necessary that it was not. Page layout should be done only in the tiles-defs.xml.
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can you please explain little bit more? not able to understand question....
 
Alex Sh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Shailesh!

I have progect, in it i use Struts + Spring frameworks: Struts MVC, tiles; Spring IoC. When i go to page, the URL is: (e.g.) localhost/Project/NewsAction?actionMethod=edit. And when i reload page, it send request on server, but i want to redirect on page and cause the action when submit form. Page consists of tiles. I can make <tiles:insert definition="newsedit"> in jsp, and it will be work, but i must declare tiles only in tiles-def.xml.

my tiles-def.xml:



struts-config.xml:

 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have progect, in it i use Struts + Spring frameworks: Struts MVC, tiles; Spring IoC. When i go to page, the URL is: (e.g.) localhost/Project/NewsAction?actionMethod=edit. And when i reload page, it send request on server, but i want to redirect on page and cause the action when submit form. Page consists of tiles. I can make <tiles:insert definition="newsedit"> in jsp, and it will be work, but i must declare tiles only in tiles-def.xml.



there are two things which I clicked while I was read your post.

when you refresh page again action is got called. and again same page is getting displayed, instead of that you want to redirect to newsEdit page.
Means on refresh you want to submit a form.

OR

On form submission you want to show one more jsp on same page and your issue is how can you avoid displaying that on first time and display it on form submission?

Please tell which is the correct from above ?
 
Alex Sh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First is correct. I don't want to handle action when i refresh page, i want to refresh anly page, may be page must saved in cache and load from cache.
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

It is not possible to stop calling action while you hit a refresh button, because it is default behavior of a browser to call a url on refresh.
 
Alex Sh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, i know it, but how don't use action in URL. I want to give the same result when i do: <forward name="edit" path="newsedit.jsp" redirect="true">; change it on <forward name="edit" path="newsedit" redirect="true"> - and will give the same effect. I need use only tiles-defs.xml for definition tiles, don't definition tiles in jsp.
 
"To do good, you actually have to do something." -- Yvon Chouinard
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic