Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 87039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:20:25+00:00 2026-05-10T22:20:25+00:00

I am very new to grails.I am doing one sample project for image uploading

  • 0

I am very new to grails.I am doing one sample project for image uploading and displaying.Right now my project uploads the images and stores into the images directory.Now i want to display all the images stored in the ‘image’ directory. I dont know how to write the gsp code for display all images.

For displaying the images I wrote the following code in list.gsp page.

My gsp code is:

<g:each in='${imageList}' var='image'> <img src='${createLinkTo(dir: 'images', file: '1.jpg')}' alt='Grails'/> </g:each> 

imageList has filenames of images in the image directory.

In the second line i want put filename instead of ‘1.jpg’.

Can any one tell me how to display the images.

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T22:20:26+00:00Added an answer on May 10, 2026 at 10:20 pm

    If your imageList has list of image objects try the following

    ${createLinkTo(dir: ‘images’, file: image.filename)}.

    If your imageList like this[‘1.jpg’,’2.jpg’,’3.jpg’] try the following

    **${createLinkTo(dir: 'images', file: image)}** 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm investigating a personal Grails project and want to put together a domain model
I'm starting out on a new project and a team member has decided to
Very new to Android development, and I am importing a bitmap that is 799
(very new to JavaScript jQuery) Can an if statement contain a collection of other
Very new to CMake, and so far I'm finding it to be extremely helpful.
im very new at javascript so, this is the question. I need to make
Im very new to Oracle so can anyone please explain about sys and system
im very new in cocoa development and I'm trying to load a Window. I
I can't configure org.hibernate.type (logging bind variables used in hibernate prepared statements) using log4j.xml,
I am developping an intranet ASP.NET MVC2 application for a small business. The small

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.