We also talk about technologies that use JSP to implement groom and sohu news systems.

Source: Internet
Author: User

I have just completed such a similar system over the past two days. I hope to discuss with you the jsp implementation technology.
A system like Sina sohu should be similar, that is, the background dynamically generates html pages at the front end, no matter what tools are used in the background.
Because the company forced it to do such a news system, there was no way to do it. After two days of connection, we finally got it done, and soon it will be published on the company's homepage.
Of course, I only manage the background and use jsp + javabean to dynamically generate html files.
I implemented it in this way.
Similar;
2. The jspsmartupload component is used to upload news images. Then, the img src label in the template is replaced with the generated image path;
3. The database saves the file title, file name, date, and other information at the same time, and there is no need to retain other information such as news content;
4. You just need to retrieve the xxx.htm file name and file title from the data warehouse;
I also used a few tips, because the jspsmartupload component does not support file upload rename, so I set a temporary directory to store uploaded image files, then I wrote a method to copy the file to the specified directory through the IO operation. Of course, the name is also replaced with the corresponding name of the htm file. This is to prevent files from having the same names. Generally, files are named by date or automatically adding variables.
After preliminary testing, the speed is still relatively fast, because news are static htm files.
After two days of hard work, I can take a break tonight :)
If you have used jsp for a similar system, please join us.

Related Article

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.