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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:50:24+00:00 2026-05-28T06:50:24+00:00

Trying to get a query string parameter and take an appropriate action in a

  • 0

Trying to get a query string parameter and take an appropriate action in a JSP page.

Here is a snippet:

<%@ page import="com.companyx.portal.model.LDAPAttributes" %>
<%@ page import="com.companyx.portal.service.LDAPAttributesLocalServiceUtil" %>
<%@ page import="com.liferay.portal.model.User" %>
<%@ page import="com.liferay.portal.util.PortalUtil" %>
<%@ page import="javax.servlet.http.HttpServletRequest" %>

<%
User user = PortalUtil.getUser(request);
String screenName = user.getScreenName();
LDAPAttributes attr = LDAPAttributesLocalServiceUtil.getLDAPAttributes(screenName);
String store = attr.getLegacyStoreNo();
String org = request.getParameter("org");
%>

...more code here...

<html>
...html code here...
<form name="LoginForm" action="check_login.php">
    <input type="hidden" name="LOGIN_NAME" size="20" value="<%= store %>" />
    <input type="hidden" name="LOGIN_PASSWORD" size="20" value="<%= store %>" />
    <input type="hidden" name="ORGANIZATION" value="<%= org %>" />
</form>

When the following lines are absent:

 String org = request.getParameter("org");
 ...
 <input type="hidden" name="ORGANIZATION" value="<%= org %>" />

The script works just fine, but I need to capture an ‘org’ parameter from the query string, write it into the generated form and submit it. When those lines are present, though, I get a 500 error.

Any thoughts?

  • 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-28T06:50:24+00:00Added an answer on May 28, 2026 at 6:50 am

    Chances are you’re working with the PortletRequest and not the HttpServletRequest.

    HttpServletRequest realRequest = PortalUtil.getHttpServletRequest(request);
    
    String organization = realRequest.getParameter("org");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get the query string from a string (not the current URL).
I'm parsing a http GET query string into its components. In trying to make
I'm trying to get a query working that takes the values (sometimes just the
I am trying to get my query to grab multiple rows while returning the
I am trying to get my linq query to replicate my t-sql but I
I'm trying to get the output of the query 'SHOW TABLES FROM database_name' into
I'm trying to get this working and the query executes but nothing comes back.
I am trying to get the below linq query to return -1 if there
I'm trying to get a queryset to issue its query over a different DB
I have this query, and I am trying to get the latest comment for

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.