• 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

Tiles

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Is it possible to have a tile load a page from another deployed WAR file?

I have two WAR files deployed. I want to load the header and footer from one WAR file, and the body from another WAR file. Is this possible?

thanks and regards,
sim085
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To the best of my knowledge, no, it isn't possible. The reason for this is that tiles uses the ServletContext's RequestDispatcher and Java EE spec does not allow it to cross Web application borders.
[ May 14, 2006: Message edited by: Merrill Higginson ]
 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Merrill

I felt it in my guts that it was imposible ... however I did want to give a one last attempt here.

Do you, or anyone else know how what I explained above could be possible?
(even without tiles if needed). I also tried jsp:include .. but this does not work either since it searches the page inside the WAR file as well.

thanks and regards,
sim085
[ May 15, 2006: Message edited by: Simon Joseph Aquilina ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JSTL tag <c:import> does allow you to include a page from another context. This link gives more details.
 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Merrill ... Thanks

I read the article you sugested in your post, and the <c:import ...> tag does what I need (now I also know what it is called 'Absolute Path'

I am now in the process of implementing this in my application, have already some implementation toughts in mind.

I still have some reservations on this. However first I want to check it out, and then ask more questions

However thanks again for your help

regards,
sim085
 
Simon Joseph Aquilina
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

the <c:import ...> worked exactly as you sugested However there is a problem using this tag..

Just as an example, I loaded the header and footer from my war file, and the body element I loaded the google site. However when I clicked the submit button (naturally) it no longer loaded the default page of my WAR file... and therefore the page was not found

I do not know if what I am trying to achieve is imposible However it really feels like it!

My plan was to have my website in a WAR file, and then develop something like a Forum in another WAR file. The reason for this division is because a forum contains a lot of logic, and also a website. Thus instead of having them all in one WAR file I wanted to spereate them, but at the same time keep the same layout of the first WAR file.

What I can do is having the header and footer imported from the forum! ... mmm .. but that is just a current tought

however thanks again.

regards,
sim085
 
reply
    Bookmark Topic Watch Topic
  • New Topic