myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gérard COLLIN <gerard.col...@netonomy.com>
Subject Running in SunOne Application Server 7
Date Mon, 04 Jul 2005 15:47:50 GMT
I finally managed to make MyFaces 1.09 work with SunOne Application Server 
7.0.0.7

In fact, there are two problems with it:

1. Security in SunOne prevents web apps to delete files.

  SYMPTOM:
	MyFaces Web-app can't initialize.

  LOG:

[30/Jun/2005:17:32:49] INFO ( 4584): CORE3282: stdout: 2005-06-30 17:32:49,560 
[main] ERROR org.apache.myfaces.webapp.StartupServletContextListener - Error 
initializing ServletContext
[30/Jun/2005:17:32:49] INFO ( 4584): CORE3282: stdout: 
javax.faces.FacesException: java.security.AccessControlException: access 
denied (java.io.FilePermission C:\WINDOWS\TEMP\myfaces51482.jar delete)
[30/Jun/2005:17:32:49] WARNING ( 4584): CORE3283: stderr: 
javax.faces.FacesException: java.security.AccessControlException: access 
denied (java.io.FilePermission C:\WINDOWS\TEMP\myfaces51482.jar delete)
[30/Jun/2005:17:32:49] INFO ( 4584): CORE3282: stdout: 	at 
org.apache.myfaces.config.FacesConfigurator.feedJarConfig(FacesConfigurator.java:399)
[30/Jun/2005:17:32:49] WARNING ( 4584): CORE3283: stderr: 	at 
org.apache.myfaces.config.FacesConfigurator.feedJarConfig(FacesConfigurator.java:399)
[30/Jun/2005:17:32:49] INFO ( 4584): CORE3282: stdout: 	at 
org.apache.myfaces.config.FacesConfigurator.feedJarFileConfigurations(FacesConfigurator.java:311)
[30/Jun/2005:17:32:49] WARNING ( 4584): CORE3283: stderr: 	at 
org.apache.myfaces.config.FacesConfigurator.feedJarFileConfigurations(FacesConfigurator.java:311)
[30/Jun/2005:17:32:49] INFO ( 4584): CORE3282: stdout: 	at 
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:203)
[30/Jun/2005:17:32:49] WARNING ( 4584): CORE3283: stderr: 	at 
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:203)

 The problem is that FacesConfigurator writes some temporary .jar files in 
order to read their included faces-config.xml, dans then tries to delete 
them.
 But by default SunOne 7 App server security doesn't allow file delete.

 FIX:
 Change the security of the application server to allow file deletion.
  In the file
	C:\Sun\AppServer7\domains\domain1\server1\config\server.policy

 Change
	permission java.io.FilePermission       "<<ALL FILES>>", "read,write";
  To
	permission java.io.FilePermission       "<<ALL FILES>>", "read,write,delete";


 QUESTION:
 It will be difficult for me to manage my clients to change their  default 
security settings.
 How can we avoid these temporary jar files ?

 2. Once the security is changed, we have another problem because of JSP 2.0 
dependency.

  SYMPTOM:
	Any Jsp page result is blank.

  LOG:
	No log, no errors on log.

  FIX:
	SunOne AppServer 7 is J2EE 1.3 compliant, that means it supports jsp 1.2.
  As MyFaces is dependant on JSP 2.0, we put the jsp-api-2.0.jar in our 
WEB-INF/lib, and this made the error.
	In order to make it work, you need to remove all .class from jsp-api-2.0.jar 
excepts the ones in package javax.servlet.jsp.el.

  QUESTION:
	Isn't there another solution ?
	Is it possible to completely get rid of this jsp 2.0 dependency ?


 Gérard COLLIN

Mime
View raw message