Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet in a frame

 
Amod Deshpande
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one tell me how to display a servlet in one of the frame of existing servlet???
I have 3 frames. when i click the search button, i want to display a reasult servlet in one of the frame.
 
Faisal Khan
Ranch Hand
Posts: 285
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont know what sort of architecture you are using but if the link itself is incharge of pulling the servelet, here is what you can do (this is straight HTML, so not sure if its useful for you):
1. Name the three frames in the frameset
2. in your href link, in addition to the servlet name place target="frame_name"
This will load the specified servlet into the given frame, but if you are using a controller which handles all the requests then you will need to do a bit more work
HTH
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose there are two frames, Frame a and Frame b
html contents for frame a
input type=button value="Search" onclik="parent.frames.b.document.location='ServletPath'"
(plz correct spellings of click)
When you click on this button(Search), it will load the contents generated by the servlet mentioned in the servletpath.
Hope this helps.
Sanjeev Kaushik
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic