"Consider the design of a web application using Struts2 and Sitemesh (and possibly Spring) for traditional displays and mobile displays."
Having had a look at how some of the major sites may be doing it, I also thought it would be a good idea to ask here to see how others may be satisying such criteria.
We already have an existing web app project designed initially for traditional displays but it now also provides one mobile page. We have "/" and "mobile" packages in the struts.xml for traditional and mobile, respectively. Both packages have near-duplicated action mappings. The same action is used for both traditional and mobile devices but the namespace is different ("/m") and the result name paths to the jsp pages differ slightly (i.e. WEB-INF/jsp/test.jsp -and- WEB-INF/jsp/mobile/test.jsp). We also use Sitemesh and have two decorators for the traditional and mobile display.
I have considered separate projects; one for a traditional displays and one for mobile device but the maintenance overhead and duplicated code sounds like a headache from the start.
I have considered having single jsp pages that would handle traditional and mobile devices in the same file but that could get convoluted and result in large, messy files.
I don't want to get too set on the design or implementation just yet. I'd be very interested to hear from more experienced users how they are doing it. Is anyone able to offer their experience / advice regarding the design and structure of a single web application that can support different display technologies?