Monday, September 27, 2010

JSP Servlet automatically jump to the wrong instance of the page



Development in JSP Servlet instance to use JSP to achieve this functionality as a command, which can define JSP error page and error in the JSP page Jump to the page when the output error

Log. The following example:

<% @ Page errorPage = "errorPage.jsp"%> errorPage.jsp of the code is as follows: ..... <% @ page isErrorPage = "true"%> .... / / output error log < % = exception.getMessage ()%>

However, this can only be controlled in the JSP page layer. In the J2EE implementation, a lot is often only as a JSP page displays, and business-related database operations are in the background of the servlet execution, and then disposed of after the jump shows a JSP page. This set the framework to achieve the MVC structure, making more difficult the maintenance of the system greatly reduced.

The actual work, though the system settings using the above framework, but by the level of J2EE developers, and custom programming are likely blocked, often encounter developers servlet error on the local treatment may be inappropriate. The most common one is, catch an Exception e, and then just call e.printStackTrace (). This is very serious consequences. Exception occurred once, web page will appear black and white, we are two aspects to it:

鈼?If you are using users. He often overwhelmed and may not know that there is an error, continue to use the system, but this time the system is wrong, wrong to build on the business processes, often resulting in more system-level error.

鈼?If the developer. Users to reflect this error, but do not know the cause of errors. Can only say that there should be black and white. Developers need to debug grasping wrong, to get to the input of the application server error log view, location may be cause of the error, further troubleshooting.

Here, I introduce an effective servlet error handling mechanism, which the contents of all the error Exception thrown to the web page, so that a user error occurs immediately, and the error in time to the developers to submit their positioning error reasons.

In fact, this mechanism is very simple. Idea is to define an abstract BaseServlet base class that inherits from HttpServlet. And add an abstract of the abstract public void doWorkFlow (HttpServletRequest request, HttpServletResponse response) method, this method is that all BaseServlet subclass must be implemented and the only way. BaseServlet course to achieve the service base class method - public final void service (HttpServletRequest request, HttpServletResponse response). It is the code snippet is as follows:

public final void service (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException (try (/ / in the implementation of doWorkFlow () before you can handle this deal with such issues as whether the permission ....... doWorkFlow ();) catch (Exception e) (StringWriter out = new StringWriter (); e.printStackTrace (new PrintWriter (out)); request.setAttribute ("err_msg", out.toString ()); RequestDispatcher rd = this.getServletContext (). getRequestDispatcher ("errorServlet.jsp"); rd.forward (request, response);))

errorServlet.jsp very simple. Code snippet is as follows:

.... / / Output error log <% = request.getAttribute ("err_msg")%>

So the above is an instance of JSP Servlet development features automatic jump through practice effective?







相关链接:



Compare Active X



Rongcheng School Link



DVR-MS to MP4



C + + Motto: As Long As Possible On The Use Of Const



VBScript CStr function



Flash game PRODUCTION - memory game



Finaldata Recovery Partition From Experience



Embedded option: the Incentive for interest rate risk



ASF Converter



How to whiten teeth With Photoshop



Around the "home appliances to the countryside," the strange status of the eight



pc Management tool 2



Flash game production - memory game



QuickTime to MPG



Simple Games Arcade



Sunday, September 19, 2010

CEO? Does not change the financial style, the class!


Such as Carly, her financial mission and Hewlett-Packard's financial goals may seem less than perfect matches, finally making her swallowed their anger "fired." Of course, there are still many cases can be shown that when the CEO with the company's financial mission, its result is perfect ... ...

One example is the great leader of IBM's Lou Gerstner.

Moderate increase in value with a high degree of resource utilization, Gerstner's deficit-based financial style to his leadership of IBM in the process like a duck

More than a year ago, with 21 million U.S. dollars 鍗¤帀璐瑰ゥ鑾夊 severance pay from HP.

This prestigious Queen as CEO during the sale, so HP's loss of millions of dollars. Is generally evaluated as gifted, wise beyond the Carly did not avoid the fate of losing money, what makes her career to the most gloomy times?

"A company make or lose money, and business leaders inherent financial characteristics are linked." In the "business school" manager Community Forum, the American 娉板痉鏅灄鏂?make that claim. But unfortunately, most of the CEO Board of Directors will not take the initiative to find their own fault, they often blame the company to lose money is a lot of internal or external causes combined result.

"How many people do that? You do it?" Ted asked. He admitted that in past research, that they have found that this practice is for the CEO, needs not only courage, but also honest.

Born three financial styles

In the past 20 years, Ted will own most of the energy used in collection management consulting leadership cases, while more than 130 visits and research on global CEO, to understand their financial styles, and use his leadership of the Perth Leadership Institute database and leadership model to analyze the business leaders of the financial style.

In Ted's description, the financial characteristics of a leader is born, some leaders like the use of resources, while others prefer to increase the value of leadership.

He pointed out that the leaders of different financial characteristics will directly affect the enterprise's financial performance and market value; and from the organization's financial results, we should also reflect the financial characteristics of a leader.

From two different financial characteristics, by Ted summarized nine financial missions. They are predators, arbitrageurs, parity operators, speculators, wholesalers, traders, venture capitalists were, related enterprises, mercantilist.

In further elaboration, the Ted that in the long run, these financial missions have their own specific profit models, nine financial missions, there are three essentially profit-oriented, there are three essentially depleted, There are three essentially average, without any type of profit, so they can be reduced to three major financial styles, that is, surplus, deficit, disorder.

For example, Bill Gates, Ted is a low use of resources and predators. And, and ordinary people to imagine difference is that smart is just a loss of potential, but the character of people within a very suitable CEO.


Determine the success or failure with

The results show that the short term, leaders will improve or weaken the financial characteristics of the three basic functions within the company, sales, products or services, operation.

To predators, mercantilist, venture capitalists who can see different example cheap business leaders because of their different financial performance of different missions.

Predators often bring high sales performance, mercantilists the opposite, venture capitalists are often increase investment, a large amount of resources to achieve performance parity is generally not increased business value, not use of resources.

In product performance, often predatory products and service deficiencies, mercantilist mature markets are expected to provide the quality of venture capital because they will focus on high value-added and unique, yet more opportunities to improve quality parity is not exclusive supplier of products, but with high quality.

Mission in the operational performance of the four financial performance also varies. The most outstanding performance of predators, they can at least have the greatest use of resources to more enforcement power; mercantilist its performance once again the contrary, their relatively weak execution; venture's execution is also weak, but the reason is because more its focus is different; parity implementation of the strongest companies, in order to maintain low-cost carriers, but they were inspired by the amazing creativity.

Proved, CEO of the financial mission of the company in a particular way in sales, product or service, operational impact on the outcome. When the CEO's financial mission of the company's financial goals and match between the degree is not enough, trouble came.

Such as Carly, her financial mission and Hewlett-Packard's financial goals may seem less than perfect matches, finally making her swallowed their anger "fired." Of course, there are still many cases can be shown that when the CEO with the company's financial mission, its result is perfect.

One example is the great leader of IBM's Lou Gerstner. Moderate increase in value with a high degree of resource utilization, Gerstner's deficit-based financial style that allows him to lead IBM's process like a duck. And this style, with IBM matching the culture at that time. In a mature industry, IBM, innovation is not strong atmosphere, value added tend to moderate; in resource utilization, were living high.

Ted suggested that, when the prospective CEO's decision to join a company, be sure to confirm whether their financial characteristics consistent with the new organizational culture, and secondly, the surplus-style corporate culture, CEO more likely to succeed.

Value of the company to change its gains

Easy to be successful, does not mean all. For the leader, their business is really successful business, it must be tested by the market. Ted is no compromise on this, he pointed out that business success and failure, ultimately through the company's market value reflected.

Ted enterprise market situation was divided into three types, growth, recession, or growth or decline. They point to the final track of the market value of 9.

Predators, speculators, arbitrageurs are in varying degrees, to the value of the path of growth; mercantilist, related enterprises, traders at different levels tend to decline; venture capitalists who, wholesalers, parity operators in growth and recession, the market value of mixed track came up OK.

Venture capitalists who have the financial mission Jobs, has increased the tendency of high-value and high resource utilization trend, but the two can not make him succeed.

Jobs later amended their financial characteristics, with moderately high values tend to increase spending to the speculators themselves, ultimately making the value of Apple's track from the ambiguities become increasingly clear, shining the market value of the company.

"You are a unique way to affect their market value, aware of this, you know how to do it." Ted warned.

He suggested that the value of their already very clear the CEO, tried to change their financial mission, so that the objectives of the company match, "you will change the value of the company's trajectory."






相关链接:



Recommend Source Editors



Wang Haibo: Society World Partners, With 10 000 Win



Brief Gallery And Cataloging Tools



Flv to ts



Training of new employees approach HR



reviews Newsgroup Clients



Using the seven Combat the Heart Jakarta Struts



Official air strike 2 Cheats



f4v PS3



Agents How to live better?



Huang Guangyu of "money power" and the weak POWER



News about Audio Players



ps3 xvid



h264 format



e-cology in the Pan Micro SERIES 31