Results 1 to 4 of 4
Thread: Dynamically including JSP page
- 07-04-2012, 03:20 PM #1
Member
- Join Date
- Jul 2012
- Posts
- 2
- Rep Power
- 0
Dynamically including JSP page
I want to know that how can I dynamically include b.jsp page in a.jsp page without reloading the whole a.jsp page and this inclusion should occur when user click on button in a.jsp page? Can I use ajax or JQuery for that because I do not want whole page reloading?
The requirement is that a.jsp page is already there at client site. user now click the button on a.jsp page. this a.jsp page include b.jsp page on user click and the condition is that including page that is a.jsp, must not be reloaded entirely only part where b.jsp page includes, will be refreshed.Last edited by farhaan@kazi; 07-04-2012 at 03:26 PM.
- 07-04-2012, 04:03 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: Dynamically including JSP page
jQuery can make a call to it (Ajax), directing the response to a div.
That would be the usual route, if you are already using jQuery on the site.
Not really a Java question at this point.
Have a dig round the jQuery site, specifically this page on the get() method. It's the one I've used in these instances.Please do not ask for code as refusal often offends.
- 07-05-2012, 08:58 AM #3
Member
- Join Date
- Jul 2012
- Posts
- 2
- Rep Power
- 0
Re: Dynamically including JSP page
- 07-05-2012, 09:35 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Re: Dynamically including JSP page
The get() method will put the response received from the server into the given element, usually a <div> or similar. There are examples at that link.
You don't want to include a JSP, at least with the definition of "include" used by JSPs. You want to direct the HTML returned by the JSP to a part of the page that already exists. That's what get() does.Please do not ask for code as refusal often offends.
Similar Threads
-
Including a .dll file
By abalis3 in forum EclipseReplies: 1Last Post: 01-16-2012, 01:40 AM -
Including an external url to a jsf page
By hajer in forum JavaServer Faces (JSF)Replies: 2Last Post: 09-12-2010, 12:47 PM -
Sum of all even numbers up to but not including 100
By bigpips305 in forum New To JavaReplies: 41Last Post: 02-09-2010, 03:16 PM -
Dynamically loading the jsp page to the application
By shekar in forum JavaServer Pages (JSP) and JSTLReplies: 3Last Post: 04-09-2008, 03:28 PM -
Including JAR in applications
By bugger in forum New To JavaReplies: 0Last Post: 01-11-2008, 09:36 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks