In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the example analysis of the interaction between JSP and EJB, which has a certain reference value, and interested friends can refer to it. I hope you will gain a lot after reading this article.
The following is a snippet code that demonstrates the interaction between JSP and EJB session bean.
In JSP, you should have as little Java code as possible.
In the above example, the JSP designer has to deal with and understand the mechanism of accessing EJB. Instead of compressing the EJB mechanism in a Mediator and using the EJB method as a Mediator method, you can use Mediator in JSP. Mediator is usually written by EJB designers. Mediator can provide additional values such as attribute caching, etc.
JSP scriptlet code must be minimized. If you want to request EJB directly in JSP, you may have to write a lot of code in JSP, including function blocks such as try...catch, to operate.
Using a standard JavaBean as an intermediary between JSP and EJB servers can reduce the amount of Java code in JSP and improve reusability. This JavaBean must be a wrapper of the EJB you access.
If you use standard JavaBean, you can use the JSP:useBean tag to initialize EJB parameters, such as server URL and server
Safety parameters, etc.
Custom tags can also be an option. However, this requires more coding than a simple JavaBean wrapper.
This place must be rewritten as small as possible and ensure that the content of the JSP script is as light as possible (light).
Thank you for reading this article carefully. I hope the article "sample Analysis of the interaction between JSP and EJB" shared by the editor will be helpful to you. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.