Model 2 questions

2002-04-24 Thread Jay Burgess
In the Model 2 architecture: (1) Is there a difference between having the controller servlet store the "model" beans in the Request or the Session before forwarding to the JSP? Is one better than the other, or preferred from some reason? (2) How am I supposed to handle the case where the bean(s)

Re: 2 questions..

2000-07-12 Thread Sundaram Ramasamy
Rathinavel Palaniappan Sent: Tuesday, July 11, 2000 8:43 AM To: [EMAIL PROTECTED] Subject: Re: 2 questions.. you can create a bean instance by using the scriptlet but the advantage you get over useBean tag is the scope of the bean. If i remember correctly , the difference between the scopes are

Re: 2 questions..

2000-07-11 Thread Dinesh Venkatraman
00 6:13 PM Subject: Re: 2 questions.. > you can create a bean instance by using the > scriptlet but the advantage you get over > useBean tag is the scope of the bean. > > If i remember correctly , the difference between the > scopes are, > > session - life time is equvalent

Re: 2 questions..

2000-07-11 Thread Daryani Santosh
gt; To: [EMAIL PROTECTED] cc:(bcc: Santosh Daryani/IT/Aon Consulting) Subject: 2 questions.. > Hi pals, I have 2 basic questions w.r.t jsp. 1)What is the use of doing can't i directly create an instance of the class (i mean bean) in the scriptlet and use it ? is ther any advanta

Re: 2 questions..

2000-07-11 Thread Rathinavel Palaniappan
you can create a bean instance by using the scriptlet but the advantage you get over useBean tag is the scope of the bean. If i remember correctly , the difference between the scopes are, session - life time is equvalent to session expire time (which is configurable). request - fo

Re: 2 questions..

2000-07-10 Thread Veena
omments. thanks Nagaraj - Original Message - From: Rakesh Bhat <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 11, 2000 8:43 PM Subject: 2 questions.. > > Hi pals, > > I have 2 basic questions w.r.t jsp. > > 1)What is

2 questions..

2000-07-10 Thread Rakesh Bhat
> Hi pals, I have 2 basic questions w.r.t jsp. 1)What is the use of doing can't i directly create an instance of the class (i mean bean) in the scriptlet and use it ? is ther any advantage ? 2)can anyone tell me the difference btw 1) request 2)session 3)application

Re: Model 2 questions

2000-04-19 Thread Hugh Tran
Hi, Where can I get the Model 2 paper/article that's been referred to? I tried to browse the news group but can't seem to find it. Thanks, Hugh === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST

Re: Model 2 questions

2000-04-18 Thread Kevin Duffey
Hi, Haha..had me on the floor. What you said is something MS should learn to live by..but oh well. I hear you loud and clear. >Now, back to our regularly scheduled discussion of JSPs and servlets ... So I was wondering... ;) =

Re: Model 2 questions

2000-04-18 Thread Kevin Duffey
Hi, >So, again, replacing a single action object (and it's associated data) is >quick and painless. But what if you are making broad changes that affect a >workflow, for example, which affects many classes and default target >pages?? One possibility might be to ignore this and allow your error

Re: Model 2 questions

2000-04-18 Thread Mike LaBudde
At 4/18/2000 10:53 AM -0700, Kevin Duffey wrote: >Hi, > > >Let's assume that the Hashxxx you use to store your list of > >request URIs is > >stored as an attribute of your servlet context. Then: > > > > HashTable uriList = (HashTable) > >servlet.getServletContext().getAttribute("urilist");

Re: Model 2 questions

2000-04-18 Thread Kevin Duffey
Hi, >Let's assume that the Hashxxx you use to store your list of >request URIs is >stored as an attribute of your servlet context. Then: > > HashTable uriList = (HashTable) >servlet.getServletContext().getAttribute("urilist"); > >Since you can get & set attributes this way into your servl

Re: Model 2 questions

2000-04-18 Thread Craig R. McClanahan
Kevin Duffey wrote: > Hi, > > >> Again..why a Hashtable instead of Hashset? > > > >And again the answer: believe it or not, there are still people > >in the world > >running JDK 1.1 -- which includes nearly everyone that is not on one of the > >"popular" OS platforms. Even on one of the arguabl

Re: Model 2 questions

2000-04-18 Thread Mike LaBudde
At 4/17/2000 03:48 PM -0700, Kevin Duffey wrote: >I will say, even if you do load it all up during the init method, if there >is a way to "reload" the XML config file without restarting the server, its >possible you can "add" new action classes and thus add new forms/pages to >use those actions

Re: Model 2 questions

2000-04-18 Thread Daniel Lopez
Hi, I'll put my 2c while most of you are sleeping :), Kevin Duffey wrote: > > Hi, > > >How do I make this work with the HashTable/Map/Set so that I can > >ensure only > >a single instance of any action class? I assume I can load all the action > >classes into a HashSomething on the servlets ini

Re: Model 2 questions

2000-04-17 Thread Kevin Duffey
Hi, >> Again..why a Hashtable instead of Hashset? > >And again the answer: believe it or not, there are still people >in the world >running JDK 1.1 -- which includes nearly everyone that is not on one of the >"popular" OS platforms. Even on one of the arguably most popular platforms >(Linux), p

Re: Model 2 questions

2000-04-17 Thread Craig R. McClanahan
Kevin Duffey wrote: > Hi, > > >This is why I use *two* Hashtables, not one. > > Again..why a Hashtable instead of Hashset? And again the answer: believe it or not, there are still people in the world running JDK 1.1 -- which includes nearly everyone that is not on one of the "popular" OS platfo

Re: Model 2 questions

2000-04-17 Thread Kevin Duffey
Hi, >This is why I use *two* Hashtables, not one. Again..why a Hashtable instead of Hashset? Seems to me since after the Hashtable is loaded its only "read" from (ok..assuming we pre-load all the instance classes during init..which is what I feel is best since I know all the action classes will

Re: Model 2 questions

2000-04-17 Thread Kevin Duffey
Hi, >How do I make this work with the HashTable/Map/Set so that I can >ensure only >a single instance of any action class? I assume I can load all the action >classes into a HashSomething on the servlets init() and get the appropriate >action and call perform()? Is this correct? Yeah..how do w

Re: Model 2 questions

2000-04-17 Thread Craig R. McClanahan
"Bailey, Jeff A" wrote: > > > > Dynamic class loading (without fleshing out the error > > handling) looks like this: > > > > String actionClassName = ...;// Whatever action class you need > > Class actionClass = Class.forName(actionClassName); > > Action action = (Action) actionC

Re: Model 2 questions

2000-04-17 Thread Sam Heisz
You can check on-the-fly for null in your hash map, that way you don't need to specify the names of all possible action classes in init(): > // check the requestURI > actionName mappings > String actionName = (String) mapping.get(request.getRequestURI()); > Action action = (Action) actions.get(ac

Re: Model 2 questions

2000-04-17 Thread Bailey, Jeff A
> Dynamic class loading (without fleshing out the error > handling) looks like this: > > String actionClassName = ...;// Whatever action class you need > Class actionClass = Class.forName(actionClassName); > Action action = (Action) actionClass.newInstance(); How do I make this

Re: Model 2 questions

2000-04-17 Thread Craig R. McClanahan
"Bailey, Jeff A" wrote: > [snip] > Craig gave some pseudocode for an action class that had the perform method: > > public interface Action { > public void perform(HttpServlet servlet, HttpServletRequest > request, HttpServletResponse response) > throws IOExceptio

Re: Model 2 questions

2000-04-17 Thread Mike LaBudde
Jeff: I'll try to give you some pointers, based on *my* implementation of model 2 architecture >Craig gave some pseudocode for an action class that had the perform method: > > public interface Action { > public void perform(HttpServlet servlet, HttpServletRequest >request

Re: Model 2 questions

2000-04-17 Thread Kevin Duffey
Hi, >Craig gave some pseudocode for an action class that had the perform method: > >public interface Action { > public void perform(HttpServlet servlet, HttpServletRequest >request, HttpServletResponse response) >throws IOException, ServletException; >} //

Model 2 questions

2000-04-17 Thread Bailey, Jeff A
This message is rather long, just a warning. . . Hello all, I would like to start this message by thanking those who have contributed to the model 2 discussion that I have been following. After reading (and re-reading) over the threads, I thought it would be a good time to discuss my design str

Re: Model 2 questions

2000-03-28 Thread Dmitri Namiot
> While I understand the benefits of using request instead of session, I > cannot figure out the syntax on JSP to get the request, i.e. if Action > class stores response class in request and not in session. Is it just > the same as for session, i.e. instead of calling session.getAttribute > we re

Re: Model 2 questions

2000-03-27 Thread Craig R. McClanahan
to resemble pretty > close a Command pattern fro GoF book. Yes, and it has a method Execute. > Pretty much the same idea, adapted slightly to reflect the fact that it is a "web application command", not just a "command". > > Vadim. > Craig > > -Original

Re: Model 2 questions

2000-03-27 Thread Shun, Vadim
, and it has a method Execute. Vadim. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 25, 2000 10:03 PM Subject: Re: Model 2 questions ... Yes, the in the JSP page grabs it back out. You have to match on the scope where your servlet placed the bean

Re: Model 2 questions

2000-03-25 Thread Craig R. McClanahan
Kevin Duffey wrote: > Hi All, > > First, Daniel, if you reading this, I am having troubles sending email to > you..so I will ask my questions here. > > Concerning the approach Daniel and Craig have discussed with me here, I have > to say I am quite pleased how easy it is and how simplistic the de

Model 2 questions

2000-03-25 Thread Kevin Duffey
Hi All, First, Daniel, if you reading this, I am having troubles sending email to you..so I will ask my questions here. Concerning the approach Daniel and Craig have discussed with me here, I have to say I am quite pleased how easy it is and how simplistic the design is. Oh yeah..I finally got i

Re: Model 2 questions

2000-02-07 Thread Dan Brown
In the article, the ShoppingServlet is the controller in the sense that you advocate. All posts are sent through it. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 06, 2000 3:13 PM To: [EMAIL PROTECTED] Subject: Re: Model 2 questions

Re: Model 2 questions

2000-02-06 Thread Craig R. McClanahan
Ginny Peterson wrote: > We plan to use the Model 2 architecture to develop our applications, as > described in Govind Seshadri's article "Understanding JSP Model 2 > Architecture" > (http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html). I > have a couple of questions about Model

Model 2 questions

2000-02-06 Thread Ginny Peterson
We plan to use the Model 2 architecture to develop our applications, as described in Govind Seshadri's article "Understanding JSP Model 2 Architecture" (http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html). I have a couple of questions about Model 2: Should the application's main