Skip to main content

Can JSF 1.2_13 work in GAE?

10 replies [Last post]
dxxvi
Offline
Joined: 2006-07-24

I saw this in the JSF RI 1.2_13 change log https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1079.

Could anybody please confirm that JSF RI 1.2_13 works in GAE? If possible, could somebody give an example?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
eduardopichler
Offline
Joined: 2004-03-04

Here there are a project running

http://code.google.com/p/jsfongap/

Jim Driscoll

Neat!

On 8/6/09 1:53 PM, webtier@javadesktop.org wrote:
> Here there are a project running
>
> http://code.google.com/p/jsfongap/
> [Message sent by forum member 'eduardopichler' (eduardopichler)]
>
> http://forums.java.net/jive/thread.jspa?messageID=359304
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Ed Burns

>>>>> On Thu, 06 Aug 2009 14:17:19 -0700, Jim Driscoll said:

JD> Neat!
JD> On 8/6/09 1:53 PM, webtier@javadesktop.org wrote:
>> Here there are a project running
>>
>> http://code.google.com/p/jsfongap/
>> [Message sent by forum member 'eduardopichler' (eduardopichler)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=359304

Is there a public URL to see the app running?

Ed

--
| ed.burns@sun.com | office: 408 884 9519 OR x31640
| homepage: | http://ridingthecrest.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

dxxvi
Offline
Joined: 2006-07-24

Thank you so much.
Is there any ajax jsf component set working on GAE? I heard that richfaces doesn't work there because it uses java.awt. Does anybody know about icefaces?

rlubke
Offline
Joined: 2003-08-21

I would recommend reviewing the GAE documentation [1]. You should be able to test a simple 1.2_13-based application with Facelets using it.

[1] http://code.google.com/appengine/docs/java/overview.html

dxxvi
Offline
Joined: 2006-07-24

Today, I tried a very example of jsf 1.2_13 and facelets 1.1.15.B1 on gae/j. It worked with the appengine on my machine, but didn't work when I updated it to the web. The error

Error: Server Error
The server encountered an error and could not complete your request.

If the problem persists, please report your problem and mention this error message and the query that caused it.

didn't help at all.

This is my app structure:[code]
-- WEB-INF
|---- lib
|---- jsf-facelets-1.1.15.B1.jar
|---- el-ri-1.2.jar
|---- jsf-api-1.2_13.jar
|---- jsf-impl-1.2_13.jar
|---- appengine-web.xml
|---- faces-config.xml
|---- web.xml
-- index.html
-- index.xhtml[/code]
This is the appengine-web.xml[code]


dang-vuth
1
true
[/code]
This is the faces-config.xml[code]

"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">


com.sun.facelets.FaceletViewHandler

[/code]
This is the web.xml[code]

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
Archetype Created Web Application

facelets.REFRESH_PERIOD 2

facelets.DEVELOPMENT true

javax.faces.STATE_SAVING_METHOD server

javax.faces.DEFAULT_SUFFIX .xhtml



Set this flag to true if you want the JavaServer Faces
Reference Implementation to validate the XML in your
faces-config.xml resources against the DTD. Default
value is false.

com.sun.faces.validateXml true



Set this flag to true if you want the JavaServer Faces
Reference Implementation to verify that all of the application
objects you have configured (components, converters,
renderers, and validators) can be successfully created.
Default value is false.

com.sun.faces.verifyObjects false


Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet
*.jsf

[/code]
This is the index.html[code]



Your Page Title


You're re-directed to index.jsf.

[/code]
This is the index.jsf[code]
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
xmlns:ui="http://java.sun.com/jsf/facelets">


Facelets: Number Guess Tutorial


This is facelets!

[/code]
Does anybody have any idea why this application runs in my local machine, but doesn't run when I update it to appspot?

If I use jsp and servlets then it works. That means my update method is correct.

Thank you.

driscoll
Offline
Joined: 2003-06-06

From the bug that you referenced, it mentions:

com.sun.faces.enableMultiThreadedStartup which defaults to true. This
option must be set to false when deploying to GAE.

This setting is also documented here:
https://javaserverfaces.dev.java.net/nonav/rlnotes/1.2_13/changelog.html

Because GAE doesn't like spawning threads.

dxxvi
Offline
Joined: 2006-07-24

where should I specify the com.sun.faces.enableMultiThreadedStartup? Like this[code]

com.sun.faces.enableMultiThreadedStartup false [/code]or like this[code]

Faces Servlet
javax.faces.webapp.FacesServlet

com.sun.faces.enableMultiThreadedStartup false

1
[/code]?
I tried both but the exception is still the same! :(
Please continue helping :)

Ryan Lubke

It should be defined as a context-param.

What's the exception in the GAE log?

On 7/19/09 7:24 PM, webtier@javadesktop.org wrote:
> where should I specify the com.sun.faces.enableMultiThreadedStartup? Like this[code]
>
>
com.sun.faces.enableMultiThreadedStartup >
false >
[/code]or like this[code]
>
> Faces Servlet
> javax.faces.webapp.FacesServlet
>
>
com.sun.faces.enableMultiThreadedStartup >
false >

> 1
>
[/code]?
> I tried both but the exception is still the same! :(
> Please continue helping :)
> [Message sent by forum member 'dxxvi' (dxxvi)]
>
> http://forums.java.net/jive/thread.jspa?messageID=356491
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net

Jim Driscoll

I know that Ryan tested it before doing the putback, but have no other
information. So, I know it works...

Jim

On 7/9/09 8:03 AM, webtier@javadesktop.org wrote:
> I saw this in the JSF RI 1.2_13 change log https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1079.
>
> Could anybody please confirm that JSF RI 1.2_13 works in GAE? If possible, could somebody give an example?
> [Message sent by forum member 'dxxvi' (dxxvi)]
>
> http://forums.java.net/jive/thread.jspa?messageID=354906
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: webtier-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net