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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:17:20+00:00 2026-05-28T08:17:20+00:00

I copied jquery.js to WebContent/js/jquery/jquery.js . Now I want to use that file in

  • 0

I copied jquery.js to WebContent/js/jquery/jquery.js. Now I want to use that file in certain portlets. To do this I created a liferay-portlet.xml that looks like this:

<?xml version="1.0"?>
<!DOCTYPE liferay-portlet-app PUBLIC
    "-//Liferay//DTD Portlet Application 6.0.0//EN"
    "http://www.liferay.com/dtd/liferay-portlet-app_6_0_0.dtd">

<liferay-portlet-app>
    <portlet>
        <portlet-name>MyPortletName</portlet-name>
        <header-portal-javascript>/js/jquery/jquery.js</header-portal-javascript>
    </portlet>
</liferay-portlet-app>

If I access the portlet Liferay generates this line:

<script src="/js/jquery/jquery.js?browserId=firefox&amp;minifierType=js&amp;languageId=en_US&amp;b=6100&amp;t=1326630657000" type="text/javascript"></script>

That leads to a WARN [404_jsp:?] /js/jquery/jquery.js in the logging console.

Is it really correct that the URL looks like this? If I had two war-files, both containing a js-file with the same path, how would Liferay distinguish those two?

What do I need to do to get my setup working?

Using Liferay Portal Community Edition 6.1.0 CE (Paton / Build 6100 / December 15, 2011)

  • 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-28T08:17:20+00:00Added an answer on May 28, 2026 at 8:17 am

    Use

    <header-portlet-javascript>/js/jquery/jquery.js</header-portlet-javascript>
    

    isntead of

    <header-portal-javascript>/js/jquery/jquery.js</header-portal-javascript>
    

    if you put js-files in to portlet

    Because regarding comments in DTD, header-portal-javascript sets the path of JavaScript relative to the portal’s context path. And header-portlet-javascript sets the path of JavaScript relative to the portlet’s context path.

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

Sidebar

Related Questions

I want to use jQuery to dynamically expand my markup so that my divs
I copied this from the jquery site. I'm trying to learn how to get
I copied this class from a similar class I have in this app that
I copied this systemd service file from the lighttpd-package and adapted it to make
I am using Jquery file upload for my django application. I have copied the
I copied some Arabic text and pasted it on my website. Now I want
I am new to Jquery.. I want use bounce effect in my application..I have
I copied this example from api.jquery.com $('.target').change(function() { alert('Handler for .change() called.'); }); I
Answers to this question explain that for example jquery-1.5.1.min.js is a minified version of
I copied HTML using .clone(true, true) because I want to keep the JQuery event

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.