Is it OK to call a Session Facade (or a Business Delegate) directly from a JSP (without going through a controller)? Let's say I have a JSP which needs to get some user data to display in a page. Using Struts, I can have an action make the call to my facade and put the resulting value bean into the request and then forward to my JSP. On the other hand, I can just access the JSP directly and have it get the data it needs by calling the facade directly. The latters seems much easier, especially when I don't know who will be linking to my page. Is this approach OK?
In the JSP I have:
<logic:iterate id="status"
collection="<%=sessionFacade.getUserReportList(user)%>">
... some html ...
</logic:iterate>
-
Calling a Session Facade from a JSP (4 messages)
- Posted by: Michael Mattox
- Posted on: March 10 2002 16:37 EST
Threaded Messages (4)
- Calling a Session Facade from a JSP by Vivek Srivastava on March 11 2002 22:26 EST
- Calling a Session Facade from a JSP by Michael Mattox on March 12 2002 17:07 EST
-
Calling a Session Facade from a JSP by Anirban Mukhopadhyay on March 15 2002 12:33 EST
- Calling a Session Facade from a JSP by make ship go on March 26 2002 11:55 EST
-
Calling a Session Facade from a JSP by Anirban Mukhopadhyay on March 15 2002 12:33 EST
- Calling a Session Facade from a JSP by Michael Mattox on March 12 2002 17:07 EST
-
Calling a Session Facade from a JSP[ Go to top ]
- Posted by: Vivek Srivastava
- Posted on: March 11 2002 22:26 EST
- in response to Michael Mattox
It will definitely work but is not a good design practice and not a recommended way to do it. -
Calling a Session Facade from a JSP[ Go to top ]
- Posted by: Michael Mattox
- Posted on: March 12 2002 17:07 EST
- in response to Vivek Srivastava
Why? This is called Dispatcher View in the Core J2EE Design patterns book. I'm just trying to figure out when it's better to use Dispatcher View and when to use Service to Worker.
-
Calling a Session Facade from a JSP[ Go to top ]
- Posted by: Anirban Mukhopadhyay
- Posted on: March 15 2002 00:33 EST
- in response to Michael Mattox
yes I think this is absolutely ok as ATG dynamo has implemented the same thing with their predefined tags. -
Calling a Session Facade from a JSP[ Go to top ]
- Posted by: make ship go
- Posted on: March 26 2002 11:55 EST
- in response to Anirban Mukhopadhyay
lol. I dont know if I would look to ATG dynamo as a reference for good programming standards.