Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can we use jsp include in javascript

 
hari vemulapalli
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I want to include a jsp page in the current JSP upon clicking of a button.Can we use jsp include directive in javascript to do that.
<%@include file="two.jsp" %>
can we write this directive inside js file..
Anyone please help me....
thnx in advance.
 
Jair Rillo Junior
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think so, because JS is a client-side as long as JSP is a server-side.

If you want to add some part of page into another page dynamically, I advice you to use AJAX (or simply a hidden DIV).
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vems,

You already have been warned about your display name once here.

Please change you display name here to match the naming policy that you agreed to when signing up or your account will be disabled in the near future.

Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ajax, iframe, or post back are you options.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this article to understand why that is not possible.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic