• 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

Sending two files after successful login

 
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) On the right side of each webpage there is IFRAME:

<iframe name=loginFrame src='/servlet/User' marginwidth=0 marginheight=0 width=203 height=239 frameborder=0 scrolling=0></iframe>


This IFRAME checks wether user session set or not if set the User servlet display the "user control panel" else it display HTML content to get login/pass for signing in


2) Login servlet is doing two works:
(a) getting user/pass to verify from db
(b) request.getHeader("Referer");


The Problem Statement:
======================
If the Login servlet verifies the user then I want to redirect "TWO LINKS" i.e.
(1) /servlet/User (that contains user controlpanel) in IFRAME
(2) request.getHeader("Referer"); (I want to send back the user from where he/she came)

Thanks in anticipation



 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No can do. You can only send one response, and to the window/frame/iframe that initiated the request.

Anything else you'll need to handle with javaScript on the page.
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:No can do. You can only send one response, and to the window/frame/iframe that initiated the request.

Anything else you'll need to handle with javaScript on the page.



Thanks for your prompt reply

I tried lot of tricks but my mind stuck at this stage. Can you please give some example solution. That'll be your kind enough

Best Regards
 
Farakh khan
Ranch Hand
Posts: 851
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:No can do. You can only send one response, and to the window/frame/iframe that initiated the request.

Anything else you'll need to handle with javaScript on the page.


Again I did this:

but again unfortunately not worked for me and login frame displays "page not found error"

and main window remains same
--------------------------------------------------------------

(2) Another idea in my mind is to refresh the parent window.

Is that idea works? if yes then again don't know how'll I do it

Please help

Thanks & best regards
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A "page not found" means that you simply have the wrong URL. Don't give up so easily. Fix the problem rather than abandon the approach.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic