File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts2/JQuery Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2/JQuery" Watch "Struts2/JQuery" New topic


Jennifer Moran
Ranch Hand

Joined: Oct 21, 2002
Posts: 60
First I apologize if this is in the wrong forum.

I have a web application that utilizes, Struts, Tiles and ExtJS & JQuery. I am confused on how the Store object url configuration works. I see many php examples but no servlet examples. What I would like to do is when a menu item is clicked, I want to open a tabbed panel that has a grid on it. The grid data needs to come from a backend database.

I am assuming that when user clicks on menu item, it has href to 'backend servlet'.action which will just forward to the jsp page that contains my grid.
Currently my grid is coded for an xml file that I am manually creating and dropping in the directory, but what I want is for the data to be loaded from the 'backend servlet'.action and that should either create XML or JSON??? And I'm confused because I am assuming that the url is going to read 'backend servlet.action' but then how does it know the name of the xml or json file???

One more thing When I code the servlet and create the JSON/XML do I need to change the struts.xml result type? Right now it's tiles, but if it needs to change to json or whatever, will my tiles still work??

Any help would be greatly appreciated.

David Newton

Joined: Sep 29, 2008
Posts: 12617

This seems like an ExtJS issue, no?

On the S2 side of things you can create XML or JSON in a variety of ways; when I've used ExtJS I've just returned the appropriate content type. ExtJS takes care of marshalling it into its UI widgets. The S2 result of the action that creates the data should be configured appropriately for how you're creating the data.
I agree. Here's the link:
subject: Struts2/JQuery
It's not a secret anymore!