Re: MaxPermSize / Threads

2010-05-17 Thread Mercy

Hi,

You could set the one fourth of physical memory size(the 
recommended heap size) for -Xms,-Xmx arguments.


What's more, you also analyze the heap using jmap.

Mercy

On 05/17/2010 05:16 PM, André Warnier wrote:

Ozgur Ozdemircili wrote:

Hi,

-Rhel 5.3 x64

-java version 1.6.0_16
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

-Apache tomcat 6.0.26

-Dual core Intel(R) Xeon(R) CPU E3110  @ 3.00GHz  and 4 GB memory each.


Hè ? do you mean 4 Gb or 8GB total RAM ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: MaxPermSize / Threads

2010-05-17 Thread Mercy

Hi,

Please take a look at this: 
http://java.sun.com/javase/6/docs/technotes/guides/vm/gc-ergonomics.html


*maximum heap size:*

   Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the
   default maximum heap size was 64MB. You can override this default
   using the |-Xmx| command-line option.


 It does not mean just only use 1/4th, it will increase overload to 
system if more than 1/4th of the physical memory.


 If you had more practical setting , please tell me.

Kind regards,
Mercy


On 05/17/2010 06:49 PM, Pid wrote:

On 17/05/2010 10:29, Mercy wrote:
   

Hi,

 You could set the one fourth of physical memory size(the recommended
heap size) for -Xms,-Xmx arguments.
 

Where does this recommendation come from?

It would mean that with 16Gb of RAM one should only use 4Gb for the heap.


p

   

What's more, you also analyze the heap using jmap.

Mercy

On 05/17/2010 05:16 PM, André Warnier wrote:
 

Ozgur Ozdemircili wrote:
   

Hi,

-Rhel 5.3 x64

-java version 1.6.0_16
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

-Apache tomcat 6.0.26

-Dual core Intel(R) Xeon(R) CPU E3110  @ 3.00GHz  and 4 GB memory each.

 

Hè ? do you mean 4 Gb or 8GB total RAM ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


   


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

 


   




Re: MaxPermSize / Threads

2010-05-17 Thread Mercy

Thank you.

Mercy

On 05/17/2010 08:58 PM, Pid wrote:

On 17/05/2010 13:18, Mercy wrote:
   

Hi,

 Please take a look at this:
http://java.sun.com/javase/6/docs/technotes/guides/vm/gc-ergonomics.html

*maximum heap size:*

 Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the
 default maximum heap size was 64MB. You can override this default
 using the |-Xmx| command-line option.


  It does not mean just only use 1/4th, it will increase overload to
system if more than 1/4th of the physical memory.
 

That part of the document only describes the initial value of the
maximum heap size parameter and how it is calculated, it doesn't make a
recommendation for what is appropriate for a given system.

I don't know what you mean by it will increase overload to system if
more than 1/4th of the physical memory?


   

  If you had more practical setting , please tell me.
 

The settings will be extremely specific to each environment and the
behaviour of the applications you've deployed, both inside and outside
of the JVM.


p



   

On 05/17/2010 06:49 PM, Pid wrote:
 

On 17/05/2010 10:29, Mercy wrote:

   

Hi,

 You could set the one fourth of physical memory size(the recommended
heap size) for -Xms,-Xmx arguments.

 

Where does this recommendation come from?

It would mean that with 16Gb of RAM one should only use 4Gb for the heap.


p


   

What's more, you also analyze the heap using jmap.

Mercy

On 05/17/2010 05:16 PM, André Warnier wrote:

 

Ozgur Ozdemircili wrote:

   

Hi,

-Rhel 5.3 x64

-java version 1.6.0_16
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

-Apache tomcat 6.0.26

-Dual core Intel(R) Xeon(R) CPU E3110  @ 3.00GHz  and 4 GB memory each.


 

Hè ? do you mean 4 Gb or 8GB total RAM ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



   

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


 


   
 


   



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to run second instance of Tomcat 6.0.20 on separate port

2010-04-21 Thread Mercy

Hi,

   Please try to execute *startup.bat* in bin folder to startup your 
tomcat instance.


Kind regards,
Mercy


Kapil Godara wrote:

Hi,
My requirement: To install Opensso and Policy agent on Tomcat 6.0.20 on
single windows server. I installed Opensso on default tomcat port 8080 but
to install the Poilcy agent I need to create a separate instance of tomcat
on different port say 8081.

My procedure:

Step 1 - Installed tomcat 6.0.20 using apache-tomcat-6.0.20.exe at path
TOMCAT_HOME=C:\Program Files\Apache Software Foundation\Tomcat 6.0. It is
running fine
Step 2 - Copied the contents of TOMCAT_HOME to new directory i.e. C:\Program
Files\Apache Software Foundation\Tomcat_instance2 (TOMCAT_HOME2)
Step 3 - Changed the ports (http, shutdown and ajp connecter ports) in
server.xml in TOMCAT_HOME2\conf
Step 4 - Set environmental variable CATALINA_BASE=C:\Program Files\Apache
Software Foundation\Tomcat_instance2 (There is no startup.bat in bin folder)

I start the tomcat from TOMCAT_HOME\bin tomcat6w.exe  In browser
http://localhost:8080/ runs fine but when I use http://localhost:8081 it
does not work.

Can you please help me how to run second instance of Tomcat on separate
port?

regards
kapil

  




Re: gc new capacity of JVM is gradually reducing when webapp(tomcat) started

2010-04-21 Thread Mercy
Hi,

You could add a JVM runtime parameter like this : -Xmn256M to fix the
size of new generation.

Kind regards,
Mercy

塗 wrote:

 hi,all

 there is a problem with my webapp.

 by manual configuration, i allocated 1G(1024M) memory for webapp.
 where the gc new capacity automatically is 262M, the gc old capacity
 automatically is 699M, S0/S1 automatically is 43.6M/43.6M.

 When my webapp is started, I use the jvm's own tools(jstat) to trace
 the garbage collections.
 when the 6th Young garbage collection has happened, gc new
 capacity(262M) is gradually reducing.
 About 10 hours after, gc new capacity is only 40.6M.


 ##web operating environment:
 tomcat5.5.27 + Apache/2.2.3 + jdk1.5.0_13 + Linux_x86_64

 ##blow is my manual configurations for tomcat JVM
 CATALINA_OPTS=-Xms1024M -Xmx1024M
 -Dorg.apache.jasper.compiler.Parser.STRICT_QUOTE_ESCAPING=false


 ##Jstat Tracking data (unit/k)
 systemTime --- S0C --- S1C --- S0U --- S1U --- EC --- --- OC --- OU
 --- YGC --- YGCT --- FGC --- FGCT --- GCT
 10:03:10 --- 43648 --- 43648 --- 22444.3 --- 0 --- 262208 --- 217735.7
 --- 699072 --- 163.6 --- 4 --- 0.126 --- 1 --- 0.007 --- 0.132 ##webpp
 startup
 10:03:13 --- 43648 --- 43648 --- 22444.3 --- 0 --- 262208 --- 217735.7
 --- 699072 --- 163.6 --- 4 --- 0.126 --- 1 --- 0.007 --- 0.132
 :
 10:11:35 --- 43648 --- 43648 --- 0 --- 22445.1--- 262208 --- 261516.6
 --- 699072 --- 163.6 --- 5 --- 0.161 --- 1 --- 0.007 --- 0.168 ##5th YGC
 10:11:38 --- 20800 --- 33984 --- 19898 --- 0 --- 258688 --- 4845.1 ---
 699072 --- 163.6 --- 6 --- 0.192 --- 1 --- 0.007 --- 0.199 ##6th YGC,
 EC is reduced.
 :
 10:18:41 --- 33152 --- 19968 --- 0 --- 19949.1--- 255232 --- ---
 699072 --- 163.6 --- 7 --- 0.221 --- 1 --- 0.007 --- 0.228 ##7th YGC,
 EC is reduced.
 :
 18:34:43 --- 640 --- 704 --- 608 --- 0 --- 40832 --- 58 --- 699072 ---
 87896 --- 380--- 5.413 --- 1 --- 0.007 --- 5.419 ##380th YGC, EC is
 reduced.


 this problem has been troubling me. please help !



 --
 Get the new Internet Explorer 8 optimized for Yahoo! JAPAN
 http://pr.mail.yahoo.co.jp/ie8/

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Why HttpSessionEvent comes prior to ServletRequestEvent

2010-04-01 Thread Mercy

Hi,

   I declared two listeners , the former is a ServletRequestListener, 
the later is HttpSessionListener.


   When a client request  calls the application first, why a 
HttpSessionEvent comes prior to ServletRequestEvent?



Kind regards,
Mercy

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Why HttpSessionEvent comes prior to ServletRequestEvent

2010-04-01 Thread Mercy

Thanks,but I can't understand why not ServnetRequestEvent comes first?

Kind regards,
Mercy

Mark Thomas wrote:

On 01/04/2010 07:19, Mercy wrote:
  

Hi,

   I declared two listeners , the former is a ServletRequestListener,
the later is HttpSessionListener.

   When a client request  calls the application first, why a
HttpSessionEvent comes prior to ServletRequestEvent?



Because something is triggering session creation before the request hits
the first filter or servlet in the app.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  




Re: The requested resource ... is not available

2010-03-24 Thread Mercy

You could access http://localhost:8080/myapp/myfile.html,

or check the path is right or not in $CATALINA_HOME/conf/context.xml.

Mercy

mehar300 wrote:

hi
i installed apache-tomcat-6.0.20  and set path variable accordingly then i
access  http://localhost:8080/ and it shows default apache tomcat page.  
but  as if try to access http://localhost:8080/myfile.html  then it display
error 


type Status report

message /myfile.html

description The requested resource (/myfile.html) is not available.
Apache Tomcat/6.0.20

can anyone suggest what step should i take to resolve problem
thanks


Note: this problem occurs from last few days.   Before that, i was able
to access all files and directory (myapp) properly.  
  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Compiling JSP with SMAP

2010-03-24 Thread Mercy

Hi TWönlìnè,

   Did you a project named Server with a sub folder  whose name is 
like Tomcat v6.0 Server at localhost-config?


   If you had, please set these values into web.xml in.


Kind regards,
Mercy

TWönlìnè wrote:

I'm using apache-tomcat-6.0.20 with JASPER 2

I need to compile a web project (Eclipse WAR application) which is JSP to
JAVA source files.

I'm successfully generating JAVA files from JSP files (Used JASPER 2), but
now i need to get mapping from JSP lines to JAVA lines.
I tried using SMAP feature which available in JASPER 2, but i can't
configure it correctly.

There are two questions i need to ask,

1) Will generating SMAP files will help me to map JSP lines to generated
JAVA lines?

2) How to do this?

JASPER how to doc says - The servlet which implements Jasper is configured
using init parameters in your global $CATALINA_BASE/conf/web.xml.

I edited that web.xml with following code - (used dumpSmap  suppressSmap)

servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namesuppressSmap/param-name
param-valuefalse/param-value
/init-param
init-param
param-namedumpSmap/param-name
param-valuetrue/param-value
/init-param
/servlet

But no luck

Any help!

  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



JMX authentication failure

2010-03-15 Thread Mercy

Hi there,

   I'd like to enable JMX on Tomcat 6.0.16/Linux, export environment 
variables :


   *# JMX authenticate
   export JMX_AUTHENTICATE=true
   echo Is JMX authenticated ?  $JMX_AUTHENTICATE
  
   # JMX password file

   export JMX_PASSWORD_FILE=$JMX_HOME/jmxremote.password
   echo The location of password file of JMX  :  $JMX_PASSWORD_FILE
  
   # JMX access file

   export JMX_ACCESS_FILE=$ETC_DIR/tomcat/jmx/jmxremote.access
   echo The location of access file of JMX  :  $JMX_ACCESS_FILE
  
   export CATALINA_OPTS=-Dcom.sun.management.jmxremote

 -Dcom.sun.management.jmxremote.port=$JMX_PORT

   -Dcom.sun.management.jmxremote.ssl=$JMX_SSL_ENABLED

   -Dcom.sun.management.jmxremote.authenticate=$JMX_SSL_ENABLED

 -Djava.rmi.server.hostname=$JMX_HOST_NAME

   -Dcom.sun.management.jmxremote.password.file=$JMX_PASSWORD_FILE

   -Dcom.sun.management.jmxremote.access.file=$JMX_ACCESS_FILE

 $CATALINA_OPTS*


The console outputs:
*...
**Is JMX authenticated ?  true
The location of password file of JMX  :  
/home/mercy/workspace/website/etc/tomcat/jmx/jmxremote.password

...*

The password(/owner read-only privilege/)  and access file are existed,

   *me...@workspace:~/workspace/website/etc/tomcat/jmx$ pwd
   /home/mercy/workspace/website/etc/tomcat/jmx
   me...@workspace:~/workspace/website/etc/tomcat/jmx$ ls -ls
   total 8
   4 -rw-r--r-- 1 mercy mercy 160 2010-03-11 20:35 jmxremote.access
   4 -rw--- 1 mercy mercy 153 2010-03-11 19:45 jmxremote.password

   *

The content of jmxremote.access:

   *# Author : Mercy
   # Date   : 11 Mar 2010
   # This is a password file of JMX, whose format is like this:
   # ${USER_NAME} ${PRIVILEGE}

   mercy readonly
   admin readwrite*

jmxremote.password:

   *# Author : Mercy
   # Date   : 11 Mar 2010
   # This is a password file of JMX, whose format is like this:
   # ${USER_NAME} ${PASSWORD}

   mercy mercy
   admin admin*


   I run the JConsole to connect JMX on Tomcat after lunching it , it 
allows to access whether there is an authentication info or not.




   Please tell me how to enable authentication, thanks in advance.

Kind regards,
Mercy




Re: JMX authentication failure

2010-03-15 Thread Mercy

Hi Gurkan,

   it's false;

regards,
Mercy

Gurkan Erdogdu wrote:

-Dcom.sun.management.jmxremote.authenticate=$JMX_SSL_ENABLED

what is the $JMX_SSL_ENABLED value?

Thanks;

2010/3/15 Mercy techme...@gmail.com

  

Hi there,

  I'd like to enable JMX on Tomcat 6.0.16/Linux, export environment
variables :

  *# JMX authenticate
  export JMX_AUTHENTICATE=true
  echo Is JMX authenticated ?  $JMX_AUTHENTICATE
# JMX password file
  export JMX_PASSWORD_FILE=$JMX_HOME/jmxremote.password
  echo The location of password file of JMX  :  $JMX_PASSWORD_FILE
# JMX access file
  export JMX_ACCESS_FILE=$ETC_DIR/tomcat/jmx/jmxremote.access
  echo The location of access file of JMX  :  $JMX_ACCESS_FILE
export CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=$JMX_PORT

-Dcom.sun.management.jmxremote.ssl=$JMX_SSL_ENABLED

-Dcom.sun.management.jmxremote.authenticate=$JMX_SSL_ENABLED
-Djava.rmi.server.hostname=$JMX_HOST_NAME

-Dcom.sun.management.jmxremote.password.file=$JMX_PASSWORD_FILE

-Dcom.sun.management.jmxremote.access.file=$JMX_ACCESS_FILE
$CATALINA_OPTS*


The console outputs:
*...
**Is JMX authenticated ?  true
The location of password file of JMX  :
 /home/mercy/workspace/website/etc/tomcat/jmx/jmxremote.password
...*

The password(/owner read-only privilege/)  and access file are existed,

  *me...@workspace:~/workspace/website/etc/tomcat/jmx$ pwd
  /home/mercy/workspace/website/etc/tomcat/jmx
  me...@workspace:~/workspace/website/etc/tomcat/jmx$ ls -ls
  total 8
  4 -rw-r--r-- 1 mercy mercy 160 2010-03-11 20:35 jmxremote.access
  4 -rw--- 1 mercy mercy 153 2010-03-11 19:45 jmxremote.password

  *

The content of jmxremote.access:

  *# Author : Mercy
  # Date   : 11 Mar 2010
  # This is a password file of JMX, whose format is like this:
  # ${USER_NAME} ${PRIVILEGE}

  mercy readonly
  admin readwrite*

jmxremote.password:

  *# Author : Mercy
  # Date   : 11 Mar 2010
  # This is a password file of JMX, whose format is like this:
  # ${USER_NAME} ${PASSWORD}

  mercy mercy
  admin admin*


  I run the JConsole to connect JMX on Tomcat after lunching it , it allows
to access whether there is an authentication info or not.



  Please tell me how to enable authentication, thanks in advance.

Kind regards,
Mercy







  




Re: JMX authentication failure

2010-03-15 Thread Mercy

JMX does not need to authenticate for access.

My question that is how to enable authentication on Tomcat.

Regards,
Mercy


Paolo Santarsiero wrote:

Is your system firewalled?

On 15 March 2010 14:17, Gurkan Erdogdu cgurkanerdo...@gmail.com wrote:

  

then you answer question :)

2010/3/15 Mercy techme...@gmail.com



Hi Gurkan,

  it's false;

regards,
Mercy


Gurkan Erdogdu wrote:

  

-Dcom.sun.management.jmxremote.authenticate=$JMX_SSL_ENABLED

what is the $JMX_SSL_ENABLED value?

Thanks;

2010/3/15 Mercy techme...@gmail.com





Hi there,

 I'd like to enable JMX on Tomcat 6.0.16/Linux, export environment
variables :

 *# JMX authenticate
 export JMX_AUTHENTICATE=true
 echo Is JMX authenticated ?  $JMX_AUTHENTICATE
   # JMX password file
 export JMX_PASSWORD_FILE=$JMX_HOME/jmxremote.password
 echo The location of password file of JMX  :  $JMX_PASSWORD_FILE
   # JMX access file
 export JMX_ACCESS_FILE=$ETC_DIR/tomcat/jmx/jmxremote.access
 echo The location of access file of JMX  :  $JMX_ACCESS_FILE
   export CATALINA_OPTS=-Dcom.sun.management.jmxremote

  

 -Dcom.sun.management.jmxremote.port=$JMX_PORT


-Dcom.sun.management.jmxremote.ssl=$JMX_SSL_ENABLED

-Dcom.sun.management.jmxremote.authenticate=$JMX_SSL_ENABLED
   -Djava.rmi.server.hostname=$JMX_HOST_NAME

-Dcom.sun.management.jmxremote.password.file=$JMX_PASSWORD_FILE

-Dcom.sun.management.jmxremote.access.file=$JMX_ACCESS_FILE
   $CATALINA_OPTS*


The console outputs:
*...
**Is JMX authenticated ?  true
The location of password file of JMX  :
 /home/mercy/workspace/website/etc/tomcat/jmx/jmxremote.password
...*

The password(/owner read-only privilege/)  and access file are existed,

 *me...@workspace:~/workspace/website/etc/tomcat/jmx$ pwd
 /home/mercy/workspace/website/etc/tomcat/jmx
 me...@workspace:~/workspace/website/etc/tomcat/jmx$ ls -ls
 total 8
 4 -rw-r--r-- 1 mercy mercy 160 2010-03-11 20:35 jmxremote.access
 4 -rw--- 1 mercy mercy 153 2010-03-11 19:45 jmxremote.password

 *

The content of jmxremote.access:

 *# Author : Mercy
 # Date   : 11 Mar 2010
 # This is a password file of JMX, whose format is like this:
 # ${USER_NAME} ${PRIVILEGE}

 mercy readonly
 admin readwrite*

jmxremote.password:

 *# Author : Mercy
 # Date   : 11 Mar 2010
 # This is a password file of JMX, whose format is like this:
 # ${USER_NAME} ${PASSWORD}

 mercy mercy
 admin admin*


 I run the JConsole to connect JMX on Tomcat after lunching it , it
allows
to access whether there is an authentication info or not.



 Please tell me how to enable authentication, thanks in advance.

Kind regards,
Mercy





  




  

--
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com




  




Re: JspServlet Issue

2009-10-10 Thread Mercy

Hi,


Again, why not simply remove the requirement that development=false?

There is nothing stopping you from recompiling JSP files explicitly with
this configuration, right?

The production application will not accept it.



Why the second request? The compile/load step should be all handled in a

single request!

 The second request is used to execute JSP page.



Where is the class (in a file? where?) and how are you trying to load it?


The class file is placed at 
$CATALINA_HOME/work/localhost/_/org/apache/jsp/test/_1_jsp.class.


I'm sorry, my brain can't make any sense out of that sentence.


The first request has loaded it ,if my compiler set precompile=false, it will 
execute that page well,but if precompile=true,and the class loader can't found 
it in next request.


Wait, you're recompiling ClassLoaders on the fly, now, too?None of this makes 
any sense. You are completely wasting your time

trying to do something that is completely unnecessary.

You can image that there are 1 pages,99.9% of them do not need to 
recompile, but a little needs to do,that's way the development parameter 
unnecessaryly set true.

I has implemented this requirement,but still do not know the reason why the 
whole operation can't be separated.

 Thank you for your time. :-) 
	

Kind regards,
Mercy








Christopher Schultz 写道:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mercy,

On 10/9/2009 10:06 PM, Mercy wrote:
  

 My JSP compiler is based on JspServletWrapper(Jasper compiler).



Again, why not simply remove the requirement that development=false?
There is nothing stopping you from recompiling JSP files explicitly with
this configuration, right?

  

My JSP compiler use JspServletWrapper ,thus, it will compile and
load(ClassLoader works fine) once,



Sounds good.

  

here is recompiled operation,and then a new request (by JspServlet) to
load that compiled JSP,



Why the second request? The compile/load step should be all handled in a
single request!

  

the ClassLoader can't find class.



Where is the class (in a file? where?) and how are you trying to load it?

  

ClassLoader loadClass method can find
the class that it loaded before



Okay, then where is /that/ class? Are you simply not writing the .class
file into the right place?

  

, thus I think JapserLoader should load
that class,but it can't find.



I'm sorry, my brain can't make any sense out of that sentence.

  

 Should it pass the recompiled ClassLoader to loader ClassLoader as
parent ClassLoader? :-)



Wait, you're recompiling ClassLoaders on the fly, now, too?

None of this makes any sense. You are completely wasting your time
trying to do something that is completely unnecessary.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrQhvkACgkQ9CaO5/Lv0PAYWACgoxdbR+iYYUOurB5tH+POjGPm
X0UAoKh9Ff90LuQa9APeXdN5KXhniTwJ
=unUf
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  




Re: JspServlet Issue

2009-10-09 Thread Mercy



Hi Mark, In my view, the JSP 11.4.2 spec says that if client adds the jsp_precompile parameter, the request will not execute the jsp page's service method,what's more, JspServlet just compiles and loads new generated jsp servlet class, it's right, JspServlet works fine when JspServlet compiles and loads the Jsp at the same time, however, if the JSP page is compiled and loaded by two part, that means, My compiler compiles a JSP page and than JspServlet loads it, JspServlet can't find that page, so I'm confuse here.       Again, why it's Ok when two operations is executed at time time , it's wrong when separates them.Kind regards,Mercy	On Thu, 08 Oct 2009 20:26:33 +0800, Mark Thomas ma...@apache.org wrote: Mercy wrote: Hi, Yes, it just does on the first time request,I need to compile the page when I need. What is wrong with the process described in JSP.11.4.2? Mark Kind regards, Mercy On Thu, 08 Oct 2009 20:00:50 +0800, Konstantin Kolinko knst.koli...@gmail.com wrote: 2009/10/8 Mercy techme...@gmail.com: Hi Kolinko,In order to implement requirement is that our application can't set development=true and needs to compile little of pages without restart need. Even if development=false, it compiles new pages. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Re: JspServlet Issue

2009-10-09 Thread Mercy


Hi chris,

* Did you mean compiles and /executes/ the JSP?

  No,here means compiles and loads the JSP.

*Huh? Are you saying that if you compile the JSP with one request then a
 second request to execute the JSP fails with a 404?

 Yes

* Please define wrong: does it fail (and generate some type of message),
or does it not meet your requirements (please describe what way).

  I need to compile Jsp on one request, and then load on another one.

  The JspServlet throws an exception of ClassNotFoundException.


Kind regards,
Mercy





On Sat, 10 Oct 2009 00:00:39 +0800, Christopher Schultz  
ch...@christopherschultz.net wrote:



Mercy,
On 10/9/2009 2:49 AM, Mercy wrote:
  In my view, the JSP 11.4.2 spec says that if client adds the  
*jsp_precompile

*parameter, the request will not execute the jsp page's service method

Correct. It merely (re-)compiles the JSP page.


JspServlet works fine when JspServlet compiles and loads the Jsp at the
same time

Did you mean compiles and /executes/ the JSP?


however, if the JSP page is compiled and loaded by two part, that
means, My compiler compiles a JSP page and than JspServlet loads it,  
JspServlet

can't find that page, so I'm confuse here.

Huh? Are you saying that if you compile the JSP with one request then a
second request to execute the JSP fails with a 404?


Again, why it's Ok when two operations is executed at time time , it's
wrong when separates them.

Please define wrong: does it fail (and generate some type of message),
or does it not meet your requirements (please describe what way).
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkrPXicACgkQ9CaO5/Lv0PAgJwCggb1eJnXSfJeomu79gHcSz0DM
DIoAnjmrEFr/jQc4XZDcttINCyR6T5J3
=GuHR
-END PGP SIGNATURE-



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JspServlet Issue

2009-10-09 Thread Mercy

Hi,

When you say load, do you mean loads the new Class object into memory?

Yes.

Why do you think the 404 has anything to do with failed compilation
and/or loading? Is it possible you just have a broken URL or something?
You *have* been messing around writing your own JSP compiler...

 My JSP compiler is based on JspServletWrapper(Jasper compiler).

Why does it matter when it gets loaded into the ClassLoader? Why would
you want the JSP to be compiled during one request and then loaded in a
separate one?

 My JSP compiler use JspServletWrapper ,thus, it will compile and 
load(ClassLoader works fine) once,
here is recompiled operation,and then a new request (by JspServlet) to 
load that compiled JSP,
the ClassLoader can't find class.ClassLoader loadClass method can find 
the class that it loaded before, thus I think JapserLoader should load

that class,but it can't find.

 Should it pass the recompiled ClassLoader to loader ClassLoader as 
parent ClassLoader? :-)


Kind regards,
Mercy




Christopher Schultz 写道:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mercy,

On 10/9/2009 1:53 PM, Mercy wrote:
  

* Did you mean compiles and /executes/ the JSP?
  

  No,here means compiles and loads the JSP.



When you say load, do you mean loads the new Class object into memory?

  

*Huh? Are you saying that if you compile the JSP with one request then a
 second request to execute the JSP fails with a 404?
  

 Yes



Why do you think the 404 has anything to do with failed compilation
and/or loading? Is it possible you just have a broken URL or something?
You *have* been messing around writing your own JSP compiler...

  

* Please define wrong: does it fail (and generate some type of message),
or does it not meet your requirements (please describe what way).
  

I need to compile Jsp on one request, and then load on another one.



Why does it matter when it gets loaded into the ClassLoader? Why would
you want the JSP to be compiled during one request and then loaded in a
separate one?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrPizsACgkQ9CaO5/Lv0PC9RgCggw2MTWlpEu2rmSqY7dZ5d5CZ
yS0AoKGOtn7oMpMvZpCaKBQjfsKZXry0
=xnQw
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  




Re: JspServlet Issue

2009-10-08 Thread Mercy


Hi Kolinko,

	In order to implement requirement is that our application can't set  
development=true and needs to compile little of pages without restart need.
If I use the JspServlet , it compiles JSP Pages and loads them class and  
works fine, but If use my compiler to compile and load, the JspServlet  
can't find the class.
I debuged it and found that JapserLoader can't find it,so I suspect that  
it's a problem about class loader.


Thank you for your response.

Kind regards,
Mercy



Mercy wrote:

Hi Mark,
 Thank you for your response, actually, I has found a way to fulfill
my requirement that it can compile the JSP pages when development
parameter is false.
My question is that why my compiler using JspServletWrapper has been
compiled some class files of Jsp file, the JasperLoader can't find
them,at the same time,
The other pages that were compiled by JspServlet in first time could be
found by JapserLoader.
 The exception told me that org/apache/jsp/_1_jsp class can't be
found,but it still exists and its modified time is latest.
 Is it a bug of JapserLoader or URLClassLoader?




On Thu, 08 Oct 2009 19:07:14 +0800, Konstantin Kolinko  
knst.koli...@gmail.com wrote:



What part of your application does not work for you when you have
development=false? What are your requirements?



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JspServlet Issue

2009-10-08 Thread Mercy

Hi,

	Yes, it just does on the first time request,I need to compile the page  
when I need.


Kind regards,
Mercy

On Thu, 08 Oct 2009 20:00:50 +0800, Konstantin Kolinko  
knst.koli...@gmail.com wrote:



2009/10/8 Mercy techme...@gmail.com:


Hi Kolinko,

   In order to implement requirement is that our application can't  
set
development=true and needs to compile little of pages without restart  
need.


Even if development=false, it compiles new pages.

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Running tomcat as native

2009-10-07 Thread Mercy


Hi Vivek,

You can try this code to get the paths,

public static void main(String[] args){
		for(String path :  
System.getProperty(java.library.path).split(File.pathSeparator))

System.out.println(path);
}

Please put the DLL file into those paths, it may help you!

Kind regards,
Mercy



On Wed, 07 Oct 2009 15:35:11 +0800, Vivek Shanmughan vivsh...@cisco.com  
wrote:



Hi all,
  I am trying to run tomcat as native. I downloaded tcnative-1.dll and
copied it to tomcat/bin. Still am getting the INFO : The Apache Tomcat
Native library which allows optimal performance in production  
environments

was not found on the java.library.path: 
Can anyone please give me some inputs on this??
Vivek



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JspServlet Issue

2009-10-07 Thread Mercy

Hi Mark,

What did you mean change the app? Could you give more information?

Thank you.

Kind regards,
Mercy


On Wed, 07 Oct 2009 15:50:28 +0800, Mark Thomas ma...@apache.org wrote:


From: Mercy Ma techme...@gmail.com
To: users@tomcat.apache.org
Sent: 07/10/09, 06:42:17
Subject: JspServlet Issue

Hi there,

I did write some code to create dynamic compiler for JSP pages, because  
our
application sets development options parameter to be false for  
JspServlet.


Surely much simpler to change the app so it doesn't do that.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JspServlet Issue

2009-10-07 Thread Mercy

Hi Mark,

	Thank you for your response, actually, I has found a way to fulfill my  
requirement that it can compile the JSP pages when development parameter  
is false.
My question is that why my compiler using JspServletWrapper has been  
compiled some class files of Jsp file, the JasperLoader can't find them,at  
the same time,
The other pages that were compiled by JspServlet in first time could be  
found by JapserLoader.


	The exception told me that org/apache/jsp/_1_jsp class can't be found,but  
it still exists and its modified time is latest.


Is it a bug of JapserLoader or URLClassLoader?

I expect you response, thank you. :)

Kind regards,
Mercy

On Wed, 07 Oct 2009 16:13:41 +0800, Mark Thomas ma...@apache.org wrote:


--- Original Message ---
From: Mercy techme...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: 07/10/09, 08:57:24
Subject: Re: JspServlet Issue

Hi Mark,

What did you mean change the app? Could you give more information?


Don't set the development parameter of the JspServlet to false.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Running tomcat as native

2009-10-07 Thread Mercy



Hi,	welcome, the following links may help for you:	http://mirrors.dotsrc.org/apache/tomcat/tomcat-connectors/native/1.1.16/binaries/win64/README.html,	http://mirrors.dotsrc.org/apache/tomcat/tomcat-connectors/native/1.1.16/binaries/win32/README.htmlFYI:Apache Tomcat Native 1.1.16 for WIN32The binaries were build using the following dependent libraries: APR 1.2.8 OpenSSL 0.9.8i The Apache Tomcat ProjectKind regards,MercyOn Wed, 07 Oct 2009 16:36:26 +0800, Vivek Shanmughan vivsh...@cisco.com wrote: Thank you Mercy,   I tried copying the dll to one of the folders in  java.library.path.   But even this didn't help. Is there a dependency between tcnative-1.dll version and tomcat version . Vivek -Original Message- From: Mercy [mailto:techme...@gmail.com] Sent: Wednesday, October 07, 2009 1:16 PM To: Tomcat Users List Subject: Re: Running tomcat as native Hi Vivek, 	You can try this code to get the paths, 	 	public static void main(String[] args){ 		for(String path : System.getProperty("java.library.path").split(File.pathSeparator)) 			System.out.println(path); 	} Please put the DLL file into those paths, it may help you! Kind regards, Mercy 	 On Wed, 07 Oct 2009 15:35:11 +0800, Vivek Shanmughan vivsh...@cisco.com wrote: Hi all,   I am trying to run tomcat as native. I downloaded tcnative-1.dll and copied it to tomcat/bin. Still am getting the INFO : "The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: " Can anyone please give me some inputs on this?? Vivek-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Re: how to integrate tomcat with IDE tools like eclipse,Netbeans?

2009-10-07 Thread Mercy

Hi,
	You could add the src.zip under JDK folder instead of JRE,please take a  
look at the attached image file.


Kind regards,
Mercy


On Wed, 07 Oct 2009 17:34:18 +0800, srinivas2828 srinivas2...@gmail.com  
wrote:




I really appriciate your help but got one more problem,please find  
attached

copy of image
http://www.nabble.com/file/p25783409/Screenshot.png Screenshot.png

Konstantin Kolinko wrote:


2009/10/7 srinivas2828 srinivas2...@gmail.com:


Hi Deepa
I integrated tomcat with eclipse(I downloaded Eclipse-Galelio) then i  
got
and I am facing one problem that when I start Tomcat server it came  
with

one
error message which says Starting Tomcatv6.0 Server at localhost has
encoutered a problem, Port 80 required by Tomcat v6.0 server at  
localhost

already in use. the server may already running in another process, or a
system process may be using  the port,To start this server you will  
need

to
stop  the other process or change the port number(s)

any idea



As it says, you will need to stop the other process or change the
port number(s)

Either change the numbers by editing server.xml (that is inside the
Servers project), or using the GUI, e.g. as is described here (found
thanks to Google):

http://techteam.wordpress.com/2009/02/13/changing-the-tomcat-port-settings-in-eclipse/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org








--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: how to integrate tomcat with IDE tools like eclipse,Netbeans?

2009-10-07 Thread Mercy

Hi,

   At first , you need to create a web project , and the add it into 
tomcat server.


   Later, you create a new jsp page, select it and click right button, 
the pop-up menu dispears, select Run As - Run on Server, the server is 
Ok when that page is present. :-)


  
Kind regards,

Mercy

srinivas2828 wrote:

Oh..thats Great and can you tell me how can i see the server status success
or not and can i see the default success page in eclipse and is it possibe?
or ele browser?dont mind for this question and I am newbie to this kind of
configurations...
O

Mercy Ma wrote:
  

Hi,
	You could add the src.zip under JDK folder instead of JRE,please take a  
look at the attached image file.


Kind regards,
Mercy


On Wed, 07 Oct 2009 17:34:18 +0800, srinivas2828 srinivas2...@gmail.com  
wrote:



I really appriciate your help but got one more problem,please find  
attached

copy of image
http://www.nabble.com/file/p25783409/Screenshot.png Screenshot.png

Konstantin Kolinko wrote:
  

2009/10/7 srinivas2828 srinivas2...@gmail.com:


Hi Deepa
I integrated tomcat with eclipse(I downloaded Eclipse-Galelio) then i  
got
and I am facing one problem that when I start Tomcat server it came  
with

one
error message which says Starting Tomcatv6.0 Server at localhost has
encoutered a problem, Port 80 required by Tomcat v6.0 server at  
localhost

already in use. the server may already running in another process, or a
system process may be using  the port,To start this server you will  
need

to
stop  the other process or change the port number(s)

any idea

  

As it says, you will need to stop the other process or change the
port number(s)

Either change the numbers by editing server.xml (that is inside the
Servers project), or using the GUI, e.g. as is described here (found
thanks to Google):

http://techteam.wordpress.com/2009/02/13/changing-the-tomcat-port-settings-in-eclipse/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




  




Re: JspServlet Issue

2009-10-07 Thread Mercy

Hi Mark,

	I just want to compile the pages what i need, not all. Actually,the most  
pages ware compiled by ANT,thus, our application does not set the  
development parameter is true.


	What's more , I did not re-invent the wheel rather than I re-use the  
JspServlet and its correlative classes.


Thank you for your time.

Kind regards,
Mercy

On Wed, 07 Oct 2009 18:15:29 +0800, Mark Thomas ma...@apache.org wrote:


Mercy wrote:

Hi Mark,

Thank you for your response, actually, I has found a way to fulfill
my requirement that it can compile the JSP pages when development
parameter is false.
My question is that why my compiler using JspServletWrapper has been
compiled some class files of Jsp file, the JasperLoader can't find
them,at the same time,
The other pages that were compiled by JspServlet in first time could be
found by JapserLoader.

The exception told me that org/apache/jsp/_1_jsp class can't be
found,but it still exists and its modified time is latest.

Is it a bug of JapserLoader or URLClassLoader?


Neither. It is a bug of your custom re-compilation code. I still don't  
see why

you are trying to re-invent the wheel. Just don't set development=false.

Mark



I expect you response, thank you. :)

Kind regards,
Mercy

On Wed, 07 Oct 2009 16:13:41 +0800, Mark Thomas ma...@apache.org  
wrote:



--- Original Message ---
From: Mercy techme...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: 07/10/09, 08:57:24
Subject: Re: JspServlet Issue

Hi Mark,

What did you mean change the app? Could you give more  
information?


Don't set the development parameter of the JspServlet to false.

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



JspServlet Issue

2009-10-06 Thread Mercy Ma
Hi there,

I did write some code to create dynamic compiler for JSP pages, because our
application sets development options parameter to be false for JspServlet.
In order to fulfill the requirement, I viewed the correlative code of Japser
engine.

At first, I implemented the Options , JspRuntimeContext , and created a new
Servlet to interpret and compile the JSP page,it works fine, and the class
file was created in work directory, but JspServletWrapper does not reload
it,I checked the source of JspServletWrapper, and found the field reload is
false ,thus , did not reload it. It's correct.

However, I tried one way to find the JspServlet instance in tomcat, and
register a Servlet Filter to map all *.jsp and *.jspx. I know the singleton
instance of JspServlet (it works) services for all *.jsp and *.jspx in one
container, the FilterChain implemention
class(org.apache.catalina.core.ApplicationFilterChain) can be taken
advantage of retrieving this JspServlet instance, Luckly, I successfully
retrieved that one, and than I'd like to set the reload is true by
invocation JspServletWrapper#setReload(true) method.

Although the reload is true,unfortunately , The JasperLoader can't find the
class file,for instance, the class file that is placed in
${CATALINA_HOME}/work/localhost/catalina/_/org/apache/jsp/test/_2_jsp.class
is a new created class by my code sucessfully,the
JasperLoader#loadClass(String name) can't load it, another JSP pages that
are created by application work fine in the same directory, is it caused by
ClassLoader? In fact , my compiler invokes the
JspServletWrapper#service(request,response,true), it was loaded once,so I'm
confused. :-(

The version of My tomcat is Apache Tomcat/6.0.18 under jdk1.6.0_16, IDE is
Eclipse 3.4 JEE

Thank you in advanced. :-)

Kind regards,
Mercy