0

什么可以在java中调用jsp文件2控制器文件?

这是Jsp文件

<form:form commandName="userProfile" method="post" action="createuserform.html" id="userForm" enctype="multipart/form-data">       
<table class="detail">
<tr>
    <th><label for="userProfile.userName"><fmt:message key="global.username"/>:</label></th>
    <td>
        <form:input path="userProfile.userName" id="userName" size="50" maxlength="300"/>
        <form:errors path="userProfile.userName" cssClass="fieldError"/>
    </td>
    ...
    ...
    ...
    <td>
        <input type="submit" class="button" name="submit" value=" Save " onclick="return checkPassword();"/>
        <input type="button" class="button" name="cancel" value="Cancel" onclick="window.location.href='<c:out value="${ctx}"/>/listuser.html'">
    </td>
</tr>

</table>    

这 2 个示例文件控制器在 java 这是 CreateUserFormController.java

import java.net.InetAddress;

public class CreateUserFormController extends SimpleFormController {


    public CreateUserFormController() {
        setCommandName("userProfile");               
        setCommandClass(UserUploadModelHelper.class);
    }
    ...
    ...
    ... 
}

这是文件 CreateUserLogFromController.java

public class CreateUserLogFromController extends SimpleFormController {


    public CreateUserLogFromController(){
        setCommandName("userLog");
        setCommandClass(UserUploadModelHelper.class);
    }
    ...
    ...
    ...
}

如何调用jsp文件两个控制器文件???

4

0 回答 0