File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

conditionally targetting the client frame based on Server(servlet) program

 
Polireddy Vanukuri
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..
I have 2 frames in my page. The first frame is Login frame. Second frame is Error frame.
Login frame having login form with 2 textboxes.. username and password & a submit button. I m submitting form information to a servlet. In the servlet i have to decision of where(to which frame) to send response.If username and password are matches to some particular values,then a response as "Login Success" has to be send to login frame(first frame itself).

If the username or password are not matched to the specific values, then a response with error message "Login failure.. User name u entered is Incorrect" has to be send to Error frame(second frame).

I m giviing a target for the form tag.Its a static target. But here my problem is.. server program has to take decision in which frame response has to be sent.

So pls help me regarding this.
 
ak pillai
author
Ranch Hand
Posts: 288
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not use some hidden fields to distinguish where the request came from along with sendRedirect.
 
Polireddy Vanukuri
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur response.
But there is no argument for sendRedirect() or forward() to specify the target(frame name) of the page.For these methods. we will specify URL of the page which has to be sent as response.But how can the servlet can specify the target frame in those methods?

Help me in this context clearly.
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm tempted to say : don't use frames
That's an old concept and might be not used around anymore.
(sorry it doesn't help)
 
Polireddy Vanukuri
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If so, Pls tell me the correct way for my application..
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic