I may be barking up the wrong tree here or missing something obvious... but here's what I'm trying to do:
-set a session attribute in a servlet with an object ..later in a JSP -trying to call jsp:setProperty, instantiating the same object using useBean (mainly for saving a lot of coding when it comes to setting the beans fields with the request parameters)
The problem occurs later, setProperty doesnt seem to call the set function for the parameters (as far as I know I have the naming conventions for the bean correct)
<jsp:useBean id="mqmd" class="Mqmd" scope="session"/> // will this useBean call access the session attribute set in servlet???
Yes. It will also instanciate it for you if one isn't present in the scope specified (in this case: session). You will need to package your beans in order for the JVM to find it. It used to be possible to run with un-packaged beans but this changed in Java 1.4. The class attribute will need to be fully qualified with the package name.
Originally posted by Tom Katz: request.getSession().setAttribute("Mqmd", mqmd); // re-set session attr // after setting fields
This isn't necessary but it doesn't hurt to leave it in for clarity. [ February 07, 2005: Message edited by: Ben Souther ]