Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

Java code in jsp:include  RSS feed

 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm having a problem putting scriptlets into an include file. The file and the page that icludes it load fine when it's just HTML, but as soon as I add a scriptlet anywhere, the page loads up to the point of the jsp:include tag and stops. It doesn't even load the included file up to the point of the scriptlet.
Here's the code from the parent page:

The page I include is just HTML and a scriptlet - no <%@ page %> tag, no beans, nothing..
Any help would be greatly appreciated.
Thanks,
g.
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's in your scriptlets, and did you name the page something.jsp?
If your scriptlet makes reference to a variable used on your current page, you'll need to use the <%@ include file %> rather than the <jsp:include /> tag.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ include file %>
Files are embedded at compile time, when jsp is converting into a servlet
<jsp:include />
Files are dynamically loaded at run time
Hence if you are communicating in between two files through variable, u must embedd it as directive
Hope this may Help
* Naveen
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!