Lu Battist

Ranch Hand
+ Follow
since Feb 17, 2003
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Lu Battist

I'm creating a file that has to be '|' (pipe) delimited from a java program running on unix (ASCII). It then get transfered to an ibm mainframe (EBCDIC) through a secure ftp type of program that I don't have control over. From there it gets transfered over the net and in the hands of the customer, probably back into a unix file again.

That pipe, on the customer end, shows up as a superscript 3 character (as in x cubed). On my end from the unix side, the pipe is a hex 7C. I have no idea what the hex code for the superscript 3 is on the customer end. No other characters seem to be affected, probably because they are standard ASCII (1-127) characters that translate well.

Anybody know a way to get the correct character to the customer end?
Even knowing which encoding produces a superscript 3 might be useful as it doesn't seem to be on any EBCIDIC/ASCII map I've seen.

10 years ago
Try doing a publish to the integrated WAS server.

I find that with EJB is doesn't regenerate a lot of the files until you try to publish, but it will report compile/interface implementation errors immediately. For instance you add a method and promote it to the remote interface. The RMI stubs and other generated code won't be updated until you publish. Also, you won't be able to publish if it doesn't have write access to those files or if there are any other compile errors.

Sometimes doing a Project->Clean and select clean all projects can also help.
11 years ago
Is it never showing up or only sometimes?
If it is never appearing, I don't have any idea but if it just stops on you then I think I might know.

RAD 6.0 is very buggy, the console output frequently stops updating. Ususally, a start and stop on the integrated test server does the trick, but sometimes I have to bounce RAD entirely.
11 years ago
Thanks Jason! I'll give that a try.
I'd like to use an absolute file path, but don't seem able to do so.
I should mention this is a stand-alone J2SE program, no Web-Container.

Anyone know a way to do this? I'm trying to use the following FileSystemXMLApplicationContext which seems to only allow relative file paths. Perhaps, I'm fairly new to Spring so perhaps there is an alternate way I've overlooked.

If I pass in "/user/appRoot/properties/projectX/projectX.xml", Spring will only look for it as a relative path off the current directory the program was launched from. So it prepends the current directory as in "/user/appRoot/scripts/user/appRoot/properties/projectX/projectX.xml" and causes an IOException. A relative path will work. As in "../properties/projectX/projectX.xml", but this isn't what I want to do.

I'd say that's fine if I had said "user/appRoot/properties/projectX/projectX.xml" but the '/' in front should indicate an absolute path, should it not?

I'm not against a relative path. If you put your configuration file in the same directory as the script that launches your application that's a beautiful thing. I just wish it had the flexibility to do both absolute and relative paths.
I'd like to use Spring framework for dataSource configuration but have a requirement to not store any passwords in clear text.

Is there a way for Spring to handle this, or for me to handle this by subclassing something, so it unencrypts the password given in the config file before attempting to establish the database connection?

I have several stand-alone (no web container) java programs that I want to run on multiple systems (Unix, Windows, test, production environments). There are several configuration parameters that I need to keep out of the jar for easy modification.

What's the best way to do this?

Some options I've considered are:
1) Using a straight properties file and passing the full path name of this file as a command line option. (Works but was hoping for a better way.)

2) Using a properties file and access it through a resource bundle.
(Not working for me. I have to run the app as a jar and can't seem to have the app find the resource outside the jar, no matter what classpath settings I use.)

3) Using Spring framework and an XML config file. (Essentially the same as 1 and 2, you still have to tell spring where to find the config file.)

4) System enviroment variables. (Haven't tried this yet.)

5) other ideas?

Thanks in advance for your input.
11 years ago
I don't know of any way to disable the back / forward buttons reliably either.

However, if a user logs out and uses the back button to go back into your site and tries to submit(reSubmit) anything from that page, your code should recognize the session is not valid and forward the user to the login page.
12 years ago
This will work better, but if you expect nulls in the stringArray
you may need to test for that and use the preparedStatement.setNull(...) method.

[ March 16, 2005: Message edited by: Lu Battist ]
You need to surround the following line:
race r1 = new race(rq);

like this:

with a try-catch block, that catches the sql exception thrown by the race constructor. Or delcare that the action performed method throws SQLException but somewhere up the line it has to be caught and dealt with so might as well do it right there on line 69.

By the way:

Editing post:
You may prefer to just remove the SQLException being thrown here if you've handled it in the constructor:
public race(String raceq)throws SQLException

You may need to move the following line into the try block, I can't remember what exceptions this one might throw.
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
[ February 16, 2005: Message edited by: Lu Battist ]
Rovas, thanks for your reply. The site navigation is pretty open, almost a matrix style navigation. There is a left hand navigation menu and plenty of links on various pages. So I don't see any potential in throwing an invalid page flow exceptions for my site - except when I'm in a linear progression and what I need from session is not there as in the case of previous bookmark. This has merit in catching bad flows from two or more browsers, but if the flow is not a bad one, I can still be in trouble with different values for the same session key. On browser X, he might now be on page A with color="blue" in session and on browser Y he might be on page A with color="brown" in session. In actuality, there is only one color in session for both browser X and Y and it is either blue or brown depending on which was saved last.

One thing that did come to mind, was if I was able to replace all links with buttons. That could eliminate multiple browsers opening through the links, but I'd still have the problem if they did a File->Open->New Window.
12 years ago
Ritu, thanks for the suggestion. Of course I'd prefer to let the user do what they want, but I'll consider anything that eliminates the problem. How do you detect if a user has opened a new broswer window? It doesn't even go through the login process, so was wondering how you could detect it.

User name and session id would be identical. Are you also tracking the particular page the user is on -(if he was on two different pages at the same time you'd know he opened a window) or is it easier than that?
12 years ago
I'm running into session problems where a user is using IE, goes to my site with a fresh browser, then right clicks a link on there and opens it in a new window. This creates two browsers with the same session id.

This user now can enjoy all kinds of weird mysterious errors as he navigates to different parts of the site because the two browsers may store different values with the same key value and since they have the same session id, they directly interfere with each other.

Does anyone know how I might handle such a problem?
(My site is stateful so I can't just switch to a stateless model.)
12 years ago
One last idea, its more of a workaround.

select substr(code, 1, 5) from ... where ...
[ September 17, 2004: Message edited by: Lu Battist ]
This is interesting! I take it there is no ending single quote way at the end of the output. You could try to modify the select statement:

select rtrim(code) from ... where ...

This will probably not work if it is really failing to put the last single quote on that string. Wonder if there is some weird backspace or delete character captured in the actual database.

If you have access to db2 client. Try to run it directly.
db2-> select '"' || code || '"' from ... where ...

This will let you see how long it really is, but if there are control chars in there it may still look the same as the JDBC output.
[ September 17, 2004: Message edited by: Lu Battist ]