I have a working JSP Renderer as per THIS earlier post to this forum. I also have a working Java DeclarativeWebScript modeled after the org.springframework.extensions.webeditor.webscript s.WEFApplicationGet class by Gavin Cornwell.
What I need now is to COMBINE a JSP Renderer with a Java DeclarativeWebScript. I'm encountering a problem when I try to provide the <package> value for the DeclarativeWebScript bean declaration. Let me explain...
The <component-type> definition for the JSP Renderer declares the path to the JSP file. This bypasses the need for any artifacts in the "webscripts" directory. Example from spring-surf-application-spring-travel:
The <component> element in the page definition then references the component-type-id (e.g. "logout-success"):Code:<component-type> <id>logout-success</id> <title>Logout Success Component Type</title> <description>Logout Success Component Type</description> <!-- Define the rendering processors for this component type --> <processor mode="view"> <id>jsp</id> <jsp-path>/WEB-INF/jsp/logout-success.jsp</jsp-path> </processor> </component-type>
This is different from a "normal" component element in a page definition where a url to the Web Script (in the "webscript") directory is required. The logout-success component works without a reference to a Web Script. You can hit the logoutSuccess page and it runs the logout-success.jsp as expected.Code:<page> <id>logoutSuccess</id> <title>logout success</title> <template-instance>standard</template-instance> <authentication>none</authentication> <components> <component> <region-id>body</region-id> <component-type-id>logout-success</component-type-id> </component> </components> </page>
The problem surfaces when you try to associate a Java DeclarativeWebScript with the JSP Renderer (e.g. logout-success). The DeclarativeWebScript bean definition requires an "id" attribute:
id="webscript.<packageId>.<serviceId>.<httpMethod> "
What value do you provide for the <packageId> token? The <packageId> appears to reference within the "webscripts" directory. But the JSP Renderer (logout-success) has no artifacts under "webscripts".
I am hoping that there is a way to combine a JSP Renderers with a Java DeclarativeWebScript. Perhaps there is a <packageId> for the JSP Renderer that I am unaware of? Or, a way to define a JSP Renderer such that it is a first class Web Script (i.e. has artifacts under the "webscripts" directory).
Thanks,
Bob


Reply With Quote