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 771129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:36:18+00:00 2026-05-14T18:36:18+00:00

I am trying to create a simple portlet for Liferay 5.2.2 using Grails 1.2.1

  • 0

I am trying to create a simple portlet for Liferay 5.2.2 using Grails 1.2.1 with the grails-portlets 0.7 and grails-portlets-liferay 0.2 plugins.

I created and deployed a stock portlet (just updated title, description, etc…). It deploys correctly and the view renders correctly. However, when I submit the default form that is in view.gsp it never hits the actionView function.

Here are the relevant code bits:

SearchPortlet.groovy

class SearchPortlet {

  def title = 'Search'
  def description = '''
A simple search portlet.
'''
  def displayName = 'Search'
  def supports = ['text/html':['view', 'edit', 'help']]

  // Liferay server specific configurations
  def liferay_display_category = 'Category'

  def actionView = {
    println "In action view"
  }

  def renderView = {
    println "In render view"
    //TODO Define render phase. Return the map of the variables bound to the view
    ['mykey':'myvalue']
  }

  ...
}

view.gsp

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<div>
<h1>View Page</h1>
The map returned by renderView is passed in. Value of mykey: ${mykey}
<form action="${portletResponse.createActionURL()}">
    <input type="submit" value="Submit"/>
</form>
</div>

The tomcat terminal prints In render view whenever I view the portlet, and after I press the submit button. It never prints the In action view statement.

Any ideas?

Update

I turned on logging and this is what I see whenever I click the submit button in the portlet:

[localhost].[/gportlet]  - servletPath=/Search, pathInfo=/invoke, queryString=null, name=null
[localhost].[/gportlet]  -  Path Based Include
portlets.GrailsDispatcherPortlet  - DispatcherPortlet with name 'Search' received render request
portlets.GrailsDispatcherPortlet  - Bound render request context to thread: com.liferay.portlet.RenderRequestImpl@7a158e
portlets.GrailsDispatcherPortlet  - Testing handler map [org.codehaus.grails.portlets.GrailsPortletHandlerMapping@1f06283] in DispatcherPortlet with name 'Search'
portlets.GrailsDispatcherPortlet  - Testing handler adapter [org.codehaus.grails.portlets.GrailsPortletHandlerAdapter@74f72b]
portlets.GrailsPortletHandlerAdapter  - portlet.handleMinimised not set, proceeding with normal render
portlet.SearchPortlet  - In render view
portlets.GrailsPortletHandlerAdapter  - Couldn't resolve action view /search/null.gsp
portlets.GrailsPortletHandlerAdapter  - Trying to render mode view /search/view.gsp
portlets.GrailsDispatcherPortlet  - Setting portlet response content type to view-determined type [text/html;charset=ISO-8859-1]
[localhost].[/gportlet]  - servletPath=/WEB-INF/servlet/view, pathInfo=null, queryString=null, name=null
[localhost].[/gportlet]  -  Path Based Include
portlets.GrailsDispatcherPortlet  - Cleared thread-bound render request context: com.liferay.portlet.RenderRequestImpl@7a158e
portlets.GrailsDispatcherPortlet  - Successfully completed request

The fourth line in that log snippet says Bound render request…, which I don’t understand because the action in the form that is in the portlet is to the action url. I would’ve thought that should be an action request.

  • 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. Editorial Team
    Editorial Team
    2026-05-14T18:36:19+00:00Added an answer on May 14, 2026 at 6:36 pm

    I have this same issue and it would be very nice to get it working.

    UPDATE

    I added method="post" to the form and it worked like a charm 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to create a simple pan and zoom app using silverlight 4, but
I am trying to create a simple dialog in MFC using Visual C++. My
I'm trying create a simple bookmarklet to capture the title and url of a
Just trying to create a simple method that counts up 1 on the tally
I'm trying to create a simple file upload form for my website. I'm using
I'm trying to create simple DER decoder - console application that just outputs content
trying to create a simple slider for an input. Using a survey gem that
Im trying to create a simple callback using blocks. I have a MainViewController which
I'm trying to build a portlet within a grails application, and I've created a
HI im trying to create simple pie chart using the MS Chart controls. When

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.