私のプロジェクトでは、ユーザーごとに、テキストボックス、ラジオボックス、ボタンなどのフォーム要素が異なります (タイプ、数、順序はすべて異なる場合があります)。ユーザーごとにデータベースから取得する必要があります。この点に関して、jsp のコンテンツを表示および管理するための提案が必要です。この種のコンテンツ表示を管理するためのツールまたはエンジンはありますか?
PS: Struts と Spring 統合フレームワークを使用しています。
最初のリクエストをサーブレットにマップしてから、ユーザーに基づいてコンテンツを動的に生成する必要があります (ユーザーを特定できるように、ユーザーについて事前に知っていると仮定します)。
There is no such free tool available to generate dynamic contents like textbox, radio, button etc.
You need to write a template.jsp , which will have if else block like
So here in template.jsp fetch types for this user from database and based on that iterate below for loop.
for(String type : types) {
if(type.equals("textbox")) {
// custom taglib for rendering textbox or textbox html tag
} else if(type.equals("radio")) {
// custom taglib for rendering radio or radiohtml tag
} ... and so on
}