Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending two files after successful login

 
Farakh khan
Ranch Hand
Posts: 833
  • Mark post as helpful
  • send pies
  • 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



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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: 833
  • Mark post as helpful
  • send pies
  • 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: 833
  • Mark post as helpful
  • send pies
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic