Regarding Login application program
Hi this is shiva. iam writing a small login form using struts1.3.10 version. once iam submit the login button it shows NULLPointer Exception. I write a SOP Statement in ActionClass. in that, the values are not getting from the formbean.my formbean class name is "myform" and ActionClass is "myAction".
the following code is written in myAction class.
public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest req, HttpServletResponse res)throws IOException
{
myform Logf=(myform)form;
String un1=Logf.getUn();
String pa1=Logf.getPw();
System.out.println(" Error USER NAME:"+un1);
System.out.println(" Error PASSWORD:"+pa1);
if(un1.equals("shiva")&& pa1.equals("shiva"))
return mapping.findForward("success");
else
return mapping.findForward("fail");
}
}
.
The following Error is shown by JBOSS Server.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NullPointerException
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
root cause
java.lang.NullPointerException
org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:289)
org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:357)
org.apache.struts.chain.commands.CreateActionForm.execute(CreateActionForm.java:92)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
note The full stack trace of the root cause is available in the JBoss Web/2.1.3.GA logs.
JBoss Web/2.1.3.GA
-----------------------
is there any problem Please send to my mail id([email protected]),
Thanks&Regards,
Shiva s
View Answers
October 19, 2010 at 1:27 PM
Hi,
Due to some configuration issues you form is not initializing
myform Logf=(myform)form;
And while typecasting it is giving java.lang.NullPointerException exception.
Please download the login form example from:
http://roseindia.net/struts/struts-login-form.shtml
Thanks
Related Tutorials/Questions & Answers:
Regarding Login application programRegarding Login application program Hi this is shiva. iam writing a small
login form using struts1.3.10 version. once iam submit the
login button... the
login form example from:
http://roseindia.net/struts/struts-
login login applicationlogin application how to create
login application ?
Hi,
Please check the following tutorials:
Video tutorial - JSP
Login Logout Example
Login Authentication using Bean and Servlet In JSP
simple code to
login user
Advertisements
Login ProgramLogin Program
Login program in struts to set username & password in session. and this session is available in all screens for authentication...
Hi,
Please read it at:ADS_TO_REPLACE_2
Login/Logout With Session
regarding connectivity program only - JDBCregarding connectivity
program only can u give me code
regarding .. that i had created student data base with his name and subject marks resp ... i use html in front end ...that there r options like
1.name----------
2.sub1
login module programlogin module program hello friends i want to develop the web service using .net pls send the
login ejb module .net
program to my mail id
login module programlogin module program hello friends i want to develop the web service using .net pls send the
login ejb module .net
program to my mail id
Spring login form application Spring
login form application Hi Please give me the Spring
login form
application so that i can understand its flow ?
Hi please find the link of the tutorial
Spring Applications
regarding connectivity program only - JDBCregarding connectivity
program only can u give me code
regarding .. that i had created student data base with his name and subject marks resp ... i use html in front end ...that there r options like
1.name----------
2.sub1
login application - Strutslogin application Can anyone give me complete code of user
login application using struts and database? Hello,
Here is good example of
Login and User Registration
Application using Struts Hibernate and Spring
mobile banking login programmobile banking
login program static Display dis;
static
Login destroy;
public
Login()
{
dis=Display .get Display(this);
}
public void startApp()
{
destroy=this;
LoginScreen
jsp/servlet login programjsp/servlet
login program <%@ page language="Java" import="java.sql.*" %>
<HTML>
<HEAD><TITLE>DataBase Search<...;
</html>
When I run the
program, I get an error: The requested resource
Login Application
Login Application
This tutorial provides some simple steps for creating a website
login
application that can be used later in any big Struts Hibernate and Spring based
Struts 2 Login ApplicationStruts 2
Login Application
Developing Struts 2
Login Application
In this section we are going to develop
login application based on Struts 2
Framework. Our current
login application Creating Midlet Application For Login in J2ME
Creating MIDlet
Application For
Login in J2ME
...
application for user
login . All
MIDlet applications for the MIDP ( Mobile Information... as a mediator between the
application
and the environment in which the
application runs
Write a java application program........?Write a java
application program........? Welcome every One :
I have
Q in Java?
Q : Write a java
application program that reads 20 integer numbers input by the user and prints how many numbers > 100 and how many numbers
JSF Simple Login Application:view>
<html>
<head><title>JSF Simple
Login Example<...;td><h:outputText value="Enter
Login ID: " /></td>
<... for the resultforfail.jsp file:
Login Failed!
Here is the code
GUI application programGUI
application program Write a GUI
application program that meets the following requirements:
Create an array with 100 randomly chosen integers.
Create a textfield to enter an array index and another textfield to display
College Application ProgramCollege
Application Program Please read the following carefully and submit the
program code.
Question # 144
A college is good if it satisfies the following conditions:
Its number of students is greater than 1000.
If the name
JSF Validation In Login Application:view>
<html>
<head><title>JSF Simple
Login Example<...;td><h:outputText value="Enter
Login ID: " /></td>
<... for the resultforfail.jsp file:
Login Failed!
Here is the code
jsp/servlet login program - JSP-Servletjsp/servlet
login program hello sir,
well i have a problem with some code(loginbean.jsp),which i actually got from ur site:
i am trying to create a
login program where a new user will be registered
and his/her details stored
About Struts 2.2.1 Login application
.style1 {
margin-left: 80px;
}
About Struts2.2.1
login application
In the most common
login application there is
login form which is takes... / browser.
To create an
login application At first create a
login page in JSP
Login Screen of Application
Login Screen of
Application
Login Screen our web
application allows the user... to logged on the
system.
Login Screen: ADS_TO_REPLACE_1
Field Description
Spring, Hibernate login and registration applicationSpring, Hibernate
login and registration
application
Spring, Hibernate
login and registration
application tutorial with
video instruction
Learn how to make fully function
login and registration
application in Spring
and Hibernate
Remember Me Login Application In JSFRemember Me
Login Application In JSF
....
This section gives you an
application which facilitates
for
login. But basically this is a different type of
login application in which,
you will get a two text
How to program an application for? - Java BeginnersHow to
program an
application for? How do you write an
application to count the number of both odd and even integers of several positive integerss? Then the final display is the total of how many odd numbers were entered
Login or Cancel Application Using AjaxLogin or Cancel
Application Using Ajax
...
implementation of
login application with features like submit and cancel buttons
using... with
features like submit and cancel buttons. This
login application first
RichFaces: Login & Registration Application:
RichFaces:
Login & Registration
Application
... the responsiveness of the
application.
In this
application,
Login page appears first... into the
application for further actions. After successful user
login, user can edit
Struts 2 Login Application to make the
login system for
Struts2 based applications.
Login application...Examples of writing and testing
Login Applications in Struts 2 framework... will show you how to make the Struts2
Login application.ADS_TO_REPLACE_1
loginlogin How to create
login page in jsp
loginlogin How to create
login page in jsp
loginlogin
login page display an error showing failure to
login even when the correct information is entered
loginlogin how to
login admin and user with the same fields(name & password) in single
login page while the table for admin and user is seprate in database(mysql)
please provide me solution
write a program for complete JDBC based application write a
program for complete JDBC based
application thank you sir... based
application where in the user supplies the following table as input and the
program should have the facilities of Adding, Modifying, Viewing and Deleting
Downloading MyFaces and creating web application we will learn how to create web
application for
our
login and
registration example
program. Alternatively you can also download the integrated
web
application...Downloading MyFaces and creating web
application
loginlogin i want to now how i can write code for form
login incolude user and password in Jcreator 4.50
Hello Friend,
Visit HereADS_TO_REPLACE_1
Thanks
login java.awt.event.*;
class
Login
{
JButton SUBMIT;
JLabel label1,label2;
final JTextField text1,text2;
Login()
{
final JFrame f=new JFrame("
Login Form...();
ResultSet rs=st.executeQuery("select * from
login where username='"+value1