1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.myfaces.webapp;
22
23 import java.util.logging.Level;
24 import java.util.logging.Logger;
25
26 import javax.faces.application.ProjectStage;
27 import javax.faces.context.FacesContext;
28
29 import org.apache.myfaces.shared.config.MyfacesConfig;
30 import org.apache.myfaces.shared.util.StringUtils;
31 import org.apache.myfaces.shared.util.WebConfigParamUtils;
32
33 public class WebConfigParamsLogger
34 {
35 private static final Logger log = Logger.getLogger(WebConfigParamsLogger.class.getName());
36
37 public static void logWebContextParams(FacesContext facesContext)
38 {
39 String logCommand = WebConfigParamUtils.getStringInitParameter(
40 facesContext.getExternalContext(),
41 AbstractFacesInitializer.INIT_PARAM_LOG_WEB_CONTEXT_PARAMS, AbstractFacesInitializer.INIT_PARAM_LOG_WEB_CONTEXT_PARAMS_DEFAULT);
42
43 if ( logCommand.equals("false") ||
44 (logCommand.equals("auto") && !facesContext.isProjectStage(ProjectStage.Development) && !facesContext.isProjectStage(ProjectStage.Production) )
45 )
46 {
47
48 return;
49 }
50
51 MyfacesConfig myfacesConfig = MyfacesConfig.getCurrentInstance(facesContext.getExternalContext());
52
53 if (myfacesConfig.isTomahawkAvailable())
54 {
55 if(myfacesConfig.isMyfacesImplAvailable())
56 {
57 if(log.isLoggable(Level.INFO))
58 {
59 log.info("Starting up Tomahawk on the MyFaces-JSF-Implementation");
60 }
61 }
62
63 if(myfacesConfig.isRiImplAvailable())
64 {
65 if(log.isLoggable(Level.INFO))
66 {
67 log.info("Starting up Tomahawk on the RI-JSF-Implementation.");
68 }
69 }
70 }
71 else
72 {
73 if (log.isLoggable(Level.INFO))
74 {
75 log.info("Tomahawk jar not available. Autoscrolling, DetectJavascript, AddResourceClass and CheckExtensionsFilter are disabled now.");
76 }
77 }
78
79 if(myfacesConfig.isRiImplAvailable() && myfacesConfig.isMyfacesImplAvailable())
80 {
81 log.severe("Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.");
82 }
83
84
85
86 if (log.isLoggable(Level.INFO))
87 {
88 log.info("Scanning for context init parameters not defined. It is not necessary to define them all into your web.xml, " +
89 "they are just provided here for informative purposes. To disable this messages set " +
90 AbstractFacesInitializer.INIT_PARAM_LOG_WEB_CONTEXT_PARAMS + " config param to 'false'");
91 String paramValue = null;
92
93 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.RESOURCE_EXCLUDES");
94 if (paramValue == null)
95 {
96 log.info("No context init parameter 'javax.faces.RESOURCE_EXCLUDES' found, using default value '.class .jsp .jspx .properties .xhtml .groovy'.");
97 }
98
99 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.STATE_SAVING_METHOD");
100 if (paramValue == null)
101 {
102 log.info("No context init parameter 'javax.faces.STATE_SAVING_METHOD' found, using default value 'server'.");
103 }
104 else
105 {
106 boolean found = false;
107 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("server,client",','));
108 for (int i = 0; i < expectedValues.length; i++)
109 {
110 if (paramValue.equalsIgnoreCase(expectedValues[i]))
111 {
112 found = true;
113 break;
114 }
115 }
116 if (!found)
117 {
118 if (log.isLoggable(Level.WARNING))
119 {
120 log.warning("Wrong value in context init parameter 'javax.faces.STATE_SAVING_METHOD' (='" + paramValue + "'), using default value 'server'");
121 }
122 }
123 }
124
125 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FULL_STATE_SAVING_VIEW_IDS");
126 if (paramValue == null)
127 {
128 log.info("No context init parameter 'javax.faces.FULL_STATE_SAVING_VIEW_IDS' found.");
129 }
130
131 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.PARTIAL_STATE_SAVING");
132 if (paramValue == null)
133 {
134 log.info("No context init parameter 'javax.faces.PARTIAL_STATE_SAVING' found, using default value 'true (false with 1.2 webapps)'.");
135 }
136 else
137 {
138 boolean found = false;
139 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
140 for (int i = 0; i < expectedValues.length; i++)
141 {
142 if (paramValue.equals(expectedValues[i]))
143 {
144 found = true;
145 break;
146 }
147 }
148 if (!found)
149 {
150 if (log.isLoggable(Level.WARNING))
151 {
152 log.warning("Wrong value in context init parameter 'javax.faces.PARTIAL_STATE_SAVING' (='" + paramValue + "'), using default value 'true (false with 1.2 webapps)'");
153 }
154 }
155 }
156
157 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.SERIALIZE_SERVER_STATE");
158 if (paramValue == null)
159 {
160 log.info("No context init parameter 'javax.faces.SERIALIZE_SERVER_STATE' found, using default value 'false'.");
161 }
162 else
163 {
164 boolean found = false;
165 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
166 for (int i = 0; i < expectedValues.length; i++)
167 {
168 if (paramValue.equals(expectedValues[i]))
169 {
170 found = true;
171 break;
172 }
173 }
174 if (!found)
175 {
176 if (log.isLoggable(Level.WARNING))
177 {
178 log.warning("Wrong value in context init parameter 'javax.faces.SERIALIZE_SERVER_STATE' (='" + paramValue + "'), using default value 'false'");
179 }
180 }
181 }
182
183 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.DEFAULT_SUFFIX");
184 if (paramValue == null)
185 {
186 log.info("No context init parameter 'javax.faces.DEFAULT_SUFFIX' found, using default value '.xhtml .view.xml .jsp'.");
187 }
188
189 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_SUFFIX");
190 if (paramValue == null)
191 {
192 log.info("No context init parameter 'javax.faces.FACELETS_SUFFIX' found, using default value '.xhtml'.");
193 }
194
195 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_VIEW_MAPPINGS");
196 if (paramValue == null)
197 {
198 log.info("No context init parameter 'javax.faces.FACELETS_VIEW_MAPPINGS' found.");
199 }
200
201 paramValue = facesContext.getExternalContext().getInitParameter("DISABLE_FACELET_JSF_VIEWHANDLER");
202 if (paramValue == null)
203 {
204 log.info("No context init parameter 'DISABLE_FACELET_JSF_VIEWHANDLER' found.");
205 }
206
207 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_BUFFER_SIZE");
208 if (paramValue == null)
209 {
210 log.info("No context init parameter 'javax.faces.FACELETS_BUFFER_SIZE' found, using default value '1024'.");
211 }
212 else
213 {
214 try
215 {
216 java.lang.Integer.valueOf(paramValue);
217 }
218 catch(Exception e)
219 {
220 if (log.isLoggable(Level.WARNING))
221 {
222 log.warning("Wrong value in context init parameter 'javax.faces.FACELETS_BUFFER_SIZE' (='" + paramValue + "'), using default value '1024'");
223 }
224 }
225 }
226
227 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_DECORATORS");
228 if (paramValue == null)
229 {
230 log.info("No context init parameter 'javax.faces.FACELETS_DECORATORS' found.");
231 }
232
233 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_LIBRARIES");
234 if (paramValue == null)
235 {
236 log.info("No context init parameter 'javax.faces.FACELETS_LIBRARIES' found.");
237 }
238
239 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_REFRESH_PERIOD");
240 if (paramValue == null)
241 {
242 log.info("No context init parameter 'javax.faces.FACELETS_REFRESH_PERIOD' found, using default value '-1'.");
243 }
244 else
245 {
246 try
247 {
248 java.lang.Long.valueOf(paramValue);
249 }
250 catch(Exception e)
251 {
252 if (log.isLoggable(Level.WARNING))
253 {
254 log.warning("Wrong value in context init parameter 'javax.faces.FACELETS_REFRESH_PERIOD' (='" + paramValue + "'), using default value '-1'");
255 }
256 }
257 }
258
259 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_SKIP_COMMENTS");
260 if (paramValue == null)
261 {
262 log.info("No context init parameter 'javax.faces.FACELETS_SKIP_COMMENTS' found.");
263 }
264
265 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.HONOR_CURRENT_COMPONENT_ATTRIBUTES");
266 if (paramValue == null)
267 {
268 log.info("No context init parameter 'javax.faces.HONOR_CURRENT_COMPONENT_ATTRIBUTES' found, using default value 'false'.");
269 }
270 else
271 {
272 boolean found = false;
273 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
274 for (int i = 0; i < expectedValues.length; i++)
275 {
276 if (paramValue.equals(expectedValues[i]))
277 {
278 found = true;
279 break;
280 }
281 }
282 if (!found)
283 {
284 if (log.isLoggable(Level.WARNING))
285 {
286 log.warning("Wrong value in context init parameter 'javax.faces.HONOR_CURRENT_COMPONENT_ATTRIBUTES' (='" + paramValue + "'), using default value 'false'");
287 }
288 }
289 }
290
291 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.VALIDATE_EMPTY_FIELDS");
292 if (paramValue == null)
293 {
294 log.info("No context init parameter 'javax.faces.VALIDATE_EMPTY_FIELDS' found, using default value 'auto'.");
295 }
296 else
297 {
298 boolean found = false;
299 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("auto, true, false",','));
300 for (int i = 0; i < expectedValues.length; i++)
301 {
302 if (paramValue.equals(expectedValues[i]))
303 {
304 found = true;
305 break;
306 }
307 }
308 if (!found)
309 {
310 if (log.isLoggable(Level.WARNING))
311 {
312 log.warning("Wrong value in context init parameter 'javax.faces.VALIDATE_EMPTY_FIELDS' (='" + paramValue + "'), using default value 'auto'");
313 }
314 }
315 }
316
317 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL");
318 if (paramValue == null)
319 {
320 log.info("No context init parameter 'javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL' found, using default value 'false'.");
321 }
322 else
323 {
324 boolean found = false;
325 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
326 for (int i = 0; i < expectedValues.length; i++)
327 {
328 if (paramValue.equals(expectedValues[i]))
329 {
330 found = true;
331 break;
332 }
333 }
334 if (!found)
335 {
336 if (log.isLoggable(Level.WARNING))
337 {
338 log.warning("Wrong value in context init parameter 'javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL' (='" + paramValue + "'), using default value 'false'");
339 }
340 }
341 }
342
343 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL_CLEAR_INPUT");
344 if (paramValue == null)
345 {
346 log.info("No context init parameter 'org.apache.myfaces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL_CLEAR_INPUT' found, using default value 'false'.");
347 }
348 else
349 {
350 boolean found = false;
351 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
352 for (int i = 0; i < expectedValues.length; i++)
353 {
354 if (paramValue.equals(expectedValues[i]))
355 {
356 found = true;
357 break;
358 }
359 }
360 if (!found)
361 {
362 if (log.isLoggable(Level.WARNING))
363 {
364 log.warning("Wrong value in context init parameter 'org.apache.myfaces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL_CLEAR_INPUT' (='" + paramValue + "'), using default value 'false'");
365 }
366 }
367 }
368
369 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE");
370 if (paramValue == null)
371 {
372 log.info("No context init parameter 'javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE' found, using default value 'false'.");
373 }
374 else
375 {
376 boolean found = false;
377 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
378 for (int i = 0; i < expectedValues.length; i++)
379 {
380 if (paramValue.equals(expectedValues[i]))
381 {
382 found = true;
383 break;
384 }
385 }
386 if (!found)
387 {
388 if (log.isLoggable(Level.WARNING))
389 {
390 log.warning("Wrong value in context init parameter 'javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE' (='" + paramValue + "'), using default value 'false'");
391 }
392 }
393 }
394
395 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ENUM_CONVERTER_ALLOW_STRING_PASSTROUGH");
396 if (paramValue == null)
397 {
398 log.info("No context init parameter 'org.apache.myfaces.ENUM_CONVERTER_ALLOW_STRING_PASSTROUGH' found, using default value 'false'.");
399 }
400 else
401 {
402 boolean found = false;
403 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
404 for (int i = 0; i < expectedValues.length; i++)
405 {
406 if (paramValue.equals(expectedValues[i]))
407 {
408 found = true;
409 break;
410 }
411 }
412 if (!found)
413 {
414 if (log.isLoggable(Level.WARNING))
415 {
416 log.warning("Wrong value in context init parameter 'org.apache.myfaces.ENUM_CONVERTER_ALLOW_STRING_PASSTROUGH' (='" + paramValue + "'), using default value 'false'");
417 }
418 }
419 }
420
421 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR");
422 if (paramValue == null)
423 {
424 log.info("No context init parameter 'javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR' found, using default value 'true'.");
425 }
426 else
427 {
428 boolean found = false;
429 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
430 for (int i = 0; i < expectedValues.length; i++)
431 {
432 if (paramValue.equals(expectedValues[i]))
433 {
434 found = true;
435 break;
436 }
437 }
438 if (!found)
439 {
440 if (log.isLoggable(Level.WARNING))
441 {
442 log.warning("Wrong value in context init parameter 'javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR' (='" + paramValue + "'), using default value 'true'");
443 }
444 }
445 }
446
447 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.CONFIG_FILES");
448 if (paramValue == null)
449 {
450 log.info("No context init parameter 'javax.faces.CONFIG_FILES' found.");
451 }
452
453 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.LIFECYCLE_ID");
454 if (paramValue == null)
455 {
456 log.info("No context init parameter 'javax.faces.LIFECYCLE_ID' found.");
457 }
458
459 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ERROR_HANDLER");
460 if (paramValue == null)
461 {
462 log.info("No context init parameter 'org.apache.myfaces.ERROR_HANDLER' found.");
463 }
464
465 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE");
466 if (paramValue == null)
467 {
468 log.info("No context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE' found, using default value '500'.");
469 }
470 else
471 {
472 try
473 {
474 java.lang.Integer.valueOf(paramValue);
475 }
476 catch(Exception e)
477 {
478 if (log.isLoggable(Level.WARNING))
479 {
480 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE' (='" + paramValue + "'), using default value '500'");
481 }
482 }
483 }
484
485 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED");
486 if (paramValue == null)
487 {
488 log.info("No context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED' found, using default value 'true'.");
489 }
490 else
491 {
492 boolean found = false;
493 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
494 for (int i = 0; i < expectedValues.length; i++)
495 {
496 if (paramValue.equals(expectedValues[i]))
497 {
498 found = true;
499 break;
500 }
501 }
502 if (!found)
503 {
504 if (log.isLoggable(Level.WARNING))
505 {
506 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED' (='" + paramValue + "'), using default value 'true'");
507 }
508 }
509 }
510
511 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.PRETTY_HTML");
512 if (paramValue == null)
513 {
514 log.info("No context init parameter 'org.apache.myfaces.PRETTY_HTML' found, using default value 'true'.");
515 }
516 else
517 {
518 boolean found = false;
519 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
520 for (int i = 0; i < expectedValues.length; i++)
521 {
522 if (paramValue.equalsIgnoreCase(expectedValues[i]))
523 {
524 found = true;
525 break;
526 }
527 }
528 if (!found)
529 {
530 if (log.isLoggable(Level.WARNING))
531 {
532 log.warning("Wrong value in context init parameter 'org.apache.myfaces.PRETTY_HTML' (='" + paramValue + "'), using default value 'true'");
533 }
534 }
535 }
536
537 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ALLOW_JAVASCRIPT");
538 if (paramValue == null)
539 {
540 log.info("No context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value 'true'.");
541 }
542 else
543 {
544 boolean found = false;
545 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
546 for (int i = 0; i < expectedValues.length; i++)
547 {
548 if (paramValue.equalsIgnoreCase(expectedValues[i]))
549 {
550 found = true;
551 break;
552 }
553 }
554 if (!found)
555 {
556 if (log.isLoggable(Level.WARNING))
557 {
558 log.warning("Wrong value in context init parameter 'org.apache.myfaces.ALLOW_JAVASCRIPT' (='" + paramValue + "'), using default value 'true'");
559 }
560 }
561 }
562
563 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CONFIG_REFRESH_PERIOD");
564 if (paramValue == null)
565 {
566 log.info("No context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' found, using default value '2'.");
567 }
568 else
569 {
570 try
571 {
572 java.lang.Long.valueOf(paramValue);
573 }
574 catch(Exception e)
575 {
576 if (log.isLoggable(Level.WARNING))
577 {
578 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CONFIG_REFRESH_PERIOD' (='" + paramValue + "'), using default value '2'");
579 }
580 }
581 }
582
583 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VIEWSTATE_JAVASCRIPT");
584 if (paramValue == null)
585 {
586 log.info("No context init parameter 'org.apache.myfaces.VIEWSTATE_JAVASCRIPT' found, using default value 'false'.");
587 }
588
589 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RENDER_VIEWSTATE_ID");
590 if (paramValue == null)
591 {
592 log.info("No context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' found, using default value 'true'.");
593 }
594 else
595 {
596 boolean found = false;
597 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
598 for (int i = 0; i < expectedValues.length; i++)
599 {
600 if (paramValue.equalsIgnoreCase(expectedValues[i]))
601 {
602 found = true;
603 break;
604 }
605 }
606 if (!found)
607 {
608 if (log.isLoggable(Level.WARNING))
609 {
610 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RENDER_VIEWSTATE_ID' (='" + paramValue + "'), using default value 'true'");
611 }
612 }
613 }
614
615 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.STRICT_XHTML_LINKS");
616 if (paramValue == null)
617 {
618 log.info("No context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' found, using default value 'true'.");
619 }
620 else
621 {
622 boolean found = false;
623 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
624 for (int i = 0; i < expectedValues.length; i++)
625 {
626 if (paramValue.equalsIgnoreCase(expectedValues[i]))
627 {
628 found = true;
629 break;
630 }
631 }
632 if (!found)
633 {
634 if (log.isLoggable(Level.WARNING))
635 {
636 log.warning("Wrong value in context init parameter 'org.apache.myfaces.STRICT_XHTML_LINKS' (='" + paramValue + "'), using default value 'true'");
637 }
638 }
639 }
640
641 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON");
642 if (paramValue == null)
643 {
644 log.info("No context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' found, using default value 'false'.");
645 }
646 else
647 {
648 boolean found = false;
649 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
650 for (int i = 0; i < expectedValues.length; i++)
651 {
652 if (paramValue.equalsIgnoreCase(expectedValues[i]))
653 {
654 found = true;
655 break;
656 }
657 }
658 if (!found)
659 {
660 if (log.isLoggable(Level.WARNING))
661 {
662 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RENDER_CLEAR_JAVASCRIPT_FOR_BUTTON' (='" + paramValue + "'), using default value 'false'");
663 }
664 }
665 }
666
667 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS");
668 if (paramValue == null)
669 {
670 log.info("No context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' found, using default value 'false'.");
671 }
672 else
673 {
674 boolean found = false;
675 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
676 for (int i = 0; i < expectedValues.length; i++)
677 {
678 if (paramValue.equalsIgnoreCase(expectedValues[i]))
679 {
680 found = true;
681 break;
682 }
683 }
684 if (!found)
685 {
686 if (log.isLoggable(Level.WARNING))
687 {
688 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RENDER_HIDDEN_FIELDS_FOR_LINK_PARAMS' (='" + paramValue + "'), using default value 'false'");
689 }
690 }
691 }
692
693 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE");
694 if (paramValue == null)
695 {
696 log.info("No context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' found, using default value 'false'.");
697 }
698 else
699 {
700 boolean found = false;
701 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
702 for (int i = 0; i < expectedValues.length; i++)
703 {
704 if (paramValue.equalsIgnoreCase(expectedValues[i]))
705 {
706 found = true;
707 break;
708 }
709 }
710 if (!found)
711 {
712 if (log.isLoggable(Level.WARNING))
713 {
714 log.warning("Wrong value in context init parameter 'org.apache.myfaces.SAVE_FORM_SUBMIT_LINK_IE' (='" + paramValue + "'), using default value 'false'");
715 }
716 }
717 }
718
719 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.DELEGATE_FACES_SERVLET");
720 if (paramValue == null)
721 {
722 log.info("No context init parameter 'org.apache.myfaces.DELEGATE_FACES_SERVLET' found.");
723 }
724
725 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS");
726 if (paramValue == null)
727 {
728 log.info("No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' found, using default value 'auto'.");
729 }
730 else
731 {
732 boolean found = false;
733 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false,auto",','));
734 for (int i = 0; i < expectedValues.length; i++)
735 {
736 if (paramValue.equalsIgnoreCase(expectedValues[i]))
737 {
738 found = true;
739 break;
740 }
741 }
742 if (!found)
743 {
744 if (log.isLoggable(Level.WARNING))
745 {
746 log.warning("Wrong value in context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS' (='" + paramValue + "'), using default value 'auto'");
747 }
748 }
749 }
750
751 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE");
752 if (paramValue == null)
753 {
754 log.info("No context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' found, using default value 'false'.");
755 }
756 else
757 {
758 boolean found = false;
759 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
760 for (int i = 0; i < expectedValues.length; i++)
761 {
762 if (paramValue.equalsIgnoreCase(expectedValues[i]))
763 {
764 found = true;
765 break;
766 }
767 }
768 if (!found)
769 {
770 if (log.isLoggable(Level.WARNING))
771 {
772 log.warning("Wrong value in context init parameter 'org.apache.myfaces.REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE' (='" + paramValue + "'), using default value 'false'");
773 }
774 }
775 }
776
777 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VALIDATE_XML");
778 if (paramValue == null)
779 {
780 log.info("No context init parameter 'org.apache.myfaces.VALIDATE_XML' found.");
781 }
782 else
783 {
784 boolean found = false;
785 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
786 for (int i = 0; i < expectedValues.length; i++)
787 {
788 if (paramValue.equalsIgnoreCase(expectedValues[i]))
789 {
790 found = true;
791 break;
792 }
793 }
794 if (!found)
795 {
796 if (log.isLoggable(Level.WARNING))
797 {
798 log.warning("Wrong value in context init parameter 'org.apache.myfaces.VALIDATE_XML' (='" + paramValue + "'), using default value 'null'");
799 }
800 }
801 }
802
803 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG");
804 if (paramValue == null)
805 {
806 log.info("No context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' found, using default value 'false'.");
807 }
808 else
809 {
810 boolean found = false;
811 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
812 for (int i = 0; i < expectedValues.length; i++)
813 {
814 if (paramValue.equalsIgnoreCase(expectedValues[i]))
815 {
816 found = true;
817 break;
818 }
819 }
820 if (!found)
821 {
822 if (log.isLoggable(Level.WARNING))
823 {
824 log.warning("Wrong value in context init parameter 'org.apache.myfaces.WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG' (='" + paramValue + "'), using default value 'false'");
825 }
826 }
827 }
828
829 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE");
830 if (paramValue == null)
831 {
832 log.info("No context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' found, using default value 'false'.");
833 }
834 else
835 {
836 boolean found = false;
837 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
838 for (int i = 0; i < expectedValues.length; i++)
839 {
840 if (paramValue.equalsIgnoreCase(expectedValues[i]))
841 {
842 found = true;
843 break;
844 }
845 }
846 if (!found)
847 {
848 if (log.isLoggable(Level.WARNING))
849 {
850 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RENDER_FORM_SUBMIT_SCRIPT_INLINE' (='" + paramValue + "'), using default value 'false'");
851 }
852 }
853 }
854
855 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.DEBUG_PHASE_LISTENER");
856 if (paramValue == null)
857 {
858 log.info("No context init parameter 'org.apache.myfaces.DEBUG_PHASE_LISTENER' found.");
859 }
860
861 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX");
862 if (paramValue == null)
863 {
864 log.info("No context init parameter 'org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX' found, using default value 'false'.");
865 }
866 else
867 {
868 boolean found = false;
869 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
870 for (int i = 0; i < expectedValues.length; i++)
871 {
872 if (paramValue.equals(expectedValues[i]))
873 {
874 found = true;
875 break;
876 }
877 }
878 if (!found)
879 {
880 if (log.isLoggable(Level.WARNING))
881 {
882 log.warning("Wrong value in context init parameter 'org.apache.myfaces.STRICT_JSF_2_REFRESH_TARGET_AJAX' (='" + paramValue + "'), using default value 'false'");
883 }
884 }
885 }
886
887 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER");
888 if (paramValue == null)
889 {
890 log.info("No context init parameter 'org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER' found, using default value 'false'.");
891 }
892 else
893 {
894 boolean found = false;
895 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
896 for (int i = 0; i < expectedValues.length; i++)
897 {
898 if (paramValue.equals(expectedValues[i]))
899 {
900 found = true;
901 break;
902 }
903 }
904 if (!found)
905 {
906 if (log.isLoggable(Level.WARNING))
907 {
908 log.warning("Wrong value in context init parameter 'org.apache.myfaces.STRICT_JSF_2_CC_EL_RESOLVER' (='" + paramValue + "'), using default value 'false'");
909 }
910 }
911 }
912
913 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE");
914 if (paramValue == null)
915 {
916 log.info("No context init parameter 'org.apache.myfaces.DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE' found, using default value 'text/html'.");
917 }
918 else
919 {
920 boolean found = false;
921 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("text/html, application/xhtml+xml",','));
922 for (int i = 0; i < expectedValues.length; i++)
923 {
924 if (paramValue.equals(expectedValues[i]))
925 {
926 found = true;
927 break;
928 }
929 }
930 if (!found)
931 {
932 if (log.isLoggable(Level.WARNING))
933 {
934 log.warning("Wrong value in context init parameter 'org.apache.myfaces.DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE' (='" + paramValue + "'), using default value 'text/html'");
935 }
936 }
937 }
938
939 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED");
940 if (paramValue == null)
941 {
942 log.info("No context init parameter 'org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED' found, using default value 'true'.");
943 }
944 else
945 {
946 boolean found = false;
947 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
948 for (int i = 0; i < expectedValues.length; i++)
949 {
950 if (paramValue.equals(expectedValues[i]))
951 {
952 found = true;
953 break;
954 }
955 }
956 if (!found)
957 {
958 if (log.isLoggable(Level.WARNING))
959 {
960 log.warning("Wrong value in context init parameter 'org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED' (='" + paramValue + "'), using default value 'true'");
961 }
962 }
963 }
964
965 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.COMPONENT_UNIQUE_IDS_CACHE_SIZE");
966 if (paramValue == null)
967 {
968 log.info("No context init parameter 'org.apache.myfaces.COMPONENT_UNIQUE_IDS_CACHE_SIZE' found, using default value '100'.");
969 }
970
971 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL");
972 if (paramValue == null)
973 {
974 log.info("No context init parameter 'org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL' found, using default value 'true'.");
975 }
976 else
977 {
978 boolean found = false;
979 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
980 for (int i = 0; i < expectedValues.length; i++)
981 {
982 if (paramValue.equals(expectedValues[i]))
983 {
984 found = true;
985 break;
986 }
987 }
988 if (!found)
989 {
990 if (log.isLoggable(Level.WARNING))
991 {
992 log.warning("Wrong value in context init parameter 'org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL' (='" + paramValue + "'), using default value 'true'");
993 }
994 }
995 }
996
997 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.GAE_JSF_JAR_FILES");
998 if (paramValue == null)
999 {
1000 log.info("No context init parameter 'org.apache.myfaces.GAE_JSF_JAR_FILES' found.");
1001 }
1002 else
1003 {
1004 boolean found = false;
1005 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("none, myfavoritejsflib-*.jar",','));
1006 for (int i = 0; i < expectedValues.length; i++)
1007 {
1008 if (paramValue.equals(expectedValues[i]))
1009 {
1010 found = true;
1011 break;
1012 }
1013 }
1014 if (!found)
1015 {
1016 if (log.isLoggable(Level.WARNING))
1017 {
1018 log.warning("Wrong value in context init parameter 'org.apache.myfaces.GAE_JSF_JAR_FILES' (='" + paramValue + "'), using default value 'null'");
1019 }
1020 }
1021 }
1022
1023 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.GAE_JSF_ANNOTATIONS_JAR_FILES");
1024 if (paramValue == null)
1025 {
1026 log.info("No context init parameter 'org.apache.myfaces.GAE_JSF_ANNOTATIONS_JAR_FILES' found.");
1027 }
1028 else
1029 {
1030 boolean found = false;
1031 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("none, myfavoritejsflib-*.jar",','));
1032 for (int i = 0; i < expectedValues.length; i++)
1033 {
1034 if (paramValue.equals(expectedValues[i]))
1035 {
1036 found = true;
1037 break;
1038 }
1039 }
1040 if (!found)
1041 {
1042 if (log.isLoggable(Level.WARNING))
1043 {
1044 log.warning("Wrong value in context init parameter 'org.apache.myfaces.GAE_JSF_ANNOTATIONS_JAR_FILES' (='" + paramValue + "'), using default value 'null'");
1045 }
1046 }
1047 }
1048
1049 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.STRICT_JSF_2_VIEW_NOT_FOUND");
1050 if (paramValue == null)
1051 {
1052 log.info("No context init parameter 'org.apache.myfaces.STRICT_JSF_2_VIEW_NOT_FOUND' found, using default value 'false'.");
1053 }
1054 else
1055 {
1056 boolean found = false;
1057 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1058 for (int i = 0; i < expectedValues.length; i++)
1059 {
1060 if (paramValue.equals(expectedValues[i]))
1061 {
1062 found = true;
1063 break;
1064 }
1065 }
1066 if (!found)
1067 {
1068 if (log.isLoggable(Level.WARNING))
1069 {
1070 log.warning("Wrong value in context init parameter 'org.apache.myfaces.STRICT_JSF_2_VIEW_NOT_FOUND' (='" + paramValue + "'), using default value 'false'");
1071 }
1072 }
1073 }
1074
1075 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.EARLY_FLUSH_ENABLED");
1076 if (paramValue == null)
1077 {
1078 log.info("No context init parameter 'org.apache.myfaces.EARLY_FLUSH_ENABLED' found, using default value 'false'.");
1079 }
1080 else
1081 {
1082 boolean found = false;
1083 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1084 for (int i = 0; i < expectedValues.length; i++)
1085 {
1086 if (paramValue.equals(expectedValues[i]))
1087 {
1088 found = true;
1089 break;
1090 }
1091 }
1092 if (!found)
1093 {
1094 if (log.isLoggable(Level.WARNING))
1095 {
1096 log.warning("Wrong value in context init parameter 'org.apache.myfaces.EARLY_FLUSH_ENABLED' (='" + paramValue + "'), using default value 'false'");
1097 }
1098 }
1099 }
1100
1101 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CDI_MANAGED_CONVERTERS_ENABLED");
1102 if (paramValue == null)
1103 {
1104 log.info("No context init parameter 'org.apache.myfaces.CDI_MANAGED_CONVERTERS_ENABLED' found, using default value 'false'.");
1105 }
1106 else
1107 {
1108 boolean found = false;
1109 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1110 for (int i = 0; i < expectedValues.length; i++)
1111 {
1112 if (paramValue.equals(expectedValues[i]))
1113 {
1114 found = true;
1115 break;
1116 }
1117 }
1118 if (!found)
1119 {
1120 if (log.isLoggable(Level.WARNING))
1121 {
1122 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CDI_MANAGED_CONVERTERS_ENABLED' (='" + paramValue + "'), using default value 'false'");
1123 }
1124 }
1125 }
1126
1127 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CDI_MANAGED_VALIDATORS_ENABLED");
1128 if (paramValue == null)
1129 {
1130 log.info("No context init parameter 'org.apache.myfaces.CDI_MANAGED_VALIDATORS_ENABLED' found, using default value 'false'.");
1131 }
1132 else
1133 {
1134 boolean found = false;
1135 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1136 for (int i = 0; i < expectedValues.length; i++)
1137 {
1138 if (paramValue.equals(expectedValues[i]))
1139 {
1140 found = true;
1141 break;
1142 }
1143 }
1144 if (!found)
1145 {
1146 if (log.isLoggable(Level.WARNING))
1147 {
1148 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CDI_MANAGED_VALIDATORS_ENABLED' (='" + paramValue + "'), using default value 'false'");
1149 }
1150 }
1151 }
1152
1153 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY");
1154 if (paramValue == null)
1155 {
1156 log.info("No context init parameter 'org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY' found, using default value 'false'.");
1157 }
1158 else
1159 {
1160 boolean found = false;
1161 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1162 for (int i = 0; i < expectedValues.length; i++)
1163 {
1164 if (paramValue.equals(expectedValues[i]))
1165 {
1166 found = true;
1167 break;
1168 }
1169 }
1170 if (!found)
1171 {
1172 if (log.isLoggable(Level.WARNING))
1173 {
1174 log.warning("Wrong value in context init parameter 'org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY' (='" + paramValue + "'), using default value 'false'");
1175 }
1176 }
1177 }
1178
1179 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN");
1180 if (paramValue == null)
1181 {
1182 log.info("No context init parameter 'org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN' found, using default value 'false'.");
1183 }
1184 else
1185 {
1186 boolean found = false;
1187 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1188 for (int i = 0; i < expectedValues.length; i++)
1189 {
1190 if (paramValue.equals(expectedValues[i]))
1191 {
1192 found = true;
1193 break;
1194 }
1195 }
1196 if (!found)
1197 {
1198 if (log.isLoggable(Level.WARNING))
1199 {
1200 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RENDER_FORM_VIEW_STATE_AT_BEGIN' (='" + paramValue + "'), using default value 'false'");
1201 }
1202 }
1203 }
1204
1205 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.FLASH_SCOPE_DISABLED");
1206 if (paramValue == null)
1207 {
1208 log.info("No context init parameter 'org.apache.myfaces.FLASH_SCOPE_DISABLED' found, using default value 'false'.");
1209 }
1210
1211 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION");
1212 if (paramValue == null)
1213 {
1214 log.info("No context init parameter 'org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION' found, using default value '20'.");
1215 }
1216 else
1217 {
1218 try
1219 {
1220 java.lang.Integer.valueOf(paramValue);
1221 }
1222 catch(Exception e)
1223 {
1224 if (log.isLoggable(Level.WARNING))
1225 {
1226 log.warning("Wrong value in context init parameter 'org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION' (='" + paramValue + "'), using default value '20'");
1227 }
1228 }
1229 }
1230
1231 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION");
1232 if (paramValue == null)
1233 {
1234 log.info("No context init parameter 'org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION' found, using default value '4'.");
1235 }
1236 else
1237 {
1238 try
1239 {
1240 java.lang.Integer.valueOf(paramValue);
1241 }
1242 catch(Exception e)
1243 {
1244 if (log.isLoggable(Level.WARNING))
1245 {
1246 log.warning("Wrong value in context init parameter 'org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION' (='" + paramValue + "'), using default value '4'");
1247 }
1248 }
1249 }
1250
1251 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.NUMBER_OF_FLASH_TOKENS_IN_SESSION");
1252 if (paramValue == null)
1253 {
1254 log.info("No context init parameter 'org.apache.myfaces.NUMBER_OF_FLASH_TOKENS_IN_SESSION' found.");
1255 }
1256
1257 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION");
1258 if (paramValue == null)
1259 {
1260 log.info("No context init parameter 'org.apache.myfaces.FACES_FLOW_CLIENT_WINDOW_IDS_IN_SESSION' found.");
1261 }
1262
1263 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SUPPORT_EL_3_IMPORT_HANDLER");
1264 if (paramValue == null)
1265 {
1266 log.info("No context init parameter 'org.apache.myfaces.SUPPORT_EL_3_IMPORT_HANDLER' found, using default value 'false'.");
1267 }
1268 else
1269 {
1270 boolean found = false;
1271 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1272 for (int i = 0; i < expectedValues.length; i++)
1273 {
1274 if (paramValue.equals(expectedValues[i]))
1275 {
1276 found = true;
1277 break;
1278 }
1279 }
1280 if (!found)
1281 {
1282 if (log.isLoggable(Level.WARNING))
1283 {
1284 log.warning("Wrong value in context init parameter 'org.apache.myfaces.SUPPORT_EL_3_IMPORT_HANDLER' (='" + paramValue + "'), using default value 'false'");
1285 }
1286 }
1287 }
1288
1289 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.STRICT_JSF_2_ORIGIN_HEADER_APP_PATH");
1290 if (paramValue == null)
1291 {
1292 log.info("No context init parameter 'org.apache.myfaces.STRICT_JSF_2_ORIGIN_HEADER_APP_PATH' found, using default value 'false'.");
1293 }
1294 else
1295 {
1296 boolean found = false;
1297 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1298 for (int i = 0; i < expectedValues.length; i++)
1299 {
1300 if (paramValue.equals(expectedValues[i]))
1301 {
1302 found = true;
1303 break;
1304 }
1305 }
1306 if (!found)
1307 {
1308 if (log.isLoggable(Level.WARNING))
1309 {
1310 log.warning("Wrong value in context init parameter 'org.apache.myfaces.STRICT_JSF_2_ORIGIN_HEADER_APP_PATH' (='" + paramValue + "'), using default value 'false'");
1311 }
1312 }
1313 }
1314
1315 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ALWAYS_FORCE_SESSION_CREATION");
1316 if (paramValue == null)
1317 {
1318 log.info("No context init parameter 'org.apache.myfaces.ALWAYS_FORCE_SESSION_CREATION' found, using default value 'true'.");
1319 }
1320 else
1321 {
1322 boolean found = false;
1323 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1324 for (int i = 0; i < expectedValues.length; i++)
1325 {
1326 if (paramValue.equals(expectedValues[i]))
1327 {
1328 found = true;
1329 break;
1330 }
1331 }
1332 if (!found)
1333 {
1334 if (log.isLoggable(Level.WARNING))
1335 {
1336 log.warning("Wrong value in context init parameter 'org.apache.myfaces.ALWAYS_FORCE_SESSION_CREATION' (='" + paramValue + "'), using default value 'true'");
1337 }
1338 }
1339 }
1340
1341 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RESOURCE_MAX_TIME_EXPIRES");
1342 if (paramValue == null)
1343 {
1344 log.info("No context init parameter 'org.apache.myfaces.RESOURCE_MAX_TIME_EXPIRES' found, using default value '604800000'.");
1345 }
1346
1347 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE");
1348 if (paramValue == null)
1349 {
1350 log.info("No context init parameter 'org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE' found, using default value '500'.");
1351 }
1352 else
1353 {
1354 try
1355 {
1356 java.lang.Integer.valueOf(paramValue);
1357 }
1358 catch(Exception e)
1359 {
1360 if (log.isLoggable(Level.WARNING))
1361 {
1362 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RESOURCE_HANDLER_CACHE_SIZE' (='" + paramValue + "'), using default value '500'");
1363 }
1364 }
1365 }
1366
1367 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED");
1368 if (paramValue == null)
1369 {
1370 log.info("No context init parameter 'org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED' found, using default value 'true'.");
1371 }
1372 else
1373 {
1374 boolean found = false;
1375 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1376 for (int i = 0; i < expectedValues.length; i++)
1377 {
1378 if (paramValue.equals(expectedValues[i]))
1379 {
1380 found = true;
1381 break;
1382 }
1383 }
1384 if (!found)
1385 {
1386 if (log.isLoggable(Level.WARNING))
1387 {
1388 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RESOURCE_HANDLER_CACHE_ENABLED' (='" + paramValue + "'), using default value 'true'");
1389 }
1390 }
1391 }
1392
1393 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.USE_ENCRYPTION");
1394 if (paramValue == null)
1395 {
1396 log.info("No context init parameter 'org.apache.myfaces.USE_ENCRYPTION' found, using default value 'true'.");
1397 }
1398 else
1399 {
1400 boolean found = false;
1401 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1402 for (int i = 0; i < expectedValues.length; i++)
1403 {
1404 if (paramValue.equals(expectedValues[i]))
1405 {
1406 found = true;
1407 break;
1408 }
1409 }
1410 if (!found)
1411 {
1412 if (log.isLoggable(Level.WARNING))
1413 {
1414 log.warning("Wrong value in context init parameter 'org.apache.myfaces.USE_ENCRYPTION' (='" + paramValue + "'), using default value 'true'");
1415 }
1416 }
1417 }
1418
1419 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SECRET");
1420 if (paramValue == null)
1421 {
1422 log.info("No context init parameter 'org.apache.myfaces.SECRET' found.");
1423 }
1424
1425 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ALGORITHM");
1426 if (paramValue == null)
1427 {
1428 log.info("No context init parameter 'org.apache.myfaces.ALGORITHM' found, using default value 'DES'.");
1429 }
1430
1431 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SECRET.CACHE");
1432 if (paramValue == null)
1433 {
1434 log.info("No context init parameter 'org.apache.myfaces.SECRET.CACHE' found.");
1435 }
1436
1437 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ALGORITHM.IV");
1438 if (paramValue == null)
1439 {
1440 log.info("No context init parameter 'org.apache.myfaces.ALGORITHM.IV' found.");
1441 }
1442
1443 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ALGORITHM.PARAMETERS");
1444 if (paramValue == null)
1445 {
1446 log.info("No context init parameter 'org.apache.myfaces.ALGORITHM.PARAMETERS' found, using default value 'ECB/PKCS5Padding'.");
1447 }
1448
1449 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SERIAL_FACTORY");
1450 if (paramValue == null)
1451 {
1452 log.info("No context init parameter 'org.apache.myfaces.SERIAL_FACTORY' found.");
1453 }
1454
1455 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.COMPRESS_STATE_IN_CLIENT");
1456 if (paramValue == null)
1457 {
1458 log.info("No context init parameter 'org.apache.myfaces.COMPRESS_STATE_IN_CLIENT' found, using default value 'false'.");
1459 }
1460 else
1461 {
1462 boolean found = false;
1463 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1464 for (int i = 0; i < expectedValues.length; i++)
1465 {
1466 if (paramValue.equals(expectedValues[i]))
1467 {
1468 found = true;
1469 break;
1470 }
1471 }
1472 if (!found)
1473 {
1474 if (log.isLoggable(Level.WARNING))
1475 {
1476 log.warning("Wrong value in context init parameter 'org.apache.myfaces.COMPRESS_STATE_IN_CLIENT' (='" + paramValue + "'), using default value 'false'");
1477 }
1478 }
1479 }
1480
1481 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.MAC_ALGORITHM");
1482 if (paramValue == null)
1483 {
1484 log.info("No context init parameter 'org.apache.myfaces.MAC_ALGORITHM' found, using default value 'HmacSHA1'.");
1485 }
1486
1487 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.MAC_SECRET");
1488 if (paramValue == null)
1489 {
1490 log.info("No context init parameter 'org.apache.myfaces.MAC_SECRET' found.");
1491 }
1492
1493 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.MAC_SECRET.CACHE");
1494 if (paramValue == null)
1495 {
1496 log.info("No context init parameter 'org.apache.myfaces.MAC_SECRET.CACHE' found.");
1497 }
1498
1499 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.PROJECT_STAGE");
1500 if (paramValue == null)
1501 {
1502 log.info("No context init parameter 'javax.faces.PROJECT_STAGE' found, using default value 'Production'.");
1503 }
1504 else
1505 {
1506 boolean found = false;
1507 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("Development, Production, SystemTest, UnitTest",','));
1508 for (int i = 0; i < expectedValues.length; i++)
1509 {
1510 if (paramValue.equals(expectedValues[i]))
1511 {
1512 found = true;
1513 break;
1514 }
1515 }
1516 if (!found)
1517 {
1518 if (log.isLoggable(Level.WARNING))
1519 {
1520 log.warning("Wrong value in context init parameter 'javax.faces.PROJECT_STAGE' (='" + paramValue + "'), using default value 'Production'");
1521 }
1522 }
1523 }
1524
1525 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.LAZY_LOAD_CONFIG_OBJECTS");
1526 if (paramValue == null)
1527 {
1528 log.info("No context init parameter 'org.apache.myfaces.LAZY_LOAD_CONFIG_OBJECTS' found, using default value 'true'.");
1529 }
1530
1531 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME");
1532 if (paramValue == null)
1533 {
1534 log.info("No context init parameter 'org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME' found, using default value 'false'.");
1535 }
1536 else
1537 {
1538 boolean found = false;
1539 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1540 for (int i = 0; i < expectedValues.length; i++)
1541 {
1542 if (paramValue.equals(expectedValues[i]))
1543 {
1544 found = true;
1545 break;
1546 }
1547 }
1548 if (!found)
1549 {
1550 if (log.isLoggable(Level.WARNING))
1551 {
1552 log.warning("Wrong value in context init parameter 'org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME' (='" + paramValue + "'), using default value 'false'");
1553 }
1554 }
1555 }
1556
1557 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RESOURCE_BUFFER_SIZE");
1558 if (paramValue == null)
1559 {
1560 log.info("No context init parameter 'org.apache.myfaces.RESOURCE_BUFFER_SIZE' found, using default value '2048'.");
1561 }
1562
1563 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN");
1564 if (paramValue == null)
1565 {
1566 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN' found, using default value 'none'.");
1567 }
1568 else
1569 {
1570 boolean found = false;
1571 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("secureRandom, random",','));
1572 for (int i = 0; i < expectedValues.length; i++)
1573 {
1574 if (paramValue.equals(expectedValues[i]))
1575 {
1576 found = true;
1577 break;
1578 }
1579 }
1580 if (!found)
1581 {
1582 if (log.isLoggable(Level.WARNING))
1583 {
1584 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN' (='" + paramValue + "'), using default value 'none'");
1585 }
1586 }
1587 }
1588
1589 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_LENGTH");
1590 if (paramValue == null)
1591 {
1592 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_LENGTH' found, using default value '16'.");
1593 }
1594
1595 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_CLASS");
1596 if (paramValue == null)
1597 {
1598 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_CLASS' found.");
1599 }
1600
1601 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_PROVIDER");
1602 if (paramValue == null)
1603 {
1604 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_PROVIDER' found.");
1605 }
1606
1607 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_ALGORITM");
1608 if (paramValue == null)
1609 {
1610 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN_SECURE_RANDOM_ALGORITM' found, using default value 'SHA1PRNG'.");
1611 }
1612
1613 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CLIENT_VIEW_STATE_TIMEOUT");
1614 if (paramValue == null)
1615 {
1616 log.info("No context init parameter 'org.apache.myfaces.CLIENT_VIEW_STATE_TIMEOUT' found, using default value '0'.");
1617 }
1618
1619 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SERIALIZE_STATE_IN_SESSION");
1620 if (paramValue == null)
1621 {
1622 log.info("No context init parameter 'org.apache.myfaces.SERIALIZE_STATE_IN_SESSION' found, using default value 'false'.");
1623 }
1624
1625 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.COMPRESS_STATE_IN_SESSION");
1626 if (paramValue == null)
1627 {
1628 log.info("No context init parameter 'org.apache.myfaces.COMPRESS_STATE_IN_SESSION' found, using default value 'true'.");
1629 }
1630 else
1631 {
1632 boolean found = false;
1633 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1634 for (int i = 0; i < expectedValues.length; i++)
1635 {
1636 if (paramValue.equals(expectedValues[i]))
1637 {
1638 found = true;
1639 break;
1640 }
1641 }
1642 if (!found)
1643 {
1644 if (log.isLoggable(Level.WARNING))
1645 {
1646 log.warning("Wrong value in context init parameter 'org.apache.myfaces.COMPRESS_STATE_IN_SESSION' (='" + paramValue + "'), using default value 'true'");
1647 }
1648 }
1649 }
1650
1651 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE");
1652 if (paramValue == null)
1653 {
1654 log.info("No context init parameter 'org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE' found, using default value 'off'.");
1655 }
1656
1657 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION");
1658 if (paramValue == null)
1659 {
1660 log.info("No context init parameter 'org.apache.myfaces.USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION' found, using default value 'false'.");
1661 }
1662 else
1663 {
1664 boolean found = false;
1665 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1666 for (int i = 0; i < expectedValues.length; i++)
1667 {
1668 if (paramValue.equals(expectedValues[i]))
1669 {
1670 found = true;
1671 break;
1672 }
1673 }
1674 if (!found)
1675 {
1676 if (log.isLoggable(Level.WARNING))
1677 {
1678 log.warning("Wrong value in context init parameter 'org.apache.myfaces.USE_FLASH_SCOPE_PURGE_VIEWS_IN_SESSION' (='" + paramValue + "'), using default value 'false'");
1679 }
1680 }
1681 }
1682
1683 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN");
1684 if (paramValue == null)
1685 {
1686 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN' found, using default value 'none'.");
1687 }
1688 else
1689 {
1690 boolean found = false;
1691 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("secureRandom, random, none",','));
1692 for (int i = 0; i < expectedValues.length; i++)
1693 {
1694 if (paramValue.equals(expectedValues[i]))
1695 {
1696 found = true;
1697 break;
1698 }
1699 }
1700 if (!found)
1701 {
1702 if (log.isLoggable(Level.WARNING))
1703 {
1704 log.warning("Wrong value in context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN' (='" + paramValue + "'), using default value 'none'");
1705 }
1706 }
1707 }
1708
1709 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_LENGTH");
1710 if (paramValue == null)
1711 {
1712 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_LENGTH' found, using default value '8'.");
1713 }
1714
1715 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_CLASS");
1716 if (paramValue == null)
1717 {
1718 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_CLASS' found.");
1719 }
1720
1721 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_PROVIDER");
1722 if (paramValue == null)
1723 {
1724 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_PROVIDER' found.");
1725 }
1726
1727 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_ALGORITM");
1728 if (paramValue == null)
1729 {
1730 log.info("No context init parameter 'org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN_SECURE_RANDOM_ALGORITM' found, using default value 'SHA1PRNG'.");
1731 }
1732
1733 paramValue = facesContext.getExternalContext().getInitParameter("facelets.LIBRARIES");
1734 if (paramValue == null)
1735 {
1736 log.info("No context init parameter 'facelets.LIBRARIES' found.");
1737 }
1738
1739 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VALIDATE");
1740 if (paramValue == null)
1741 {
1742 log.info("No context init parameter 'org.apache.myfaces.VALIDATE' found, using default value 'false'.");
1743 }
1744 else
1745 {
1746 boolean found = false;
1747 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1748 for (int i = 0; i < expectedValues.length; i++)
1749 {
1750 if (paramValue.equals(expectedValues[i]))
1751 {
1752 found = true;
1753 break;
1754 }
1755 }
1756 if (!found)
1757 {
1758 if (log.isLoggable(Level.WARNING))
1759 {
1760 log.warning("Wrong value in context init parameter 'org.apache.myfaces.VALIDATE' (='" + paramValue + "'), using default value 'false'");
1761 }
1762 }
1763 }
1764
1765 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.annotation.USE_CDI_FOR_ANNOTATION_SCANNING");
1766 if (paramValue == null)
1767 {
1768 log.info("No context init parameter 'org.apache.myfaces.annotation.USE_CDI_FOR_ANNOTATION_SCANNING' found.");
1769 }
1770
1771 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.annotation.SCAN_PACKAGES");
1772 if (paramValue == null)
1773 {
1774 log.info("No context init parameter 'org.apache.myfaces.annotation.SCAN_PACKAGES' found.");
1775 }
1776
1777 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.config.annotation.LifecycleProvider");
1778 if (paramValue == null)
1779 {
1780 log.info("No context init parameter 'org.apache.myfaces.config.annotation.LifecycleProvider' found.");
1781 }
1782
1783 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.INITIALIZE_SKIP_JAR_FACES_CONFIG_SCAN");
1784 if (paramValue == null)
1785 {
1786 log.info("No context init parameter 'org.apache.myfaces.INITIALIZE_SKIP_JAR_FACES_CONFIG_SCAN' found, using default value 'false'.");
1787 }
1788 else
1789 {
1790 boolean found = false;
1791 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1792 for (int i = 0; i < expectedValues.length; i++)
1793 {
1794 if (paramValue.equals(expectedValues[i]))
1795 {
1796 found = true;
1797 break;
1798 }
1799 }
1800 if (!found)
1801 {
1802 if (log.isLoggable(Level.WARNING))
1803 {
1804 log.warning("Wrong value in context init parameter 'org.apache.myfaces.INITIALIZE_SKIP_JAR_FACES_CONFIG_SCAN' (='" + paramValue + "'), using default value 'false'");
1805 }
1806 }
1807 }
1808
1809 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.EL_RESOLVER_COMPARATOR");
1810 if (paramValue == null)
1811 {
1812 log.info("No context init parameter 'org.apache.myfaces.EL_RESOLVER_COMPARATOR' found.");
1813 }
1814
1815 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.EL_RESOLVER_PREDICATE");
1816 if (paramValue == null)
1817 {
1818 log.info("No context init parameter 'org.apache.myfaces.EL_RESOLVER_PREDICATE' found.");
1819 }
1820
1821 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.DEFAULT_WINDOW_MODE");
1822 if (paramValue == null)
1823 {
1824 log.info("No context init parameter 'org.apache.myfaces.DEFAULT_WINDOW_MODE' found, using default value 'url'.");
1825 }
1826
1827 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE");
1828 if (paramValue == null)
1829 {
1830 log.info("No context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE' found, using default value '500'.");
1831 }
1832 else
1833 {
1834 try
1835 {
1836 java.lang.Integer.valueOf(paramValue);
1837 }
1838 catch(Exception e)
1839 {
1840 if (log.isLoggable(Level.WARNING))
1841 {
1842 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_SIZE' (='" + paramValue + "'), using default value '500'");
1843 }
1844 }
1845 }
1846
1847 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED");
1848 if (paramValue == null)
1849 {
1850 log.info("No context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED' found, using default value 'true'.");
1851 }
1852 else
1853 {
1854 boolean found = false;
1855 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1856 for (int i = 0; i < expectedValues.length; i++)
1857 {
1858 if (paramValue.equals(expectedValues[i]))
1859 {
1860 found = true;
1861 break;
1862 }
1863 }
1864 if (!found)
1865 {
1866 if (log.isLoggable(Level.WARNING))
1867 {
1868 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CHECKED_VIEWID_CACHE_ENABLED' (='" + paramValue + "'), using default value 'true'");
1869 }
1870 }
1871 }
1872
1873 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ERROR_TEMPLATE_RESOURCE");
1874 if (paramValue == null)
1875 {
1876 log.info("No context init parameter 'org.apache.myfaces.ERROR_TEMPLATE_RESOURCE' found, using default value 'META-INF/rsc/myfaces-dev-error.xml'.");
1877 }
1878
1879 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.DEBUG_TEMPLATE_RESOURCE");
1880 if (paramValue == null)
1881 {
1882 log.info("No context init parameter 'org.apache.myfaces.DEBUG_TEMPLATE_RESOURCE' found, using default value 'META-INF/rsc/myfaces-dev-debug.xml'.");
1883 }
1884
1885 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ERROR_HANDLING");
1886 if (paramValue == null)
1887 {
1888 log.info("No context init parameter 'org.apache.myfaces.ERROR_HANDLING' found, using default value 'false, on Development Project stage: true'.");
1889 }
1890 else
1891 {
1892 boolean found = false;
1893 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1894 for (int i = 0; i < expectedValues.length; i++)
1895 {
1896 if (paramValue.equals(expectedValues[i]))
1897 {
1898 found = true;
1899 break;
1900 }
1901 }
1902 if (!found)
1903 {
1904 if (log.isLoggable(Level.WARNING))
1905 {
1906 log.warning("Wrong value in context init parameter 'org.apache.myfaces.ERROR_HANDLING' (='" + paramValue + "'), using default value 'false, on Development Project stage: true'");
1907 }
1908 }
1909 }
1910
1911 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.HANDLE_STATE_CACHING_MECHANICS");
1912 if (paramValue == null)
1913 {
1914 log.info("No context init parameter 'org.apache.myfaces.HANDLE_STATE_CACHING_MECHANICS' found, using default value 'true'.");
1915 }
1916
1917 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.AUTOCOMPLETE_OFF_VIEW_STATE");
1918 if (paramValue == null)
1919 {
1920 log.info("No context init parameter 'org.apache.myfaces.AUTOCOMPLETE_OFF_VIEW_STATE' found, using default value 'true'.");
1921 }
1922 else
1923 {
1924 boolean found = false;
1925 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
1926 for (int i = 0; i < expectedValues.length; i++)
1927 {
1928 if (paramValue.equals(expectedValues[i]))
1929 {
1930 found = true;
1931 break;
1932 }
1933 }
1934 if (!found)
1935 {
1936 if (log.isLoggable(Level.WARNING))
1937 {
1938 log.warning("Wrong value in context init parameter 'org.apache.myfaces.AUTOCOMPLETE_OFF_VIEW_STATE' (='" + paramValue + "'), using default value 'true'");
1939 }
1940 }
1941 }
1942
1943 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS");
1944 if (paramValue == null)
1945 {
1946 log.info("No context init parameter 'org.apache.myfaces.USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS' found, using default value 'false'.");
1947 }
1948 else
1949 {
1950 boolean found = false;
1951 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
1952 for (int i = 0; i < expectedValues.length; i++)
1953 {
1954 if (paramValue.equals(expectedValues[i]))
1955 {
1956 found = true;
1957 break;
1958 }
1959 }
1960 if (!found)
1961 {
1962 if (log.isLoggable(Level.WARNING))
1963 {
1964 log.warning("Wrong value in context init parameter 'org.apache.myfaces.USE_MULTIPLE_JS_FILES_FOR_JSF_UNCOMPRESSED_JS' (='" + paramValue + "'), using default value 'false'");
1965 }
1966 }
1967 }
1968
1969 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.JSF_JS_MODE");
1970 if (paramValue == null)
1971 {
1972 log.info("No context init parameter 'org.apache.myfaces.JSF_JS_MODE' found, using default value 'normal'.");
1973 }
1974 else
1975 {
1976 boolean found = false;
1977 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("normal, minimal-modern, minimal",','));
1978 for (int i = 0; i < expectedValues.length; i++)
1979 {
1980 if (paramValue.equals(expectedValues[i]))
1981 {
1982 found = true;
1983 break;
1984 }
1985 }
1986 if (!found)
1987 {
1988 if (log.isLoggable(Level.WARNING))
1989 {
1990 log.warning("Wrong value in context init parameter 'org.apache.myfaces.JSF_JS_MODE' (='" + paramValue + "'), using default value 'normal'");
1991 }
1992 }
1993 }
1994
1995 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.TEMPORAL_RESOURCEHANDLER_CACHE_ENABLED");
1996 if (paramValue == null)
1997 {
1998 log.info("No context init parameter 'org.apache.myfaces.TEMPORAL_RESOURCEHANDLER_CACHE_ENABLED' found, using default value 'false'.");
1999 }
2000 else
2001 {
2002 boolean found = false;
2003 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
2004 for (int i = 0; i < expectedValues.length; i++)
2005 {
2006 if (paramValue.equals(expectedValues[i]))
2007 {
2008 found = true;
2009 break;
2010 }
2011 }
2012 if (!found)
2013 {
2014 if (log.isLoggable(Level.WARNING))
2015 {
2016 log.warning("Wrong value in context init parameter 'org.apache.myfaces.TEMPORAL_RESOURCEHANDLER_CACHE_ENABLED' (='" + paramValue + "'), using default value 'false'");
2017 }
2018 }
2019 }
2020
2021 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SERVICE_PROVIDER_FINDER");
2022 if (paramValue == null)
2023 {
2024 log.info("No context init parameter 'org.apache.myfaces.SERVICE_PROVIDER_FINDER' found.");
2025 }
2026
2027 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.spi.InjectionProvider");
2028 if (paramValue == null)
2029 {
2030 log.info("No context init parameter 'org.apache.myfaces.spi.InjectionProvider' found.");
2031 }
2032
2033 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER");
2034 if (paramValue == null)
2035 {
2036 log.info("No context init parameter 'javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER' found, using default value 'false'.");
2037 }
2038 else
2039 {
2040 boolean found = false;
2041 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true,false",','));
2042 for (int i = 0; i < expectedValues.length; i++)
2043 {
2044 if (paramValue.equals(expectedValues[i]))
2045 {
2046 found = true;
2047 break;
2048 }
2049 }
2050 if (!found)
2051 {
2052 if (log.isLoggable(Level.WARNING))
2053 {
2054 log.warning("Wrong value in context init parameter 'javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER' (='" + paramValue + "'), using default value 'false'");
2055 }
2056 }
2057 }
2058
2059 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.SAVE_STATE_WITH_VISIT_TREE_ON_PSS");
2060 if (paramValue == null)
2061 {
2062 log.info("No context init parameter 'org.apache.myfaces.SAVE_STATE_WITH_VISIT_TREE_ON_PSS' found, using default value 'true'.");
2063 }
2064
2065 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CHECK_ID_PRODUCTION_MODE");
2066 if (paramValue == null)
2067 {
2068 log.info("No context init parameter 'org.apache.myfaces.CHECK_ID_PRODUCTION_MODE' found, using default value 'auto'.");
2069 }
2070 else
2071 {
2072 boolean found = false;
2073 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, auto, false",','));
2074 for (int i = 0; i < expectedValues.length; i++)
2075 {
2076 if (paramValue.equals(expectedValues[i]))
2077 {
2078 found = true;
2079 break;
2080 }
2081 }
2082 if (!found)
2083 {
2084 if (log.isLoggable(Level.WARNING))
2085 {
2086 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CHECK_ID_PRODUCTION_MODE' (='" + paramValue + "'), using default value 'auto'");
2087 }
2088 }
2089 }
2090
2091 paramValue = facesContext.getExternalContext().getInitParameter("facelets.BUFFER_SIZE");
2092 if (paramValue == null)
2093 {
2094 log.info("No context init parameter 'facelets.BUFFER_SIZE' found.");
2095 }
2096
2097 paramValue = facesContext.getExternalContext().getInitParameter("facelets.REFRESH_PERIOD");
2098 if (paramValue == null)
2099 {
2100 log.info("No context init parameter 'facelets.REFRESH_PERIOD' found, using default value '-1'.");
2101 }
2102
2103 paramValue = facesContext.getExternalContext().getInitParameter("javax.faces.FACELETS_RESOURCE_RESOLVER");
2104 if (paramValue == null)
2105 {
2106 log.info("No context init parameter 'javax.faces.FACELETS_RESOURCE_RESOLVER' found.");
2107 }
2108
2109 paramValue = facesContext.getExternalContext().getInitParameter("facelets.RESOURCE_RESOLVER");
2110 if (paramValue == null)
2111 {
2112 log.info("No context init parameter 'facelets.RESOURCE_RESOLVER' found.");
2113 }
2114
2115 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW");
2116 if (paramValue == null)
2117 {
2118 log.info("No context init parameter 'org.apache.myfaces.MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW' found, using default value 'false'.");
2119 }
2120 else
2121 {
2122 boolean found = false;
2123 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
2124 for (int i = 0; i < expectedValues.length; i++)
2125 {
2126 if (paramValue.equals(expectedValues[i]))
2127 {
2128 found = true;
2129 break;
2130 }
2131 }
2132 if (!found)
2133 {
2134 if (log.isLoggable(Level.WARNING))
2135 {
2136 log.warning("Wrong value in context init parameter 'org.apache.myfaces.MARK_INITIAL_STATE_WHEN_APPLY_BUILD_VIEW' (='" + paramValue + "'), using default value 'false'");
2137 }
2138 }
2139 }
2140
2141 paramValue = facesContext.getExternalContext().getInitParameter("facelets.DECORATORS");
2142 if (paramValue == null)
2143 {
2144 log.info("No context init parameter 'facelets.DECORATORS' found.");
2145 }
2146
2147 paramValue = facesContext.getExternalContext().getInitParameter("facelets.SKIP_COMMENTS");
2148 if (paramValue == null)
2149 {
2150 log.info("No context init parameter 'facelets.SKIP_COMMENTS' found.");
2151 }
2152
2153 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE");
2154 if (paramValue == null)
2155 {
2156 log.info("No context init parameter 'org.apache.myfaces.WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE' found, using default value 'true'.");
2157 }
2158 else
2159 {
2160 boolean found = false;
2161 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
2162 for (int i = 0; i < expectedValues.length; i++)
2163 {
2164 if (paramValue.equals(expectedValues[i]))
2165 {
2166 found = true;
2167 break;
2168 }
2169 }
2170 if (!found)
2171 {
2172 if (log.isLoggable(Level.WARNING))
2173 {
2174 log.warning("Wrong value in context init parameter 'org.apache.myfaces.WRAP_TAG_EXCEPTIONS_AS_CONTEXT_AWARE' (='" + paramValue + "'), using default value 'true'");
2175 }
2176 }
2177 }
2178
2179 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CACHE_EL_EXPRESSIONS");
2180 if (paramValue == null)
2181 {
2182 log.info("No context init parameter 'org.apache.myfaces.CACHE_EL_EXPRESSIONS' found, using default value 'noCache'.");
2183 }
2184 else
2185 {
2186 boolean found = false;
2187 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("noCache, strict, allowCset, always, alwaysRecompile",','));
2188 for (int i = 0; i < expectedValues.length; i++)
2189 {
2190 if (paramValue.equals(expectedValues[i]))
2191 {
2192 found = true;
2193 break;
2194 }
2195 }
2196 if (!found)
2197 {
2198 if (log.isLoggable(Level.WARNING))
2199 {
2200 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CACHE_EL_EXPRESSIONS' (='" + paramValue + "'), using default value 'noCache'");
2201 }
2202 }
2203 }
2204
2205 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VIEW_POOL_MAX_POOL_SIZE");
2206 if (paramValue == null)
2207 {
2208 log.info("No context init parameter 'org.apache.myfaces.VIEW_POOL_MAX_POOL_SIZE' found, using default value '5'.");
2209 }
2210
2211 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VIEW_POOL_MAX_DYNAMIC_PARTIAL_LIMIT");
2212 if (paramValue == null)
2213 {
2214 log.info("No context init parameter 'org.apache.myfaces.VIEW_POOL_MAX_DYNAMIC_PARTIAL_LIMIT' found, using default value '2'.");
2215 }
2216
2217 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VIEW_POOL_ENTRY_MODE");
2218 if (paramValue == null)
2219 {
2220 log.info("No context init parameter 'org.apache.myfaces.VIEW_POOL_ENTRY_MODE' found, using default value 'soft'.");
2221 }
2222 else
2223 {
2224 boolean found = false;
2225 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("weak,soft",','));
2226 for (int i = 0; i < expectedValues.length; i++)
2227 {
2228 if (paramValue.equals(expectedValues[i]))
2229 {
2230 found = true;
2231 break;
2232 }
2233 }
2234 if (!found)
2235 {
2236 if (log.isLoggable(Level.WARNING))
2237 {
2238 log.warning("Wrong value in context init parameter 'org.apache.myfaces.VIEW_POOL_ENTRY_MODE' (='" + paramValue + "'), using default value 'soft'");
2239 }
2240 }
2241 }
2242
2243 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.VIEW_POOL_DEFERRED_NAVIGATION");
2244 if (paramValue == null)
2245 {
2246 log.info("No context init parameter 'org.apache.myfaces.VIEW_POOL_DEFERRED_NAVIGATION' found, using default value 'false'.");
2247 }
2248 else
2249 {
2250 boolean found = false;
2251 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
2252 for (int i = 0; i < expectedValues.length; i++)
2253 {
2254 if (paramValue.equals(expectedValues[i]))
2255 {
2256 found = true;
2257 break;
2258 }
2259 }
2260 if (!found)
2261 {
2262 if (log.isLoggable(Level.WARNING))
2263 {
2264 log.warning("Wrong value in context init parameter 'org.apache.myfaces.VIEW_POOL_DEFERRED_NAVIGATION' (='" + paramValue + "'), using default value 'false'");
2265 }
2266 }
2267 }
2268
2269 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.validator.BEAN_BEFORE_JSF_VALIDATION");
2270 if (paramValue == null)
2271 {
2272 log.info("No context init parameter 'org.apache.myfaces.validator.BEAN_BEFORE_JSF_VALIDATION' found, using default value 'false'.");
2273 }
2274 else
2275 {
2276 boolean found = false;
2277 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false",','));
2278 for (int i = 0; i < expectedValues.length; i++)
2279 {
2280 if (paramValue.equals(expectedValues[i]))
2281 {
2282 found = true;
2283 break;
2284 }
2285 }
2286 if (!found)
2287 {
2288 if (log.isLoggable(Level.WARNING))
2289 {
2290 log.warning("Wrong value in context init parameter 'org.apache.myfaces.validator.BEAN_BEFORE_JSF_VALIDATION' (='" + paramValue + "'), using default value 'false'");
2291 }
2292 }
2293 }
2294
2295 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.EXPRESSION_FACTORY");
2296 if (paramValue == null)
2297 {
2298 log.info("No context init parameter 'org.apache.myfaces.EXPRESSION_FACTORY' found.");
2299 }
2300
2301 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.INITIALIZE_ALWAYS_STANDALONE");
2302 if (paramValue == null)
2303 {
2304 log.info("No context init parameter 'org.apache.myfaces.INITIALIZE_ALWAYS_STANDALONE' found, using default value 'false'.");
2305 }
2306
2307 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.LOG_WEB_CONTEXT_PARAMS");
2308 if (paramValue == null)
2309 {
2310 log.info("No context init parameter 'org.apache.myfaces.LOG_WEB_CONTEXT_PARAMS' found, using default value 'auto'.");
2311 }
2312 else
2313 {
2314 boolean found = false;
2315 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, auto, false",','));
2316 for (int i = 0; i < expectedValues.length; i++)
2317 {
2318 if (paramValue.equals(expectedValues[i]))
2319 {
2320 found = true;
2321 break;
2322 }
2323 }
2324 if (!found)
2325 {
2326 if (log.isLoggable(Level.WARNING))
2327 {
2328 log.warning("Wrong value in context init parameter 'org.apache.myfaces.LOG_WEB_CONTEXT_PARAMS' (='" + paramValue + "'), using default value 'auto'");
2329 }
2330 }
2331 }
2332
2333 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.FACES_INITIALIZER");
2334 if (paramValue == null)
2335 {
2336 log.info("No context init parameter 'org.apache.myfaces.FACES_INITIALIZER' found.");
2337 }
2338
2339 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.FACES_INIT_PLUGINS");
2340 if (paramValue == null)
2341 {
2342 log.info("No context init parameter 'org.apache.myfaces.FACES_INIT_PLUGINS' found.");
2343 }
2344 }
2345 if (log.isLoggable(Level.INFO) && myfacesConfig.isTomahawkAvailable())
2346 {
2347 String paramValue = null;
2348
2349 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.RESOURCE_VIRTUAL_PATH");
2350 if (paramValue == null)
2351 {
2352 log.info("No context init parameter 'org.apache.myfaces.RESOURCE_VIRTUAL_PATH' found.");
2353 }
2354
2355 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.DETECT_JAVASCRIPT");
2356 if (paramValue == null)
2357 {
2358 log.info("No context init parameter 'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value 'false'.");
2359 }
2360
2361 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.AUTO_SCROLL");
2362 if (paramValue == null)
2363 {
2364 log.info("No context init parameter 'org.apache.myfaces.AUTO_SCROLL' found, using default value 'false'.");
2365 }
2366 else
2367 {
2368 boolean found = false;
2369 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
2370 for (int i = 0; i < expectedValues.length; i++)
2371 {
2372 if (paramValue.equalsIgnoreCase(expectedValues[i]))
2373 {
2374 found = true;
2375 break;
2376 }
2377 }
2378 if (!found)
2379 {
2380 if (log.isLoggable(Level.WARNING))
2381 {
2382 log.warning("Wrong value in context init parameter 'org.apache.myfaces.AUTO_SCROLL' (='" + paramValue + "'), using default value 'false'");
2383 }
2384 }
2385 }
2386
2387 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.ADD_RESOURCE_CLASS");
2388 if (paramValue == null)
2389 {
2390 log.info("No context init parameter 'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value 'org.apache.myfaces. renderkit.html.util. DefaultAddResource'.");
2391 }
2392
2393 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.CHECK_EXTENSIONS_FILTER");
2394 if (paramValue == null)
2395 {
2396 log.info("No context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value 'for JSF 2.0 since 1.1.11 false, otherwise true'.");
2397 }
2398 else
2399 {
2400 boolean found = false;
2401 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
2402 for (int i = 0; i < expectedValues.length; i++)
2403 {
2404 if (paramValue.equalsIgnoreCase(expectedValues[i]))
2405 {
2406 found = true;
2407 break;
2408 }
2409 }
2410 if (!found)
2411 {
2412 if (log.isLoggable(Level.WARNING))
2413 {
2414 log.warning("Wrong value in context init parameter 'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' (='" + paramValue + "'), using default value 'for JSF 2.0 since 1.1.11 false, otherwise true'");
2415 }
2416 }
2417 }
2418
2419 paramValue = facesContext.getExternalContext().getInitParameter("org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS");
2420 if (paramValue == null)
2421 {
2422 log.info("No context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' found, using default value 'true'.");
2423 }
2424 else
2425 {
2426 boolean found = false;
2427 String[] expectedValues = StringUtils.trim(StringUtils.splitShortString("true, false, on, off, yes, no",','));
2428 for (int i = 0; i < expectedValues.length; i++)
2429 {
2430 if (paramValue.equalsIgnoreCase(expectedValues[i]))
2431 {
2432 found = true;
2433 break;
2434 }
2435 }
2436 if (!found)
2437 {
2438 if (log.isLoggable(Level.WARNING))
2439 {
2440 log.warning("Wrong value in context init parameter 'org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS' (='" + paramValue + "'), using default value 'true'");
2441 }
2442 }
2443 }
2444 }
2445 }
2446 }