Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dan Rush
non root context with JBoss, IIS AJP front end , custom theme and hook
February 5, 2013 9:24 AM
Answer

Dan Rush

Rank: New Member

Posts: 5

Join Date: August 23, 2011

Recent Posts

I'm running JBoss 5.1 and Liferay 6.0.6 and using IIS as authenticator and AJP redirector.
I've changed my context to /bsp by adding <context-root>/bsp</context-root> to ROOT.war/WEB-INF/jboss-web.xml
and adding
<context-param>
<param-name>root_path</param-name>
<param-value>/bsp</param-value>
</context-param>
to ROOT.war/WEB-INF/web.xml
and adding <virtual-path>/bsp/look-to-the-cookie-theme</virtual-path> to the theme tag in ROOT.war/WEB-INF/liferay-look-and-feel.xml.

IIS is set to forward /bsp*, /mytheme*, and /chat-portlet* to Jboss.

Now I'm down to a couple of 404 errors:
One is for a javascript file in a hook I have that includes a header in every portlet.
-- 404 error --- http://localhost/bsp/page-header-hook/js/ServerManager.js

The other is for css and js files that are part of each of my portlets and are defined in their respective liferay-portal.xml
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>

The 404 errors are
http://localhost/bsp/css/main.css?browser....
http://localhost/bsp/js/main.js?browser....

Not sure how to fix these, can someone help me out here?
David H Nebinger
RE: non root context with JBoss, IIS AJP front end , custom theme and hook
February 5, 2013 10:30 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11081

Join Date: September 1, 2006

Recent Posts

Well, the /bsp is only correct for Liferay portal assets served out of the ROOT web application. Custom themes, layouts, and portlets have their own context that would not include the /bsp in the path, and that's why you'll get 404s on them.

There's doco in the wiki for putting Liferay in a non-root slot; I think you should pull that up and read it. It may help you out of this predicament...
Dan Rush
RE: non root context with JBoss, IIS AJP front end , custom theme and hook
February 7, 2013 1:25 PM
Answer

Dan Rush

Rank: New Member

Posts: 5

Join Date: August 23, 2011

Recent Posts

OK, thanks.
Is there a way to deploy all my portlets to a sub context under my root.war context of /bsp?
David H Nebinger
RE: non root context with JBoss, IIS AJP front end , custom theme and hook
February 7, 2013 1:46 PM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11081

Join Date: September 1, 2006

Recent Posts

You'd have to repeat your context hack for all of your deployed plugins, but I'm not sure that would work...

You can't 'nest' web applications under each other. Your only hope is that the context hack works.

As a side note, I think all of this would have been better accomplished using mod_rewrite (or whatever accomplishes this in IIS)...