[solved] Prettyfaces in GAE environment
Tagged: prom dresses sale
August 16, 2010 at 10:02 pm #17765
I am trying to use prettyfaces into a GAE environment, I configured my web.xml like this:
Here is my pretty-faces config:
If I try call http://<server>:8888/app/ it never calls index.faces
Any comments on that?
EdgarAugust 16, 2010 at 10:09 pm #20057
There may be a few things wrong. Based on your current config, I’d expect you to get a 404 error when you try to access “/”.
First, remove the rewrite rules from the pretty-config… they will likely break your unmapped pages since they are just examples. (They need to be removed from the docs.)
Second, your url-mapping needs to match your Faces-Servlet mapping:
<pattern value="/" />
Notice the ‘/’ in front of index.faces (the path must begin at the context). If that still doesn’t work, I’ll need to see
Let me know if this helps.
–LincolnAugust 16, 2010 at 10:15 pm #20058
Yep Lincoln, it is a NOT FOUND error that I am getting, let me try thisAugust 16, 2010 at 10:15 pm #20059
Also, your website homepage is: http://corerest.appspot.com/home.faces, but you used /index.faces… is that relevant?August 16, 2010 at 10:17 pm #20060
I got this error :
HTTP ERROR 404
Problem accessing /app. Reason:
Powered by Jetty://August 16, 2010 at 10:20 pm #20061
I am still getting HTTP ERROR 404August 16, 2010 at 10:45 pm #20062
I changed as you recommended, still getting error!August 16, 2010 at 10:48 pm #20063
Very strange. Are you sure that you are sending the request to the right view-id? does /index.faces exist?
The 404 message does not look very descriptive. Also, is it possible that you have to do something special in order for GAE to even invoke a filter if there is no Servlet or file “mapped” to the requested URL?
Sometimes you have to enable that behavior, like on websphere: http://ocpsoft.com/docs/prettyfaces/snapshot/en-US/html_single/#d0e1334August 16, 2010 at 10:48 pm #20064
I suppose I should ask, did this work on a non GAE server?August 16, 2010 at 11:02 pm #20065
The http://corerest.appspot.com/home.faces is the version under production, I am working on a new version that runs locally in my machine.August 16, 2010 at 11:31 pm #20066
This is the error log:
Aug 16, 2010 7:43:27 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: /app/
I have the prettyfaces starting apparently fine:
INFO: Successfully processed /opt/work/gitprojects/corerest/corerest/war/WEB-INF/web.xml
1107 [main] INFO com.ocpsoft.pretty.PrettyFilter – PrettyFilter starting up…
2660 [main] INFO com.ocpsoft.pretty.PrettyFilter – PrettyFilter initialized.
Aug 16, 2010 7:18:37 PM com.google.appengine.tools.development.DevAppServerImpl startAugust 17, 2010 at 1:16 am #20067
Can you tell if PrettyFilter is being invoked? Can you turn com.ocpsoft=DEBUG logging on? (Log4J) Or can you actually debug the app and see if the filter is triggering?
I have a sneaking suspicion that the request is never being passed on to the webapp because GAE thinks there’s nothing there.August 17, 2010 at 6:04 pm #20068
As a matter of fact this is pretty easy, seems that PrettyFilter is ready to work just if we use the mapping configured to : “/*”, as the follow:
Once I put that, everything is working fine!
Thanks for you support, and soon you will see a cool app using prettyfaces running on Google AppEngine.
EdgarAugust 17, 2010 at 6:08 pm #20069
Isn’t that what you had in your original web.xml? What happened to it? :p I call shenanigans!
</filter-mapping>August 17, 2010 at 9:40 pm #20070
Nop, I had:
And that’s my mistake, there’s no resource for *app* initially speaking
The forum ‘PrettyFaces Users’ is closed to new topics and replies.