Exceptions and ActionErrors

2005-03-25 Thread Matt Hughes
In my current application, business logic is often scattered throughout my Action classes. I am trying desperately to undo this 8th deadly sin, and while I have, I've noticed how Exception(s) and ActionError(s) are really being used with the exact same functionality. You might see something li

Use JavaDoc and XDoclet to create site description document

2005-03-24 Thread Matt Hughes
I have a fairly large application (100+ actions) with all of the actions hard-coded into a struts-config. I would like to move the mappings into the Action classes using XDoclet as well as adding some custom parameters such as: @requires @failsIf ...etc Then I would like some tool, pr

Tiles and html:form problem

2005-03-16 Thread Matt Hughes
I have designed a basic layout file that looks something like this: My problem is that I have a element that needs to span both the "header" and "mainBody" attributes. But it doesn't really work as the tags become unbalanced: Has anyone e

Re: Strange Behaviour (ClassNotFoundException)

2005-02-18 Thread Matt Hughes
I don't know how new you are to web applications. But make the most basic web application you can without any of your classes. Just have a simple folder structure: web_application WEB_INF web.xml index.jsp And try a simple expression in the JSP file like: The time is <%=new java.u

Building accurate URI

2005-02-17 Thread Matt Hughes
Previously all the JSPs in my application were in the same folder. To organize things a bit, I categorized them according to action and now they are nice, but the problem is all the links in my application are relative. And they all expect that they are in the same base folder, but now they'r

Name of JSP in Request

2005-02-15 Thread Matt Hughes
When I am inside a JSP page, is there any way to access the forward path in the action mapping: In other words, does Struts, when it forwards control to the JSP page, put a variable in the request scope like request.setAttribute("path","/pages/admin/COLDCache.jsp");

Re: Opinion needed on a Design issue

2004-10-20 Thread Matt Hughes
It's a bad idea because what if in the future you want to use that business logic elsewhere? What if you want to use it in a webservice or in a GUI standalone application. The business logic should have to know nothing about web servers and HttpSession objects, unless your business is buildin

Getting DataSource from non-Struts class

2004-10-20 Thread Matt Hughes
Hi, I am developing a web service for my application and am putting the class in the same web context as the rest of my struts application. However, I want to be able to get a DataSource object from within this class. The only thing I have to connect the two is a ServletContext object. How c

Upgrading Woes

2004-10-08 Thread Matt Hughes
Hi, I just starting working on a project at work that is using a very old version of Struts (1.0). Having used the newest version of Struts, I am desperate to upgrade this application to use the newest version, but I have fixed all I can fix without a little assistance. The application has man