shaun michael

Greenhorn
+ Follow
since Jan 05, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by shaun michael

Originally posted by Ilja Preuss:
As a *heuristic*, you should more likely do the latter - it makes for much better decoupling. Google "Law of Demeter" for more info.

In the end, you will have to decide case by case. Do you have a concrete example?



No example. I've gotten in the habit of doing it the first way and lately have been questioning if that was the right. But after reading up on LOD I guess I have affirmation that it is not the right way. Thanks.
If Object A contains Object B and Object C needs to be able to send a message to Object B how should it be designed? Should it be something like C calls A.getB().doSomething() or should A have a method that completely hides the existence of B so C calls A.doSomething() which calls B.doSomething.
I'm recieving the following error when trying to use the format tag with bean:write. 'org.apache.struts.taglib.bean.WriteTag' has no property 'format'. Does anyone know what might be causing this? My code looks something like this.

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

...
<logic:iterate name="RateIncreaseMaintenanceForm" id="valueObject" property="rateIncreaseResults" type="RateIncreaseMaintenanceVO">
<bean efine id="record" name="valueObject"/>
...
<bean:write name="valueObject" format="#,##0.00" property="currentBaseRateAmt"/><br>
...
17 years ago
Can someone point me to where I can download the J2EE 1.3 RI Server. I've tried google and been all over sun's website but all I can find is the sun application server. Is the sun application server the same thing as the j2ee RI server? If not where might I find the 1.3 RI server?
I'm trying to access an xml file from my servlet using File xmlFile = new File("/menu.xml"), however the servlet keeps looking in C:\ for the file. How come it doesn't recognize this as a relative path and look in the web app for the file?
19 years ago
When I access the code below from a command line program it gives me the correct output, however when I access the same code from a servlet the output is incorrect. For example when I run from the command line the variable name = "program" and link = "program.html" and the output would be <a href="program.html">program</a>. When accessed from a servlet the variables come out backwards so the output would be <a href="program">program.html</a>. Can someone explain why this happens and how it might be fixed. Thanks in advance.
19 years ago