Announcement Announcement Module
Collapse
No announcement yet.
Passing data from the web to the controller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing data from the web to the controller

    Hi all, i have a jsp with images. I want that when an user click an image, the controller takes the path to the image, so it can show properties of that image in a new view.

    Im not using any form, i only use the <a> tag to link the image to the controller:

    <a href="viewimage.html"><img href="theimage.jpg" alt="an image"/></a>

    in the app-servlet the viewimage.html is associated to the controller.

    How can i pass the "theimage.jpg" path to the controller?

    Thx a lot

  • #2
    Code:
    <a href="viewimage.html?imageFileName=theimage.jpg">
    But it's not the full url to the image, just its name.

    Comment


    • #3
      Here's a tutorial I started for myself; it's extremely basic. Have a look at the last 2 examples. http://belch.berkeley.edu/springapp/ It's so simple it doesn't even subclass anything; it's all in the xml and jsp files.

      Comment


      • #4
        Thx both

        Comment

        Working...
        X