Open yesterday morning, the person in charge suddenly asked me, the client control information, how to get in the background? I would like to answer: Assume that the overall submission form, in C #, uses code request to get the contents of the form. Suppose the partial commit, in the use of JS and Ajax interaction, through the Ajax Open () and send () method to the background, through the Ajax onreadystatechange () callback function to receive back data.
comprehend by analogy. Extrapolate, when the original learning Javaweb. It's been a long time. How the HTML and servlet interact is now explained by a simple servlet login instance that explains the interactive mechanism of the entire login process. Source code:http://pan.baidu.com/s/1ntCztBr.
Is the structure of the entire project.
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvcxv3zw56agu=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">
login.html for the login page, set the form processing class to Logincheck (servlet) in the Action property in the form table. Then Logincheck calls DAO to access the SQL database (JDBC Connection database) to get the results of the query. The Logincheck class selects the jump page based on the returned results (involving sendredirect () jumps and getrequestdispatcher () jumps, the details will be seen in the blog: http://blog.csdn.net/lishehe/ article/details/23133105).
Not very . UCH. With this little demo, speed can help you learn the servlet.
Copyright notice: This article blog original article. Blogs, without consent, may not be reproduced.
Servlet instance Commentary