Originally posted by Subhadip Chatterjee:
Hi,
<url>?jsessionid=2089718#...For an example, "www.amazon.com" woulds be changed to "www.amazon.com?jsessionid='2089718#'".
Originally posted by John Meyers:
It would be the container's job to keep them in sync wouldn't it ?.
Originally posted by Bear Bibeault:
The bottom line is that it is asking for trouble to use read/write class or instance variables in a servlet. And as the context scopes are availabe to store data in a safe fashion, there's no need, so don't do it.
I understand how I can do this with bit-masking, but JAVA doesn't allow me to use literal hexadecimal values, so it's proving a bit challenging.
Originally posted by Ilja Preuss:
Originally posted by Stan James:
This makes me uncomfortable. ABase has the method we need, but it doesn't claim to know anything about the interface. It might have the signature but do something completely undesirable with it. AChild glues together the interface which promises certain behavior and superclass which does not.
Of course polymorphism is all about doing different things with the same signature and I like to be able to introduce new unpredicted behavior at runtime, so maybe AChild takes responsibility for knowing the ABase really does the right thing. This still looks like a trick to sneak ABase into someplace it doesn't belong.
Back in VB4 days we used to practice what I called "polymorphism by coincidence". A method gets a parameter of unknown type and tries to call a method on it. If the parameter object has that method you go merrily on your way. If not then "on error goto" does something else. Does that sound similar?
Originally posted by Devesh H Rao:
Makes sense to me if ASample is a customized class for specific clients, ABase is the core of a product and AChild and A are used as switch to turn on or off specific features of the product for a client.
The product ABase core can contain all the business functionality which is common across clients, AChild can build on client specific functionality and A can be used to provide conditional access.
Originally posted by Mr. C Lamont Gilbert:
I agree Ilja almost. Problem is child class does not adapt base class. it just wears an interface and inadvertently opens itself up to new usages.
As it stands the interface almost seems to be scavaging for any class that fits its signature![]()