I'm leaving this up in case anyone has any input, but I decided it was silly for me to try to do this this way. I just added an "environment" property to each of the beans, put the build.jsp page into the application proper as a view and set it within showForm() if the querystring contains a "build" parameter, and added the environment property to the model.
...
I have a Spring 2.5 MVC web application that can be deployed with any of several back-end environments. I have a bean for each environment defined in dispatcher-servlet.xml, and depending on the deployment environment, I edit my controller's bean in dispatcher-servlet.xml to reference the appropriate back-end environment bean.
I also have a
JSP page accessible to the end user (not in web-inf, not mapped to a
servlet), that gives build information. I would like the JSP page to also display the deployment environment information, since that is something that the user can't otherwise tell (the same front-end URL may use any of several different back-end environments).
Is there a way to include the environment bean name or bean id in the JSP page? That would be the id of the bean referenced by projreqController.dbSubmitter in the snippet below.
representative snippet of dispatcher-servlet.xml:
Thanks,
Rebeccah