Yup. I got that.Jeanne Boyarsky wrote:Rudy: I meant any Java code. I didn't have any specific code in mind.
Bear Bibeault wrote:Arguments such as "it's easier" are invalid.
Correctly, as defined by whom?Bear Bibeault wrote:It's much important to do thing correctly, than to do them easily.
Hi JeanneJeanne Boyarsky wrote: What do you think are the reasons people keep writing code in the JSP?
Greg Bag wrote:Hey guys I'm kind of confused on what to learn next. As in, what J2EE technology should I be learning next. My main purpose is for marketability and finding jobs.
I know Servlets, JSP, JDBC
Sandesh Shashidhar wrote:
I have a PDF file in my Webcontent/dir/helpdir.pdf and in JSP page i am trying to download the PDF by calling a servlet
The PDF is located in Webcontent/dir folder
But in your code you are opening the /doc directorySandesh Shashidhar wrote:String filePath =request.getContextPath()+"//doc//";
Hi Bear. I'm wondering if select count(*) would really be more efficient than say select username. I'm thinking that for select count(*) it has to read every row in the table no matter what, whereas for select username it will stop searching when the row is found.Bear Bibeault wrote:
If you only care whether the record exists or not, why fetch all the data with a "select *"? To check for existence a "select count(*)" will be more efficient.
Aryeh just to clarify, the DbUtil class need not be a Servlet, in fact should not be a Servlet, as it will not be interacting with the HTTP client, it will only be interacting with your servlets.Aryeh Golob wrote:
From this point, I would use a static class, say DbUtil to perform all interactions with the database.
Stefan why do you feel that using the static methods in the DB Access class is sub-optimal?Stefan Evans wrote:But your mention of servlet context attributes and static classes sound sub-optimal.
I'm curious to ask, if I may, why do you feel that you need a design pattern for something like this? Realistically speaking does it offer something to you that your own solution does not?Nico Van Belle wrote:
I know how to do this technically (with an interface) but I was wondering .. isn't there a Design Pattern for this?
thank you!![]()