• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Is onSubmit() mandatory to write when SimpleFormController is used?

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a jsp page called redirect.jsp-----

<% page contentType="text/html" pageEncoding="UTF-8" %>
<% response.sendRedirect("welcome.htm"); %>


In dispatcher-servlet.xml it is written that --------

<bean name="/welcome.htm" class="control.GetValueController" >
<property name="formView" value="index" />
<property name="validator"> <ref bean="userValidator"/></property>
</bean>


So index.jsp will open and in index.jsp it is written that----


<html>
<head>
<script type="text/javascript">
function myfunc(){
var fname=document.getElementById("fname");
var lname=document.getElementById("lname");
window.open("credential.jsp?fname="+fname.value+"&lname="+lname.value,"mywindow","width=200,height=200");
}
</script>
</head>
<body>

<form name="form1">
First Name:
<input type="text" name="fname" id="fname" />

Last Name:
<input type="text" name="lname" id="lname" />

<input type="button" value="click here" onclick="myfunc()" />
</form>
</body>
</html>


Here I didn’t used any spring specified form tag because I don’t have any need to store the input data into any bean at this moment ,can I use this HTML form tag in spring architecture and will I have to write the onSubmit() in GetValueController,because I am not submitting the form present in index.jsp.(please suggest any other suitable controller I can use here)

Thanks in advance
 
Abhra Kar
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello any suggestion?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic