• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problems with include directive

 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greetings!
I have the following question. I would like to know how to pass a varable to a include directive.
<%@ include file=<%= myfile %> %>
This won't work. Compiler is complaining about the missing quotes
<%@ include file="<%= myfile %>" %>
This won't work because Tomcat is looking for this file name <%= myfile %> which doesn't exist.
What i am trying to do is to load diferent files into a table cell without reloading the entire page.
Greatly appreciated
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you need to use the XML style include:
<jsp:include page="<%=myFile%>" flush="true" />
I recommend you check out the JSP syntax sheet available from the Sun site.
Um... http://java.sun.com/products/jsp off the top of my head. Wouldn't trust it too much.
Dave.
 
mocca az
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you David, that was exactly what i was looking foor.
It works great.
M, phx
reply
    Bookmark Topic Watch Topic
  • New Topic