• Post Reply Bookmark Topic Watch Topic
  • New Topic

INCLUDE (Any one know how to do it ???)  RSS feed

 
Nakul Kasadwala
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got one situation ..
My one JSP (say example1.jsp) is on server1
& another jsp(say example2.jsp) is on server 2
I want to include output of example1.jsp (server1) into example2.jsp ...
I try to use include but it allows only relativeURI ...
Any one know how to do it ???
 
martin samm
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try a server side include - not sure sure if this is Apache specific however
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Nakul Kasadwala:
Any one know how to do it ???

Yes
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK I'll quit being smart. The includes for a JSP page are limited to their context which means the WebApp you are in. However, nothing prevents you from writing a component which makes a URLConnection to the other server, reads in the results, does any intermediate processing you may need and writes the results out to your response object. The process is termed Scraping. Not always the best solution if you do any detailed manipulation of the data, a simple change to the output on the other server can destroy your process.
 
Nakul Kasadwala
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Carl Trusiak,
Thanks for your both replies ..
Now i comes to know who can help me ..
NAkul
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!