Simple download of the source code of the SSH2 development shopping website, and download of the ssh2 source code

Source: Internet
Author: User

Simple download of the source code of the SSH2 development shopping website, and download of the ssh2 source code

Original article: simple download of the source code of the SSH2 development shopping website

Source code: http://www.zuidaima.com/share/1550463431412736.htm

Simple shopping website, using SSH2

How to handle program bugs:

Severe: StandardWrapper. Throwable

Java. lang. IllegalStateException: Cannot initialize context because there is already a root application context present-check whether you have multiple ContextLoader * definitions in your web. xml!

Solution: annotate the web. xml file.

<! -- Spring
<Servlet>
<Servlet-name> context </servlet-name>
<Servlet-class>
Org. springframework. web. context. ContextLoaderServlet
</Servlet-class>
<Load-on-startup> 1 </load-on-startup>
</Servlet>
-->

The jar package is missing:

Http://www.zuidaima.com/jar/search/jstl-1.0.1.htm

Http://www.zuidaima.com/jar/search/servlet-api-2.4.htm

Http://www.zuidaima.com/jar/search/standard-1.0.1.htm

For more information, see: shopping.


Which can be downloaded to the java source code of the SSH2 + JQuery web project. It is not a simple logon function and cannot be complicated. It is suitable for beginners to learn.

You can go to csdn to check whether there are many programs on it.
 
Code of the ssh2 Project (especially shopping cart, or shopping cart and jsp can also be referenced)

The first storage is stored in the session. in put ("test", test), however, you save it in the second time, So it overwrites the first result and inserts the second result directly,
Solution: 1. Save the information about the shopping cart in the Table. Each time you add a commodity, a piece of data is added to the table,
2: If the shopping cart is saved to the session, a set is saved in the session. Each time a piece of data is added to the set, the set is resaved to the session,
3: Save the shopping cart information in the cookie. The method and session are saved,

We recommend that you use a table for storage, which is much more convenient and saves a lot of trouble. You can check the database directly each time you use it, which is also easier for future maintenance.

OK! Pick up your keyboard.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.