1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.shared.config;
20
21
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
24 import javax.faces.context.ExternalContext;
25 import javax.servlet.ServletContext;
26
27 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam;
28 import org.apache.myfaces.shared.util.ClassUtils;
29 import org.apache.myfaces.shared.util.WebConfigParamUtils;
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44 public class MyfacesConfig
45 {
46 private static final String APPLICATION_MAP_PARAM_NAME = MyfacesConfig.class.getName();
47
48
49
50
51
52 @JSFWebConfigParam(tags="tomahawk")
53 public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH = "org.apache.myfaces.RESOURCE_VIRTUAL_PATH";
54 public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT = "/faces/myFacesExtensionResource";
55
56
57
58
59 @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
60 ignoreUpperLowerCase=true, deprecated=true, tags="tomahawk", group="render")
61 private static final String INIT_PARAM_DETECT_JAVASCRIPT = "org.apache.myfaces.DETECT_JAVASCRIPT";
62 private static final boolean INIT_PARAM_DETECT_JAVASCRIPT_DEFAULT = false;
63
64
65
66
67
68
69
70
71 @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
72 ignoreUpperLowerCase=true, tags="tomahawk")
73 private static final String INIT_PARAM_AUTO_SCROLL = "org.apache.myfaces.AUTO_SCROLL";
74 private static final boolean INIT_PARAM_AUTO_SCROLL_DEFAULT = false;
75
76
77
78
79
80
81
82
83
84
85
86 @JSFWebConfigParam(defaultValue="org.apache.myfaces. renderkit.html.util. DefaultAddResource",since="1.1",
87 desc="Tomahawk specific: Indicate the class responsible to place scripts and css using " +
88 "tomahawk AddResource API", tags="tomahawk")
89 private static final String INIT_PARAM_ADD_RESOURCE_CLASS = "org.apache.myfaces.ADD_RESOURCE_CLASS";
90 private static final String INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT =
91 "org.apache.myfaces.renderkit.html.util.DefaultAddResource";
92
93
94
95
96
97
98
99
100
101
102
103
104
105 @JSFWebConfigParam(defaultValue="for JSF 2.0 since 1.1.11 false, otherwise true",
106 expectedValues="true, false, on, off, yes, no",since="1.1", ignoreUpperLowerCase=true,
107 desc="Tomahawk specific: This parameter will check for a properly configured Extensions-Filter if " +
108 "it is needed by the web-app.", tags="tomahawk")
109 private static final String INIT_CHECK_EXTENSIONS_FILTER = "org.apache.myfaces.CHECK_EXTENSIONS_FILTER";
110 private static final boolean INIT_CHECK_EXTENSIONS_FILTER_DEFAULT = false;
111
112
113
114
115 @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1",
116 ignoreUpperLowerCase=true, tags="tomahawk", group="render")
117 private static final String INIT_READONLY_AS_DISABLED_FOR_SELECT =
118 "org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS";
119 private static final boolean INIT_READONLY_AS_DISABLED_FOR_SELECT_DEFAULT = true;
120
121
122
123
124
125
126 @JSFWebConfigParam(defaultValue="2",since="1.1", classType="java.lang.Long")
127 public static final String INIT_PARAM_CONFIG_REFRESH_PERIOD = "org.apache.myfaces.CONFIG_REFRESH_PERIOD";
128 public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT = 2;
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145 @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1",
146 ignoreUpperLowerCase=true, group="state")
147 private static final String INIT_PARAM_RENDER_VIEWSTATE_ID = "org.apache.myfaces.RENDER_VIEWSTATE_ID";
148 private static final boolean INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT = true;
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165 @JSFWebConfigParam(defaultValue="true", expectedValues="true, false, on, off, yes, no",since="1.1.6",
166 ignoreUpperLowerCase=true, group="render")
167 private static final String INIT_PARAM_STRICT_XHTML_LINKS = "org.apache.myfaces.STRICT_XHTML_LINKS";
168 private static final boolean INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT = true;
169
170
171
172
173
174
175
176 @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.2.3",
177 ignoreUpperLowerCase=true, group="render")
178 private static final String INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON =
179 "org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON";
180 private static final boolean INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT= false;
181
182
183
184
185
186
187
188
189 @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.2.9",
190 ignoreUpperLowerCase=true, group="render")
191 private static final String INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS =
192 "org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS";
193 private static final boolean INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS_DEFAULT= false;
194
195
196
197
198
199 @JSFWebConfigParam(defaultValue="false", expectedValues="true, false, on, off, yes, no",since="1.1",
200 ignoreUpperLowerCase=true, group="render")
201 private static final String INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE = "org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE";
202 private static final boolean INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE_DEFAULT = false;
203
204
205
206
207
208
209
210
211
212 @JSFWebConfigParam(since="1.2.7")
213 private static final String INIT_PARAM_DELEGATE_FACES_SERVLET = "org.apache.myfaces.DELEGATE_FACES_SERVLET";
214
215
216
217
218
219
220
221
222
223
224
225
226 @JSFWebConfigParam(since="2.0", defaultValue="auto", expectedValues="true,false,auto", tags="performance",
227 ignoreUpperLowerCase=true, group="state")
228 public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS =
229 "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS";
230 public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT = "auto";
231
232
233
234
235
236
237
238
239
240
241 @JSFWebConfigParam(since="2.0", defaultValue="false", expectedValues="true, false, on, off, yes, no",
242 tags="performance", ignoreUpperLowerCase=true, group="state")
243 public final static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE =
244 "org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE";
245 public final static boolean INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT = false;
246
247
248
249
250
251 @JSFWebConfigParam(since="2.0", expectedValues="true, false, on, off, yes, no", ignoreUpperLowerCase=true)
252 public final static String INIT_PARAM_VALIDATE_XML = "org.apache.myfaces.VALIDATE_XML";
253 public final static boolean INIT_PARAM_VALIDATE_XML_DEFAULT = false;
254
255
256
257
258 @JSFWebConfigParam(since="2.0.1", expectedValues="true, false, on, off, yes, no", defaultValue="false",
259 ignoreUpperLowerCase=true, group="render")
260 public final static String INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG =
261 "org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG";
262 public final static boolean INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT = false;
263
264
265
266
267
268
269
270
271 @JSFWebConfigParam(since="2.0.8")
272 public final static String INIT_PARAM_DEBUG_PHASE_LISTENER = "org.apache.myfaces.DEBUG_PHASE_LISTENER";
273 public final static boolean INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT = false;
274
275
276
277
278
279
280
281
282
283
284
285 @JSFWebConfigParam(since="2.0.10", expectedValues="true, false", defaultValue="false", group="EL")
286 public final static String INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER =
287 "org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER";
288 public final static boolean INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT = false;
289
290
291
292
293
294 @JSFWebConfigParam(since="2.0.11,2.1.5", expectedValues="text/html, application/xhtml+xml",
295 defaultValue="text/html", group="render")
296 public final static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE =
297 "org.apache.myfaces.DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE";
298 public final static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT = "text/html";
299
300
301
302
303
304 @JSFWebConfigParam(defaultValue = "true", since = "2.0.13, 2.1.7", expectedValues="true, false",
305 group="viewhandler", tags="performance",
306 desc="Enable or disable a cache used to 'remember' the generated facelets unique ids " +
307 "and reduce the impact over memory usage.")
308 public static final String INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED =
309 "org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED";
310 public static final boolean INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT = true;
311
312
313
314
315
316 @JSFWebConfigParam(defaultValue = "100", since = "2.0.13, 2.1.7",
317 group="viewhandler", tags="performance")
318 public static final String INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE =
319 "org.apache.myfaces.COMPONENT_UNIQUE_IDS_CACHE_SIZE";
320 public static final int INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT = 100;
321
322
323
324
325
326
327
328
329 @JSFWebConfigParam(since="2.0.13,2.1.7", expectedValues="true,false", defaultValue="true",
330 desc="If set false, myfaces won't support JSP and javax.faces.el. JSP are deprecated in " +
331 "JSF 2.X, javax.faces.el in in JSF 1.2. Default value is true.",
332 group="EL", tags="performance ")
333 public final static String INIT_PARAM_SUPPORT_JSP_AND_FACES_EL = "org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL";
334 public final static boolean INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT = true;
335
336 @JSFWebConfigParam(since = "2.3", expectedValues="true,false", defaultValue="true",
337 desc="If set false, myfaces won't support ManagedBeans anymore. ManagedBeans are deprecated in " +
338 "JSF 2.3, Default value is true.",
339 group="EL", tags="performance ")
340 public static final String INIT_PARAM_SUPPORT_MANAGED_BEANS = "org.apache.myfaces.SUPPORT_MANAGED_BEANS";
341 public final static boolean INIT_PARAM_SUPPORT_MANAGED_BEANS_DEFAULT = true;
342
343
344
345
346
347
348
349
350 @JSFWebConfigParam(since = "2.1.8, 2.0.14", expectedValues="none, myfavoritejsflib-*.jar",
351 tags="performance, GAE")
352 public static final String INIT_PARAM_GAE_JSF_JAR_FILES = "org.apache.myfaces.GAE_JSF_JAR_FILES";
353 public final static String INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT = null;
354
355
356
357
358
359
360
361
362
363
364
365 @JSFWebConfigParam(since = "2.1.8, 2.0.14", expectedValues="none, myfavoritejsflib-*.jar",
366 tags="performance, GAE")
367 public static final String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES =
368 "org.apache.myfaces.GAE_JSF_ANNOTATIONS_JAR_FILES";
369 public final static String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT = null;
370
371
372
373
374
375
376
377
378 @JSFWebConfigParam(since = "2.1.13", defaultValue="false", expectedValues="true,false",
379 group="viewhandler")
380 public static final String INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND =
381 "org.apache.myfaces.STRICT_JSF_2_VIEW_NOT_FOUND";
382 public final static boolean INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT = false;
383
384 @JSFWebConfigParam(defaultValue = "false", since = "2.2.0", expectedValues="true, false", group="render",
385 tags="performance",
386 desc="Enable or disable an early flush which allows to send e.g. the HTML-Head to the client " +
387 "while the rest gets rendered. It's a well known technique to reduce the time for loading a page.")
388 private static final String INIT_PARAM_EARLY_FLUSH_ENABLED =
389 "org.apache.myfaces.EARLY_FLUSH_ENABLED";
390 private static final boolean INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT = false;
391
392
393
394
395
396
397 @JSFWebConfigParam(since = "2.2.0", defaultValue="false", expectedValues="true,false",
398 group="viewhandler")
399 public static final String INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY =
400 "org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY";
401 public final static boolean INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT = false;
402
403
404
405
406
407
408 @JSFWebConfigParam(since = "2.2.4", defaultValue = "false", expectedValues = "true,false",
409 group="render")
410 public static final String INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN =
411 "org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN";
412 public final static boolean INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT = false;
413
414
415
416
417
418
419 @JSFWebConfigParam(defaultValue="false",since="2.0.5")
420 public static final String INIT_PARAM_FLASH_SCOPE_DISABLED = "org.apache.myfaces.FLASH_SCOPE_DISABLED";
421 public static final boolean INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT = false;
422
423
424
425
426
427
428
429
430 @JSFWebConfigParam(defaultValue="20",since="1.1", classType="java.lang.Integer", group="state", tags="performance")
431 public static final String INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION = "org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION";
432
433
434
435
436 public static final int INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT = 20;
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451 @JSFWebConfigParam(since="2.0.6", classType="java.lang.Integer", group="state", tags="performance",
452 defaultValue = "4")
453 public static final String INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
454 = "org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION";
455 public static final Integer INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT = 4;
456
457
458
459
460
461
462
463
464
465
466 @JSFWebConfigParam(since="2.2.6", group="state", tags="performance")
467 static final String INIT_PARAM_NUMBER_OF_FLASH_TOKENS_IN_SESSION =
468 "org.apache.myfaces.NUMBER_OF_FLASH_TOKENS_IN_SESSION";
469
470
471
472
473
474
475
476
477
478
479
480 @JSFWebConfigParam(since="2.2.6", group="state", tags="performance")
481 static final String INIT_PARAM_NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION =
482 "org.apache.myfaces.FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION";
483
484
485
486
487 @JSFWebConfigParam(since="2.2.9", defaultValue="false", expectedValues="true,false", group="EL")
488 protected static final String SUPPORT_EL_3_IMPORT_HANDLER = "org.apache.myfaces.SUPPORT_EL_3_IMPORT_HANDLER";
489 public final static boolean SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT = false;
490
491
492
493
494 @JSFWebConfigParam(since="2.3", defaultValue="false", expectedValues="true,false")
495 protected static final String STRICT_JSF_2_ORIGIN_HEADER_APP_PATH =
496 "org.apache.myfaces.STRICT_JSF_2_ORIGIN_HEADER_APP_PATH";
497 public final static boolean STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT = false;
498
499
500
501
502
503
504
505
506 @JSFWebConfigParam(since="2.3.6", defaultValue="true", expectedValues="true,false")
507 protected static final String ALWAYS_FORCE_SESSION_CREATION =
508 "org.apache.myfaces.ALWAYS_FORCE_SESSION_CREATION";
509 public final static boolean ALWAYS_FORCE_SESSION_CREATION_DEFAULT = true;
510
511 private boolean _detectJavascript;
512 private boolean _autoScroll;
513 private String _addResourceClass;
514 private String _resourceVirtualPath;
515 private boolean _checkExtensionsFilter;
516 private boolean _readonlyAsDisabledForSelect;
517 private long _configRefreshPeriod;
518 private boolean _renderViewStateId;
519 private boolean _strictXhtmlLinks;
520 private boolean _renderClearJavascriptOnButton;
521 private boolean renderHiddenFieldsForLinkParams;
522 private boolean _saveFormSubmitLinkIE;
523 private String _delegateFacesServlet;
524 private boolean _refreshTransientBuildOnPSS;
525 private boolean _refreshTransientBuildOnPSSAuto;
526 private boolean refreshTransientBuildOnPSSPreserveState;
527 private boolean _validateXML;
528 private boolean _wrapScriptContentWithXmlCommentTag;
529 private boolean _debugPhaseListenerEnabled;
530 private boolean _strictJsf2CCELResolver;
531 private String _defaultResponseWriterContentTypeMode;
532 private boolean _viewUniqueIdsCacheEnabled;
533 private int _componentUniqueIdsCacheSize;
534 private boolean _supportJSPAndFacesEL;
535 private boolean _supportManagedBeans;
536 private String _gaeJsfJarFiles;
537 private String _gaeJsfAnnotationsJarFiles;
538 private boolean _strictJsf2ViewNotFound;
539 private boolean _earlyFlushEnabled;
540 private boolean _strictJsf2FaceletsCompatibility;
541 private boolean _renderFormViewStateAtBegin;
542 private boolean _flashScopeDisabled;
543 private Integer _numberOfViewsInSession;
544 private Integer _numberOfSequentialViewsInSession;
545 private Integer _numberOfFlashTokensInSession;
546 private Integer _numberOfFacesFlowClientWindowIdsInSession;
547 private boolean _supportEL3ImportHandler;
548 private boolean _strictJsf2OriginHeaderAppPath;
549 private boolean _alwaysForceSessionCreation;
550
551 private static final boolean TOMAHAWK_AVAILABLE;
552 private static final boolean MYFACES_IMPL_AVAILABLE;
553 private static final boolean RI_IMPL_AVAILABLE;
554
555 static
556 {
557 boolean tomahawkAvailable;
558 try
559 {
560 ClassUtils.classForName("org.apache.myfaces.webapp.filter.ExtensionsFilter");
561 tomahawkAvailable = true;
562 }
563 catch (ClassNotFoundException e)
564 {
565 tomahawkAvailable = false;
566 }
567 TOMAHAWK_AVAILABLE = tomahawkAvailable;
568 }
569
570 static
571 {
572 boolean myfacesImplAvailable;
573 try
574 {
575 ClassUtils.classForName("org.apache.myfaces.application.ApplicationImpl");
576 myfacesImplAvailable = true;
577 }
578 catch (ClassNotFoundException e)
579 {
580 myfacesImplAvailable = false;
581 }
582 MYFACES_IMPL_AVAILABLE = myfacesImplAvailable;
583 }
584
585 static
586 {
587 boolean riImplAvailable;
588 try
589 {
590 ClassUtils.classForName("com.sun.faces.application.ApplicationImpl");
591 riImplAvailable = true;
592 }
593 catch (ClassNotFoundException e)
594 {
595 riImplAvailable = false;
596 }
597 RI_IMPL_AVAILABLE = riImplAvailable;
598 }
599
600 public static MyfacesConfig getCurrentInstance(ExternalContext extCtx)
601 {
602 MyfacesConfig myfacesConfig = (MyfacesConfig) extCtx
603 .getApplicationMap().get(APPLICATION_MAP_PARAM_NAME);
604 if (myfacesConfig == null)
605 {
606
607 myfacesConfig = createAndInitializeMyFacesConfig(extCtx);
608
609 extCtx.getApplicationMap().put(APPLICATION_MAP_PARAM_NAME, myfacesConfig);
610
611 }
612
613 return myfacesConfig;
614 }
615
616 public MyfacesConfig()
617 {
618 setRenderClearJavascriptOnButton(INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT);
619 setRenderHiddenFieldsForLinkParams(INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS_DEFAULT);
620 setSaveFormSubmitLinkIE(INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE_DEFAULT);
621 setReadonlyAsDisabledForSelect(INIT_READONLY_AS_DISABLED_FOR_SELECT_DEFAULT);
622 setRenderViewStateId(INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT);
623 setStrictXhtmlLinks(INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT);
624 setConfigRefreshPeriod(INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT);
625 setRefreshTransientBuildOnPSS(true);
626 setRefreshTransientBuildOnPSSAuto(true);
627 setRefreshTransientBuildOnPSSPreserveState(INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT);
628 setValidateXML(INIT_PARAM_VALIDATE_XML_DEFAULT);
629 setWrapScriptContentWithXmlCommentTag(INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT);
630 setDetectJavascript(INIT_PARAM_DETECT_JAVASCRIPT_DEFAULT);
631 setAutoScroll(INIT_PARAM_AUTO_SCROLL_DEFAULT);
632 setAddResourceClass(INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT);
633 setResourceVirtualPath(INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT);
634
635
636 setCheckExtensionsFilter(false);
637 setDebugPhaseListenerEnabled(INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT);
638 setStrictJsf2CCELResolver(INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT);
639 setDefaultResponseWriterContentTypeMode(INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT);
640 setViewUniqueIdsCacheEnabled(INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT);
641 setComponentUniqueIdsCacheSize(INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT);
642 setSupportJSPAndFacesEL(INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT);
643 setSupportManagedBeans(INIT_PARAM_SUPPORT_MANAGED_BEANS_DEFAULT);
644 setGaeJsfJarFiles(INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT);
645 setGaeJsfAnnotationsJarFiles(INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT);
646 setStrictJsf2ViewNotFound(INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT);
647 setEarlyFlushEnabled(INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT);
648 setStrictJsf2FaceletsCompatibility(INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT);
649 setRenderFormViewStateAtBegin(INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT);
650 setFlashScopeDisabled(INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT);
651 setNumberOfViewsInSession(INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
652 setNumberOfSequentialViewsInSession(INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
653 setNumberOfFlashTokensInSession(
654 (INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT /
655 INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT)+1);
656 setSupportEL3ImportHandler(SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT);
657 setStrictJsf2OriginHeaderAppPath(STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT);
658 setAlwaysForceSessionCreation(ALWAYS_FORCE_SESSION_CREATION_DEFAULT);
659 }
660
661 private static MyfacesConfig createAndInitializeMyFacesConfig(ExternalContext extCtx)
662 {
663
664 MyfacesConfig myfacesConfig = new MyfacesConfig();
665
666 myfacesConfig.setRenderClearJavascriptOnButton(getBooleanInitParameter(extCtx,
667 INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON,
668 INIT_PARAM_RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON_DEFAULT));
669
670 myfacesConfig.setRenderHiddenFieldsForLinkParams(getBooleanInitParameter(extCtx,
671 INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS,
672 INIT_PARAM_RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS_DEFAULT));
673
674 myfacesConfig.setSaveFormSubmitLinkIE(getBooleanInitParameter(extCtx, INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE,
675 INIT_PARAM_SAVE_FORM_SUBMIT_LINK_IE_DEFAULT));
676
677 myfacesConfig.setReadonlyAsDisabledForSelect(getBooleanInitParameter(extCtx,
678 INIT_READONLY_AS_DISABLED_FOR_SELECT,
679 INIT_READONLY_AS_DISABLED_FOR_SELECT_DEFAULT));
680 myfacesConfig.setRenderViewStateId(getBooleanInitParameter(extCtx, INIT_PARAM_RENDER_VIEWSTATE_ID,
681 INIT_PARAM_RENDER_VIEWSTATE_ID_DEFAULT));
682 myfacesConfig.setStrictXhtmlLinks(getBooleanInitParameter(extCtx, INIT_PARAM_STRICT_XHTML_LINKS,
683 INIT_PARAM_STRICT_XHTML_LINKS_DEFAULT));
684
685 myfacesConfig.setConfigRefreshPeriod(getLongInitParameter(extCtx, INIT_PARAM_CONFIG_REFRESH_PERIOD,
686 INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT));
687
688
689 myfacesConfig.setDelegateFacesServlet(extCtx.getInitParameter(INIT_PARAM_DELEGATE_FACES_SERVLET));
690
691 String refreshTransientBuildOnPSS = getStringInitParameter(extCtx,
692 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS,
693 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT);
694
695 if (refreshTransientBuildOnPSS == null)
696 {
697 myfacesConfig.setRefreshTransientBuildOnPSS(false);
698 myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
699 }
700 else if ("auto".equalsIgnoreCase(refreshTransientBuildOnPSS))
701 {
702 myfacesConfig.setRefreshTransientBuildOnPSS(true);
703 myfacesConfig.setRefreshTransientBuildOnPSSAuto(true);
704 }
705 else if (refreshTransientBuildOnPSS.equalsIgnoreCase("true") ||
706 refreshTransientBuildOnPSS.equalsIgnoreCase("on") ||
707 refreshTransientBuildOnPSS.equalsIgnoreCase("yes"))
708 {
709 myfacesConfig.setRefreshTransientBuildOnPSS(true);
710 myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
711 }
712 else
713 {
714 myfacesConfig.setRefreshTransientBuildOnPSS(false);
715 myfacesConfig.setRefreshTransientBuildOnPSSAuto(false);
716 }
717
718 myfacesConfig.setRefreshTransientBuildOnPSSPreserveState(getBooleanInitParameter(extCtx,
719 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE,
720 INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT));
721
722 myfacesConfig.setValidateXML(getBooleanInitParameter(extCtx, INIT_PARAM_VALIDATE_XML,
723 INIT_PARAM_VALIDATE_XML_DEFAULT));
724
725 myfacesConfig.setWrapScriptContentWithXmlCommentTag(getBooleanInitParameter(extCtx,
726 INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG,
727 INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT));
728
729 myfacesConfig.setDebugPhaseListenerEnabled(getBooleanInitParameter(extCtx, INIT_PARAM_DEBUG_PHASE_LISTENER,
730 INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT));
731
732 myfacesConfig.setStrictJsf2CCELResolver(WebConfigParamUtils.getBooleanInitParameter(extCtx,
733 INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER, INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT));
734
735 myfacesConfig.setDefaultResponseWriterContentTypeMode(WebConfigParamUtils.getStringInitParameter(
736 extCtx, INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE,
737 INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT));
738
739 myfacesConfig.setViewUniqueIdsCacheEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
740 INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED, INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT));
741 myfacesConfig.setComponentUniqueIdsCacheSize(
742 WebConfigParamUtils.getIntegerInitParameter(extCtx,
743 INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE,
744 INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT));
745 myfacesConfig.setSupportJSPAndFacesEL(WebConfigParamUtils.getBooleanInitParameter(extCtx,
746 INIT_PARAM_SUPPORT_JSP_AND_FACES_EL, INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT));
747
748 myfacesConfig.setSupportManagedBeans(WebConfigParamUtils.getBooleanInitParameter(extCtx,
749 INIT_PARAM_SUPPORT_MANAGED_BEANS, INIT_PARAM_SUPPORT_MANAGED_BEANS_DEFAULT));
750
751 myfacesConfig.setGaeJsfJarFiles(WebConfigParamUtils.getStringInitParameter(extCtx,
752 INIT_PARAM_GAE_JSF_JAR_FILES, INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT));
753 myfacesConfig.setGaeJsfAnnotationsJarFiles(WebConfigParamUtils.getStringInitParameter(extCtx,
754 INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES, INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT));
755
756 myfacesConfig.setStrictJsf2ViewNotFound(WebConfigParamUtils.getBooleanInitParameter(extCtx,
757 INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND, INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT));
758
759 myfacesConfig.setEarlyFlushEnabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
760 INIT_PARAM_EARLY_FLUSH_ENABLED, INIT_PARAM_EARLY_FLUSH_ENABLED_DEFAULT));
761
762
763 myfacesConfig.setStrictJsf2FaceletsCompatibility(WebConfigParamUtils.getBooleanInitParameter(extCtx,
764 INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY,
765 INIT_PARAM_STRICT_JSF_2_FACELETS_COMPATIBILITY_DEFAULT));
766
767 myfacesConfig.setRenderFormViewStateAtBegin(WebConfigParamUtils.getBooleanInitParameter(extCtx,
768 INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN,
769 INIT_PARAM_RENDER_FORM_VIEW_STATE_AT_BEGIN_DEFAULT));
770
771 myfacesConfig.setFlashScopeDisabled(WebConfigParamUtils.getBooleanInitParameter(extCtx,
772 INIT_PARAM_FLASH_SCOPE_DISABLED,
773 INIT_PARAM_FLASH_SCOPE_DISABLED_DEFAULT));
774
775 try
776 {
777 myfacesConfig.setNumberOfSequentialViewsInSession(WebConfigParamUtils.getIntegerInitParameter(
778 extCtx,
779 INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION,
780 INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT));
781 Integer views = myfacesConfig.getNumberOfSequentialViewsInSession();
782 if (views == null || views < 0)
783 {
784 Logger.getLogger(MyfacesConfig.class.getName()).severe(
785 "Configured value for " + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
786 + " is not valid, must be an value >= 0, using default value ("
787 + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT);
788 views = INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT;
789 }
790 }
791 catch (Throwable e)
792 {
793 Logger.getLogger(MyfacesConfig.class.getName()).log(Level.SEVERE, "Error determining the value for "
794 + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION
795 + ", expected an integer value > 0, using default value ("
796 + INIT_PARAM_NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
797 }
798 try
799 {
800 myfacesConfig.setNumberOfViewsInSession(WebConfigParamUtils.getIntegerInitParameter(
801 extCtx,
802 INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION,
803 INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT));
804 Integer views = myfacesConfig.getNumberOfViewsInSession();
805 if (views == null || views <= 0)
806 {
807 Logger.getLogger(MyfacesConfig.class.getName()).severe(
808 "Configured value for " + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION
809 + " is not valid, must be an value > 0, using default value ("
810 + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT);
811 views = INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT;
812 }
813 }
814 catch (Throwable e)
815 {
816 Logger.getLogger(MyfacesConfig.class.getName()).log(Level.SEVERE, "Error determining the value for "
817 + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION
818 + ", expected an integer value > 0, using default value ("
819 + INIT_PARAM_NUMBER_OF_VIEWS_IN_SESSION_DEFAULT + "): " + e.getMessage(), e);
820 }
821
822 Integer numberOfFlashTokensInSessionDefault;
823 Integer i = myfacesConfig.getNumberOfSequentialViewsInSession();
824 int j = myfacesConfig.getNumberOfViewsInSession();
825 if (i != null && i.intValue() > 0)
826 {
827 numberOfFlashTokensInSessionDefault = (j / i.intValue()) + 1;
828 }
829 else
830 {
831 numberOfFlashTokensInSessionDefault = j + 1;
832 }
833 myfacesConfig.setNumberOfFlashTokensInSession(WebConfigParamUtils.getIntegerInitParameter(
834 extCtx,
835 INIT_PARAM_NUMBER_OF_FLASH_TOKENS_IN_SESSION, numberOfFlashTokensInSessionDefault));
836 myfacesConfig.setNumberOfFacesFlowClientWindowIdsInSession(WebConfigParamUtils.getIntegerInitParameter(
837 extCtx,
838 INIT_PARAM_NUMBER_OF_FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION,
839 numberOfFlashTokensInSessionDefault));
840
841 myfacesConfig.setSupportEL3ImportHandler(WebConfigParamUtils.getBooleanInitParameter(extCtx,
842 SUPPORT_EL_3_IMPORT_HANDLER,
843 SUPPORT_EL_3_IMPORT_HANDLER_DEFAULT));
844
845 myfacesConfig.setStrictJsf2OriginHeaderAppPath(WebConfigParamUtils.getBooleanInitParameter(extCtx,
846 STRICT_JSF_2_ORIGIN_HEADER_APP_PATH,
847 STRICT_JSF_2_ORIGIN_HEADER_APP_PATH_DEFAULT));
848
849 myfacesConfig.setAlwaysForceSessionCreation(WebConfigParamUtils.getBooleanInitParameter(extCtx,
850 ALWAYS_FORCE_SESSION_CREATION,
851 ALWAYS_FORCE_SESSION_CREATION_DEFAULT));
852
853 if (TOMAHAWK_AVAILABLE)
854 {
855 myfacesConfig.setDetectJavascript(getBooleanInitParameter(extCtx, INIT_PARAM_DETECT_JAVASCRIPT,
856 INIT_PARAM_DETECT_JAVASCRIPT_DEFAULT));
857 myfacesConfig.setAutoScroll(getBooleanInitParameter(extCtx, INIT_PARAM_AUTO_SCROLL,
858 INIT_PARAM_AUTO_SCROLL_DEFAULT));
859
860 myfacesConfig.setAddResourceClass(getStringInitParameter(extCtx, INIT_PARAM_ADD_RESOURCE_CLASS,
861 INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT));
862 myfacesConfig.setResourceVirtualPath(getStringInitParameter(extCtx, INIT_PARAM_RESOURCE_VIRTUAL_PATH,
863 INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT));
864
865 myfacesConfig.setCheckExtensionsFilter(getBooleanInitParameter(extCtx, INIT_CHECK_EXTENSIONS_FILTER,
866 INIT_CHECK_EXTENSIONS_FILTER_DEFAULT));
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883 }
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900 return myfacesConfig;
901 }
902
903 private static boolean getBooleanInitParameter(ExternalContext externalContext,
904 String paramName,
905 boolean defaultValue)
906 {
907 String strValue = externalContext.getInitParameter(paramName);
908 if (strValue == null)
909 {
910
911
912 return defaultValue;
913 }
914 else if (strValue.equalsIgnoreCase("true") || strValue.equalsIgnoreCase("on") ||
915 strValue.equalsIgnoreCase("yes"))
916 {
917 return true;
918 }
919 else if (strValue.equalsIgnoreCase("false") || strValue.equalsIgnoreCase("off") ||
920 strValue.equalsIgnoreCase("no"))
921 {
922 return false;
923 }
924 else
925 {
926
927
928 return defaultValue;
929 }
930 }
931
932 private static String getStringInitParameter(ExternalContext externalContext,
933 String paramName,
934 String defaultValue)
935 {
936 String strValue = externalContext.getInitParameter(paramName);
937 if (strValue == null)
938 {
939
940
941
942 return defaultValue;
943 }
944
945 return strValue;
946 }
947
948 private static long getLongInitParameter(ExternalContext externalContext,
949 String paramName,
950 long defaultValue)
951 {
952 String strValue = externalContext.getInitParameter(paramName);
953 if (strValue == null)
954 {
955
956
957 return defaultValue;
958 }
959 else
960 {
961 try
962 {
963 return Long.parseLong(strValue);
964 }
965 catch (NumberFormatException e)
966 {
967
968
969 }
970 return defaultValue;
971 }
972 }
973
974 private void setResourceVirtualPath( String resourceVirtualPath )
975 {
976 this._resourceVirtualPath = resourceVirtualPath;
977 }
978
979 public String getResourceVirtualPath()
980 {
981 return this._resourceVirtualPath;
982 }
983
984 public boolean isDetectJavascript()
985 {
986 return _detectJavascript;
987 }
988
989 private void setDetectJavascript(boolean detectJavascript)
990 {
991 _detectJavascript = detectJavascript;
992 }
993
994 private void setReadonlyAsDisabledForSelect(boolean readonlyAsDisabledForSelect)
995 {
996 _readonlyAsDisabledForSelect = readonlyAsDisabledForSelect;
997 }
998
999 public boolean isReadonlyAsDisabledForSelect()
1000 {
1001 return _readonlyAsDisabledForSelect;
1002 }
1003
1004
1005 public long getConfigRefreshPeriod()
1006 {
1007 return _configRefreshPeriod;
1008 }
1009
1010 public void setConfigRefreshPeriod(long configRefreshPeriod)
1011 {
1012 _configRefreshPeriod = configRefreshPeriod;
1013 }
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028 public boolean isRenderViewStateId()
1029 {
1030 return _renderViewStateId;
1031 }
1032
1033 public void setRenderViewStateId(boolean renderViewStateId)
1034 {
1035 _renderViewStateId = renderViewStateId;
1036 }
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052 public boolean isStrictXhtmlLinks()
1053 {
1054 return _strictXhtmlLinks;
1055 }
1056
1057 public void setStrictXhtmlLinks(boolean strictXhtmlLinks)
1058 {
1059 _strictXhtmlLinks = strictXhtmlLinks;
1060 }
1061
1062 public boolean isTomahawkAvailable()
1063 {
1064 return TOMAHAWK_AVAILABLE;
1065 }
1066
1067 public boolean isMyfacesImplAvailable()
1068 {
1069 return MYFACES_IMPL_AVAILABLE;
1070 }
1071
1072 public boolean isRiImplAvailable()
1073 {
1074 return RI_IMPL_AVAILABLE;
1075 }
1076
1077 public boolean isAutoScroll()
1078 {
1079 return _autoScroll;
1080 }
1081
1082 private void setAutoScroll(boolean autoScroll)
1083 {
1084 _autoScroll = autoScroll;
1085 }
1086
1087 private void setAddResourceClass(String addResourceClass)
1088 {
1089 _addResourceClass = addResourceClass;
1090 }
1091
1092 public String getAddResourceClass()
1093 {
1094 return _addResourceClass;
1095 }
1096
1097
1098
1099
1100
1101 public static String getAddResourceClassFromServletContext(ServletContext servletContext)
1102 {
1103 String addResourceClass = servletContext.getInitParameter(INIT_PARAM_ADD_RESOURCE_CLASS);
1104
1105 return addResourceClass == null ? INIT_PARAM_ADD_RESOURCE_CLASS_DEFAULT : addResourceClass;
1106 }
1107
1108
1109
1110
1111 public boolean isCheckExtensionsFilter()
1112 {
1113 return _checkExtensionsFilter;
1114 }
1115
1116 public void setCheckExtensionsFilter(boolean extensionsFilter)
1117 {
1118 _checkExtensionsFilter = extensionsFilter;
1119 }
1120
1121 public void setRenderClearJavascriptOnButton(
1122 boolean renderClearJavascriptOnButton)
1123 {
1124 _renderClearJavascriptOnButton = renderClearJavascriptOnButton;
1125 }
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135 public boolean isRenderClearJavascriptOnButton()
1136 {
1137 return _renderClearJavascriptOnButton;
1138 }
1139
1140 public boolean isRenderHiddenFieldsForLinkParams()
1141 {
1142 return renderHiddenFieldsForLinkParams;
1143 }
1144
1145 public void setRenderHiddenFieldsForLinkParams(
1146 boolean renderHiddenFieldsForLinkParams)
1147 {
1148 this.renderHiddenFieldsForLinkParams = renderHiddenFieldsForLinkParams;
1149 }
1150
1151 public void setSaveFormSubmitLinkIE(boolean saveFormSubmitLinkIE)
1152 {
1153 _saveFormSubmitLinkIE = saveFormSubmitLinkIE;
1154 }
1155
1156
1157
1158
1159
1160
1161
1162 public boolean isSaveFormSubmitLinkIE()
1163 {
1164 return _saveFormSubmitLinkIE;
1165 }
1166
1167 public String getDelegateFacesServlet()
1168 {
1169 return _delegateFacesServlet;
1170 }
1171
1172 public void setDelegateFacesServlet(String delegateFacesServlet)
1173 {
1174 _delegateFacesServlet = delegateFacesServlet;
1175 }
1176
1177 public boolean isRefreshTransientBuildOnPSS()
1178 {
1179 return _refreshTransientBuildOnPSS;
1180 }
1181
1182 public void setRefreshTransientBuildOnPSS(boolean refreshTransientBuildOnPSS)
1183 {
1184 this._refreshTransientBuildOnPSS = refreshTransientBuildOnPSS;
1185 }
1186
1187 public boolean isRefreshTransientBuildOnPSSAuto()
1188 {
1189 return _refreshTransientBuildOnPSSAuto;
1190 }
1191
1192 public void setRefreshTransientBuildOnPSSAuto(
1193 boolean refreshTransientBuildOnPSSAuto)
1194 {
1195 this._refreshTransientBuildOnPSSAuto = refreshTransientBuildOnPSSAuto;
1196 }
1197
1198 public boolean isRefreshTransientBuildOnPSSPreserveState()
1199 {
1200 return refreshTransientBuildOnPSSPreserveState;
1201 }
1202
1203 public void setRefreshTransientBuildOnPSSPreserveState(
1204 boolean refreshTransientBuildOnPSSPreserveState)
1205 {
1206 this.refreshTransientBuildOnPSSPreserveState = refreshTransientBuildOnPSSPreserveState;
1207 }
1208
1209 public boolean isValidateXML()
1210 {
1211 return _validateXML;
1212 }
1213
1214 public void setValidateXML(boolean validateXML)
1215 {
1216 _validateXML = validateXML;
1217 }
1218
1219 public boolean isWrapScriptContentWithXmlCommentTag()
1220 {
1221 return _wrapScriptContentWithXmlCommentTag;
1222 }
1223
1224 public void setWrapScriptContentWithXmlCommentTag(
1225 boolean wrapScriptContentWithXmlCommentTag)
1226 {
1227 this._wrapScriptContentWithXmlCommentTag = wrapScriptContentWithXmlCommentTag;
1228 }
1229
1230 public boolean isDebugPhaseListenerEnabled()
1231 {
1232 return _debugPhaseListenerEnabled;
1233 }
1234
1235 public void setDebugPhaseListenerEnabled(boolean debugPhaseListener)
1236 {
1237 this._debugPhaseListenerEnabled = debugPhaseListener;
1238 }
1239
1240 public boolean isStrictJsf2CCELResolver()
1241 {
1242 return _strictJsf2CCELResolver;
1243 }
1244
1245 public void setStrictJsf2CCELResolver(boolean strictJsf2CCELResolver)
1246 {
1247 this._strictJsf2CCELResolver = strictJsf2CCELResolver;
1248 }
1249
1250 public String getDefaultResponseWriterContentTypeMode()
1251 {
1252 return _defaultResponseWriterContentTypeMode;
1253 }
1254
1255 public void setDefaultResponseWriterContentTypeMode(
1256 String defaultResponseWriterContentTypeMode)
1257 {
1258 this._defaultResponseWriterContentTypeMode = defaultResponseWriterContentTypeMode;
1259 }
1260
1261 public boolean isViewUniqueIdsCacheEnabled()
1262 {
1263 return _viewUniqueIdsCacheEnabled;
1264 }
1265
1266 public void setViewUniqueIdsCacheEnabled(boolean viewUniqueIdsCacheEnabled)
1267 {
1268 _viewUniqueIdsCacheEnabled = viewUniqueIdsCacheEnabled;
1269 }
1270
1271 public boolean isSupportJSPAndFacesEL()
1272 {
1273 return _supportJSPAndFacesEL;
1274 }
1275
1276 public void setSupportJSPAndFacesEL(boolean supportJSPANDFacesEL)
1277 {
1278 _supportJSPAndFacesEL = supportJSPANDFacesEL;
1279 }
1280
1281 public boolean isSupportManagedBeans()
1282 {
1283 return _supportManagedBeans;
1284 }
1285
1286 public void setSupportManagedBeans(boolean supportManagedBeans)
1287 {
1288 _supportManagedBeans = supportManagedBeans;
1289 }
1290
1291 public int getComponentUniqueIdsCacheSize()
1292 {
1293 return _componentUniqueIdsCacheSize;
1294 }
1295
1296 public void setComponentUniqueIdsCacheSize(int componentUniqueIdsCacheSize)
1297 {
1298 this._componentUniqueIdsCacheSize = componentUniqueIdsCacheSize;
1299 }
1300
1301 public String getGaeJsfJarFiles()
1302 {
1303 return _gaeJsfJarFiles;
1304 }
1305
1306 public void setGaeJsfJarFiles(String gaeJsfJarFiles)
1307 {
1308 this._gaeJsfJarFiles = gaeJsfJarFiles;
1309 }
1310
1311 public String getGaeJsfAnnotationsJarFiles()
1312 {
1313 return _gaeJsfAnnotationsJarFiles;
1314 }
1315
1316 public void setGaeJsfAnnotationsJarFiles(String gaeJsfAnnotationsJarFiles)
1317 {
1318 this._gaeJsfAnnotationsJarFiles = gaeJsfAnnotationsJarFiles;
1319 }
1320
1321 public boolean isStrictJsf2ViewNotFound()
1322 {
1323 return _strictJsf2ViewNotFound;
1324 }
1325
1326 public void setStrictJsf2ViewNotFound(boolean strictJsf2ViewNotFound)
1327 {
1328 this._strictJsf2ViewNotFound = strictJsf2ViewNotFound;
1329 }
1330
1331 public boolean isEarlyFlushEnabled()
1332 {
1333 return _earlyFlushEnabled;
1334 }
1335
1336 public void setEarlyFlushEnabled(boolean earlyFlushEnabled)
1337 {
1338 this._earlyFlushEnabled = earlyFlushEnabled;
1339 }
1340
1341 public boolean isStrictJsf2FaceletsCompatibility()
1342 {
1343 return _strictJsf2FaceletsCompatibility;
1344 }
1345
1346 public void setStrictJsf2FaceletsCompatibility(boolean strictJsf2FaceletsCompatibility)
1347 {
1348 this._strictJsf2FaceletsCompatibility = strictJsf2FaceletsCompatibility;
1349 }
1350
1351 public boolean isRenderFormViewStateAtBegin()
1352 {
1353 return _renderFormViewStateAtBegin;
1354 }
1355
1356 public void setRenderFormViewStateAtBegin(boolean renderFormViewStateAtBegin)
1357 {
1358 this._renderFormViewStateAtBegin = renderFormViewStateAtBegin;
1359 }
1360
1361 public boolean isFlashScopeDisabled()
1362 {
1363 return _flashScopeDisabled;
1364 }
1365
1366 public void setFlashScopeDisabled(boolean flashScopeDisabled)
1367 {
1368 this._flashScopeDisabled = flashScopeDisabled;
1369 }
1370
1371
1372
1373
1374 public Integer getNumberOfViewsInSession()
1375 {
1376 return _numberOfViewsInSession;
1377 }
1378
1379
1380
1381
1382 public void setNumberOfViewsInSession(Integer numberOfViewsInSession)
1383 {
1384 this._numberOfViewsInSession = numberOfViewsInSession;
1385 }
1386
1387
1388
1389
1390 public Integer getNumberOfSequentialViewsInSession()
1391 {
1392 return _numberOfSequentialViewsInSession;
1393 }
1394
1395
1396
1397
1398 public void setNumberOfSequentialViewsInSession(Integer numberOfSequentialViewsInSession)
1399 {
1400 this._numberOfSequentialViewsInSession = numberOfSequentialViewsInSession;
1401 }
1402
1403
1404
1405
1406 public Integer getNumberOfFlashTokensInSession()
1407 {
1408 return _numberOfFlashTokensInSession;
1409 }
1410
1411
1412
1413
1414 public void setNumberOfFlashTokensInSession(Integer numberOfFlashTokensInSession)
1415 {
1416 this._numberOfFlashTokensInSession = numberOfFlashTokensInSession;
1417 }
1418
1419
1420
1421
1422 public Integer getNumberOfFacesFlowClientWindowIdsInSession()
1423 {
1424 return _numberOfFacesFlowClientWindowIdsInSession;
1425 }
1426
1427
1428
1429
1430 public void setNumberOfFacesFlowClientWindowIdsInSession(Integer numberOfFacesFlowClientWindowIdsInSession)
1431 {
1432 this._numberOfFacesFlowClientWindowIdsInSession = numberOfFacesFlowClientWindowIdsInSession;
1433 }
1434
1435
1436
1437
1438 public boolean isSupportEL3ImportHandler()
1439 {
1440 return _supportEL3ImportHandler;
1441 }
1442
1443
1444
1445
1446 public void setSupportEL3ImportHandler(boolean supportEL3ImportHandler)
1447 {
1448 this._supportEL3ImportHandler = supportEL3ImportHandler;
1449 }
1450
1451 public boolean isStrictJsf2OriginHeaderAppPath()
1452 {
1453 return _strictJsf2OriginHeaderAppPath;
1454 }
1455
1456 public void setStrictJsf2OriginHeaderAppPath(boolean strictJsf2OriginHeaderAppPath)
1457 {
1458 this._strictJsf2OriginHeaderAppPath = strictJsf2OriginHeaderAppPath;
1459 }
1460
1461 public boolean isAlwaysForceSessionCreation()
1462 {
1463 return _alwaysForceSessionCreation;
1464 }
1465
1466
1467
1468
1469 public void setAlwaysForceSessionCreation(boolean alwaysForceSessionCreation)
1470 {
1471 this._alwaysForceSessionCreation = alwaysForceSessionCreation;
1472 }
1473 }