Hi All !!! I am doing a small project by using JSP standard action elements.
Above after setting Employee bean properties I am forwarding it to FinalJsp.jsp page where I want to display bean properties.
After submitting data through Login.jsp page I am getting the following error
However when I am using <jsp:getProperty> elements on the same page i.e. StdAct.jsp then its working fine. I just wanted to check how a single bean could be accessed from different places by using JSP standard action.
OK. It's obsolete and shouldn't be used, so I'm not sure how much attention your question will get. For the modern means, look into <c:set> (or follow best practices and set up scoped variables in the controller, not the JSP).
Yes agree but it is still taught in many j2ee courses in India. I have worked with JSTL and with all core library tags. Anyways thanks for your reply Bear Bibeault. I finally got it solved thanks to the following
Just for completeness, I'm presuming the solution here was to include the jsp:useBean tag on the second page as well as the first.
i.e. add the useBean tag to FinalJsp.jsp
You need to declare you are going to use a bean on the page with the useBean tag before you can refer to it with a getProperty tag.
At that point it will either retrieve the bean from the appropriate scope, or if it is not present, create it.
Having said that, Bear's recommendations about not using them still stand.
JSP standards have come a long way since those tags were introduced.
We can walk to school together. And we can both read this tiny ad: