Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Opening a window popup from within a Servlet

 
Ragav Baskaran
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a requirement to open a window popup and display an information pdf file in the popup. Before opening this popup a set of inputs will be collected in a form and the same will be validated in the servlet.

If the validation is through then it should open and display the information pdf file in the popup or else it will show a validation message in the custom built error component. I'm using the below code to create a popup from within a servet and "info.serv/InfoServ" will take care of writing the pdf contents to the servlet output stream.



This piece of code works fine, however my question here is, If this information popup is already opened and if i try to invoke the action again it is overwriting the content of existing popup instead of creating a new popup. My expectation here is that, It should open a new popup everytime a new action is fired.

Can one of you help me in explaining/overcoming this behavior ?

Thanks,
Ragavendran.
 
Ragav Baskaran
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have resolved it myself. This was happening as the window name of the popup was hardcoded to "Information" and whenever the browser attempts to open the popup it is already finding a window named "Information" and thus it overwritting the same popup.


Thanks,
Ragavendran.
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please, check out the concept of JSPs. You'll love them :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic