Ben Zung

Ranch Hand
+ Follow
since Mar 25, 2004
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 Ben Zung

Thanks for the reply.
No I did not move it to the first in the list but doubt that would make a difference.
And yes I have tried to rename it to something else and still broke. The name in the source is actually something else, I posted as "db3" for the purpose of asking the question. The real source name is "abdominaltrauma" and it is hard to imagine it is reserved anywhere.

Thanks you for looking at the problem.

Ben
13 years ago
You could also look for some code online to intercept the system output and save it to someplace. But it's kind of shaky if you had only webapps directory to put the file. You probably don't want to reside it right under webapps. And if you put it under your application's, say log or tmp directory, you may have problem to re-deploy your application -- I had done that before. I was not able to un-deploy the application successfully because the log file was open.

Good luck.
Ben
13 years ago
Hi ranchers, I have this problme that I could no figure out. Any help is appreciated. Following are part of the context.xml file for my application, which needs to make connections to any of them depending on user's selection.

The problme is, the application can obtain connections to db1, db2, db4 but never db3. The error message was "Name db3 is not bound in this Context".
The way the application obtains connection is:

(dbName is either db1,db2,db3 or db4 and lowercased before being looked up)

And all the four databases are hosted by the same sql server. I checked there wasn't a typo or anything.

Thanks in adavance for your help.

Ben
[ July 01, 2008: Message edited by: Ben Zung ]
13 years ago
Hello,

we have set up an env where IIS forwards jsp/servlet to tomcat using Jarkata/ISAPI. Everything works fine until receltly new situation arise and we are kind of stuck.

First, say the IIS server IP is 1.2.3.4, and one tomcat instance is installed their too. Virtual host myHost.org is pointing to the ip and using IIS/Jarkata to serve servlets from application "CatMouse" in tomcat. Now we have a new application "HiddenCatMouse" deployed under the same tomcat. Another virtual host (with https) mySecureHost.org is pointing to the same IP. Our concerns then becomes, how do we do to prevent users from accessing the secured "CatMouse" from un-secured channel? I mean, supposedly user is able to do this "http://myHost.org/CatMouse/catchMouse.do". Now that I have the "hiddenCatMouse" run by the same tomcat, what do I do to prevent user from typing in "http://myHost.org/hiddenCatMouse/catchMouse.do", where "hiddenCatMouse/catchMouse.do" would be available only from "https://mySecureHost.org/hiddenCatMouse/catchMouse.do".?


I hope I have made it clear and I apprciate any comments in advance.

Thanks,

Ben
13 years ago
1. extend JOptionPane


2. have the component, say comp that contains the tabbed pane implements "ChangeListener"

3. in your "public void stateChanged(ChangeEvent e) "
method, instead of
use

Gook luck.
[ March 30, 2006: Message edited by: Ben Zung ]
15 years ago
Check out SwingWT(Swing and awt). It has something similar to it.
15 years ago
How about "JFileChooser"?

Good luck.
15 years ago
in the ranch SCJD/SCJP forum there are lots of good talks about it -- since you passed SCJP, you may find it is very helpful whether you are going to take SCJD or not regarding MVC.

Good luck.
15 years ago
You must have had

Instead

HTH.
15 years ago
Yes, other than set the cell editor to be a combo box, you need to set the cell renderer (view -- when/where users can see).
Here is a custom one that you can set for the "time period" column:

then


Good luck.

ps. To be just on the safe side, to prevent MyTableCellRenderer (now a JComboBox) to get too many items added, do "removeAllItems()" before "addItem(value)".
If the our renderer was a Label, text field, there is no such worry.

[ March 23, 2006: Message edited by: Ben Zung ]
[ March 23, 2006: Message edited by: Ben Zung ]
15 years ago
If you google "Java print", you got some very usefull hints/helps.

Good luck.
15 years ago
How did you get passed with these two identical constructors?

You probably had it compiled ok before and edited the class again. The two same constructors will fail the compiler. Remove the one that does not have the Radio Buttons added to pane1 and try again.
[ March 22, 2006: Message edited by: Ben Zung ]
15 years ago
I worked on a project for Uni. of Chicago a while ago only not to finish it before moving to Utah. I am able to find a reference here from IBM. Hope it helps.
BIDI

Good luck.
15 years ago
There are lots of examples if you google "FileChooser".
Here is one of them.

Good luck.
15 years ago
Why do you have jButtonMoreDataActionPerformed method while actionPerformed is already there for you?
Nothing wrong with having it though but did you have someway to invoke this
jButtonMoreDataActionPerformed method when the button gets clicked?
15 years ago