Re: Monitoring Tomcat Clusters

2008-01-08 Thread Vinu Varghese

Sorry I missed this in the last post

Also regarding Monitoring tomcat , using JMX is better

Check this: http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html

Shiby Maria John wrote:

HI,

Do the Tomcat 5.5.x / 6.x versions have a default bundled application
for monitoring tomcat clusters ?

Also does it support JMS ?

Regards,
Shiby



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


  


--

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



Re: Database connectivity problem

2008-01-08 Thread Vinu Varghese

Could you pls post the stack trace?

Sergey Livanov wrote:

Please help figure out a connection pool error.
My application ( tomcat, spring, ibatis ) works well in the
configuration SQL 2000 + ms server 2000.
When I transfer the application ( war ) to a win 2003 server
I get an error ( error creating connection pool e.t.c. )
(I think ms server 2003 needs to be adjusted).

Please help.

  


--

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



Re: Tomcat consumes much memory when web.xml size grows

2008-01-08 Thread Vinu Varghese

Try putting those jars in the lib folder of the WAR

unnikrishnans wrote:

I have one war file having size 140MB and has been deployed in tomcat 5 and
runs smothly. This war contains files from 20 different modules. So i
planned to split war in to multiple jar file in the following manner. 


one main.war file contains common classes,images,stylesheets,common jsp
files and web.xml . 

seperate module jar files with following . 

  




 java classes of the particular module 


 pre-compiled Jsp files of the module jsp.( Since jsp's are pre compiled
these entries will go to web.xml)  

   





 main.war will be having servlets entries of all the pre-compiled jsp's. 
The count comes around 6000. All these module jar files are put in to

shared/lib. while starting tomcat , it is found that it is taking 200MB more
memory than the previous one.It seems that when the number of servlet
entries in web.xml is more, it consumes much memory. Is there any way to
invoke the pre-compiled Jsp files with out having entry in web.xml file. 


Any help is appreciated.

 thanks  regards 


unni
  


--

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



Re: Monitoring Tomcat Clusters

2008-01-08 Thread Vinu Varghese

See this :
.1) http://www.jguru.com/faq/view.jsp?EID=499412
.2) http://www.onjava.com/pub/a/onjava/2001/12/12/openjms.html
.3) http://activemq.apache.org/tomcat.html

HTH



Shiby Maria John wrote:

HI,

Do the Tomcat 5.5.x / 6.x versions have a default bundled application
for monitoring tomcat clusters ?

Also does it support JMS ?

Regards,
Shiby



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


  


--

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



Re: Tomcat 5.5 problem with log4j and policy

2008-01-08 Thread Vinu Varghese

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



Re: How Do I do (Can I do) Apache like redirects in Tomcat

2008-01-07 Thread Vinu Varghese

Implement a filter/Servlet and do a redirect there

response.sendRedirect(..);

Rob Tanner wrote:

Hi,

I would like to setup an HTTPS connector in Tomcat (v 5.5.23) that 
listens on port 28080.  That part's easy enough and there is already a 
certificate installed.
Here's the part I'm having trouble with.  Whenever a browser send a 
GET request to that port, I need to return a redirect to an entirely 
different server (different IP, etc) listening on port 28443.  I 
cannot figure out anyway to do that.


Any ideas?

Thanks,
Rob





--

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



Re: Tomcat6

2008-01-04 Thread Vinu Varghese

Yes,
Why it shouldn't be ?

Shiby Maria John wrote:

Hi,

can Tomcat 6 version be used in production?

Regards,
Shiby



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


  


--

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



Re: Failure to start tomcat

2007-11-02 Thread Vinu Varghese
Did you start Tomcat prior to Httpd ?, Just see catalina.out in logs 
folder of Tomcat installation


Gaurav Agarwal wrote:

Nothing has been recorded in tomcat's log for this duration

-Original Message-
From: Vinu Varghese [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 02, 2007 5:38 PM

To: Tomcat Users List
Subject: Re: Failure to start tomcat

Hi,
 What does the tomcat log say ?

Gaurav Agarwal wrote:
  

Dear All,

 

I have installed Tomcat (using vinstall) on a NTT/Verio FreeBSD server 
and am unable to start it. I checked out various mod_jk.log and found 
these errors. Any idea what is wrong with this? I have searched the 
internet like mad but couldn't find anything wrong with the settings.


 

[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
jk_open_socket::jk_connect.c (432): trying to connect socket 24 to 
127.0.0.1:8009


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
jk_open_socket::jk_connect.c (450): connect to 127.0.0.1:8009 failed 
with errno=61


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_connect_to_endpoint::jk_ajp_common.c (872): Failed opening socket 
to (127.0.0.1:8009) with (errno=61)


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_send_request::jk_ajp_common.c (1247): (ajp13) error connecting to 
the backend server (errno=61)


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat 
failed,  recoverable operation attempt=1


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
jk_open_socket::jk_connect.c (334): socket TCP_NODELAY set to On


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
jk_open_socket::jk_connect.c (432): trying to connect socket 24 to 
127.0.0.1:8009


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
jk_open_socket::jk_connect.c (450): connect to 127.0.0.1:8009 failed 
with errno=61


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_connect_to_endpoint::jk_ajp_common.c (872): Failed opening socket 
to (127.0.0.1:8009) with (errno=61)


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_send_request::jk_ajp_common.c (1247): (ajp13) error connecting to 
the backend server (errno=61)


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_service::jk_ajp_common.c (1867): (ajp13) sending request to tomcat 
failed,  recoverable operation attempt=2


[Fri Nov 02 12:43:11 2007] [67847:] [error] 
ajp_service::jk_ajp_common.c (1879): (ajp13) Connecting to tomcat 
failed. Tomcat is probably not started or is listening on the wrong port


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
ajp_done::jk_ajp_common.c (2194): recycling connection pool slot=0 for 
worker ajp13


[Fri Nov 02 12:43:11 2007] [67847:] [info]  jk_handler::mod_jk.c 
(2063): Service error=0 for worker=ajp13


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (513): Attempting to map URI 
'/error/HTTP_SERVICE_UNAVAILABLE.html.var' from 2 maps


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (525): Attempting to map 
context URI '/*.jsp'


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (525): Attempting to map 
context URI '/*'


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
map_uri_to_worker::jk_uri_worker_map.c (539): Found a wildchar match 
ajp13 - /*


[Fri Nov 02 12:43:11 2007] [67847:] [debug] jk_handler::mod_jk.c 
(1920): Into handler jakarta-servlet worker=ajp13 r-proxyreq=0


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
wc_get_worker_for_name::jk_worker.c (111): found a worker ajp13


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
wc_get_name_for_type::jk_worker.c (287): Found worker type 'ajp13'


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
init_ws_service::mod_jk.c (568): Service protocol=HTTP/1.1 method=GET 
host=(null) addr=122.167.151.137 name=innovit1.securesites.net port=80 
auth=(null) user=(null) laddr=198.66.140.63 raddr=122.167.151.137


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
ajp_get_endpoint::jk_ajp_common.c (2251): acquired connection pool slot=0


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
ajp_marshal_into_msgb::jk_ajp_common.c (547): ajp marshaling done


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
ajp_service::jk_ajp_common.c (1734): processing ajp13 with 2 retries


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
jk_open_socket::jk_connect.c (334): socket TCP_NODELAY set to On


[Fri Nov 02 12:43:11 2007] [67847:] [debug] 
jk_open_socket::jk_connect.c (432): trying to connect socket 24 to 
127.0.0.1:8009


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
jk_open_socket::jk_connect.c (450): connect to 127.0.0.1:8009 failed 
with errno=61


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_connect_to_endpoint::jk_ajp_common.c (872): Failed opening socket 
to (127.0.0.1:8009) with (errno=61)


[Fri Nov 02 12:43:11 2007] [67847:] [info]  
ajp_send_request::jk_ajp_common.c (1247): (ajp13) error connecting

Re: Failure to start tomcat

2007-11-02 Thread Vinu Varghese
   

Mobile Number (Mumbai): 9920036823   Innoviti Embedded 
Solutions Pvt Ltd


Mobile Number (Bglore): 9739261069 
Website: www.innoviti.com http://www.innoviti.com/


Landline (Bglore): 080 - 41482608

 





   



 



--

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



Re: Is it possible to run multiple instances of Jboss Server on a single Windows 2k box

2007-06-22 Thread Vinu Varghese

Hi Shravan,
Yes it is possible, but you've to change the ports in the second instance.

-regards
Vinu

shravan kumar wrote:
Is it possible to run multiple instances of Jboss Server on a single 
Windows

2k box


--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org
(Success always occurs in private, and failure in full view.)

\/  ._ _   o  .__|   _
/\  ~~  | | |  |  | |  (_|  _\



Tomcat clustering without multicasting

2007-06-22 Thread Vinu Varghese

Hi all,

I am trying clustering with tomcat, but I have machines with multicast 
disabled. So is there any way to do clustering without multicasting, 
like use tcp for notifying member addition and removal ?


Thanks in advance

- regards

Vinu

--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org
(Success always occurs in private, and failure in full view.)

\/  ._ _   o  .__|   _
/\  ~~  | | |  |  | |  (_|  _\



Re: apache-tomcat-6.0.10 OutOfMemoryError

2007-03-15 Thread Vinu Varghese

Hi all

Please check this 
http://my.opera.com/karmazilla/blog/2007/03/13/good-riddance-permgen-outofmemoryerror


regards
vinu

prakash shanmugam wrote:

hi
i personally fell disabling the session in tomcat is not the correct
solution to overcome the memory out of error. just try to asign null for
unused objects. hope it resolve your issue.

bye
with regards
prakash.s


On 3/13/07, acec acec [EMAIL PROTECTED] wrote:


Hi, Remy
After I added %@ page session=false % into
/apache-tomcat-6.0.10/webapps/examples/jsp/tagplugin/foreach.jsp
, I could not reproduce OutOfMemoryError.
But if I add %@ page session=false % into my
application, my jsp could not get information from
session. How can I walk around this problem?
Thanks.
Arden

--- Rémy Maucherat [EMAIL PROTECTED] wrote:

 On 3/12/07, Filip Hanik - Dev Lists
 [EMAIL PROTECTED] wrote:
  add -XX:+HeapDumpOnOutOfMemoryError to your
 JAVA_OPTS, then you can zip
  up the file that gets generated, make it available
 to us and I'll take a
  look at it

 Most likely it's because of session creation. (you
 should not be too
 naive about problem reports, I think :D)

 - Add %@ page session=false % before testing
 the page, or make
 the client send a cookie with the session id.

 Rémy


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




__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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







--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org
(Success always occurs in private, and failure in full view.)



Re: Tomcat, Timer and TimerTask question

2006-07-20 Thread Vinu Varghese

Hi,
 What is the main for ? , Once u have main , why u need tomcat to run 
this ?


Pls let me know how u are running this ?

Cheers
Vinu

Cameron wrote:

Hello

Just trying to schedule a batch email run using Timer and TimerTask framework on
Tomcat 4.1.31

Found the following example from http://www.javapractices.com/Topic54.cjp

Trying trying to test this scheduling mechanism first just by printing to
System.out first... (see below) 


It does not seem to run. Code compiles properly in eclipse.

Does tomcat require any libraries... There is no errors in tomcat either.


public final class schedEmailUser extends TimerTask {

public static void main (String[] args) {
TimerTask schedEmail  = new schedEmailUser();

Timer timer = new Timer();
Calendar date = Calendar.getInstance();
date.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);
date.set(Calendar.HOUR, 12);
date.set(Calendar.MINUTE, 10);
date.set(Calendar.SECOND, 0);
date.set(Calendar.MILLISECOND, 0);
	   
	timer.scheduleAtFixedRate(new schedEmailUser(), date.getTime(), 1000 * 60 *

60 * 24);
System.out.println(In main Sending email...);
timer.cancel();
  }

public void run(){
  System.out.println(In run Sending email...);
  }
} //end schedEmailUser


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





--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org

-
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: starting with windows service

2006-07-13 Thread Vinu Varghese

Hi Sk,
Have u tried with the windows binary of tomcat ?

- regards
Vinu

Shinya Koizumi wrote:
Any word on this problem. 


SK.

- Original Message - 
From: Shinya Koizumi [EMAIL PROTECTED]

To: users@tomcat.apache.org
Sent: Monday, July 10, 2006 3:22 PM
Subject: starting with windows service


Recently i take over project developed by servlet.
Currently whenever start the web server I have to
click on the mycompany.bat file in CATALINA_HOME/bin folder

mycompany.bat===
@echo off
rem set CATALINA_OPTS=-Djava.security.debug=all

cd %CATALINA_HOME%\bin\
catalina start -security
pause
===

This way is different from how the tomcat starts up when starting
tomcat from windows menu? How can I change the configuration so that
the tomcat is going to start up just like when i click on mycompany.bat
file?

SK





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



  


--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: Getting the date/time from the client

2006-07-11 Thread Vinu Varghese

SK,
That javascript prints the current client time. But I want the client 
time with the request.

The scenario is :

I have a index.jsp

%@ page language=java contentType=text/html; charset=ISO-8859-1
   pageEncoding=ISO-8859-1%
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1
titleInsert title here/title
/head
body
Client time : a href=clienttime.htm Click/a
/body
/html

and  a servlet that can take the client time (Hoping to :-) ) which is 
mapped to 'clienttime.htm'


   protected void doGet(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {
  
   response.setContentType(text/plain);
  
   long time = request.getDateHeader(Date); // Hoping to get the 
client date.
  
   PrintWriter out = response.getWriter();
 
   out.println(Server time  + new Date());
  
   out.println(Client time (long)  + time);
  
   out.println(Client time  + new Date(time));
  
   }



Is there any way to do this (get the client time from the request) ? 


Or Am I trying to do a dumb thing ? ;)

Thanks  Regards
Vinu




Shinya Koizumi wrote:

Vinu
Yeah, you are right about it, I can't get getDateHeader working.

For the solution one, I have setup like this for jsp and worked.

%@ page session=false %
html
   head
   meta http-equiv=Content-Type content=text/html; 
charset=iso-8859-1

   title%= application.getServerInfo() %/title
/head
body
Current Time:
%
out.println(SCRIPT LANGUAGE=JavaScript);
out.println(var currentTime = new Date(););
out.println(document.write(currentTime.toLocaleString()););
out.println(/SCRIPT);
out.println(/HEAD);
%
/body
/html

SK
- Original Message - From: Vinu Varghese [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, July 11, 2006 1:24 AM
Subject: Re: Getting the date/time from the client



Thanks SK,

I tried the second solution , but request.getDateHeader(Date) 
returns -1 .


Also I didn't understand the first solution ( embed a javascript), Can u
pls elaborate that.

Thanks and regards
Vinu

Shinya Koizumi wrote:

One is to embed javascript in the output

out.println(HTMLHEADtitleJavaScriptExample/title);
out.println(SCRIPT LANGUAGE=JavaScript);
out.println(function back() {);
out.println(history.back(-1););
out.println(});
out.println(/SCRIPT);
out.println(/HEAD);


The other solution is to get it from the request header.

protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
long l = request.getDateHeader(Date);
Date d = new Date(l);
System.out.println(d);
}

SK
- Original Message - From: Vinu Varghese [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, July 11, 2006 12:51 AM
Subject: Getting the date/time from the client



Hi All,

I am doing a project in jsp/servlet and tomcat, which requires to take
the client date/time (ie the time of the machine the browser is
running). Is there any way to accomplish this ?

Thanks  regards
Vinu



--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org






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





--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org






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





--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: forwarding to a remote host

2006-07-11 Thread Vinu Varghese

Hi Zohar
Check this 
http://marc.theaimsgroup.com/?l=tomcat-userm=108568149602563w=2 
http://marc.theaimsgroup.com/?l=tomcat-userm=108568149602563w=2


Hope this helps

- Regards
Vinu

Zohar wrote:

Hello list,
I have a servlet that handles POST requests. Sometimes the request needs to be 
forwarded to a different servlet, which may be running on a different server. 
What is the best way to do that?
Thanks,
Zohar.
  


--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: Getting the date/time from the client

2006-07-11 Thread Vinu Varghese

Thanks Pid,

I think that is a good idea
 Let me try

- Regards
Vinu

Pid wrote:

you can get a Locale from the request, and adjust the time accordingly.

Vinu Varghese wrote:
  

but that still sets the server date - yes ?

Pid wrote:


write a filter that activates for that url, and get the time just before
you doFilter. if you need to, you can pass the date obj as an attribute

Date date = new Date();
hreq.setAttribute(thisIsTheDate, date);
chain.doFilter(hreq, hres);



Jon Wingfield wrote:
 
  

The HTTP spec (rfc2616) says clients should only send the Date header
with http messages with body content (POST, PUT) and even then it's
optional.

Try adding a date string as a parameter on your GET request which your
servlet can then parse from request.getParameter(...).

One way to do this would be to change your link to a form with a hidden
input field for your date value. Add an onclick/onsubmit javascript
handler to your form button which sets the value of the hidden field to
the current date in a format that your servlet will understand.

for example:

function setDate(form) {
  form.dateField.value = new Date().toString();
}


Example assumes a hidden form input field with name dateField.

HTH,

Jon

Vinu Varghese wrote:
   


SK,
That javascript prints the current client time. But I want the client
time with the request.
The scenario is :

I have a index.jsp

%@ page language=java contentType=text/html; charset=ISO-8859-1
   pageEncoding=ISO-8859-1%
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
html
head
meta http-equiv=Content-Type content=text/html;
charset=ISO-8859-1
titleInsert title here/title
/head
body
Client time : a href=clienttime.htm Click/a
/body
/html

and  a servlet that can take the client time (Hoping to :-) ) which is
mapped to 'clienttime.htm'

   protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
 response.setContentType(text/plain);
 long time = request.getDateHeader(Date); // Hoping to
get the client date.
 PrintWriter out = response.getWriter();
out.println(Server time  + new Date());
 out.println(Client time (long)  + time);
 out.println(Client time  + new Date(time));
 }


Is there any way to do this (get the client time from the request) ?
Or Am I trying to do a dumb thing ? ;)

Thanks  Regards
Vinu




Shinya Koizumi wrote:
 
  

Vinu
Yeah, you are right about it, I can't get getDateHeader working.

For the solution one, I have setup like this for jsp and worked.

%@ page session=false %
html
   head
   meta http-equiv=Content-Type content=text/html;
charset=iso-8859-1
   title%= application.getServerInfo() %/title
/head
body
Current Time:
%
out.println(SCRIPT LANGUAGE=JavaScript);
out.println(var currentTime = new Date(););
out.println(document.write(currentTime.toLocaleString()););
out.println(/SCRIPT);
out.println(/HEAD);
%
/body
/html

SK
- Original Message - From: Vinu Varghese [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, July 11, 2006 1:24 AM
Subject: Re: Getting the date/time from the client


   


Thanks SK,

I tried the second solution , but request.getDateHeader(Date)
returns -1 .

Also I didn't understand the first solution ( embed a javascript),
Can u
pls elaborate that.

Thanks and regards
Vinu

Shinya Koizumi wrote:
 
  

One is to embed javascript in the output

out.println(HTMLHEADtitleJavaScriptExample/title);
out.println(SCRIPT LANGUAGE=JavaScript);
out.println(function back() {);
out.println(history.back(-1););
out.println(});
out.println(/SCRIPT);
out.println(/HEAD);


The other solution is to get it from the request header.

protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
long l = request.getDateHeader(Date);
Date d = new Date(l);
System.out.println(d);
}

SK
- Original Message - From: Vinu Varghese
[EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Tuesday, July 11, 2006 12:51 AM
Subject: Getting the date/time from the client


   


Hi All,

I am doing a project in jsp/servlet and tomcat, which requires to
take
the client date/time (ie the time of the machine the browser is
running). Is there any way to accomplish this ?

Thanks  regards
Vinu



--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org


  
  

-

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






--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org

Re: Error in tomcat, after logging in to the Tomcat Administration page

2006-07-01 Thread Vinu Varghese

hi
Did u ever looked at the logs - catalina.out ?

- regards
Vinu

[EMAIL PROTECTED] wrote:

Hi everyone,

 After logging in to the Tomcat Administration page, I 
am getting Error status as 500 in right frame for every link on left 
frame, which represetns some internal sever error, I am not getting 
why it has happend so, If any one can tell me the resone why it has 
happend so along with solution I am gald and please to take that,


Thanks in Advance,

Regards.

_
Sexy, sultry, sensuous. - see why Bipasha Basu is all that and more. 
Try MSN Search http://server1.msn.co.in/Profile/bipashabasu.asp



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





--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: how to get value of select

2006-03-24 Thread Vinu Varghese

Hi

use

request.getParameterValues(String paramName)

HTH
Vinu

Prashant Saraf wrote:


Hello all,
can some one tell me how to get value of select if it is multipal
selected.
like this
select name=txtrole size=2 multiple=multiple

--
Cup of Java + Suger of XML = Secure WebApp

 



--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: Hellp me Don't know whats the problem

2006-03-23 Thread Vinu Varghese

Hi,
Put your bean class in a package rather than putting it in the default 
package and access it

like

jsp:useBean id=station class=pack1.stationname scope=page/

where pack1 is the new package

HTH
Vinu

Kasim wrote:


Yes

-Original Message-
From: Allistair Crossley [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 23, 2006 5:34 PM
To: Tomcat Users List
Subject: RE: Hellp me Don't know whats the problem

Does your WEB-INF/classes folder have the class

stationname.class

i.e in the default package?

And then is it imported with a page directive in the JSP?

-Original Message-
From: Kasim [mailto:[EMAIL PROTECTED]
Sent: 23 March 2006 12:04
To: Tomcat Users List
Subject: RE: Hellp me Don't know whats the problem

This is the code generating the problem

html
head
titleSouthern Command/title
jsp:useBean id=station class=stationname scope=page/



script

function show(this_layer)
{
   this_layer.style.visibility='visible';
}

function hide(this_layer)
{
   this_layer.style.visibility='hidden';
}

function make_bold(x)
{
   x.style.fontSize='11px';
}

function make_normal(x)
{
   x.style.fontSize='10px';
}

function openwindow(stationcode)
{   window.close();
   window.open('station_index.jsp?stationcode='+stationcode,
'Station',
'resizable=yes,scrollbars=no,toolbar=yes,status=yes,dependant=no')

}

/script

style
div.for_layer1
{
   z-index:2;
   visibility:hidden;
   position:absolute;
   top:120px;
   left:155px;
}
table.for_layer1
{
   border:2px solid #99;
   color:#FF;
   font-family:arial;
   font-size:10px;
   cursor:hand;
   background-color:#ced6ff
}
tr.for_layer1
{
   background-color:#BB3D00;
}

div.for_layer2
{
   z-index:2;
   visibility:hidden;
   position:absolute;
   top:150px;
   left:155px;
}

table.for_layer2
{
   border:2px solid #006600;
   color:#FF;
   font-family:arial;
   font-size:10px;
   cursor:hand;
   background-color:#ced6ff;
}

tr.for_layer2
{
   background-color:#006600;
}

div.for_layer3
{
   z-index:2;
   visibility:hidden;
   position:absolute;
   top:90px;
   left:155px;
}

table.for_layer3
{
   border:2px solid #663399;
   color:#FF;
   font-family:arial;
   font-size:10px;
   cursor:hand;
   background-color:#ced6ff;
}

tr.for_layer3
{
   background-color:#99;
}

div.for_layer4
{
   z-index:2;
   visibility:hidden;
   position:absolute;
   top:205px;
   left:155px;
}

table.for_layer4
{
   border:2px solid #FF0033;
   color:#FF;
   font-family:arial;
   font-size:10px;
   cursor:hand;
   background-color:#FF;
}

tr.for_layer4
{
   background-color:#990033;
}

/style



/head

body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0
!--Describing layers--

%
   Vector chennailist=station.getData(chennai);
   Vector jaipurlist=station.getData(jaipur);
   Vector hyderabadlist=station.getData(hyderabad);
   Vector punelist=station.getData(pune); %



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---
/FONT FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLACK
Disclaimer:  The information contained within this e-mail is confidential
and may be privileged. This email is intended solely for the named recipient
only; if you are not authorised you must not disclose, copy, distribute, or
retain this message or any part of it. If you have received this message in
error please contact the sender at once so that we may take the appropriate
action and avoid troubling you further.  Any views expressed in this message
are those of the individual sender.  QAS Limited has the right lawfully to
record, monitor and inspect messages between its employees and any third
party.  Your messages shall be subject to such lawful supervision as QAS
Limited deems to be necessary in order to protect its information, its
interests and its reputation.

Whilst all efforts are made to safeguard Inbound and Outbound emails, QAS
Limited cannot guarantee that attachments are virus free or compatible with
your systems and does not accept any liability in respect of viruses or
computer problems experienced.
/FONT


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 



--


Vinu

Re: error in tomcat

2006-03-13 Thread Vinu Varghese
Just change the 'default' to something else like default.test , and 
check whether the error repeats


David Delbecq wrote:


Nope, downgrading to 2.3 servlet specs does not solve problem.

foo shyn a écrit :

 


Maybe u could try the this DOCTYPE tag instead

!DOCTYPE web-app

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN

http://java.sun.com/dtd/web-app_2_3.dtd;



hope this helps

F.S.

- Original Message - 


From: David Delbecq [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, March 13, 2006 4:48 PM
Subject: Re: error in tomcat




   


line 43 contains
/servlet
It corresponds to the following section:

  *servlet*
  *servlet-name*default*/servlet-name*
  *servlet-class*
  org.apache.catalina.servlets.DefaultServlet
  */servlet-class*
  *init-param*
  *param-name*debug*/param-name*
  *param-value*0*/param-value*
  */init-param*
  *init-param*
  *param-name*listings*/param-name*
  *param-value*true*/param-value*
  */init-param*
  *load-on-startup*1*/load-on-startup*
  */servlet*

There is no other default section in the web.xml. The whole web.xml is
as follow:

*web-app* xmlns=http://java.sun.com/xml/ns/j2ee;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee
  

 


http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;


   


  version=2.4**

*display-name*Welcome to Tomcat*/display-name*
*description*
   Welcome to Tomcat
*/description*

/!-- JSPC servlet mappings start --/
  *servlet*
  *servlet-name*default*/servlet-name*
  *servlet-class*
  org.apache.catalina.servlets.DefaultServlet
  */servlet-class*
  *init-param*
  *param-name*debug*/param-name*
  *param-value*0*/param-value*
  */init-param*
  *init-param*
  *param-name*listings*/param-name*
  *param-value*true*/param-value*
  */init-param*
  *load-on-startup*1*/load-on-startup*
  */servlet*
  *servlet*
  *servlet-name*org.apache.jsp.index_jsp*/servlet-name*
  *servlet-class*org.apache.jsp.index_jsp*/servlet-class*
  */servlet*
  *servlet-mapping*
  *servlet-name*default*/servlet-name*
  *url-pattern*/*/url-pattern*
  */servlet-mapping*
  *servlet-mapping*
  *servlet-name*org.apache.jsp.index_jsp*/servlet-name*
  *url-pattern*/index.jsp*/url-pattern*
  */servlet-mapping*

/!-- JSPC servlet mappings end --/

*/web-app*


Any idea why this webapp fail?
Regards?


Alan Chaney a écrit :

  

 


One place to start might be in your web.xml file. About half way down
you have a message saying



   


Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException: addChild:  Child name 'default' is
not unique
 at
o

  

 


And at the end you have



   


 at
  

 


org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)


   


Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
SEVERE: Occurred at line 43 column 15
Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)



  

 


Does 'line 43 column 15' refer to something relevant in web.xml?

Regards

Alan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



   




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 



--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: error in tomcat

2006-03-13 Thread Vinu Varghese
default is a valid servlet name, but it is already defined in 
$CATALINA_HOME/conf/web.xml. So we can't use that name in our web.xmls

Just check the introduction section inside that file.
:-)

- Regards
Vinu

David Delbecq wrote:


Yes, renaming  this does solve the problem, but i can't see in servlet
specs where it's stated 'default' is not a valid logical name for a servlet.

Vinu Varghese a écrit :

 


Just change the 'default' to something else like default.test , and
check whether the error repeats

David Delbecq wrote:

   


Nope, downgrading to 2.3 servlet specs does not solve problem.

foo shyn a écrit :



 


Maybe u could try the this DOCTYPE tag instead

!DOCTYPE web-app

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN

http://java.sun.com/dtd/web-app_2_3.dtd;



hope this helps

F.S.

- Original Message -
From: David Delbecq [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, March 13, 2006 4:48 PM
Subject: Re: error in tomcat




 

   


line 43 contains
/servlet
It corresponds to the following section:

 *servlet*
 *servlet-name*default*/servlet-name*
 *servlet-class*
 org.apache.catalina.servlets.DefaultServlet
 */servlet-class*
 *init-param*
 *param-name*debug*/param-name*
 *param-value*0*/param-value*
 */init-param*
 *init-param*
 *param-name*listings*/param-name*
 *param-value*true*/param-value*
 */init-param*
 *load-on-startup*1*/load-on-startup*
 */servlet*

There is no other default section in the web.xml. The whole web.xml is
as follow:

*web-app* xmlns=http://java.sun.com/xml/ns/j2ee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee

   
 


http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;


 

   


 version=2.4**

*display-name*Welcome to Tomcat*/display-name*
*description*
  Welcome to Tomcat
*/description*

/!-- JSPC servlet mappings start --/
 *servlet*
 *servlet-name*default*/servlet-name*
 *servlet-class*
 org.apache.catalina.servlets.DefaultServlet
 */servlet-class*
 *init-param*
 *param-name*debug*/param-name*
 *param-value*0*/param-value*
 */init-param*
 *init-param*
 *param-name*listings*/param-name*
 *param-value*true*/param-value*
 */init-param*
 *load-on-startup*1*/load-on-startup*
 */servlet*
 *servlet*
 *servlet-name*org.apache.jsp.index_jsp*/servlet-name*
 *servlet-class*org.apache.jsp.index_jsp*/servlet-class*
 */servlet*
 *servlet-mapping*
 *servlet-name*default*/servlet-name*
 *url-pattern*/*/url-pattern*
 */servlet-mapping*
 *servlet-mapping*
 *servlet-name*org.apache.jsp.index_jsp*/servlet-name*
 *url-pattern*/index.jsp*/url-pattern*
 */servlet-mapping*

/!-- JSPC servlet mappings end --/

*/web-app*


Any idea why this webapp fail?
Regards?


Alan Chaney a écrit :


   

 


One place to start might be in your web.xml file. About half way down
you have a message saying

  
 

   


Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException: addChild:  Child name
'default' is
not unique
at
o


   
 


And at the end you have

  
 

   


at

   
 


org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)


 

   


Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
SEVERE: Occurred at line 43 column 15
Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
start
SEVERE: Marking this application unavailable due to previous
error(s)




   
 


Does 'line 43 column 15' refer to something relevant in web.xml?

Regards

Alan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  
 
   


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




   
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 
   



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 



--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: error in tomcat

2006-03-13 Thread Vinu Varghese

Hi
Just check this : 
http://www.dm.fh-muenchen.de/tomcat-docs/architecture/startup/serverStartup.txt, 

it says , first it will process the default web.xml (conf/web.xml) then 
the applications web.xml (WEB-INF/web.xml)


- Regards
Vinu

David Delbecq wrote:


Content in webapp should take precedence on content of
$CATALINA_HOME/conf/web.xml as stated in servlet specs about implicit
mappings. At least that's how i understand the specs. The container is
allowed to add it's own servlet and mapping but, except for implicit
mappings defined in specs, they should not interfere with the webapp.


Vinu Varghese a écrit :

 


default is a valid servlet name, but it is already defined in
$CATALINA_HOME/conf/web.xml. So we can't use that name in our web.xmls
Just check the introduction section inside that file.
:-)

- Regards
Vinu

David Delbecq wrote:

   


Yes, renaming  this does solve the problem, but i can't see in servlet
specs where it's stated 'default' is not a valid logical name for a
servlet.

Vinu Varghese a écrit :



 


Just change the 'default' to something else like default.test , and
check whether the error repeats

David Delbecq wrote:

 

   


Nope, downgrading to 2.3 servlet specs does not solve problem.

foo shyn a écrit :



   

 


Maybe u could try the this DOCTYPE tag instead

!DOCTYPE web-app

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN

http://java.sun.com/dtd/web-app_2_3.dtd;



hope this helps

F.S.

- Original Message -
From: David Delbecq [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Monday, March 13, 2006 4:48 PM
Subject: Re: error in tomcat






 

   


line 43 contains
/servlet
It corresponds to the following section:

*servlet*
*servlet-name*default*/servlet-name*
*servlet-class*
org.apache.catalina.servlets.DefaultServlet
*/servlet-class*
*init-param*
*param-name*debug*/param-name*
*param-value*0*/param-value*
*/init-param*
*init-param*
*param-name*listings*/param-name*
*param-value*true*/param-value*
*/init-param*
*load-on-startup*1*/load-on-startup*
*/servlet*

There is no other default section in the web.xml. The whole
web.xml is
as follow:

*web-app* xmlns=http://java.sun.com/xml/ns/j2ee;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee

  
 


http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd;




 

   


version=2.4**

*display-name*Welcome to Tomcat*/display-name*
*description*
 Welcome to Tomcat
*/description*

/!-- JSPC servlet mappings start --/
*servlet*
*servlet-name*default*/servlet-name*
*servlet-class*
org.apache.catalina.servlets.DefaultServlet
*/servlet-class*
*init-param*
*param-name*debug*/param-name*
*param-value*0*/param-value*
*/init-param*
*init-param*
*param-name*listings*/param-name*
*param-value*true*/param-value*
*/init-param*
*load-on-startup*1*/load-on-startup*
*/servlet*
*servlet*
*servlet-name*org.apache.jsp.index_jsp*/servlet-name*
*servlet-class*org.apache.jsp.index_jsp*/servlet-class*
*/servlet*
*servlet-mapping*
*servlet-name*default*/servlet-name*
*url-pattern*/*/url-pattern*
*/servlet-mapping*
*servlet-mapping*
*servlet-name*org.apache.jsp.index_jsp*/servlet-name*
*url-pattern*/index.jsp*/url-pattern*
*/servlet-mapping*

/!-- JSPC servlet mappings end --/

*/web-app*


Any idea why this webapp fail?
Regards?


Alan Chaney a écrit :


 
   

 


One place to start might be in your web.xml file. About half way
down
you have a message saying

 
 

   


Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
SEVERE: Parse error in application web.xml
java.lang.IllegalArgumentException: addChild:  Child name
'default' is
not unique
   at
o

  
 


And at the end you have

 
 

   


   at
  
 


org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)




 

   


Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
applicationWebConfig
SEVERE: Occurred at line 43 column 15
Mar 10, 2006 2:03:42 PM org.apache.catalina.startup.ContextConfig
start
SEVERE: Marking this application unavailable due to previous
error(s)



  
 


Does 'line 43 column 15' refer to something relevant in web.xml?

Regards

Alan

-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


   


-

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  
 


-
To unsubscribe, e-mail

Re: Image files accesable for a servlet in Tomcat, but they were accesible in Java standalone program

2006-02-22 Thread Vinu Varghese

Add this to the CATALINA_OPTS

-Djava.awt.headless=true

in your catalina.sh

Wentink, Marc wrote:


Dear Sirs,

I have got a servlet that generates a pdf file from a xml file, the servlet 
runs in Tomcat, and it runs fine as long as in the xml file does not contain 
references to images. At the moment the xml contains an image I got this error:

java.lang.NoClassDefFoundError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at 
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
   at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1041)
   at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1031)
   at net.antonius.pdfgen.TypeImageMap.parse(Unknown Source)


The strange thing is that if I ran the old program as an independent java 
program, I did not got the error. Hence the java environment provided by Tomcat 
misses some classes?

Thanks in advance for any suggestions.

Marc 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 



--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: starting tomcat with opts - FC4

2006-02-19 Thread Vinu Varghese

Put that in catalina.sh file , $CATALINA_HOME/bin

kevin wrote:


Where is the best place of RHFC5 to add the code to start tomcat5 with 
CATALINA_OPTS=-Djava.awt.headless=true

Would it be in the dtomcat5 script in /usr/bin

Thanks

KP
 



--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: Tomcat 5.5.9 + JDK 1.4.2 + Freebsd 5.3

2006-01-31 Thread Vinu Varghese

Hi Mike
Thank you.
But what is difference in using startup.sh and catalina.sh start. The 
startup.sh simply calls catalina.sh with start .


- Regards
Vinu

Mike Sabroff wrote:


and shutdown.sh

Vinu Varghese wrote:


Hi,

I am running Tomcat 5.5.9 with JDK 1.4.2 on freebsd 5.3. I use the 
'catalina.sh start' to start tomcat. Now it creates a bunch of java 
processes - which can be seen using ps command. Now the problem is 
when I shutdown tomcat with command 'catalina.sh stop' , still there 
exists some java processes that doesn't get killed. Why is this so ?


- Regards
Vinu





--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org



Re: Cannot transform and load jsp file with Tomcat under Eclipse

2006-01-31 Thread Vinu Varghese
(Bootstrap.java:275)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jan 31, 2006 5:13:51 PM org.apache.catalina.core.StandardContext 
loadOnStartup

SEVERE: Servlet /MusarAvicha threw load() exception
java.lang.ClassNotFoundException: showlogin_jsp
  at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1352) 

  at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198) 

  at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1034) 

  at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
  at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3915) 

  at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4176)
  at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

  at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
  at 
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
  at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
  at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
  at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:700)

  at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

  at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Jan 31, 2006 5:13:51 PM org.apache.catalina.startup.ContextConfig 
applicationWebConfig
INFO: Missing application web.xml, using defaults only 
StandardEngine[Catalina].StandardHost[localhost].StandardContext[]

Jan 31, 2006 5:13:51 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jan 31, 2006 5:13:52 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jan 31, 2006 5:13:52 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/47  config=null
Jan 31, 2006 5:13:52 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Jan 31, 2006 5:13:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1110 ms
===





I have followed (or more appropriately adapted) the instructions on

Tomcat home page, and I have a smooth startup of tomcat within the ide.
This is after updating my WEB-INF/web.xml with appropriate servlet
markups.

My problems at this stage are:
1) The output class files are written to the .deployables output
directory and not to the directory I choose to work. Trying to remove
this setting under project/properties/java build path doesn't help, and
this setting is reassigned when I do my next build.

Should I be doing my development work under this directory?

If so: how do I see my jsp/html files under eclipse as it seems the .
as the first character of the directory name prevents it from appearing
in the eclipse project explorer?

If not: how do I set so my output classes are written to where I want
to? The documentation talks about a context setting, but how and where
exactly do I put it, (if this is what I am missing)?

2) Is there anything else I need to do for the servlet engine to hear
my servlet?

Thank you very much in advance for your help.

David Ziants





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



__ NOD32 1.1372 (20060119) Information __

This message was checked by NOD32 antivirus system.
http://www.eset.com





--


Vinu Varghese
[EMAIL PROTECTED]
www.x-minds.org