I am new to AJAX. Just trying a sample. I have following div Tag
In above method i am loading( when link is clicked) a JSP page which is developed with struts.
The issue is, its not loading my JSP page in the above div when i clicked on href. When i tried to print the responsText, its just cintained
only HTML, but not jsp stuff like jsp page directive etc.. I hope this is the cause for the above problem.
Kindly any one adivce how to deal this issue. Is it like AJAX should only have HTML stuff ? ... Please clarify ?
Sreedhar Pasunoori wrote:When i tried to print the responsText, its just cintained only HTML, but not jsp stuff like jsp page directive etc..
Of course. All that JSP stuff is evaluated on the server before the response is sent to the client, just like with any other request. Why would you want it otherwise? What would the browser possibly do with JSP markup?
Joined: Jul 10, 2009
Thanks for your kind reply.
Why would you want it otherwise? What would the browser possibly do with JSP markup?
When the link is clicked, as i mentioned loading jsp. It contains some components which will be filled on selection
of some components. (E.g. filling states based on country selection) . It has one jsp usebean, and JSP has some <DIV> tags which will
interact with Database.
Kindly advice the right way to display the way of the mentioned JSP page, if I am doing in wrong way.
Sorry, but I still don't understand what you are trying to do. Please explain it leaving all the Struts stuff out, which is irrelevant to the discussion.
Joined: Jul 10, 2009
For clarity I am putting the required pages images in a GIF file. The same is attached.
In Figure 1, I shown the home page which contains link to open Registration Page. I shown Registration page in which is a Jsp as Figure 2.
This JSP contains <jsp:usebean> which will interact with Database to get countries(marked with oval) which are to be loaded on form load. This page will be
displayed in the center of home page. Now the problem is, when i clicks on the home link, i am not able to display Registration page.