1 2 Previous Next 17 Replies Latest reply on Mar 23, 2008 5:13 PM by msystems Go to original post
      • 15. Re: Direct PDF serving
        jmahle

        I have another question about this. If I use same aproach as above to show images stored in a database as a blob, how do I map the fake image url to this ActionClass (ReportAction).


        Let's I want all my image urls to be: http://localhost:8080/project/images/foo.jpg


        How do I do the mapping from the url so it's mapped to the ActionClass?


        Thanks,


        /Jacob 

        • 16. Re: Direct PDF serving
          jmahle

          If I used a Custom servlet I would have to add this to the web.xml


          <servlet>
              <servlet-name>CustromServlet</servlet-name>
              <servlet-class>test.CustomServlet</servlet-class>
              <load-on-startup>2</load-on-startup>
          </servlet>
          <servlet-mapping>
              <servlet-name>CustromServlet</servlet-name>
              <url-pattern>/image/*</url-pattern>
          </servlet-mapping>
          



          But the above aproach is not a servlet, how or is it possible? :)


          /Jacob

          • 17. Re: Direct PDF serving
            msystems

            You could try with pages.xml:


                <page view-id="/image/*"> <!-- This is a dummy page - it don't exist ! -->
                    <action execute="#{<component name>.<action method>}"/>
                   ...
                   ...
                 </page>
            

            1 2 Previous Next