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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:05:01+00:00 2026-06-06T16:05:01+00:00

Hi im begin lern liferay and have one problem. I cant send POST in

  • 0

Hi im begin lern liferay and have one problem. I cant send POST in portlet from jsp.

In jsp i have :

<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<portlet:defineObjects />

<div>
  <form action="HelloWorld" method="post" enctype="multipart/form-data">
   <div id="up">
    <input id="fileUpload1" type="button" name="filename" value="Привет">
   </div>
   </form>
 </div>

in portlet:

public class HelloWorld extends GenericPortlet {
protected void doGet(ActionRequest request,
     ActionResponse response) throws ServletException, IOException
     { 
 // reading the user input 
 //String color= request.getParameter("color");
 HttpServletResponse servletResponse = PortalUtil.getHttpServletResponse(response);
 PrintWriter out = servletResponse.getWriter(); 
    out.println("<HTML>");
    out.println("<HEAD <TITLE> Upload4 </TITLE> </HEAD>");
    out.println("<BODY>");
    out.println("<FORM action = \"HelloWorld\" method = \"post\" enctype = \"multipart/form-data\">");
    out.println("<div id='up'>");
    out.println("Hello World!!");
    out.println("<input id='fileUpload1' type='button' name='filename' value='Привет'>");
    out.println("</div>");
    out.println("</FORM>");
    out.println("</BODY>");
    out.println("</HTML>");
 } 
     }

Where i can mistake? I gonna write something in portlet’s XML files?

  • 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-06-06T16:05:02+00:00Added an answer on June 6, 2026 at 4:05 pm

    This is wrong on so many levels – sorry – that I don’t know where to start:

    • You should post to <portlet:actionURL />, not to “HelloWorld“
    • You should implement processAction instead of doGet (which sounds rather like a servlet)
    • You must not get access to the original HttpServletRequest in your action handler in order to write content
    • In action handling you just handle the action, during the render phase you render the HTML you need
    • the HTML you generate does not contain <html>, <head>, but just some part that the portal will embed on a page
    • and I feel like I missed a few more things…

    I recommend to start with some tutorial – like the Liferay in Action book – to get the basic concepts.

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

Sidebar

Related Questions

Mysql begin generate big IO. One website have many rows in session,requests table (
Just begin my Python/Django experience and i have a problem :-) So i have
I begin in Python language and face a problem with my script. On stackoverflow,
To begin i read all resources from xml in my MergedDictionaries and now I
To begin with, let me say that I understand how and why the problem
To begin, Ive spent several hours looking for an answer and have come CLOSE
\begin{wrapfigure}{l}{0.3\textwidth} \begin{center} \includegraphics[width=0.2\textwidth]{one} \end{center} \caption{} \end{wrapfigure} How can I hide label 'Figure 1:' below
To begin with, I have a database that holds map data for a game
I begin to study qt (I have qt creator, last version), so I read
I begin to program some handheld program as hobby, right now i currently have

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.