This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hello, we have <form name="" action="" target=""> Is it possible to set / change the value of target attribute in my service method of the servlet, so that i can control when to open the output in a new window. I have a situtation where i have to decide(whether to open a new window or display the result in same window) after retrieving request parameters. I am confused, plz help thanks
Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
servlet processing happens server-side, after the form has been submitted. The target has already been remembered by the browser, and the response the servlet sends back will appear either in the same window or a different one. This is up to the browser, and there is nothing your servlet can do about it.