web.xml? Struts is just one action
Twiff is short for Trajano Web Imaginary Framework. Trajano being my last name.
Because if it ever gets out of my workstation, something is seriously wrong with the universe. Seriously, I don't forsee me finishing this anytime in the next decade if ever. I am just doing this to learn about J2EE 5.0 template stuff.
Whatever you heart desires it to be. Just keep it clean if you're around children.
For me to learn. No one is forcing you to use this framework (I hope). But I wanted to see how far I can take things. This is also something like a blog for me as well.
Also there isn't really anything out there that can just take an HTML site with a directory structure and convert it into a web application while preserving the structure.
The following projects gave me ideas on how I want twiff to end up.
Whether something will come out of it or not is a big maybe.
web.xml? Struts is just one action
I am trying to put as much of the application configuration data into
web.xml since its part of the J2EE spec itself. Struts
if you would notice has its own
which can get quite unweildly. Anyway I hope to at least make it easier
eventually by providing a template application in the end.
This framework is an exercise for me to learn about templates in J2SE 5.0. I also want to keep the code base a small and clean as possible. Anyway if this does get out of my workstation 5.0 would be either mainstream or legacy by then.
Nanocontainer is good. But I want to simplify it more by removing the capability of doing scriptable container creation. I wanted to keep it simple and just use Java code to populate the container so I can reduce the number of XML data sets in the application core.
And like I said before this project is meant as an exercise for me. I just want to see what I can do.
I tried, but the version of XDoclet I am using 1.2.1 is quite buggy and won't do context parameters and Servlet API 2.4. It also does not support J2SE 5.0 constructs, so I decided to hold off on it for now.
Also I have tried using Hibernate Annotations and I find it good, but getting things in sync with the EJB 3.0 JAR which is not allowed in the Maven repositories because of Sun's licensing restrictions.
It is possible, but not recommended. There is only one
table that needs to be created namely
SessionToken. This table also needs to have
indexed for efficiency. Hibernate's tools do not put in
the index automatically and without it, it will run really slowly.
The following commands create the necessary index for DB2.
create index sessiontoken on sessiontoken(sessionid,tokenid) create index sessionid on sessiontoken(sessionid)
I tried, but it seems to hang on Tomcat 5.5.7. Haven't checked much into it yet. Also HttpUnit/ServletUnit does not support Servlet API 2.4 listeners as of yet, but I sent a feature request already, but the project has a lot feature requests already so I won't hold my breath on it, for the mean time, I faked my own listener calls in one of my test cases.
Having multiple servlets allows for a bit better profiling for some application servers than one single uber servlet, I guess. Also its still just a few servlets to deal with: ViewServlet, RedirectServlet, ActionServlet and AttachmentServlet.
I think its better to keep using as much of the standard technology as possible rather than reinventing the wheel over and over again like the Struts plugin system when there are load-on-startup servlet supported. If someone can't handle doing this they shouldn't be working on J2EE apps I think.
The listener creates the PicoContainers used in the context, session and request levels.
The listener also prepares and cleans up any required objects to handle request tokens.
In theory if the listener is split into two, the PicoContainer population logic can be excluded. But the token data management is still required to handle the forms.
The filter parses the URI to extract the locale information requested. So the browser does not need to be configured to have a specific locale.
It was implemented this way in order to remove locale logic from the servlet level.
The filter itself is optional and may be excluded from the web.xml file, but it would not allow URL based locale selection.
There is no maven checkstyle plugin that supports Java 5.0 constructs yet. A version of checkstyle that supports Java 5.0 exists in the CVS version, but I will fix those errors later. I don't think I do anything really weird except for the license and line length.
The table might not have been indexed. The
for efficiency. See schemaupdate.