Tony Walters

Ranch Hand
+ Follow
since Feb 13, 2003
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 Tony Walters

I've a feeling this is not possible, but does anyone know of a means in JSF of providing a split page with one half vertically scrollable - independantly of the other half. The scrollable half contains text and graphics. I'm guessing frames is the only way to do this.

Thanks in advance.
18 years ago
JSF
Does anyone know how to implement a right-click menu using JSF? I'm trying to add one to the MyFaces Tree2 component.
18 years ago
JSF
Thanks guys. That one really stumped me. I've been using Java (a lot) for 5 years or so, but never come across that. Simple when explained really.

Ta

Tony
18 years ago
Hi all

I was playing with some primitive casting, like so:

public class Test {

public static void main(String[] args) {

float f = (float)99.9;
double d1 = 99.9;
double d2 = f;
System.out.println("f: " + f);
System.out.println("d1: " + d1);
System.out.println("d2: " + d2);
}
}

Here's the output:

99.9
f: 99.9
d1: 99.9
d2: 99.9000015258789

I'd be *very* grateful if someone could explain to me why d2 seems to be greater than d1 (I know its not much, but don't understand why!).

Ta

Tony
18 years ago
Thanks Scott

Unfortunately I don't have any control over the XML document itself, its coming from another system, so I cant alter the doctype.

At the moment I've put the DTDs with the XML docs and that seems to work. Unfortunately, I'm not sure this will be an option in the production environment since (again) I have no control over this directory.
18 years ago
Hi All

I'm doing some XML processing in a servlet. Problem is it can't seem to find the (SYSTEM) DTD. Where in the WEB-INF should it go to be automatically picked?

Thanks in advance.
Tony
18 years ago
Thanks for the advice. I'm going to give Rational Rose a try. Downloading the XDE Developer Plus version. Does anyone know if this also provides sqeuence diagrams from existing source code?
Can anyone reccomend a product to produce class diagrams from existing source code. I've just started supporting an application and could use some class diagrams to make sense of things. Is this something Rational Rose is any good at?

Thanks in advance.
Maybe this question would be better asked in the OO, Paterns, and UML forum. Am I allowed to ask it there, or does that count as cross-posting?
The system cannot (as yet) be tied to a particular application server, so a pure, non-proprietory J2EE solution is needed.

As for the DAO pattern, I can see how it would help abstract the underlying database, but I don't think that actually addresses the problem I'm having.

Basically, I need to issue complex read queries separately from update (create, update, delete) queries. I'm wondering whether to do these in a Session bean using JDBC, or perhaps using JSTL from the JSP page itself.
Hi All

I'm in the middle of building an application using EJB and Struts. The problem I am having is with EJB-QL. I need some fairly complex queries and EJB-QL just doesn't appear up to the job.

I remember reading about an EJB design pattern for performing read-only queries using a session bean and JDBC (I think), and am wondering if this is a possible solution. I have relied heavily on design patterns up until now, and want to justify my solution to this particular problem in relation to tried and tested design patterns.

Is there anybody that knows of such a pattern, or something similar, to solve this problem. Any links to explanations would also be helpful.

Thanks in advance.
If I do that, the system won't be portable to another app server, or another computer. At the very least this system will at some point be on a production server, rather than a dev one.
19 years ago
I'm uploading some files to Tomcat via a webapp. I was surprised to find the default location was to store uploaded files in the bin directory. Is there a uploaded file location specified for all J2EE-compliant JPS/Servlet containers, and how do I get it?

Advice gratefully received.
19 years ago
Just unzip Tomcat into your root directory (or wherever). No other install is necessary. To check if it works, double click 'startup.bat' in the 'bin' directory and, when it has started, point your browser at http://localhost:8080/ and you should see the welcome page. 8080 is the default port Tomcat listens at.

Your web applications go int the webapps folder. But you need to follow fairly strict rules regarding the structure and content of a web application.
19 years ago
Hi, fairly new to struts and getting confused about the use of ActionForms and validation. I can get one to work using simple String values in the form bean like this:

class MyFormBean extends ActionForm {
private String value1;
private String value2;
etc;

However, what is confusing me (and I don't know if its even possible) is using a complex object in an ActionForm. Can I have an object like this:

class MyObject {
private String value1;
private Collection values2;
etc.

Then put it into an ActionForm like so:

class MyActionForm extends ActionForm {
private MyObject myObject;
etc.

Is this possible? and if so, how do I reference fields in the ActionForm on a JSP?

Any suggestions gratefully received.
19 years ago