Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Spring
Search Coderanch
Advance search
Google search
Register / Login
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
Tim Cooke
paul wheaton
Paul Clapham
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Liutauras Vilda
Saloon Keepers:
Tim Holloway
Carey Brown
Roland Mueller
Piet Souris
Bartenders:
Forum:
Spring
request is not going into onSubmit
indu iyengar
Ranch Hand
Posts: 115
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi
am developing a login application with mvc. the request is straightly going to Loginsuccess page without entering into onSubmit() method..
my code in student-servlet.xml
<bean name="/login.htm" class="controllers.Login1"> <property name="formView" value="Loginform"></property> <property name="successView" value="LoginSuccess"></property> <property name="commandName" value="student"></property> <property name="commandClass" value="com.std.CheckStudent"></property> </bean>
code in Login1 Controller
public class Login1 extends SimpleFormController { private static final Logger logger = Logger.getLogger(Login1.class); public Login1() { setCommandClass(CheckStudent.class); } protected ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors)throws ServletException { BasicConfigurator.configure(); logger.info(" *********** in submit *************"); String id = request.getParameter("stid"); String pw = request.getParameter("stpw"); HttpSession session = request.getSession(); session.setAttribute("stid",id); return new ModelAndView("LoginSuccess"); } }
thanks ,
Indu
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
spring mvc validator
Spring MVC AOP Logger
IllegalStateException:Neither BindingResult nor plain target object for bean name available
how to get session from spring-config.xml
Problem with form submission
More...