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.
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.