Kenny Dilger

Greenhorn
+ Follow
since Jan 14, 2002
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 Kenny Dilger

How is the DBA cert more approriate if I am a java developer? Is it important for a developer to understand database administration? I guess I need to look at the two certs and see the differences.
Hello,
Are there any forums like Java Ranch for the Oracle developer certs? I have just ordered the SCWCD Study Kit and will be taking that certification within the next few weeks. I have been getting into Oracle and JDBC programming and would like to next go after the certification from oracle. If anyone knows of any forums for Oracle like this one that would be great.
Thanks,
Kenny
[ March 24, 2003: Message edited by: Kenny Dilger ]
I fixed it. I think it had to do with the scoping of my HttpSession declaration. I was declaring it as an instance variable. I now have it local and pass it around to the necessary methods and all works fine.
Thanks!
Kenny
15 years ago
Using HttpSession was one of my thoughts but I was not sure if that is how it should be done.
Basically what I am doing is wanting to have an instance of IMAPFolder and IMAPStore available so I do not have to re-initialize the connection to the mail server all the time... Should I not do it this way. Would it be better to just re-init them everytime I need them?
Thanks!
Kenny
15 years ago
Okay, what is the proper way of doing this then? I have read lots of posts saying to not use any instance variables. Here you state that instance variables can be used if they are synchronized.
15 years ago
From reading through a lot of threads I have come to the conclusion that instance variables should not be used because in the Servlet model only on Instance of the Servlet class will exist.
So, if instance variables can't be used how are multiple objects/data passed into a method and then in that method when they Objects are initialized used in the doGet and doPost methods.
Basically I have some connection routines to an IMAP mailbox that will happen more than once. I want to put that part into a connect_mailbox method that takes a Folder and a Store. How can the Folder and Store be used else where if they are not instance variables? I have some ideas but am looking for the correct way...
Thanks,
Kenny
15 years ago
For some reason when I invalidate a Session it does not seem to be working. If I have the following code.
session.invalidate();
session = request.getSession(true);
System.err.println("invalidated:" + session.getId());
forwardToPage("/mailapp/Login.jsp", request, response);
The Session ID printed out is the same session ID that was printed out when the session was first created. What could be going on. Could it be a problem at where I am declaring my HttpSession variable? I have another thread asking about HttpSession scope.
Thanks,
Kenny
15 years ago
At what scoping level should the decleration of an HttpSession be at? Is it okay be at the field level or should it be declared in either doGet() or doPost and passed along to methods needing access?
Thanks,
Kenny
15 years ago
Is it OK to leave the Folder and Store open during the life of the Session? If it's not then I guess I will have to create a class to store messages for access while the connection is closed. Since this is a Web interface to an IMAP server I would think leaving it open until the session ends would be fine...
15 years ago
Is there a "proper" way to mix Servlet and JSP pages together? The book I have "More Servlets and JavaServer Pages" says that JSP pages should mostly be concerned with formatting of data received by a servlet.
So does this mean that the Servlet should take care of Data collecting (be it either a Database or some other source) and the JSP page should just take that data and display it.
In my current project I am downloading email message information from an email server and storing the messages in a Vector. Then the JSP page just uses the data from the Vector instead of making its own connections.
In the future I would also use the method for database information. One problem I see could be if the data you are collecting is really large, say from a large database table.
Thanks for any info,
Kenny
15 years ago
Thanks for the info. Name fixed.
I have also read that some people have used some Java Servlet/JSP books. Is that necessary? I took a practice exam just to see where I am at and obviously there was lots of stuff I had no idea on. After studying the API and other notes I don't think it will be a problem though.
Thanks,
Kenny