At 3/28/2000 01:04 PM -0800, Kevin Duffey wrote:

> >Would another option be to check the current context (instead of having
> >multiple suffixes)? (This way everything still routes thru your single
> >controllerServlet.)
>
>Not quite sure what you mean by this. I have to admit there are still things
>I dont quite understand in the whole servlet model. Does the context refer
>to EVERY application running? Or when you get the servlet context during the
>init() method, is that specific to the application the init method is called
>in?

I'm using tomcat, which comes with three contexts configured to run "out of
the box." They are:
1. /examples    (examples)
2. /            (ROOT)
3. /test        (test)

I think you may be using JRun, which I haven't (really) used....


> >Does it make sense to add a parameter to the perform() function to
> >represent the target Page? E.g.
> >

snip, snip

>I would think not, because how is the controller servlet going to pass the
>right forwarding URL to each action? I mean, what if the logic of one action
>class may forward to many different pages depending on the outcome of the
>logic? I would think the forwarding page should be defined or figured out in
>the action class, EJB, whatever is doing the logic. An example would
>be..what if you needed to go to a different page based on a STATE drop-down
>on a form. Each state has its own page. The controller servlet I guess could
>read this in from an XML file..but I think this is "logic" that shouldn't be
>done in the controller servlet.

I was thinking that under normal circumstances there would be one (and only
one) preferred next page. (The use case modelling "Happy Days" (primary)
scenario.) All that you say is true and none of that would be prevented by
specifying a preferred next page. Again, my goal here was to make things
more configurable, rather than embedding application flow logic within a
compiled Action class. Hmmmh, I can see that I'll have to give this whole
area a lot more thought. Comments, anyone, on how you do this?

> >I think of the action class objects as still part of the controller level
> >(from Model - View - Controller). Since their role in life is to mediate
> >between the UI & the Model (your EJB objects, or, as in my case, our Corba
> >objects, whatever). If your business logic objects have method signatures
> >including HttpServletRequest and the like, then you're only going to be
> >accessing them thru a web-based frontend. (Not necessarily a bad thing if
> >you're a web developer!)
>
>Thats a good point. I am curious as to how you pass, say, the values of a
>form field on to the EJB (or business) layer. Do you just pass it the
>request object, or do you parse the request object into some intermediary
>object, pass that on to the business layer, and it works with it that way?

Yup! The Action objects simply parse out the data and plug it in to a
business object (what everybody is referring to as the bean, which gets
stored in the session object). Each business object provides a thin layer
over a corba object (the model components). HTH to clarify what I/we are
doing.

Enjoy!

Mike

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to