Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

eric zhao

Greenhorn
+ Follow
since Feb 26, 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 eric zhao

We are using JBuilder's dataset | resolver | provider to display resultset in tables. Is there a way to align the table column caption (columnnames) to the left? By default it is in the center.

Thanks.
14 years ago
Tom,

Still more problems. Even if I pass in the userid and password with the constructor you mentioned, I still get the following error messge:
[Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Any ideas? I have googled this error and haven't found any pointers.

thanks.

Eric
Tom, thank you very much for your help.

Do you happen to know if there is some website having good documentation for DBCP? DBCP's own website has very limited examples and how-tos.

Have a great day.
Thanks, Tom. But with DBCP, when dealing with oracle or mysql, I have userid and password passed in explicitly in the connection string. I don't know how to do the same with SQL Server.

Any suggestions? Do I have to change my wrapper code for DBCP for SQL Server? Below is the code I wrote to wrap DBCP (pooled driver) used for my projects, it works if the userid and password are in connectionURL. How can I pass the userid and password outside the connectionURL?

ObjectPool connectionPool = new GenericObjectPool(null, maxActive, GenericObjectPool.WHEN_EXHAUSTED_BLOCK, 5000);

ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI, null);

PoolableConnectionFactory poolableConnectionFactory = new
PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);
Class.forName("org.apache.commons.dbcp.PoolingDriver");
PoolingDriver driver = (PoolingDriver) DriverManager.getDriver(
"jdbc:apache:commons bcp:");
driver.registerPool(poolname, connectionPool);


Many thanks.

Eric
[ August 29, 2005: Message edited by: eric zhao ]
Folks:

Anyone has experience using DBCP with SQL Server? What is the connection String for SQL Server? I am using following for oracle, but couldn't find any documentation for SQL Server: (replace # with :, : was displayed as icons for some reason)

jdbc#oracle#thin#userid/password@server#port#Databasename

Thanks.

[ August 24, 2005: Message edited by: eric zhao ]
[ August 24, 2005: Message edited by: eric zhao ]
Thank you very much, Ben. I got it completely wrong between the <%@ include> and <jsp:include>.

Thanks.

eric
15 years ago
JSP
Folks:

jsp1 has a return statement at the end. Then I include it on top of jsp2 with:

<jsp:include page="jsp1" flush="true"/>

Now jsp2 still displays even though jsp1 has a return statement! Why is that? I tried it on JRun and Tomcat inside JBuilder.

I am trying to write jsp1 as a common security check jsp, so it returns if user doesn't have the right role. Then I can just include it on top of every page that is not for regular user. However, it doesn't work :-(

Help? Thanks.
15 years ago
JSP
I only hope there are more smart interviewers out there.

I agree an US degree works pretty much the same in canada. However, most entry level jobs are taken by local new graduates through internships. Another difference I noticed, Canada's job market relies more on agencies than in the states. Although my own experience with agency in both countries are they are pretty much useless unless you are already in senior level. Definately not to promote it, but I only applaud for my friend who pulled it off pretending he is senior level. Sometimes, this f***ing system just doesn't deserve much respect.

Anyhow, with a MS degree in computer from states and 2 years working experience, I got 3 real interviews in three months between June and august last year before landed a job. Nothing happened at all in the first two months. Good test of patience (rather not though). Overall, it's MUCH better than 2001, 2002 in US if you had been there. Two months back, I even got contacted by an agency for a temp job without ever applying for it. That's very different from a year ago.

Anyway, best wishes for all the java people.
15 years ago
While it's true that the job market is getting better in toronto (there has been more hiring ads in banks web sites etc), it is still very hard. And most of the contract jobs are only for people with 5 years experiences. After working in states for 2 years as a java developer and landed in Toronto in April 2004, it took me 5 months to land another java job paying 38k (entry level in an university setting).

In short, if you are still in entry level and not graduating from a canadian university, it's still very dark out there. Unless you are capable of lying big on your resume to try your luck on some dumb agencies.
15 years ago
Folks:

I would like to use a properties file for JDBC properties cross web module (don't want to use web.xml per web module) that can be read from a standard JDBC library we wrote. It works fine on JRun when we put the properties file under .../server/default. But I couldn't figure out where I should put it on Tomcat or can it be done? If you had experience with this, please give me some feedback. Thanks a lot.

Eric
15 years ago
Thanks a lot, Charles. I will try it out.
17 years ago
I have tried to find a way to add page brak or underline those kinds of print control characters in my java output file. However, it seems impossible in ASCII and I didn't find a way in unicode either.
Anyone could help?
Thanks a lot.
17 years ago
Our tomcat is hosting a couple JSP and Servlet that would make connection to SQLServer and calling xalan to parse XML. We checked our code to make sure all database connections are closed. However, after a few days, tomcat will use up all the cpu and has to be restarted.
Any idea where we should look at to find out what the problem is?
Thanks.
17 years ago
how do you populate the combox for origin and destination? Did you hard code the entries for those airports? If so, when they use another copy of db.db, it won't work anymore.
I know a firm called setFocus has benn doing this for a long time. Doesn't make much sense for americans, but foreigners, if they can't help you with your status here, why not? It's so much better than paying the tuition for nothing these days.
17 years ago