Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java scriptlet not executing in Iframe  RSS feed

 
Vasha Daniels
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I have a JSP which has an Iframe as follows:
main.jsp - contains a frame
display.jsp - referenced in main.jsp with an IFrame.
I have Java scriptlets <% ... %> in both JSPs. The scriptlets execute in main.jsp, but not in display.jsp. Any ideas why the scriptlet doesn't execute in the "framed" JSP?
Thanks,
Here's more details:
Both have <%@ page language ="java" %> directives
I'm using HTML spec 4.0.1
MAIN.JSP
...

DISPLAY.JSP
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Examine
SRC="display.jsp%>"

hth,
bear
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you had a look at the source for the IFrame? (i think they're evil, by the way)
My guess is the the data is being written out, but it gets written between the script brackets and therefore doesn't show up.
Try this version:

Dave
 
Vasha Daniels
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. This works now.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!