aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes How to send response to some other file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to send response to some other file" Watch "How to send response to some other file" New topic
Author

How to send response to some other file

Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
I have "A.jsp" and from this jsp there is a button, on button click the request is sent to a servlet (cServerlet) and at the same time a popwindow is opened using JS.

Now i want to write data from cServlet to the poped up window. How?

If i do out.println in cServlet it will write data on the A.jsp, i don't want to do this, neither i want to close the A.jsp nor i want to send a request at the initiation of popup window.

Help me?
[ August 03, 2006: Message edited by: Bear Bibeault ]

The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Did you try to use the "target" attribute in your form ?


[My Blog]
All roads lead to JavaRanch
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
nops ...

my form looks like this
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

This needs to be done with client side code.
Moving to HTML/Javascript where client side code is discussed.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61199
    
  66

The url for the popup window needs to be the URL that addresses the servlet. Why are you submitting to the servelt in the parent window if you want the response in the popup?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to send response to some other file