Primefaces resource on ROOT webapp

UI Components for JSF
Post Reply
baianux
Posts: 4
Joined: 28 Jul 2010, 03:17

28 Jul 2010, 03:37

Hi,

I develop a app and deploy on my hosting server...
I dont change the web context to run in Tomcat ROOT directory.

When move the app to the $TOMCAT_HOME/webapps/ROOT the Primefaces resource servlet dont works and dont mapped the resource like CSS and JS (like www.mysite.com)

If the app is a subdirectory of Tomcat webapps the resource servlet works fine (like www.mysite.com/mycontext).

What is the problem?

Please help me.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Jul 2010, 10:45

Hi,

What does p:resource render?

Also which version are you using?

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

28 Jul 2010, 10:48

I think, it's Tomcat problem (was at least in the 5.5 version). I didn't find mistakes in ResourceRenderer and even deeper.
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

baianux
Posts: 4
Joined: 28 Jul 2010, 03:17

28 Jul 2010, 13:10

Hi all,

I using Tomcat 6 and the p:resource with the aditional context (mysite.com/mycontext) works and outputs like this:

<link rel="stylesheet" type="text/css" href="/mycontext/primefaces_resource/2.0.2/yui/menu/assets/skins/sam/menu.css" />
...
<script type="text/javascript" src="/acqualife/primefaces_resource/2.0.2/yui/utilities/utilities.js"></script>

But if deploy on ROOT directory the p:resource outputs:

<link rel="stylesheet" type="text/css" href="/primefaces_resource/2.0.2/yui/menu/assets/skins/sam/menu.css" />
...
<script type="text/javascript" src="/primefaces_resource/2.0.2/yui/utilities/utilities.js"></script>

In this case the /primefaces_resource servlet is not found.

Regards,

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Jul 2010, 13:49

What is the url you use to access your app? Something like http://localhost ...

baianux
Posts: 4
Joined: 28 Jul 2010, 03:17

28 Jul 2010, 14:17


cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Jul 2010, 14:26

So what does happen when you directly try to access;

Code: Select all

http://localhost/primefaces_resource/2.0.2/yui/utilities/utilities.js

baianux
Posts: 4
Joined: 28 Jul 2010, 03:17

28 Jul 2010, 14:31

When I deploy the app in tomcat root the /primefaces_resource servlet is not found, I receive the 404 error.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Jul 2010, 19:40

I've tried deploying the showcase to ROOT webapp in my local tomcat and it worked fine.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 35 guests