aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Facing problem when I am mixing struts and AJAX Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Facing problem when I am mixing struts and AJAX" Watch "Facing problem when I am mixing struts and AJAX" New topic
Author

Facing problem when I am mixing struts and AJAX

Sreedhar Pasunoori
Greenhorn

Joined: Jul 10, 2009
Posts: 4
Hi,

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 ?

Thnanks in advance
Regards
Sreedhar P
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60056
    
  65

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?
Sreedhar Pasunoori
Greenhorn

Joined: Jul 10, 2009
Posts: 4
Hi Bibeault,
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.

Reg,
Sree
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60056
    
  65

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.
Sreedhar Pasunoori
Greenhorn

Joined: Jul 10, 2009
Posts: 4
Bibeault,
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.

Hope this will give some idea to you.

Regards,
Sree



[Thumbnail for sample.GIF]

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60056
    
  65

Sreedhar Pasunoori wrote:Now the problem is, when i clicks on the home link, i am not able to display Registration page.

Why? Just saying "I am not able" doesn't explain what the problem is.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Facing problem when I am mixing struts and AJAX
 
Similar Threads
Struts Taglibs issues while including html in jsp
Not achieving space between div blocks containing lists
HTML drop downs not working
jQuery UI tabs not loading in the same tab
jQuery tabs UI issue