• 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

static content in JSP  RSS feed

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,

can we include static content in JSP page by using the following?
1.<jsp:include page="/app/first.html" />

2.RequestDispatcher dispatcher =request.getRequestDispatcher("/app/first.html");
dispatcher.include(request,response);


One more question!!
Why cant we use request object in JspContext API.??where as we can use it in PageContext API.
Thnks in advance
shanthisri
[ February 07, 2006: Message edited by: shanthisri mocherla ]
 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


can we include static content in JSP page by using the following?
1.<jsp:include page="/app/first.html" />



Yes you can include. But the purpose of <jsp:include> standard action is to include dynamic content. For static content prefer <%@ include file="/app/first.html" %> directive.


One more question!!
Why cant we use request object in JspContext API.??where as we can use it in PageContext API.



I didn't get you here. Are u talking about custom tags (or) in general. By request object do you mean request implicit variable.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
---
2.RequestDispatcher dispatcher =request.getRequestDispatcher("/app/first.html");
dispatcher.include(request,response);

---

Can you specify a static html page in getting the request dispatcher?
 
shanthisri mocherla
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Vishnu
You are right.I was talking about request implicit object in JSPContext.
I've seen this statement in final coffecram exam in HFSJ.
Thnak sfor your time
Shnathisri
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!