Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7960911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:53:27+00:00 2026-06-04T04:53:27+00:00

I referred to sample spring application on netbeans.org and tried to create a simple

  • 0

I referred to sample spring application on netbeans.org and tried to create a simple login application. When I run I get this error:

javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'login' available as request attribute

Here is my login.jsp

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Business SMS Login</title>            
</head>

<body>
    <div id="mainContainer">
        <spring:nestedPath path="login">
        <form name="frmBSMSLogin" action="" method="post">
        <div id="controls">
            <div id="lgnUsername">
                <label for="txtUsername">Username</label>                     
                <spring:bind path="login.username">
                    <input type="text" name="${status.expression}" value="${status.value}" id="txtUsername" maxlength="20" class="textInput"/>
                </spring:bind>
            </div>
            <br/>
            <div id="lgnPassword">
                <label for="txtPassword">Password:</label>
                <spring:bind path="login.password">
                    <input type="password" id="txtPassword" maxlength="20" name="${status.expression}" value="${status.value}" class="textInput"/>
                </spring:bind>
            </div>
        </div>

        <div id="submitSection">
            <input type="button" value="Submit" class="buttonInput"/>
            <input type="reset" value="Reset" class="buttonInput"/>
        </div>
        </form>
        </spring:nestedPath>
    </div>
</body>

Here’s the LoginController.java

package controller;

import org.springframework.web.servlet.mvc.SimpleFormController;
import java.net.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;   
import org.springframework.web.portlet.ModelAndView;
import service.Login;

public class LoginController extends SimpleFormController {
private Login login;
public LoginController() {
    setCommandClass(GetLoginDetails.class);
    setCommandName("login");
    setSuccessView("dashboard");
    setFormView("index");
}

public void setLogin(Login login){
    this.login = login;
}

protected ModelAndView onSubmit( HttpServletRequest request, HttpServletResponse response, Object command, BindException errors)throws Exception {           
    //System.out.println("are we here?");
    GetLoginDetails l = (GetLoginDetails) command;
    ModelAndView mv = new ModelAndView(getSuccessView());
    mv.addObject("helloMessage", login.authenticate(l.getUsername(),l.getPassword()));
    return mv;
}    

}

This is the applicationContext.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:p="http://www.springframework.org/schema/p"
   xmlns:aop="http://www.springframework.org/schema/aop"
   xmlns:tx="http://www.springframework.org/schema/tx"
   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

<bean name="login" class="service.Login"/>

</beans>

I have been on this thing since last entire week I think. I am doing this by referring to netbeans’ example. Here’s the link http://netbeans.org/kb/docs/web/quickstart-webapps-spring.html. I haven’t found any solution to this. Begin from PHP background I am already finding spring framework too damn difficult, however I am trying with full efforts. I am using Netbeans as my IDE. Is it a good choice or Eclipse is the standard one? Also please give me some advice on how to debug the application. simple echo or print_r as in php looks too much of a luxury here 🙂

P.s I had posted similar question before, and someone from around here had complained of it being a code dump and downvoted me. There are many question where there is a huge code dump yet people were kind enough to help. So anyone who thinks this a code dump or somewhat in rude language please don’t waste your precious time downvoting this question. I am a genuine learner here to ask for help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:53:28+00:00Added an answer on June 4, 2026 at 4:53 am

    Try to remove

    <spring:nestedPath path="login">
    

    after

    <body>
        <div id="mainContainer">
    

    spring:nestedPath – Sets a nested path to be used by the bind tag’s path.

    UPD:

    Read about this tag here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have referred this for creating error message tool tips, to be displayed continuously
From this answer in stack overflow and the sample project referred there, i got
I referred this on SO as the problem was similar to mine. In my
I referred to the DOC and it said: completion ... This block has no
I know it's simple, but I can't seem to make this work. My function
I am trying to get the Zend_Filter_Input to work as required on a simple
Referred this question first. But seems my context is different. I'll try to be
This may be a toughie so you get bonus points! THIS IS A .TXT
I have a simple MVC3 Controller Action like this [HttpGet] [OutputCache(Duration = 1200,Location=System.Web.UI.OutputCacheLocation.Server)] public
I have a simple WCF service setup that uses JSON. In this service I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.