Yes... you are right. I guess what I meant by "spanning multiple pages" is that up until now all my actions classes mapped nicely to my /webapp/struts/ (jsp) directory structure. (e.g. /java/com/afs/web/action/contact/ContactDetailAction.java => /webapp/struts/contact/contactDetail.jsp). Now I have json actions that are used by jsps (via client side js) that reside in various /webapp/struts/ directories. But as you suggested, I need to think of my action packages from a functionality standpoint rather than from a website directory/layout perspective.
I think I will end up moving them to the appropriate functional package perhaps with a naming convention of adding "Json" somewhere in the name (e.g. ContactJsonAction.java). On Fri, Jun 8, 2012 at 9:05 AM, Dave Newton <davelnew...@gmail.com> wrote: > I wouldn't have a package just for "JSON actions", because that separates > them from what they actually are. > > I'm not sure what is meant by "spanning multiple pages"; in general > wouldn't they still be associated with specific data types, or > functionality? > > Dave > > On Fri, Jun 8, 2012 at 10:03 AM, Burton Rhodes <burtonrho...@gmail.com>wrote: > >> I have a web application that originally mapped only one action per >> page (for the most part). Little by little it's grown to incoporate >> ajax/json actions (using Struts json plugin) that populate different >> parts of pages or update the database. My question is how best to >> organize these new actions in packages with the rest of the web >> application. First I started with a simple json package, but realized >> this probably isn't manageable as I add more "json" actions. Then I >> thought to move these "json" actions in with other packages but >> hesistate since they tend to span multiple pages. Or perhaps this is >> the best way and use a naming convension for these, e.g. >> ContactJsonAction.java ?? >> >> Just curious if any of you have found a good way to do this and stay >> logical and organized... >> >> My current layout is something like: >> com.afs.web.action >> - com.afs.web.action.contact >> - com.afs.web.action.accounts >> - com.afs.web.action.xactions >> - com.afs.web.action.help >> - com.afs.web.action.json <-- this is a catch-all for json >> actions >> - .... >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org