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.