Rich Knight

Greenhorn
+ Follow
since Feb 05, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Rich Knight

Thanks a lot Jamie and prabhat, it works! Hind sight is 20/20 but I can't believe I went on that wild goose chase! Yall have been a huge help. As I get more into java I hope that I can be as much of a help to others. Thanks again!
Jamie,
Yes, it was my initial thought to just use Statement, however I got an "Invalid column name" exception when I tried to access the returned value via the "<%=rs.getString("id")%>" expression below (commenting it out removes the error, but of course that renders the page useless). I'll give your suggestions a try. Thanks.

[ February 21, 2002: Message edited by: Rich Knight ]
Thanks a lot. I follow you, and see my mistakes. I now realize that I didn't pose my initial question accurately. 'myFunc' is a function that decrypts an ID. So when I pass it in 'joe' it decrypts Joe's ID and returns that value. What I'm confused about is how to build my statement incorporating the query, ie., how to tell 'myFunc' what table 'joe' resides ('users') in and what field ('id') of joe's record to decrypt. Does that make sense, or am I just totally missing it?
Thanks for your patience, here's the code for the function in question if it would help matters.
Giving things a try, I tried the following code and it returned a "null" value for "returnVal". Am I in the ballpark? Thanks.
Thanks for your replies.
prabhat,
Thanks for posting the code. If I have to call a function with parameters I use the setXXX(), correct? However, I don't see where I place my actual SQL query. I'm new to SQL so forgive me if it's obvious.
Hello,
I need to run the following query in my JSP:

Where myFunc is a function stored in my Oracle database. When I execute the query in Toad, it provides the expected results. The Java API says to use CallableStatement, however, I'm totally confused on how to use it, if it is indeed the answer. CallableStatement seems to be for stored procs and not for stored functions? Any help would be appreciated, this is the last piece of my app and it's due tomorrow.
Thanks,
RK
[ February 20, 2002: Message edited by: Rich Knight ]
I'm able to boot up fine now, but when I try to login to my JSP I get the following error generated in my log file. The error is only generated if the user actually exists in the database, so I'm sure I'm connecting and accessing the info. Thanks :

[ February 20, 2002: Message edited by: Rich Knight ]
Thanks for the reply,
Yes I am using classes12.zip, and I renamed it to .rar. Same results .
Hi,
I'm trying to use Tomcat 4's JDBCRealm to authenticate users. When I ran
tests with mySQL, everything went fine. However now that I need to move the
JSP application to production I have to connect to an Oracle 8i database. I
set everthing up the same way by editing the server.xml file, but now Tomcat
won't start. I even tested getting the connection and accessing the
database in one of my jsp's and it works fine, so I don't believe it's the
connectionURL. It gives me the error that I pasted below. Please help,
this unforseen dip has placed me behind schedule at work.
Code added to server.xml (worked fine using mySQL):

Error when I attempt to launch Tomcat:
22 years ago
Hi,
I'm trying to use Tomcat 4's JDBCRealm to authenticate users. When I ran
tests with mySQL, everything went fine. However now that I need to move the
JSP application to production I have to connect to an Oracle 8i database. I
set everthing up the same way by editing the server.xml file, but now Tomcat
won't start. I even tested getting the connection and accessing the
database in one of my jsp's and it works fine, so I don't believe it's the
connectionURL. It gives me the error that I pasted below. Please help,
this unforseen dip has placed me behind schedule at work.
Code added to server.xml (worked fine using mySQL):

Error when I attempt to launch Tomcat:
22 years ago
Hi,
I'm trying to use Tomcat 4's JDBCRealm to authenticate users. When I ran tests with mySQL, everything went fine. However now that I need to move the JSP application to production I have to connect to an Oracle 8i database. I set everthing up the same way by editing the server.xml file, but now Tomcat won't start. I even tested getting the connection and accessing the database in one of my jsp's and it works fine, so I don't believe it's the connectionURL. It gives me the error that I pasted below. Please help, this unforseen dip has placed me behind schedule at work.
Code added to server.xml (worked fine using mySQL):

Error when I attempt to launch Tomcat:

[ February 20, 2002: Message edited by: Rich Knight ]
Thanks,
I just compared the session time to the current time and it produced the required results.
RK
22 years ago
JSP
Hi,
I know that you can set in the web.xml the session time-out. However, it refers to idle-time. Is there a way to set the session to be a set amount of time, for example give someone10 min to answer a quiz?
Thanks,
RK
22 years ago
JSP
Hi,
I'm attempting a simple Form-Based login to authenticate a user and give access to my site. I authenticate their username and password against a database and based on the role they have (also stored in the database) I grant them access. I'm using Tomcat 4's JDBCRealm to authenticate.
Unfortunately my results are very inconsistent. Sometimes I'm able to login and sometimes I get 404(Resourse not found) errors. In the address bar I notice it reads: "<myApp>/j_security_check" when it should be forwarding it to "<myApp>/index.jsp". Also I sometimes get a 401 (Invalid Redirect) error. Below is the relevant code to my login page, taken straight from tutorials. Any help would be appreciated.
Thanks
RK
22 years ago
JSP