This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Building Blockchain Apps and have Michael Yuan on-line!
See this thread for details.
Win a copy of Building Blockchain Apps this week in the Cloud/Virtualization forum!

Walter Chen

Greenhorn
+ Follow
since Jan 10, 2003
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 Walter Chen

Hi, not sure it is appropriate to post on this forum (but probably more relevant here than others) -- does anyone know if there is any open source tool to generate "verification images"? By that I mean the kind of automatically generated images which contain a randomized string of alphanumeric characters so that the user has to type in the string manually, thus preventing robotic registrations, postings, etc.

Thanks in advance,
Walter
11 years ago
Hi, group:

In our system we use JSF, we have a log-in page and want to always create a new HTTP session when the user accesses this page. The reason is sometimes users do not always log out of their previous session and they try to log in again (could be a different user), but the session data will still remain there.

Is there a header or something in the JSF code that we can use to force create a new session?

Thanks,
Walter
13 years ago
JSF
I have an EJB project which is packaged into a jar, which is in turn packaged into an EAR file. I have a customized xml file which I put under the META-INF directory, but how do I open it in my java code?

Thanks,
Walter
IBM RSA/RSD is about the worst IDE I have ever used. Sometimes it even corrupts xml files, for example, if you have a string which is enclosed in quotation marks (""), sometimes one of the quotation mark will become "e, thus leaving the string not fully enclosed by the quotation marks anymore. And when viewed from RSD everything looks normal until you view the source code of the xml file. It is really a piece of turd.

Walter
13 years ago
I am using IBM/Rational Software Architect (RSA). I am starting the server from inside RSA.

Thanks,
Walter
13 years ago
How do I specify JVM command line options (such as -mmx, etc.) with Websphere 6.0? Is it available on the Administrative Console?

Thanks in advance,
Walter
13 years ago
Thanks for the reply but getEnv has been deprecated and the API says use getProperty or getProperties, but those do get the OS environment variables that I want.
Hi, all:

I am having difficulty getting OS environment variables inside a J2EE app. For example, on Windows, the TEMP variable is defined as "C:\temp" -- you can see this by typing "set" on any command prompt window. I want to retrieve it from the java code (running on an app server), but System.getProperties does not return it. What is the best way to get it?

Thanks,
Walter
The client and server are running on the same server inside the same JVM, I am using Websphere 6.0, I will check the VM tomorrow, but I believe it is IBM's standard VM.

Thanks,
Walter
13 years ago
This is weird! Say I have a session bean with a local home and local interfaces. From the client, I could get the local home interface by JNDI look-up, this is my code:

Object obj = initial.lookup("java:comp/env/ejb/MySessionLocal");
System.out.println("Looked up local home, class is: " + obj.getClass());

The System.out prints out something like the following:

Looked up local home, class is: ejbs.EJSLocalMySessionHome_5c39c28d

So, ejbs.EJSLocalMySessionHome_5c39c28d is the stub. I looked at the code inside this file, it has the following:

public class EJSLocalMySessionHome_5c39c28d extends EJSLocalWrapper implements ejbs.MySessionLocalHome {

public EJSLocalMySessionHome_5c39c28d() {
super();}

So far so good. It is clear that this stub implements the local home interface ejbs.MySessionLocalHome


However, in my client code, when I do the following:

ejbs.MySessionLocalHome mySessionHomeIf = (ejbs.MySessionLocalHome) obj;

I get a ClassCastException. How can this be? It DOES implement the home interface, why can't I cast it???

Thanks in advance.
Walter
13 years ago
I don't mean to flame, because I have a real reason for saying this. I really do not like JSF, I know it is component based, event driven and etc., but what it really is is Swing stretched across the client-server. All the event handling has to be sent to the server, this will create a lot of traffic between the client (browser) and server.

Also, most IDEs (Eclipse, for example) do not make a clear distinction between the client side handlers (JavaScript) and server side handlers (backing bean methods), and often times, based on my experience, a lot of front end developers do not have a very good understanding of these too. Thus, it is prone to developing a server-side operations heavy application.

Just my $0.02.

Walter
13 years ago
JSF
Hi, all:

I have struggled with this for a while -- this is semmingly such a simple and common task, which is really frustrating.

I have build a dynamic web project, I want to import an external jar file. I used Rational Software Developer Platform's utility to import the jar file, and I can see it right there in my project (under java resources). When I instantiate a class in this jar file, the context sensitive editor recognizes the class (it would auto-complete the statement, for example). So far so good. But, when I try to run the project, I got a javax.faces.el.EvaluationException: java.lang.NoClassDefFoundError.

It sounds like the compiler is able to recognize the jar file, but it is not in the runtime classpath. I've struggled for a few hours now and could not get it to work, any ideas?

Any help will be much appreciated.

Thanks,
Walter
13 years ago
I can see that because the lifecycles of EJBs are managed by the EJB container and there are lifecycle methods such as ejbCreate and ejbRemove there is no need for the finalize method, but what is the official explanation?
Thanks,
Walter
Hi, there:
Is there a visual editor for XSL-FO? I am not just talking about an XML editor, to be specific, this is what I really want:
I am trying to use XSL-FO to generate PDF files. The resulting PDF files have a lot of tables. Is there a WYSIWYG editor from which you can see the resulting PDF file while you are editing the XSL file (does Adobe Acrobat do this? I've never used the full version but the reader)?
Thanks,
Walter
Hi, Balaji:
Wow, that works. Thanks! Amazing how a little trick can go a long way ;-)
Walter