• 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

Embedding another website inside your Struts application

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

Well I have a Struts web application and what I wanted to do is to basically "embed" another website inside it, but I don't know if this is at all possible.

This is how I see it happening. There will be a link in the menu inside my Struts app, and when the user clicks it, the external website will be loaded (inside a frame?) and the user can then interact with it. The tricky thing about this though is that the external website also has it's own login, so I don't know how I can bypass that (probably programmatically?) and redirect the user to the appropriate page without having him to login in the external site.

I have heard something about iframes, but I am not sure if this is the right solution. Any ideas?

Thanks in advance,

Eugene
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

i think <c:import url="your website's full path"/>.it is a jstl tag used to import external server's data...

thanks & regards,
seetharaman
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Seetharam,

So <c:import> tag will just display the external website inside my webapp? How about the issue of the external site having its own seperate login? I wanted to redirect the user to a particular page in the external app, but I need to bypass the login part since the user is already logged in to my application.

Thanks,

Eugene
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eugene,

i understand your problem..

i am not sure about this issue..

thanks & regards,
seetharaman
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Seetharam,

Ok thanks though for your reply.

Eugene
 
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 term generally used for this is "Mashup". There are techniques that will allow you to do this, but c:include isn't one of them. The page you include with this tag must at the very least be on the same server, and preferably within the same web application.

I'd suggest you Google the above term to learn some of the ways this can be done. There is lots of information out there.

Regarding the issue of the login: If the developer of the other website was even marginally capable, it will not be possible for you to bypass the login.
 
Eugene Abarquez
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Merrill,

Thanks for your reply. I was just able to successfully "embed" the external site inside my web application using an iFrame. This is what I was looking for.

Marginally capable? That's funny. The thing is though, I have an access to the user name and password of the user to the external site. It's actually the same login credentials with my own web application (same DB), it's just that the external application is running on a different server and written by a different developer probably with a different language too. I just need a way to programmatically bypass the login page by doing something nifty or "hacky" that I have no idea what yet so the user is directly taken to the inside pages (since he already logged-in to my web app, there's really no need to login again). Now that I'm thinking about it, how about using HttpUnit to bypass the login page? Or perhaps you have better ideas, I'm always open to any advice.

Thanks a lot,

Eugene
 
reply
    Bookmark Topic Watch Topic
  • New Topic