Problem with policies

2008-04-30 Thread Roberto Riggio
Hi,

I'm running tomcat 5.5.25 under ubuntu. However with the default setup i get 
the following exeception when a try to use my webapp:

org.apache.jasper.JasperException: The absolute uri: 
http://struts.apache.org/tags-html cannot be resolved in either web.xml or the 
jar files deployed with this application

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)

org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)

org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
org.apache.jasper.compiler.Parser.parse(Parser.java:127)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)

org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

The I've tried to grant all rights to my webapp with:

grant codeBase file:${catalina.base}/webapps/myapp/- {
  permission java.security.AllPermission;
};

and everything works fine. Is there anybody that can give me some
hints about how this problem should be handled? I'm sure that give 
full rights to the webapp is not the best solutions.

Thanks
Roberto

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem with policies

2008-04-30 Thread Roberto Riggio
Because it works fine if I add the following block to to 50user.policy 

grant codeBase file:${catalina.base}/webapps/myapp/- {
  permission java.security.AllPermission;
}; 

Am I missing something? 

R.

- David Smith [EMAIL PROTECTED] wrote:
 What makes you think its a problem with the security policy file?  
 This 
 looks more like it can't find the struts html taglib tld file.   It's
 
 looking for the definition in your web.xml file or the tld file in the
 
 META-INF of one of your .jar files in WEB-INF/lib
 
  --David
 
 Roberto Riggio wrote:
  Hi,
 
  I'm running tomcat 5.5.25 under ubuntu. However with the default
 setup i get the following exeception when a try to use my webapp:
 
  org.apache.jasper.JasperException: The absolute uri:
 http://struts.apache.org/tags-html cannot be resolved in either
 web.xml or the jar files deployed with this application
  
 org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
  
 org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
  
 org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
  
 org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
  
 org.apache.jasper.compiler.TagLibraryInfoImpl.init(TagLibraryInfoImpl.java:148)
  
 org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
  org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
  org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
  org.apache.jasper.compiler.Parser.parse(Parser.java:127)
  
 org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
  
 org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
  
 org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
  org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
  
 org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
  
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
  
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  java.lang.reflect.Method.invoke(Method.java:597)
  
 org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
  java.security.AccessController.doPrivileged(Native Method)
  javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
  
 org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
  
 org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
 
  The I've tried to grant all rights to my webapp with:
 
  grant codeBase file:${catalina.base}/webapps/myapp/- {
permission java.security.AllPermission;
  };
 
  and everything works fine. Is there anybody that can give me some
  hints about how this problem should be handled? I'm sure that give 
  full rights to the webapp is not the best solutions.
 
  Thanks
  Roberto
 
 
 -
  To start a new topic, e-mail: users@tomcat.apache.org
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 
 
 -- 
 David Smith
 Network Operations Supervisor
 Department of Entomology
 Cornell University
 2132 Comstock Hall
 Ithaca, NY 14853
 Phone: (607) 255-9571
 Fax: (607) 255-0940
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-- 

Roberto Riggio, PhD

CREATE-NET
Via alla Cascata 56/C 
38100 Trento (Italy)

E-mail: [EMAIL PROTECTED]
HomePage: http://disi.unitn.it/~riggio/

Tel: +39.0461.314.960
Fax: +39.0461.314.972



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5 problem with log4j and policy

2008-01-09 Thread Roberto Riggio
As an alternative can you point me to an howto about best pratices 
in logging with tomcat?

R.

- Roberto Riggio [EMAIL PROTECTED] wrote:
 Hi,
 
 sorry for the mistake, this is the directory where I'm logging:
 
 drwxr-x--- 2 tomcat55 adm  4096 2008-01-08 09:23 tomcat5.5
 
 so the path that I'm using is:
 
 /var/log/tomcat5.5/myapp.log
 
 Tomcat is running under the user tomcat55
 
 R.
 
 - Vinu Varghese [EMAIL PROTECTED] wrote:
  Hi,
   
   Under which user the tomcat process is running?. It seems the user
 
  doesn't have enough privilege to write to the folder.
  
  regards
  
  
  Roberto Riggio wrote:
   Hi,
  
   I'm deploying a struts 1.3.x webapp on tomcat 5.5.
  
   I'm using log4j 1.2.13 for logging and I've configured to
   log everything at /var/tmp/myapp.log
  
   However when i try to deploy the app tomcat complains that
   the webapp is not allowed to write on /var/log/myapp.log.
  
   How should I modify the policy files in order to enable
   proper logging?
  
   Moreover: is it correct to specify the log name in the
  log4j.properties
   files inside the webapp? Is there another more general way to
   do this so i do not have to modify it if I deploy the webapp on
 win
   instead of linux?
  
   Thanks
   R
  
 
  
  -- 
  
  signature
 full-name Vinu Varghese /full-name
 company-email [EMAIL PROTECTED] /company-email
 company-website www.x-minds.org /company-website
 big-words
  Success always occurs in private, and failure in full view.
  /big-words
 company-name-big
  \/  ._ _   o  .__|   _
  /\  ~~  | | |  |  | |  (_|  _\  
  
  
  /company-name-big
  /signature
 
 
 -- 
 
 Roberto Riggio, PhD Student
 
 CREATE-NET
 Via alla Cascata 56/C 
 38100 Trento (Italy)
 
 E-mail: [EMAIL PROTECTED]
 HomePage: http://disi.unitn.it/~riggio/
 
 Tel: +39.0461.314.960
 Fax: +39.0461.314.972
 
 
 
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-- 

Roberto Riggio, PhD Student

CREATE-NET
Via alla Cascata 56/C 
38100 Trento (Italy)

E-mail: [EMAIL PROTECTED]
HomePage: http://disi.unitn.it/~riggio/

Tel: +39.0461.314.960
Fax: +39.0461.314.972



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5 problem with log4j and policy

2008-01-08 Thread Roberto Riggio
Hi,

I'm deploying a struts 1.3.x webapp on tomcat 5.5.

I'm using log4j 1.2.13 for logging and I've configured to
log everything at /var/tmp/myapp.log

However when i try to deploy the app tomcat complains that
the webapp is not allowed to write on /var/log/myapp.log.

How should I modify the policy files in order to enable
proper logging?

Moreover: is it correct to specify the log name in the log4j.properties
files inside the webapp? Is there another more general way to
do this so i do not have to modify it if I deploy the webapp on win
instead of linux?

Thanks
R

-- 

Roberto Riggio, PhD Student

CREATE-NET
Via alla Cascata 56/C 
38100 Trento (Italy)

E-mail: [EMAIL PROTECTED]
HomePage: http://disi.unitn.it/~riggio/

Tel: +39.0461.314.960
Fax: +39.0461.314.972



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5 problem with log4j and policy

2008-01-08 Thread Roberto Riggio
Hi,

sorry for the mistake, this is the directory where I'm logging:

drwxr-x--- 2 tomcat55 adm  4096 2008-01-08 09:23 tomcat5.5

so the path that I'm using is:

/var/log/tomcat5.5/myapp.log

Tomcat is running under the user tomcat55

R.

- Vinu Varghese [EMAIL PROTECTED] wrote:
 Hi,
  
  Under which user the tomcat process is running?. It seems the user 
 doesn't have enough privilege to write to the folder.
 
 regards
 
 
 Roberto Riggio wrote:
  Hi,
 
  I'm deploying a struts 1.3.x webapp on tomcat 5.5.
 
  I'm using log4j 1.2.13 for logging and I've configured to
  log everything at /var/tmp/myapp.log
 
  However when i try to deploy the app tomcat complains that
  the webapp is not allowed to write on /var/log/myapp.log.
 
  How should I modify the policy files in order to enable
  proper logging?
 
  Moreover: is it correct to specify the log name in the
 log4j.properties
  files inside the webapp? Is there another more general way to
  do this so i do not have to modify it if I deploy the webapp on win
  instead of linux?
 
  Thanks
  R
 

 
 -- 
 
 signature
full-name Vinu Varghese /full-name
company-email [EMAIL PROTECTED] /company-email
company-website www.x-minds.org /company-website
big-words
 Success always occurs in private, and failure in full view.
 /big-words
company-name-big
 \/  ._ _   o  .__|   _
 /\  ~~  | | |  |  | |  (_|  _\
 
 /company-name-big
 /signature


-- 

Roberto Riggio, PhD Student

CREATE-NET
Via alla Cascata 56/C 
38100 Trento (Italy)

E-mail: [EMAIL PROTECTED]
HomePage: http://disi.unitn.it/~riggio/

Tel: +39.0461.314.960
Fax: +39.0461.314.972



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]