JSP - Process a form with a Bean Method with more than one parameter

elTico

New Member
I have this form and want to process it:\[code\] <form id="myForm" class="form-horizontal" action="/user" method="post"> <fieldset> <div class="control-group"> <!-- Text input--> <label class="control-label" for="input01">Email:</label> <div class="controls"> <input name="email" placeholder="email" class="input-xlarge" type="text" value="http://stackoverflow.com/questions/15580828/<%=?????????"> </div> </div> <div class="control-group"> <!-- Text input--> <label class="control-label" for="input01">Password:</label> <div class="controls"> <input name="password" placeholder="password" class="input-xlarge" type="text" value="http://stackoverflow.com/questions/15580828/<%=request.getParameter("password")%>"> </div> </div> </fieldset> </form> </div> <div class="modal-footer"> <a href="http://stackoverflow.com/questions/15580828/#" class="btn" data-dismiss="modal">Close</a> <input class="btn btn-primary" type='button' value='http://stackoverflow.com/questions/15580828/Save Changes' onclick='document.forms["myForm"].submit();'> </div> </div>\[/code\]However, i have a bean method with two parameteres and I tried to handel this by using: \[code\]public void insert(String email, String password) { User entry = new User(email, password); PersistenceManager pm = PMF.get().getPersistenceManager(); pm.makePersistent(entry);}\[/code\]My question is, how to connect the Bean properly with the form, which uses two parameters?btw the Bean is not in a servlet!
 
Back
Top