
--
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to CTJUG...@googlegroups.com
To unsubscribe from this group, send email to CTJUG-Forum...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
For jobs see http://jobs.gamatam.com/
I’m not sure what the controller does, but if you are keen on sharing the final product I would be very interested.
I did something sort of similar a while back (also servlet based) where I wanted to avoid the mappings etc.
I used introspection/reflection in the filter to find the appropriate action classes directly. Ie /person/add url would redirect through my filter initializing the person action class, calling the add method and finally passing the request along to the dispatcher. Worked like a charm, no middle men, create your action class and call it via your url’s.
This did however cause some security issues which were easily overcome via adding some checks to the filter.
Chris
Mark van Wyk
Error! Filename not specified.
On 5 May 2011 20:42, Andre Roodt <aro...@gmail.com> wrote:
How about one of JSF / Struts / Wicket / Seam / Tapestry / GWT / Stripes or any fweb framework that you dont have to create yourself. Just saying :-)
On Thu, May 5, 2011 at 8:31 PM, Mark van Wyk <ma...@foxbomb.com> wrote:
Hey friends,
I created a simple FrontController. It takes a request, does some neat stuff to it, and then passes it on to a JSP.
So of course you map
/* to com.foxbomb.portal.ControllerServlet, which does some neat shit, and forwards the request onto /views/*
Which causes an infinite loop.
Yeah yeah, I can prefix it with /go, /action, or make *.html map to *.jsp but I think that sucks. I want .jsp to map to .jsp and I don't want a prefix. Any suggestions.
Another question... Of course, you have your /static where you store your images, etc.
What do you think is the best was to overcome this. I saw someone mapping /pages and /static to default which (apparently on Tomcat and Jetty) maps it to the normal java server - but this is then container specific, so that sucks too.
Any brilliant ideas appreciated...
Mark van Wyk
Error! Filename not specified.
--
> So, basically, you create a couple of smart annotated classes, a couple
> of views and you're done.
One step better - you don't even have to define any views.
http://incubator.apache.org/isis/index.html
--
mike morris :: mikro2nd (at) gmail (dot) com
http://mikro2nd.net/
http://mikro2nd.net/blog/planb/
http://mikro2nd.net/blog/mike/
This email is [X]bloggable [ ]ask-first [ ]private
Using the object model itself, naturally. Objects are the nouns; methods
are the verbs; you annotate for better UI.
Of course this means that you actually have to build a REAL object
model, which may confound a bunch of those JEE weanies...
model,"
With pleasure. R highly neg. ;-)
Regards Heinz -- Dr Heinz M. Kabutz (PhD CompSci) Author of "The Java(tm) Specialists' Newsletter" Sun Java Champion IEEE Certified Software Development Professional http://www.javaspecialists.eu Tel: +30 69 72 850 460 Skype: kabutz
Sent via my CrackBerry...
Regards Heinz -- Dr Heinz M. Kabutz (PhD CompSci) Author of "The Java(tm) Specialists' Newsletter" Sun Java Champion IEEE Certified Software Development Professional http://www.javaspecialists.eu Tel: +30 69 72 850 460 Skype: kabutz
For jobs see http://jobs.gamatam.com/ --
Sent via my CrackBerry...