Balaji Krishnan wrote:I need to include a html content into a JSP.
As with any other resource, run-time inclusion is accomplished via <jsp:include> or <c:import>
But I will come to know about the JSP file where i need to include the html at runtime only.
You will need to explain this more clearly.
You can make use of ajax and servlets in this context. You can create a servlet which responds to the ajax request and returns the htmlcontent of the related keyword. At browser side, when the search button is clicked then in the background , send a request to the servlet using ajax with keyword as input parameter.
After you receieve the response you can
1. open an new window with responseText.
2. include the responseText as div innerHTML.
Hope it solves your problem.
Thanks for your help here. I don't know anything about AJAX. I don't have open an new window to show the responseContent(html).
When i mention redirect, it will redirected to an existing screen in my application. This is where i need to include the HTML content without affecting page layout. Is this possible?
Sorry if i din't get your point correctly.
Balaji Krishnan wrote:
When i mention redirect, it will redirected to an existing screen in my application. This is where i need to include the HTML content without affecting page layout
You can do that ...
From page A you will be sending a parameter to page B.
Page B will display the content that is relavant to the parameter.
What is the problem you are facing here? And as far as layout is concerned, you can always adjust your layouts according to your need. Sometimes you can solve things when you jumpstart the coding.