Java Tools Section Index | Page 8
Is it possible to install multiple instances of Tomcat on one server to create a development, test and production version?
Additional info: I am trying to create a seperate development, test and production environment on one windows NT-server. To ensure that each environment is completely seperated from all others, I ...more
Hi, If you are working on Tomcat, and you are looking for a Tomcat specific solution (not portable), then you can use the Tomcat 4.x valves, that can be considered as a server-level version of Ser...more
As default, I18N Struts-applications are managed by the language in the browser. I would like it to be based on a language-code in the users login and thus I need to set the locale/language designation that controls Struts. .
As far as I know, by default, Struts applications are governed by the default locale of the container/JVM hosting the application. (The last thing Struts is going to do is trust what some whacky b...more
Do all the ActionMappings share one action instance? What happens when I have a custom Action that uses property setters from the struts-config.xml to set properties during use of that action.
Yes, all the ActionMappings share one Action instance. But, you wouldn't be setting the properties of the Action object here but the *ActionMapping* bean. To get to your custom properties, you wou...more
I have a button on my form that's suppose to submit the form. The script works on other forms, but not when I use it with Struts. Why would this be?
By default, the <html:submit> button is also named (surprise) Submit. To avoid conflicts, give the Submit button another name. <html:submit property="submitButton:/> HTH, Ted. -...more
I need to populate property lists in an ActionForm from a database. For different application user, I store the userid in session attribute. The data is based on userid. How can I get the userid session attribute within the ActionForm? I know it's easy to do this in an Action class, but I would like to do it in the JSP.
The HttpServletRequest is passed to the reset method, which gives you access to the session. It's preferred to do such things in an Action, but you can access database in the reset (or validate) m...more
I would like to isolate the business logic to a bean class and use the scaffold ProcessAction class ala the Artimus app in Struts in Action. Since the bean class has all the business logic, how do I communicate errors?
Excellent question! The Scaffold solution is to use a ProcessResult object that encapsulates the typical things that the Model might want to send back to the Controller/View. So far, it can transf...more
Is there a way to lock a form if the form is in use? The intention is to avoid two users submitting the same form.
Your options here are the same as with any enterprise application. Pessimistic locking, and Optimistic locking For a pessimistic lock, you need some flag on the record that says someone has ch...more
The problem I am noticing is that when the second action is being invoked, the form is being 'repopulated' with the initial form values that the form had when it was passed to the first action.
This is an excellent example of what we mean when we talk about "Action chaining", or, as I like to call it, the "dark side of Struts". There is a very fine design pattern called "Chain of Respon...more
If you are using EJBs for the business logic layer, then yes, it's perfectly all right to bind your Actions to the EJB interfaces. Though, some people do prefer to use EJBs as a persistence laye...more
I'm trying to use the ActionError facility in Struts 1.1-b3. I create and save my error in my action.
I'm trying to use the ActionError facility in Struts 1.1-b3. I create and save my error in my action. But when I try to render my error page, using this tag <html:errors/> I get this error me...more
In theory, you should not need any tools for that task. If you have developed a fully compliant J2EE application, you will be able to deploy it on any Application Server that follows Sun J2EE Spe...more
Imagine input: class P extends Parser; a : "a" A ; class L extends Lexer; A : "a"; ANTLR will think "a" and A are two different tokens as it doesn't know that in the Lexer you will define A...more
Is it possible to use COM ports in TOMCAT on a Win32 system? I get the "Port COM1 does not exist." error message every time I try to access to the serial port.
A "switch case" tag - Maybe Tedd knows??? Hi, Is there some sort of "switch case" tag existing? My point is that I want to avoid to use plenty of: <logic:equal name="theBean" parameter="thePar...more