Could current approach to TDD in Servlets be optimized?

ぃ、小莉子 提交于 2019-12-08 19:41:29

I think the main problem here is that you are building your html page by manually putting the html elements together from various strings. As you have experienced, this leads to code that is hard to test and maintain.

Try using JSF or some simliar technique instead. This will enable you to focus only on the functionality on the Java side, which is much easier to test.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!