Results 1 to 3 of 3

Thread: JSP component-type using WebScriptProcessor?

  1. #1

    Default JSP component-type using WebScriptProcessor?

    I am trying to use the logout-success component-type provided with the spring-travel sample application:

    ------------------------------------------
    <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>
    ------------------------------------------

    I copied to logout-success.xml file from spring-travel to my sample application. I then created a simple page and added the following component:

    ------------------------------------------
    <component>
    <component-type>logout-success</component-type>
    <scope>page</scope>
    <region-id>top-left</region-id>
    <source-id>3column</source-id>
    </component>
    -------------------------------------------

    I know that this component is recognized as an error is generated if I make improper changes to the logout-success.xml file.

    The problem is that I get the NullPointerException below when I try to access the page. What is interesting is that the WebScriptProcessor class is on the stack rather than the JSPProcessor. There must be a mistake in the logout-success.xml? Any help appreciated!

    Thanks,

    Bob

    P.S. I have tried to run the spring-travel application stand-alone, but I am getting the error described in THIS forum post.

    -------------------------------------------------
    Caused by: java.lang.NullPointerException
    at org.springframework.extensions.surf.uri.UriUtils.r eplaceUriTokens(UriUtils.java:57)
    at org.springframework.extensions.webscripts.WebScrip tProcessor.executeHeader(WebScriptProcessor.java:1 49)
    at org.springframework.extensions.surf.render.Abstrac tProcessor.execute(AbstractProcessor.java:89)
    at org.springframework.extensions.surf.render.RenderS ervice.processComponent(RenderService.java:468)
    at org.springframework.extensions.surf.render.RenderS ervice.renderRawComponent(RenderService.java:970)
    at org.springframework.extensions.surf.render.bean.Co mponentRenderer.header(ComponentRenderer.java:67)
    ... 50 more

    -------------------------------------------------

  2. #2

    Default Problem Solved

    I discovered the problem. The element name for the type declaration in the in the component definition (above) should be "component-type-id", not "component-type":


    <component-type-id>logout-success</component-type-id>

    The JSP executes properly!

    Thanks,

    Bob

  3. #3

    Default

    Good to know, thanks for posting that tip - could be an easy mistake to make!

    Cheers,

    Kev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •