Reggie McDougal

Ranch Hand
+ Follow
since Sep 27, 2004
Merit badge: grant badges
For More
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 Reggie McDougal

How do I tell in J2me type of object ie. passing and object into a method
that I need to determine the type before evaluating
18 years ago
I'm getting an OI error with create image, I have the files in a res directory, casing all ok, I'm using eclipse, it don't make sence must be an eclipse problem




18 years ago
Setting the DB_Bean as a super class to product solved the problem OK.

I have a couple of servlets that save form data and they cant extend DB_Bean.

What about setting up an interface to impliment the DB connection and returning the resultSet.

Is there more elegant solution than just sub classing to DB_Bean?
[ February 15, 2005: Message edited by: Reggie McDougal ]
I want to use a Bean for my DB Connections and results set by just passing in the SQL and returing a Result Set.

But I'm stunped here How can I close the connection?

I want to used this or a similar approach so I don't have to repeat the same code multiple times. If some one could give me a way I can achive this?



// Instantiating method



[ February 15, 2005: Message edited by: Reggie McDougal ]

[ February 15, 2005: Message edited by: Reggie McDougal ]
[ February 15, 2005: Message edited by: Reggie McDougal ]
Hey it works now - I implemented Serializable in ProductGeneralFunctions and it stopped throwing the Exception.
19 years ago
JSP
Hi all,

I'm trying to get the following code to run...

try{
if (session.getAttribute("arraycache") == null) {
// set it
session.setAttribute("arraycache", new ProductGeneralFunctions());
} else {
pgfHelper = (ProductGeneralFunctions) session.getAttribute("arraycache");
}

etc.

When initialised, the attribute starts as null, so the setAttribute call works, but on subsequent page loads I get a ClassCastException.

Any ideas? (yes pgfHelper is declared as of the type ProductGeneralFunctions)
19 years ago
JSP
Ok lets just say I want to clone a row in a table, how maight I do that?

Reg
If I wanted greater seperation between View and Model would ejb be the best appraoch.

Based on the senario above, using TagLib for display and a controller
to manage requests and utililise ejb to implement the logic.

From an ejb, cause I'm using stored procedures in Oracle I would have to use BMP (from what i have seen CMP and CMR looks like a major pain) now so I can understand ejb a little better, would I even go as far as as session bean to store the data, in this case an ArrayList and a persistance bean to connect with the Intergration tier.

Apart from clear sepeartion using a MVC pattern what other possible advantage gains would I get from taking this approach.

Lets say part of the app is restricted to certain users and other parts public.

Reg
If I call a taglib from a JSP with the usual syntax <prefix:tag>, and that tag outputs something like the following <prefix:another tag>, will this output like a nested tag, or, will the <prefix:another tag> end up written to the browser?

Basically, what will happen if I do the above?

Or, is there a better way to "nest" tags?

Reg
[ January 31, 2005: Message edited by: Reggie McDougal ]
19 years ago
JSP
I need to get an idea of the best approach to an MVC application I'm developing.

At this point it is simple, a catalog that displays products by using a jsp using a bean to call the method that connect to the database and retrieve the record set in an ArrayList to the jsp and display in a form for editing.

The form then submits to a servlet to write to the database.

Rather than just simply calling a Bean with all my method that retrieve the data I need, based on my simple description of my app would there be any advantage to implementing ejb in my retrieval of reference data and writing it back to the database?

What perceived benefits would ejb give me over the basic simplicity of POJO?

Reg
So I should set these in the session object? and get them as I need them?

Reg
19 years ago
JSP
I have a result set saved into an ArrayList, how would I go about cloning
a record or element in the arrayList.

Then if I add an new record I have to insert in instead of updating in the database.

How might bI appraoch this problem.

Reg
Using Weblogic 8.1 which support the 1.2 spec

Reg
19 years ago
JSP
Bear,

Thanks for the reply.

If I use a taglib let say the one below I'm passing these parameters
by appending to a url, I still have to declare the vars in my jsp page for it to work and use request object to get the parameters.

Is there another way to declare and get the params, or do I still have to
have some scripting in my jsp?

Reg



19 years ago
JSP
Hi there,

I need an opinion on the below approach in my application.

I have app using a controller, and within the app a form that points direcly to a servlet that makes a database connection, uses a prepared statement and inserts data.

What possible security issues are there in this approach, is ther a better way and more secure way to update and insert into my database?

If someone could give me some advice would be great.

Reg

[ January 31, 2005: Message edited by: Reggie McDougal ]
[ January 31, 2005: Message edited by: Reggie McDougal ]
19 years ago