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.
Primefaces resource on ROOT webapp
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Hi,
What does p:resource render?
Also which version are you using?
What does p:resource render?
Also which version are you using?
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
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,
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,
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
What is the url you use to access your app? Something like http://localhost ...
Yes, I access with http://localhost/ or http://www.mysite.com/
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
So what does happen when you directly try to access;
Code: Select all
http://localhost/primefaces_resource/2.0.2/yui/utilities/utilities.js
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
I've tried deploying the showcase to ROOT webapp in my local tomcat and it worked fine.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 35 guests