I'm getting this error: javax.naming.NameNotFoundException: Name [global/EJBStateful/ListElements] is not bound in this Context. Unable to find [global].
If you look closely he doesn't use the action attribute but the name attribute instead. When hitting one of the buttons the request gets directed to the same index.jsp page since there is no "action" attribute specified.
i am getting below exception while running this:- description: The server encountered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: java.lang.NullPointerException
this code will not work without servlets do like this in servlets in post method it will work. if(request.getParameter("addNum") != null){ int e = Integer.parseInt(request.getParameter("t1")); TheBean2 bean = new TheBean2(); bean.addElement(e); request.setAttribute("values", bean); request.getRequestDispatcher("index.jsp").forward(request, response); }
Dear , your explanations are so helpful and clear to the points, beginner like me
thank you for your precious tutorial
I'm getting this error:
javax.naming.NameNotFoundException: Name [global/EJBStateful/ListElements] is not bound in this Context. Unable to find [global].
Also as am new to Java , and kudirithe mee email istara . Naku doubts unte eppudina mike mail pedutanu
what about form action="abc" ??? when I am clicking on add, There is no "abc" Servlet.....
If you look closely he doesn't use the action attribute but the name attribute instead. When hitting one of the buttons the request gets directed to the same index.jsp page since there is no "action" attribute specified.
What is abc as action ??
+Hitesh Singh : name = "abc" :D
please explain how the form is getting submitted without action attribute??
If it submits to the same file,(handled in the same file)you dont specify it as far as I know.
i am getting below exception while running this:-
description: The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException
Me too getting thhe same exception
getting the same error
You have to make sure that you place the index.jsp exactly at the right spot. Try to clean and buld the project again and run the index.jsp again.
cool Its like ajax, no loading on the same page
this code will not work without servlets do like this in servlets in post method it will work.
if(request.getParameter("addNum") != null){
int e = Integer.parseInt(request.getParameter("t1"));
TheBean2 bean = new TheBean2();
bean.addElement(e);
request.setAttribute("values", bean);
request.getRequestDispatcher("index.jsp").forward(request, response);
}