[appengine-java] web.xml version=2.5 is not supported

2009-11-18 Thread Nacho Coloma
Hi all,

I have been trying to use the following web.xml elements in GAE:

jsp-config
jsp-property-group
url-pattern*.jsp/url-pattern
el-ignoredfalse/el-ignored
include-prelude/WEB-INF/taglibs.jspf/include-prelude

deferred-syntax-allowed-as-literaltrue/deferred-syntax-allowed-
as-literal

trim-directive-whitespacestrue/trim-directive-whitespaces
/jsp-property-group
/jsp-config

This instructs the JSP compiler to add some directives at the
beginning of all JSP pages:

* el-ignored: to be able to use ${...} at every page.
* include-prelude: to include a jsp fragment with tag libraries etc at
the beginning.
* deferred-syntax-allowed-as-literal: to ignore the use of #{...}
literals
* trim-directive-whitespaces: to trim the line feeds at the beginning
of each page

The thing is, this is only supported for web.xml 2.5 which I know is
supported by jetty but not by AppEngine. Anyway, I would expect it to
throw an exception instead of ignoring my XML start:

?xml version=1.0 encoding=UTF-8?
web-app xmlns=http://java.sun.com/xml/ns/javaee;
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;
metadata-complete=true version=2.5

The thing is, I don't know if:

* It is planned to be supported by AppEngine at some point.
* I am missing the correct way of configuring this in GAE.
* Just nobody looked at it before.

Comments would be welcome. Best regards,

Nacho.

--

You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=.




Re: [appengine-java] web.xml version=2.5 is not supported

2009-11-18 Thread Derek Berube
One of the issues that you are going to encounter is the mismatch between
the JSP API defined in GAE and the implementation of that API provided.  As
documented in bug
1506http://code.google.com/p/googleappengine/issues/detail?id=1506,
GAE includes the JSP 2.1 specification (found in the
geronimo-jsp_2.1_spec-1.0.1.jar); however, they provide the Apache Tomcat
Jasper classes from 5.0.28 which implements the 2.0 JSP specification.

If you want to use the 2.1 Unified Expression language, then you're going to
need to download the Unified Expression Language
https://uel.dev.java.net/ 1.1
API 
(el-api-1.1.jarhttp://download.java.net/maven/glassfish/javax/el/el-api/1.1/el-api-1.1.jar)
and Implementation
(el-impl-1.1jarhttp://download.java.net/maven/glassfish/org/glassfish/web/el-impl/1.1/el-impl-1.1.jar)
files and place them in the WEB-INF/lib directory of your web application.
Once that is done, modify your web.xml with the following snippet of code:

!-- GAE Bug 1506 JSP 2.1 API but 2.0 Implementation --
context-param
  param-namecom.sun.faces.expressionFactory/param-name
  param-valuecom.sun.el.ExpressionFactoryImpl/param-value
/context-param

This should make the Unified EL available to your web application.

Derek Berube
Wildstar Technologies, LLC.
1453 Riverview Run Lane
Suwanee, Georgia 30024-3890
M: (404) 444-5283

http://www.wildstartech.com/


On Wed, Nov 18, 2009 at 5:24 AM, Nacho Coloma icol...@gmail.com wrote:

 Hi all,

 I have been trying to use the following web.xml elements in GAE:

jsp-config
jsp-property-group
url-pattern*.jsp/url-pattern
el-ignoredfalse/el-ignored

  include-prelude/WEB-INF/taglibs.jspf/include-prelude

  deferred-syntax-allowed-as-literaltrue/deferred-syntax-allowed-
 as-literal

  trim-directive-whitespacestrue/trim-directive-whitespaces
/jsp-property-group
/jsp-config

 This instructs the JSP compiler to add some directives at the
 beginning of all JSP pages:

 * el-ignored: to be able to use ${...} at every page.
 * include-prelude: to include a jsp fragment with tag libraries etc at
 the beginning.
 * deferred-syntax-allowed-as-literal: to ignore the use of #{...}
 literals
 * trim-directive-whitespaces: to trim the line feeds at the beginning
 of each page

 The thing is, this is only supported for web.xml 2.5 which I know is
 supported by jetty but not by AppEngine. Anyway, I would expect it to
 throw an exception instead of ignoring my XML start:

 ?xml version=1.0 encoding=UTF-8?
 web-app xmlns=http://java.sun.com/xml/ns/javaee;
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;
metadata-complete=true version=2.5

 The thing is, I don't know if:

 * It is planned to be supported by AppEngine at some point.
 * I am missing the correct way of configuring this in GAE.
 * Just nobody looked at it before.

 Comments would be welcome. Best regards,

 Nacho.

 --

 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=.




--

You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=.