In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you the "sample analysis of NetBeans Struts applications", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let the editor lead you to study and learn the article "sample Analysis of NetBeans Struts applications".
As one of the company's systems needs to be WEB, several common WEB technologies are investigated. I tried NetBeans Struts and understood the development process of NetBeans Struts. The following is a small example of a trial Login.
Development environment: JDK1.5.06 Struts1.2.7 NetBeans5.0 (embedded Tomcat5.5.9)
1 first, use NB to create a WEB project: Hello. Select the check box for whether or not to use Struts1.2.7.
2 create a LoginActionForm.java file:
Public class LoginActionForm extends ActionForm... {private String userName; private String userPwd; public String getUserName ()... {return userName;} public void setUserName (String userName)... {this.userName = userName;} public void setUserPwd (String userPwd)... {this.userPwd = userPwd;} public String getUserPwd (). {return userPwd;}}
3 create a LoginAction.java file:
Public class LoginAction extends Action... {public ActionForward execute (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)... {LoginActionForm loginForm = (LoginActionForm) form; String forword= "success"; System.out.println ("Name:" + loginForm.getUserName ()); System.out.println ("Passwd:" + loginForm.getUserPwd ()); return mapping.findForward (forword);}}
4 create a Login.jsp file:
Login Welcome login into the system
UserName Password
5 modify the struts-config.xml file to add the following:
6 deployment:
You can deploy the Web service using NetBeans.
7 Test:
Start Tomcat and type http://localhost:8084/Helo/login.jsp in the browser.
The above is all the contents of the article "sample Analysis of NetBeans Struts applications". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.