Results 1 to 3 of 3

Thread: JSP Problem

  1. #1
    Join Date
    Feb 2011
    Posts
    5
    Rep Power
    0

    Default JSP Problem

    Hi,

    I am trying to call a jasper report from onclick of image but how to call a servlet onclick of image.Please give me sugessin.



    Regards
    Sangram

  2. #2
    Petr's Avatar
    Petr is offline Senior Member
    Join Date
    Jan 2011
    Location
    Russia
    Posts
    620
    Rep Power
    4

    Default

    It is easy. You write a mapping url in web.xml and just to call it. for example
    Java Code:
     <servlet-mapping>
            <servlet-name>BirtReports</servlet-name>
            <url-pattern>/birtReports</url-pattern>
        </servlet-mapping>
    
        <servlet>
            <servlet-name>BirtReports</servlet-name>
            <servlet-class>
                com.trackstudio.action.WebReportServlet
            </servlet-class>
        </servlet>
    Java Code:
    <a href="/birtReport"><img src="/your_image.png"/></a>
    Skype: petrarsentev
    http://TrackStudio.com

  3. #3
    Join Date
    Feb 2011
    Posts
    5
    Rep Power
    0

Posting Permissions

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