Re: Context fails to load with Filter

2006-05-09 Thread Mike Sabroff
)
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

:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
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:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
May 9, 2006 11:46:33 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
May 9, 2006 11:46:33 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
May 9, 2006 11:46:34 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 9, 2006 11:46:34 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
May 9, 2006 11:46:34 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/25  config=null
May 9, 2006 11:46:34 AM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
May 9, 2006 11:46:34 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2637 ms

thanks for your help.



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Context fails to load with Filter

2006-05-09 Thread Mike Sabroff

Disreguard my previous statement as I am obviously brain deadsorry

Mike Sabroff wrote:
If this is truly what your web.xml looks like, you are missing the end 
tag '' in the following line

filter-classcom.affinity.tasc.filters.AuthenticateFilter

Jason Beck wrote:


Hello list,

I have written my first filter and think that I have it right, but 
when I
try to start Tomcat 5.5.9 after applying the necessary configuration 
changes

to web.xml, the Context that the Filter is in fails to start.   Perhaps
someone can tell me what I may have done wrong.

-- web.xml --
   filter
  filter-nameAuthenticateFilter/filter-name
  filter-classcom.affinity.tasc.filters.AuthenticateFilter
/filter-class
   /filter
   filter-mapping
  filter-nameAuthenticateFilter/filter-name
  servlet-nameIndex/servlet-name
   /filter-mapping

   servlet
  servlet-nameIndex/servlet-name
  servlet-classcom.affinity.tasc.core.Index/servlet-class
   /servlet
   servlet-mapping
  servlet-nameIndex/servlet-name
  url-pattern/Index/url-pattern
   /servlet-mapping

-- end web.xml --

-- Filter code --

package com.affinity.tasc.filters;

import java.io.IOException;
import javax.servlet.*;
import javax.servlet.http.*;
import com.affinity.tasc.beans.SiteUserBean;

public abstract class AuthenticateFilter implements Filter {

private FilterConfig fc;

public void doFilter(ServletRequest req, ServletResponse res,
FilterChain chain)
throws IOException, ServletException {

/* Make sure we are dealing with HTTP */
if (req instanceof HttpServletRequest) {
HttpServletRequest request =
(HttpServletRequest)req;
HttpServletResponse response =
(HttpServletResponse)res;

HttpSession session = request.getSession(false);

if 
(request.getParameter(Authenticate).equals(1))

{

try {
SiteUserBean user = new
SiteUserBean();
user.setUsername(
request.getParameter(username));
user.setPassword(
request.getParameter(password));

int authed = 
user.getUserAuthed();


/* Successful authentication */
if (authed  0) {

session.setAttribute(user,

user);
}

session.setAttribute(authed,
authed);

} catch (NullPointerException nx) {
nx.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}

/* Continue filtering */
chain.doFilter(req, res);
}

public void init(FilterConfig filterConfig) throws 
ServletException

{
this.fc = filterConfig;
}

public void destroy() {
this.fc = null;
}
}

-- end filter code --

Here is the output from catalina.out when I try to start tomcat with 
this

filter installed...

May 9, 2006 11:46:31 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
May 9, 2006 11:46:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1270 ms
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.9
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
May 9, 2006 11:46:32 AM org.apache.catalina.core.StandardContext 
filterStart

SEVERE: Exception starting filter AuthenticateFilter
java.lang.InstantiationException
at
sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(
InstantiationExceptionConstructorAccessorImpl.java:30)
at 
java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(
ApplicationFilterConfig.java:212)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(

ApplicationFilterConfig.java:308)
at org.apache.catalina.core.ApplicationFilterConfig.init(
ApplicationFilterConfig.java:79)
at org.apache.catalina.core.StandardContext.filterStart(
StandardContext.java:3540)
at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4110)
at 
org.apache.catalina.core.ContainerBase.start

Re: User WEb Applications

2006-05-04 Thread Mike Sabroff
You might try writing some script they can use that will create a 
symlink in the webapps directory to their home directory:


#!/bin/csh
# do whatever needed to write to directory and read or prompt for user 
directory

# maybe some other logging or setup ???
cd /usr/local/tomcat/webapps
#create symlink to userdir
ln -s /home/user/dirname dirname
#wait for tomcat to load
sleep 10
exit

Then tomcat will load this as a webapp providing ofcourse that the 
directory structure the link is pointing to is a true webapp (containing 
WEB-INF, WEB-INF/lib, WEB-INF/classes) directories


Ofcourse, if you are using apache on port 80, and using jk, you will 
have to write a script to add the jk-mount  as well


Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379



Darryl Miles wrote:

Robert Frank wrote:

I'm trying to set up the standalone server such that users can
install and deply webapplications in their home directory (this
is for a lab).


Heh...  Container stability during development for a single user is 
hard enough than to have to worry about what your other lab students 
are doing at the same time.


The general get-out when you first find a problem that isn't an 
obvious programming error is to restart the container and re-test the 
situation.


Maybe you'd be better off teaching students how to use Eclipse and 
manage their own Tomcat instance from within it.  But to use Eclipse 
you'd need PCs of half decent spec with a little more RAM on board.




Sorry I don't have an answer to your request, and whatever I do say 
has more bearing on TC 5.5.x than 5.0.x.  But my understanding is that 
there is a single deployment directory folder per virtual hostname.


So if you wanted to give each student/computer their own workspace 
maybe you could setup DNS to point lab01host001.tomcat.mydomain.com to 
the same IP address.


Then setup Host directives in conf/server.xml like:

Host name=lab01host001.tomcat.mydomain.com 
appBase=/opt/website/lab01host001.tomcat.mydomain.com/tomcat/webapps

workDir=/opt/website/lab01host001.tomcat.mydomain.com/tomcat/work

unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
/Host



To setup each lab users workspace use:

mkdir /opt/website/lab01host001.tomcat.mydomain.com/tomcat
mkdir /opt/website/lab01host001.tomcat.mydomain.com/tomcat/work
mkdir /opt/website/lab01host001.tomcat.mydomain.com/tomcat/webapps

# chown the work folder to the same user the TC JVM instance runs as:
chown jakarta.jakarta 
/opt/website/lab01host001.tomcat.mydomain.com/tomcat/work

chmod 775 /opt/website/lab01host001.tomcat.mydomain.com/tomcat/work

# chown the webapps folder to the same user as the student that is 
allowed to deploy, but also give the TB JVM instalce group permission 
to write too.
chown student0123.jakarta 
/opt/website/lab01host001.tomcat.mydomain.com/tomcat/webapps

chmod 775 /opt/website/lab01host001.tomcat.mydomain.com/tomcat/webapps



# deploy your webapp and access as: 
http://lab01host001.tomcat.mydomain.com/
cp ROOT.war 
/opt/website/lab01host001.tomcat.mydomain.com/tomcat/webapps/ROOT.war


# or under a context and access as: 
http://lab01host001.tomcat.mydomain.com/student0123/
cp student0123.war 
/opt/website/lab01host001.tomcat.mydomain.com/tomcat/webapps/student0123.war 



# You may wish to create inside your WAR the file META-INF/context.xml 
for any context specific parameters.  See TC documentation.



You'd still need to give the students the ability to shutdown and 
restart the container themselves, it really is a necessary requirement 
to successfully develop with TC.  More so if you are a student and 
don't understand anything to begin with and need to learn from making 
as many mistakes as possible.




HTH

Darryl



Following the instructions of the documentation (for 5.0),
I found the topic 'User Web Applications' in the host container
documentation. The doc states:

'If a user home directory has been set up for a user named
 craigmcc, then its contents will be visible from a client browser
 by making a request to a URL like:'

which is the behaviour I get. I.e., it will only list the contents of
the directories and return files if selected. The doc then goes on:

'Successful use of this feature requires recognition of the
 following considerations:
   Each user web application will be deployed with characteristics
   established by any DefaultContext element you have configured
   for this Host.'

Which tells me that user applications are *deployed* - but how?
No matter what applictaion I put into the user's webapp directory
(given as attribute to the Listener tag), it is never deployed, but if I
put it into the webapp of the tomcat home, then it will be deployed.

The logs state:

catalina.out:

4-May-06 11:50:37 AM org.apache.catalina.startup.ContextConfig 
applicationConfig()
INFO: Missing application web.xml, using defaults only 
StandardEngine[Catalina].StandardHost[localhost

Re: Setting up to use 443

2006-04-13 Thread Mike Sabroff

run as root else nothing less than 1024

David Shaw wrote:
I have troubled setting up server.xml to use port 443 - always report 
that The page cannot be displayed in IE.  8080 and 8443 works fine 
though.  Using the same setting in server.xml and just changing the 
port to use 8443 instead of 443, I can access using 
https://localhost:8443.  Any idea what I need to set in order to get 
443 working?


Thanks,

David

_
Don�t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Help with filter affecting Chinese words in request parameters

2006-04-09 Thread Mike Sabroff
So, what are the differences on the machines that have the problem vs 
the ones that don not??


roy tang wrote:

Hi,

I'm new to this list, hope someone here can help. :)

We're developing a webapp that should be able to accept Chinese input. We
also have a filter installed in the webapp for some auditing that we need to
do per request that's processed. However, we've found that when we submit a
form with Chinese inputs, the Chinese chars end up saved to the database as
HTML-escaped entities. (i.e. #32610; or such).

So we backtrace, and we find that removing the filter from web.xml fixes the
problem. We debug through the doFilter() method of our filter, but we find
that at the start of the method, request.getParameter(PARAM_NAME) already
shows the input as HTML-escaped entities.

The weird thing is, this doesn't happen on all our Tomcat
installations...each of our developers has a local Tomcat running, and it
only happens for one or two. But it also happens on our Test (QA) server,
such that our testing team always encounters the problem.

Is there any particular language or encoding setting that I should be
checking?

Thanks a lot :D

Roy
  


--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: What is the best way to send back a file as http response?

2006-04-02 Thread Mike Sabroff

You can

Kanishka Liyanage wrote:

Why cannot you forward your response to the file URL
if the file is available within the web application
directory. 


response.sendRedirect(File Location);

Otherwise you can use the servlet output stream

Good Luck
-Kanishka


--- Meryl Silverburgh [EMAIL PROTECTED]
wrote:

  

Hi all,

Can you please tell me what is the best way to send
back a file as
http response in a Servlet?
Should I use NIO?
Or I just use the normal, open the file, read it a
chuck at a time and
write that to the servlet output stream?

Thank you.




-
  

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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: getInputStream() fails intermittently

2006-03-31 Thread Mike Sabroff

You need to bounce tomcat occasioally

We server a lot of content and we bounce tomcat every morning. Might not 
need it that often, but better safe than sorry.


We use tomcat 4.xx


Ramadhenu, Giridhar (STSD) wrote:


Hello,



I am encountering IOException while getting input stream using
getInputStream() method on URLConnection class while sending data to
Tomcat. Error is pasted below.



XML Regular I/O Exception - while getting the input stream from
http://12.34.56.78:80/myApp/servlet/com.myComp.xml.CollectorServlet |
original message - 2006-03-04 22:20:05.54 java.io.IOException: Server
returned HTTP response code: 500 for URL:
http://12.34.56.78:80/myApp/servlet/com.myComp.xml.CollectorServlet;



The problem occurs after continuous operation of Tomcat server for about
one month. But server does not show any exception when client encounters
this problem.



Please find the client code below.



URLConnection httpConnection = null;



//Code to open connection to URL





httpConnection.setDoOutput(true);

httpConnection.setDoInput(true);

httpConnection.setUseCaches(false);

httpConnection.setRequestProperty(Content-Type,
text/xml;charset=UTF-8);

httpConnection.setRequestProperty(Authorization, authString);



//Code to get the output stream





outStream.write(..);

outStream.flush();

outStream.close();



try

{

inStream = httpConnection.getInputStream();

}

catch (IOException e)

{

String sMessage = XML Regular I/O Exception - while getting the input
stream from  +

url.toString() +  | original message -  + (e);

throw new XMLExceptionIO(sMessage);

}





Thanks in advance.

Giridhar.



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Does Tomcat provide support for PHP scripts

2006-03-31 Thread Mike Sabroff

fraught operation??

A lot of people seem to have problems with this, but I have had few problems 
with it.
A bit time consuming to set up initially, but there is enough documentation to 
do it fairly easily.
I think that the reason there seems to be so many posts here is because some 
people are not willing to spend a reasonable amount of time in the process 
before posting fer help.

Mike



Peter Crowther wrote:
From: Ikonne, Ike [mailto:[EMAIL PROTECTED] 
Does Tomcat provide support for php scripting language?



Yes, you could build PHP as a CGI program and run it using Tomcat's CGI
support, but this would be pretty slow.  There is no facility that I
know of to integrate PHP with Tomcat.  Otherwise, as Markus suggests,
run Apache, run PHP inside Apache and use a connector to link Apache and
Tomcat.  Be aware that connecting Apache and Tomcat seems to be a
somewhat fraught operation!

- Peter

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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat, Security and RMI

2006-03-28 Thread Mike Sabroff
I have not used RMI since '98 and I know it has gone through some 
changes since then. It use to be that RMIC created stubs and skeletons 
fore marshalling the data and class structure. (That is not the case 
anymore is it?)
But, when I did this...even though the stub was on one side and th 
skeleton on the other, I had to have at least one of them on both client 
and server side in order for it to work.
This is probably not helpful, but my point isis this a Tomcat 
problem or a java problem??


Mike S.

Gary Pennington wrote:

Hi,

Environment:

OS: Solaris 10 on client and server
Java: java full version 1.5.0_06-b04
Tomcat: 5.5.15

I'm trying make one of my servlets act as an RMI client with an RMI server
running on a different host.

I have a problem though and I can't seem to make much progress, so maybe
someone can help me.

If I invoke Tomcat with the following additional options, I can make my
servlet/RMI client deploy:

-Djava.rmi.server.codebase=http://webserver/builds2/garypen/jars/jscmc.jar 
http://webserver/builds2/garypen/jars/jscma.jar;

The application executes fine until it tries to make an RMI call to the server
which involves transferring an object from the client to the server. At this
point, if I make sure that the client jar file is in my server's class path
then everything works fine, since the server loads the local class definition.
However, this is not ideal and I don't want to have to load client jar files
on my server. Rather, I would like to use the RMI capability to load the
class definition from my client. This is the problem I'm trying to solve.

I modified my catalina policy file so that:

//Gary's nasty hack to get round all security :)
grant codeBase file:${catalina.home}/webapps/repository/- {
permission java.security.AllPermission;
};

You'll note that I'm trying to give every permisssion to my servlets.
I'll fix this later and only give specific permissions. I'm just using
this whilst I figure out what is going on.

I start up my server with the -security option to make sure the policy
file is used to set the security environment.

However, when the call to the server is made, I get the following errors:

Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested 
exception is:
java.lang.ClassNotFoundException: access to class loader denied
blah, bla, blah...
Caused by: java.security.AccessControlException: access denied 
(java.io.FilePermission 
/home/garypen/dev/dist/apache-tomcat-5.5.15/webapps/repository/WEB-INF/classes/-
 read)

(This is just a snippet of the full trace log, the rest appears to be
fairly unhelpful detail.)

So, this is a big puzzle to me. I'm giving everything under
blah/webapps/repository all permissions and yet Tomcat is failing to
load the class that I want to send to my RMI server because of a
permissions problem.

Has anyone got any idea what the problem could be?

On a related note. When you modify a policy file and use the '-' sign to
indicate all jars and classes under this codebase have the policies applied.
Does this include jar files with different extensions, e.g. .war or .ear?

It doesn't seem that it does at the moment, so I'm unpacking my .war
files. Again, this is a bit unsatisfactory, so I'd rather not do this.
How do I set policy against .war files?

Thanks for any pointers,

Gary
  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: multiple sessions being created with Tomcat Proxy and session is null

2006-03-28 Thread Mike Sabroff

Do you have any mappings for your servlet in a web.xml?

I have always mapped my servlets in my web.xml, then made a JkMount the 
same as that mapping


i.e.
?xml version=1.0 encoding=ISO-8859-1?

!DOCTYPE web-app
   PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
   http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
   servlet
   servlet-nameadmincontrol/servlet-name
   servlet-classcom.bla.servlet.AdminServlet/servlet-class
   load-on-startup4/load-on-startup
   /servlet

   servlet-mapping
   servlet-nameadmincontrol/servlet-name
   url-pattern/admincontrol/*/url-pattern
   /servlet-mapping

/web-app

then in httpd.conf

JkMount /*.jsp local
JkMount /webappname/* local
JkMount /admincontrol/* local

then when accessing through these mappings, the session is the same session

The problem is, if you don't have some kind of mapping in apache to 
match a webapp class in tomcat

apache will access the jsp though a session at /
and the webapp servlet at /servlet or whatever so you have 2 different 
sessions
Doing it the way I described, then accessing through the 
/webappname/main.jsp where the action of the form is 
/webappname/admincontrol insures using the same session.


Now, there may be better ways of doing this as the support persons at 
tomcat would know better than me, but this works for me.


The thing is (I believe this to be true) that if you don't create the 
correct mappings for both servers, you can get 2 different sessions as 
you have 2 different servers. After all, a session is a connection 
between a client and a server.







[EMAIL PROTECTED] wrote:

 Greetings:

I am looking for help with an issue that I cannot find the answer to on the
web or list-archives. My issue is this:

I use Tomcat 5.5 and jdk 1.5 on linux. 


1)I have a custom jsp tag that puts string data in a Session attribute when
the jsp page loads (via pageRequest.getSession().setAttribute(var,value).

2)The jsp page is a form that submits to data to a servlet. The servlet
retrieves the data request.getSession().getAttribute(var) to compare it
with data from another form field.

Under normal deployement with tomcat running on port 8080 and the app at
context /myapp (http://localhost:8080/myapp) the servlet is able to
retrieve the var out of the session and read it.

The problem-issue is when I setup the apache/tomcat proxy (http not
modjk).

When I access the application with Apache on port 80 through the proxy on
port 8082 (http://myhost.localhost/myapp), the
request.getSession().getAttribute(var) within the servlet returns null.
When I access the application throgh the proxied port
(http://myhost.localhost:8082/myapp) the session attribute is not null.

Also, when I access the application through port 80, the Tomcat manager
webapp reports double the amount of sessions being created.


Here is the connector setting in sever.xml
Connector port=8082
maxThreads=150 minSpareThreads=25 maxSpareThreads=75
enableLookups=false acceptCount=100
connectionTimeout=2
proxyPort=80 disableUploadTimeout=true /

Here is the host setting in server.xml
Host name=myhost.localhost appBase=myhost unpackWARs=true
autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
Aliasmyhost.localhost.org/Alias

Context path= docBase=/usr/local/tomcat/myhost /

Context path=/manager debug=0 privileged=true
docBase=${catalina.home}/server/webapps/manager /

/Host

Here is the apache virtual host proxy configuration:
VirtualHost *:80
ServerName myhost.localhost
DocumentRoot /usr/local/tomcat/myhost
Options Indexes

ProxyPass / http://myhost.localhost:8082/myhost/
ProxyPassReverse / http://myhost.localhost:8082/myhost/

/VirtualHost


Does anyone know what is going on here? any help is greatly appreciated.
Thanks.
Bill


mail2web - Check your email from the web at
http://mail2web.com/ .



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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: InputBuffer and Posting Data

2006-03-27 Thread Mike Sabroff

This IS a java question.
If post.Conn is a URLConnection you opened from the applet (looks that 
way) then you need to call setDoInput()
and setDoOutput() methods (basically read/write) to make it a post. 
There is also a setUseCaches() (true or false)
to control caching, default is true (reload button). Most of my 
statement is from the Javadocs.




Vikram Goyal wrote:


Hi all,



I am trying to post some data via an applet to a JSP running on Tomcat
5.5.16. In my applet code, I am setting the following:



postConn.setRequestMethod(POST);



postConn.setRequestProperty(Content-Length, (buf.length) + );



postConn.setRequestProperty(Content-Type, application/octet-stream);



Now, on the server side, I am retrieving my actual data by using the
ServletInputStream gathered from request.getInputStream() method. The
connection also contains some query parameters, which I am retrieving on
the server side using request.getParameter().



Now, irrespective of the size of the data that I post, the
ServletInputStream is truncating the data to a size of 8K (for files
greater than that size, smaller files are the received correctly). I
understand, after going through the source code, that the Request class
uses the InputBuffer class for reading from this stream and the default
size of the buffer for this operation is 8K. However, I would have
expected this buffer to grow, if the data was larger than this default,
but this is not happening.



Is there a setting to increase this buffer automatically that I need to
set? Alternatively, is there a setting that I need to set that will set
the default to a larger value? I have searched and searched and cannot
find anything.



Thanks,

Vikram







--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Classloader question

2006-03-24 Thread Mike Sabroff

SHORTCUT!

Fran Varin wrote:

aah...now I understand the reason it sounded foreign to me. We are a Windows
shop so, I'm not sure we have the same capability. 
--

View this message in context: 
http://www.nabble.com/Classloader-question-t1332679.html#a3573581
Sent from the Tomcat - User forum at Nabble.com.


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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Classloader question

2006-03-24 Thread Mike Sabroff
I run cygwin (a linux like application/environment) on my windows box at 
home. When I create a symbolic link in that system and look at it frm 
the windows side of it, it IS a shortcut.


try itI think it may work, but I am not sure that tomcat will see it 
as cygwin does. Curious.


Fran Varin wrote:
...as in Windows shortcut...I'll have to look into that possibility. 
--

View this message in context: 
http://www.nabble.com/Classloader-question-t1332679.html#a3573968
Sent from the Tomcat - User forum at Nabble.com.


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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Undeploy

2006-03-10 Thread Mike Sabroff
Undeploy should really say Remove or Delete because that is what it 
does. It removes the webapp from disk!!! Lucky for you, permissions 
won't allow that.


Mike

P.S. I found out the hard way

Artamonov, Juri wrote:

Hi All,

I have Tomcat 4.1.29 installed and I tried to used manager's undeploy
command but this is doesn't work saying Cannot remove document base for
path 

I know and I see in the archive that a lot of dicussions was here on
mailing list but I still not sure if this bug or limitatiomn or it's
fixed.

Could you please tell me if this fixed and for what version in Tomcat4x?

Thanks in advance, 
 Juri.


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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: TRACE messages

2006-03-10 Thread Mike Sabroff
Well, I know you are all sitting on the edge of your chairs waiting for 
the solution to this...


2 make a long story short:

Failure to thoroughly search the documentation led me to install a 
DEBUG version of connectorj.
The tarball has 2 connectorj jar files, one which is a debug version and 
in my haste, i used the wrong one.
No wonder no one else ever saw this problem! I must be the dumbest guy 
in the world since I am the only one who ever had this happen.


Thanks, and I hope I didn't waste anybody's time

Mike

Mike Sabroff wrote:
Just in case someone else comes across this error, I found this code 
in the mysql connectorj

Jdk14Logger.java:
  private void logInternal(int level, Object msg, Throwable 
exception) {

   StringBuffer msgBuf = new StringBuffer();
   msgBuf.append(new Date().toString());
   msgBuf.append( );
   switch (level) {case FATAL:
   msgBuf.append(FATAL: );
   break;
   case ERROR:
   msgBuf.append(ERROR: );
   break;
   case WARN:
   msgBuf.append(WARN: );
   break;
   case INFO:
   msgBuf.append(INFO: );
   break;
   case DEBUG:
   msgBuf.append(DEBUG: );
   break;
   case TRACE:
   msgBuf.append(TRACE: );
   break;
   }
  So..whoever said it was something in my webapps 
was right.


Mike Sabroff wrote:



I am not sure if this is a Tomcat issue or a MySql issue.
I get these trace messages in catalina.out:
Wed Mar 08 07:48:48 CST 2006 TRACE:
about 800 to 1000 lines of them, each time I connect to the database.
I have googled and searched but can find nothing on the cause or the 
solution

except maybe to use log4j.

I have several versions of Tomcat 4.x  / 5.x and it happens in all cases
I don't really think it is a Tomcat issue, but was hoping someone 
else has experienced the

problem and could lead me in the right direction.

Any help would be appreciated.

Thanks,

Mike





--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Undeploy

2006-03-10 Thread Mike Sabroff
it does work. my answer is that whoever tomcat is running as does not 
have the permissions to remove or Undeploy the webapp. could be owner 
permissions, or if you are on windows it could be a protected archive or 
however windows does that sort of thing.


Mike - :-)

Artamonov, Juri wrote:

I don't see answer in your sentence.

What I need to use removeinstead of undeploy? This is a bug, this is
limitation, what is it, that undeploy doesn't work for Tomcat 4x
although documentation said that undeploy is used for ndeploying
applications?

-Original Message-
From: Mike Sabroff [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 10, 2006 6:37 PM

To: Tomcat Users List
Subject: Re: Undeploy


Undeploy should really say Remove or Delete because that is what it 
does. It removes the webapp from disk!!! Lucky for you, permissions 
won't allow that.


Mike

P.S. I found out the hard way

Artamonov, Juri wrote:
  

Hi All,

I have Tomcat 4.1.29 installed and I tried to used manager's undeploy 
command but this is doesn't work saying Cannot remove document base 
for path 


I know and I see in the archive that a lot of dicussions was here on 
mailing list but I still not sure if this bug or limitatiomn or it's 
fixed.


Could you please tell me if this fixed and for what version in 
Tomcat4x?


Thanks in advance, 
 Juri.


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

  



  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Disappointed

2006-03-09 Thread Mike Sabroff
I have read and sometimes participated in these postings and answers in 
hopes of either finding answers to problems I am having or might have in 
the future and found it a well organized and contained group.
I am disappointed though, in that I have posted a question in hopes of 
help with a problem I am experiencing and notta zilch zap. No response 
of any kind. So I posted it again and whappo,  forget you. No answer. Is 
it common to have to post several times before getting a response? Is 
there a time delay because of the numerous amounts of threads? Is it 
something I did?
I see a lot of really dumb things going through the postings and most of 
the time I try to remember that I once new nothing of Tomcat too, and 
that I still don't know very much and that no question is too dumb. Is 
my question too dumb?
Have I been Black-Listed because I had a cruel response on one of those 
days that I just couldn't hold it back anymore?


WASSUP???

Mike

--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Disappointed

2006-03-09 Thread Mike Sabroff
Thanks for the responses to this post! And by the way, funny how I got 
answers to my original post after posting this...amaizing, and I am 
truly sincere in thanking you for the link.

http://www.catb.org/~esr/faqs/smart-questions.html

good stuff!

Mike

Leon Rosenberg wrote:

On 3/9/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:
  

Hehe, thanks for boiling my response down to a single line Leon! :) LOL




You're welcome :-)
saw the post, pasted the link, hit reply. If I'd had language skills
so far developed as yours I would probably write the long explanation
lines too. But my skills are far beyond yours, so I just throwed in
the link :-)

  

Frank



Leon

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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: TRACE messages

2006-03-09 Thread Mike Sabroff
Thanks Dave, I will scour my webapps to see if this is true, since I do 
have some common jars to all my webapps


Mike

David Smith wrote:

Given the extreme lack of any info to base a diagnosis on, I'd say you
have a library in your webapp generating this to standard out.  My MySQL
install does not do this.

--David

Mike Sabroff wrote:

  

I am not sure if this is a Tomcat issue or a MySql issue.
I get these trace messages in catalina.out:
Wed Mar 08 07:48:48 CST 2006 TRACE:
about 800 to 1000 lines of them, each time I connect to the database.
I have googled and searched but can find nothing on the cause or the
solution
except maybe to use log4j.

I have several versions of Tomcat 4.x  / 5.x and it happens in all cases
I don't really think it is a Tomcat issue, but was hoping someone else
has experienced the
problem and could lead me in the right direction.

Any help would be appreciated.

Thanks,

Mike





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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: TRACE messages

2006-03-09 Thread Mike Sabroff
actually not using log4j, just thought it might be a way to redefine 
what I log.


thx

Antonio Petrelli wrote:

Mike Sabroff ha scritto:



I am not sure if this is a Tomcat issue or a MySql issue.
I get these trace messages in catalina.out:
Wed Mar 08 07:48:48 CST 2006 TRACE:
about 800 to 1000 lines of them, each time I connect to the database.
I have googled and searched but can find nothing on the cause or the 
solution

except maybe to use log4j.
If you are using log4j, maybe you put a debug level to your root 
logger.
Put the correct logging level to the root logger (I suggest at least 
INFO) and your desired level to your own logger.

Ciao
Antonio


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



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: TRACE messages

2006-03-09 Thread Mike Sabroff
Just in case someone else comes across this error, I found this code in 
the mysql connectorj

Jdk14Logger.java:
  private void logInternal(int level, Object msg, Throwable 
exception) {

   StringBuffer msgBuf = new StringBuffer();
   msgBuf.append(new Date().toString());
   msgBuf.append( );
   switch (level) {case FATAL:
   msgBuf.append(FATAL: );
   break;
   case ERROR:
   msgBuf.append(ERROR: );
   break;
   case WARN:
   msgBuf.append(WARN: );
   break;
   case INFO:
   msgBuf.append(INFO: );
   break;
   case DEBUG:
   msgBuf.append(DEBUG: );
   break;
   case TRACE:
   msgBuf.append(TRACE: );
   break;
   }
  
So..whoever said it was something in my webapps was right.


Mike Sabroff wrote:



I am not sure if this is a Tomcat issue or a MySql issue.
I get these trace messages in catalina.out:
Wed Mar 08 07:48:48 CST 2006 TRACE:
about 800 to 1000 lines of them, each time I connect to the database.
I have googled and searched but can find nothing on the cause or the 
solution

except maybe to use log4j.

I have several versions of Tomcat 4.x  / 5.x and it happens in all cases
I don't really think it is a Tomcat issue, but was hoping someone else 
has experienced the

problem and could lead me in the right direction.

Any help would be appreciated.

Thanks,

Mike



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Trace messages when connecting to the database (MySql)

2006-03-08 Thread Mike Sabroff

I am not sure if this is a Tomcat issue or a MySql issue.
I get these trace messages in catalina.out:
Wed Mar 08 07:48:48 CST 2006 TRACE:

about 800 to 1000 lines of them, each time I connect to the database.
I have googled and searched but can find nothing on the cause or the 
solution

except maybe to use log4j.

Any help would be appreciated.

Tanks,

Mike


--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



TRACE messages

2006-03-08 Thread Mike Sabroff



I am not sure if this is a Tomcat issue or a MySql issue.
I get these trace messages in catalina.out:
Wed Mar 08 07:48:48 CST 2006 TRACE:
about 800 to 1000 lines of them, each time I connect to the database.
I have googled and searched but can find nothing on the cause or the 
solution

except maybe to use log4j.

I have several versions of Tomcat 4.x  / 5.x and it happens in all cases
I don't really think it is a Tomcat issue, but was hoping someone else 
has experienced the

problem and could lead me in the right direction.

Any help would be appreciated.

Thanks,

Mike

--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Linux JNI ClassLoad

2006-03-03 Thread Mike Sabroff
I think that this can be done with the environment variable 
LD_LIBRARY_PATH which will point to your C object file.


This is an uneducated guess, but worth a try.

Mike

Shannon Scott wrote:

Greetings,
I have been trying to use some Native C code in one of my applications.
I have it working, but after it runs once it fails.  
The release-notes mention that:

To avoid this problem, place classes that load native libraries outside
of the web application, and ensure that the loadLibrary() call is
executed only once during the lifetime of a particular JVM.

From here:
http://tomcat.apache.org/tomcat-5.0-doc/class-loader-howto.html
I read:
For classes and resources that must be shared across all web
applications, 
place unpacked classes and resources under
$CATALINA_BASE/shared/classes, 
or place JAR files containing those classes and resources under 
$CATALINA_BASE/shared/lib.


When I place class files into my $CATALINA_BASE/shared/classes, I get
the 
'NoClassDefFoundError' error.  I have also tried a package in

$CATALINA_BASE/shared/lib.

Has anyone successfully resolved this issue on the Linux platform?
Where is the config that tells tomcat to load classes from
$CATALINA_BASE/shared/classes?  It seems like mine is not configured
correctly because they don't seem to get loaded.
Any pointers or advice is greatly appreciated.
Take care.
S




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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: jdbc tomcat

2006-03-01 Thread Mike Sabroff
When I do this from a program or bean or servlet, i make the connection 
a true url:


url=jdbc:mysql://localhost:3306/everycitizen?username=everyuserpassword=%

I dont know if it is different in the server.xml as I have never tried this, 
but why should it be?

I have been fooled by thinking logically b4 and I know that things are 
different in different setups, but it's worth a try, huh?

Mike



David McMinn wrote:

  I'm running Tomcat 5.5 and trying to do a very simple jdbc connection a 
single table. I have set up tomcat to run on port 8070 and the mysql database 
on the default 3306 port. It's the connection statement in the jsp that is 
blowing up - If I take that out, it works fine.
   
  I'm getting page not found or 
Cannot create JDBC driver of class '' for connect URL 'null' .



  

Steps I have done

1) Created a DB called everycitizen and a table called test with a
column called pk. Created user everyuser w/ a password and granted Select 
privileges to that user.
2) Copied the mysql-connector-java-3.1.12-bin.jar into
$CATALINA_HOME/common/lib.
3)Added the following to the $CATALINA_HOME/conf/server.xml 

  
  
javax.sql.Datasource name=jdbc/WroxTC5 
  

driverClassName=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/everycitizen username=everyuser password=% 
maxActive=20 maxIdle=3
maxWait=100/

4) Added the following to the
$CATALINA_HOME/webapps/jsp-examples/WEB-INF web.xml file at the bottom
just before the entry after the last env-entry.


jdbc/WroxTC5
javax.sql.DataSource
Container


5) Added the JDBCTest.jsp file and the errorpg.jsp file to
$CATALINA_HOME/webapps/jsp-examples/wroxjdbc directory. I created the
wroxjdbc folder. The JDBC Test is:





import=java.sql.*,
  

javax.sql.*,
java.io.*,
javax.naming.InitialContext,
javax.naming.Context %

JDBC JNDI Resource Test


InitialContext initCtx = new InitialContext();
  

DataSource ds =
(DataSource)initCtx.lookup(java:comp/env/jdbc/WroxTC5);
Connection conn = ds.getConnection();
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery(select * from test;);
%






while (rset.next())
  

{
%



rset.close();
  

stmt.close();
conn.close();
initCtx.close();
%



  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Cannot create JDBC driver of class '' for connect URL 'null'

2006-03-01 Thread Mike Sabroff

Isn't that the old mysql driver?? I thought the new one is:
org.gjt.mm.mysql.Driver
or do I have it backwards?

David McMinn wrote:


Tomcat Server 5.5.15 - I searched for solutions and most mention a 
Context element in the server.xml.


I only have a DefaultContext tag within with I have my resouce tag:

DefaultContext
 Resource
auth=Container
driverClassName=com.mysql.jdbc.Driver
logAbandoned=true
maxActive=100
maxIdle=30
maxWait=1
name=jdbc/wroxTC5
password=everypass
removeAbandoned=true
removeAbandonedTimeout=300
type=javax.sql.DataSource

url=jdbc:mysql://localhost:3306/everycitizen?autoReconnect=true

username=everyuser
/
 /DefaultContext

The actual failure is on the connection = ds.getConnection(); line in 
the jsp if that helps any.


SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC 
driver of class '' for connect URL 'null'
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:780)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
 at 
org.apache.jsp.wroxjdbc.JDBCTest_jsp._jspService(org.apache.jsp.wroxjdbc.JDBCTest_jsp:83)

 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at 
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:831)
 at 
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:639)
 at 
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1203)

 at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getDriver(Unknown Source)
 at 
org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:773)

 ... 21 more



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat 5.5 Possible Context Question

2006-02-28 Thread Mike Sabroff
Do you have the servlet definitions and mappings in the web.xml for the 
apps?
Also remember (i think) seeing something about tomcat 5 not using the 
invoker servlet by default anymore. If that is true, it would need to be 
uncommented in the web.xml file in the conf directory


Scott Purcell wrote:


Running Tomcat 5.5.15 on Win 2000.



Originally we were running Tomcat 4.x?. So in order to upgrade our
administrator loaded 5.5.15 and copied (copied) the webapps from the 4.x
to the 5.5.15.



There are currently four sites running, and I can hit the index.html for
each context. But I cannot invoke any of the servlets within the webapp.
After checking the 4.x server.xml, I recalled that we put the context
entries there for these four sites.



But as I am reading the 5.5.15 docs, it looks like putting them there is
frowned upon. I would like to try and get this resolved, and possibly
someone ran into this same thing? Is a context entry required somewhere
in order to fire up servlets?





Thanks,



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat 5.5 Possible Context Question

2006-02-28 Thread Mike Sabroff
I saw the response from chuckif the invoker servlet is a security 
risk, and only the mappings need to be done, then that is the way you 
should do it.


Mike Sabroff wrote:
Do you have the servlet definitions and mappings in the web.xml for 
the apps?
Also remember (i think) seeing something about tomcat 5 not using the 
invoker servlet by default anymore. If that is true, it would need to 
be uncommented in the web.xml file in the conf directory


Scott Purcell wrote:


Running Tomcat 5.5.15 on Win 2000.



Originally we were running Tomcat 4.x?. So in order to upgrade our
administrator loaded 5.5.15 and copied (copied) the webapps from the 4.x
to the 5.5.15.



There are currently four sites running, and I can hit the index.html for
each context. But I cannot invoke any of the servlets within the webapp.
After checking the 4.x server.xml, I recalled that we put the context
entries there for these four sites.



But as I am reading the 5.5.15 docs, it looks like putting them there is
frowned upon. I would like to try and get this resolved, and possibly
someone ran into this same thing? Is a context entry required somewhere
in order to fire up servlets?





Thanks,





--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Problem with jar files in Tomcat 5.X

2006-02-28 Thread Mike Sabroff
Are your samples part of a package? If not, then they are assigned the 
default package and that may not be the same as the package assigned 
when they are in the classes directory. Use a package statement if you 
are not already.


Devireddy, Nagendra Reddy (STSD) wrote:

Hi ,

I have installed Tomcat 5.0 and trying to access the sample servlet
examples.
My directory structure is like this

tomcat installation dir/webapps/sample is the directory where I have
my files

tomact installation dir/webapps/sample/index.html
tomact installation dir/webapps/sample/WEB-INF/web.xml
tomact installation dir/webapps/sample/WEB-INF/lib/sample.jar

When I try accessing index.html .. Its throwing classdefinationNotFound
error .. But that class exists in the sample.jar 

But When I unjarred and kept all the classes under 


tomact installation dir/webapps/sample/WEB-INF/classes/*.class

Then its working perfectly fine ..

Can some one please help me in resolving this issue ..

Thanks in advance,
Nagendra


  


--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: JNDI Datasource Problem

2006-02-19 Thread Mike Sabroff
maxThreads=150
tcpNoDelay=true
maxHttpHeaderSize=8192
/Connector
Connector
port=8443
scheme=https
secure=true
minSpareThreads=25
connectionTimeout=6
clientAuth=false
keystorePass=?MtHw7!
connectionLinger=-1
serverSoTimeout=0
keystoreFile=D:\FYPCode\keystore
maxSpareThreads=75
maxThreads=150
tcpNoDelay=true
maxHttpHeaderSize=8192
sslProtocol=TLS
/Connector
Connector
port=8009
redirectPort=8443
protocol=AJP/1.3
/Connector
Engine
defaultHost=localhost
name=Catalina
  Realm className=org.apache.catalina.realm.UserDatabaseRealm/

  Host
  appBase=webapps
  name=localhost
Valve className=org.apache.catalina.valves.AccessLogValve
  fileDateFormat=-MM-dd
  prefix=localhost_access_log.
  suffix=.txt/
Valve className=org.apache.catalina.valves.FastCommonAccessLogValve
  fileDateFormat=-MM-dd
  prefix=localhost_access_log.
  suffix=.txt/

Context path=/DBTest docBase=DBTest
debug=5 reloadable=true crossContext=true

!-- maxActive: Maximum number of dB connections in pool. Make sure you
 configure your mysqld max_connections large enough to handle
 all of your db connections. Set to 0 for no limit.
 --

!-- maxIdle: Maximum number of idle dB connections to retain in pool.
 Set to -1 for no limit.  See also the DBCP documentation on this
 and the minEvictableIdleTimeMillis configuration parameter.
 --

!-- maxWait: Maximum time to wait for a dB connection to become available
 in ms, in this example 10 seconds. An Exception is thrown if
 this timeout is exceeded.  Set to -1 to wait indefinitely.
 --

!-- username and password: MySQL dB username and password for dB connections  
--

!-- driverClassName: Class name for the old mm.mysql JDBC driver is
 org.gjt.mm.mysql.Driver - we recommend using Connector/J though.
 Class name for the official MySQL Connector/J driver is 
com.mysql.jdbc.Driver.
 --

!-- url: The JDBC connection url for connecting to your MySQL dB.

 The autoReconnect=true argument to the url makes sure that the
 mm.mysql JDBC Driver will automatically reconnect if mysqld closed the
 connection.  mysqld by default closes idle connections after 8 hours.
 --

  Resource name=jdbc/TestDB auth=Container type=javax.sql.DataSource
   maxActive=100 maxIdle=30 maxWait=1
   username=javauser password=pilks2 
driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://localhost:3306/fyptest?autoReconnect=true/

/Context
  /Host
/Engine
  /Service
/Server

  



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


--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: context error

2006-02-14 Thread Mike Sabroff
Then do that

jacky wrote:

 hi,
 When i add a Context in the server.xml, an error occurs:

 Apache Tomcat/4.1.31
 Catalina.start: LifecycleException: Context startup failed due to
 previous errors
 LifecycleException: Context startup failed due to previous errors
 at
 org.apache.catalina.core.StandardContext.start(StandardContext.java:3578)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
 at
 org.apache.catalina.core.StandardService.start(StandardService.java:450)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
 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:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)
 Stopping service Tomcat-Standalone
 Catalina.stop: LifecycleException: Coyote connector has not been started
 LifecycleException: Coyote connector has not been started
 at
 org.apache.coyote.tomcat4.CoyoteConnector.stop(CoyoteConnector.java:1296)
 at org.apache.catalina.core.StandardService.stop(StandardService.java:499)
 at org.apache.catalina.core.StandardServer.stop(StandardServer.java:2178)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:494)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
 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:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

 If i remove the added context, tomcat will start.
 In fact, i rearrange the directories, i don't know if this will impact
 on the Context. If i put all directories under $CATALINA_HOME, tomcat
 will work well with the Context.

 $CATALINA_HOME/bin/
 shared/
 server/

 $CATALINA_BASE/bin/
 conf/
 webapps/
 logs/
 work/

 Context is as following:
 Context path=/test docBase=test reloadable=true /

 Best Regards.
 jacky


-- 
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Robots cannot read JSP?

2006-02-11 Thread Mike Sabroff

Scott,
Your assessment is incorrect!  First off, curl doesn't read html pages, 
it does a get or post to a url just as though you clicked it in your 
browser (and a lot of other things you can do with curl). Second off, it 
is not the jsp that is the problem, it is the javascript as Tim said, 
and the lack of links.


Mike

David Smith wrote:
I doubt the problem is with curl not being able to read files other 
than .htm or .html. The problem is only browsers execute javascript. 
Think of curl or the search engines as a browser without javascript 
enabled.  What would you get in IE or Firefox if you disabled javascript?


-- David

Scott Purcell wrote:

Tim,
Thanks a lot for the info. I got to thinking, and tried invoking curl
from my box on the url, and see exactly what you saw. The js screwing
things up.

So I decided to run curl on different pages, and I came to the
conclusion that only htm, or html pages show up via curl?

Does anyone think that the robots are just like curl, and that they can
only read HTML files?

Thanks for all, I know this is a bit off topic ...and I hope I don't
hack anyone off.

Thanks
Scott

-Original Message-
From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Friday, February 10, 
2006 8:50 PM

To: Tomcat Users List
Subject: Re: Access log to see where robots go.

The problem is your home page, not robots.txt. When / is requested - the

following is served back, notice the javascript redirect: (the full file
is below)


   function invokeWebApp() {
 top.location.href =
http://www.theuniquepear.com/unique/index.jsp;;
   }

Search engines do not execute javascript are there are no links on the
page so search engines have no where to go. (Except someone else's 
site).


As much as I detest SEO companies, you might find it helpful to search
for one for some assistance.

html
head
   head
 titleThe Unique Pear | Unique Home Decor  Accessories/title
 meta name=description content=The Unique Pear is an

online b outique specializing in home decor  
accessories. Products include clocks, candl es, wall


decor, garden, lighting, bath and more.
 meta name=keywords content=The Unique Pear Timework clocks,
lamps, lamp  shades, candles, aroma, aroma 
difuser, wall
decor, wall scounces, wrought iron,  pitchers, 
bookstands,

jaqua bath products, candleholders
 meta name=description content=
meta name=keywords content=
  /head
body bgcolor=#FF

script language = javascript
   //!--
   function invokeWebApp() {
 top.location.href =
http://www.theuniquepear.com/unique/index.jsp;;
   }
   invokeWebApp();
   // --
/script

hello
/body
/html

-Tim

Scott Purcell wrote:
 

I have had trouble getting search engines to see my site. I built it


with struts, and use some tags from the index.html page to get business
logic, to finally get to my page. The url is
http://www.theuniquepear.com
 

Anyway, upon talking to some co-workers, they suggested I watch my


access log, so I can see what files they are indexing. I thought I had
the access log turned on for the site, and see when someone hits my web
site, but as far as the searchbots go, I only see this in my logs daily.
 

$ cat  localhost_access_log.2006-02-07.txt | less
67.15.16.30 - - [07/Feb/2006:03:44:55 -0600] GET /robots.txt


HTTP/1.0 404 985
 

67.15.16.30 - - [07/Feb/2006:03:46:21 -0600] GET / HTTP/1.0 200 844
67.15.16.30 - - [07/Feb/2006:03:51:57 -0600] GET /robots.txt


HTTP/1.0 404 985
 

62.114.208.233 - - [07/Feb/2006:03:52:42 -0600] GET


/unique/welcome.do?OVRAW=home%20decorating%20ideasOVKEY=home
 

62.114.208.233 - - [07/Feb/2006:03:52:44 -0600] GET


/unique/includes/siteWide.css HTTP/1.1 200 15402
 

62.114.208.233 - - [07/Feb/2006:03:52:44 -0600] GET


/unique/images/header_pear.jpg HTTP/1.1 200 11227
 

I see the entry for robots.txt, but I have no idea where they are


going, or what they are doing.
 

I turned on access log like this in the server.xml like so:
Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs  prefix=localhost_access_log.


suffix=.txt
 

 pattern=common resolveHosts=false/

And that is a snippet of the log from above.




-
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]



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379

Re: Problem with Tomcat and Java versions

2006-02-10 Thread Mike Sabroff
I have been looking at this for a couple of days, and it seems that 
maybe, it is a problem with the init.d startup. Sounds like it is 
pointing at the old tomcat and not the new until you run it manually and 
tell it tomcat 5. I am no systems person and I have many problems of 
this nature and it usually ends up being some file or symlink the I 
failed to remove or change with the new installation.


Letícia Álvares Barbalho wrote:

I think I could require that, but as a last try - if nothing else would
work...

But I really think this should be able to be solved without reinstalling.
The thing is that when I only restart tomcat (with /etc/init.d/tomcat5
restart) things start working fine! So i don't think it's a tomcat problem,
but a tomcat configuration problem. It means that maybe, even if
reinstalling it, it would remain.

On 2/10/06, Anoop kumar V [EMAIL PROTECTED] wrote:
  

Do you have the option of reinstalling Tomcat5  - so that Tomcat5 would
just
pick up java 5 and not have anything at all to do with java 1.4??

-Anoop

On 2/9/06, Let?cia ?lvares Barbalho [EMAIL PROTECTED] wrote:


Hey,

First of all thank you very much for the attention. I got some reading
about
it and found the jars [jaxp_parser_impl].jar and [xml-commons-apis].jar
under /usr/share/tomcat5/common/endorsed
I renamed them (so they could not be found) and restarted the server
  

(the


computer, I mean). Still, didn't work.

The problem remains just as it was before :(



On 2/9/06, Caldarale, Charles R [EMAIL PROTECTED] wrote:
  

From: Let?cia ?lvares Barbalho [mailto:[EMAIL PROTECTED]
Subject: Problem with Tomcat and Java versions

I was using java 1.4.2 here, and recently migrated to java 1.5.
Unfortunately, something probably is missing, 'cause I'm
having problems with Tomcat.
  

You don't say what Tomcat version you're using.  If you were running


5.5.xon JRE
  

1.4.2, there may in fact be something extra, not something


missing.  The


compatibility package that's required for 1.4.2 execution should be
removed when using JRE 5; the package consists of two jars in
common/endorsed, and these should be deleted.  Of course, this may or


may
  

not have anything to do with your problem, but it's something to try.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE


PROPRIETARY


MATERIAL and is thus for use only by the intended recipient. If you


received
  

this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

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




--
Let?cia ?lvares Barbalho
[EMAIL PROTECTED]


  

--
Thanks and best regards,
Anoop






--
Let?cia ?lvares Barbalho
[EMAIL PROTECTED]

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat out of memory

2006-02-10 Thread Mike Sabroff

At our company we bounce tomcat every morning via a cron job

Burak Y wrote:

Hi all;

I have a web site where 200 users online at average...These user overload 
started in these days...

Webpages seem to be loading sometimes then blank page comes(totaly blank no 
error messages)...I havent set any memory pool option on Tomcat or havent 
installed native software support of Tomcat...

Please give me an idea in this situation...What must i do?

thanks

Burak YILMAZ


-
 Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews,  more on new 
and used cars.
  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Getting directory in which app is deployed

2006-02-10 Thread Mike Sabroff
have your external process use a script that points to the webdirectory 
or if you use servlets, set an init param in the web.xml or in 
server.xml set an environment variable:

!-- Test entry for demonstration purposes --
   Environment name=simpleValue type=java.lang.Integer value=30/
or set a session variable in a jsp

Wojciech Ciesielski wrote:


Hi there,

I have one problem... We have to execute external Java process from 
JAR archive included in our web application directory. The problem is, 
that all system dependant functions are relative to tomcat home 
directory. And - when our application is deployed outside tomcat 
directory via server.xml context definition - we cannot find a way to 
get path to our web directory...


I am not sure if I am expressing myself clear, so example...

I have web app with structure:

someDir/web:
  WEB-INF
  META-INF
  dirWithArchive
externalProgram.jar
  ...

which is deployed OUTSIDE tomcat. I need to execute such code:

Process = new ProcessBuilder(java -jar 
some/path/to/someDir/web/dirWithArchive/externalProgram.jar.split(\\s+).start();


from within struts action or struts plugin. HOW can I find a path 
without specifying it manualy (it's problematic because of different 
environments we deploy our application to).


TIA

Wojciech Ciesielski
Software Mind | Where Quality Meets the Future

mailto:[EMAIL PROTECTED]
tel./fax: +48-12 6145170
http://www.softwaremind.pl



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: problems with iso-8859-2 characters sending with GET method

2006-02-10 Thread Mike Sabroff
why would you use  8859-2? why not use utf-8 and solve a lot of future 
problems?

Przemysław Klein wrote:

Hi All.

I use iso-8859-2 character encoding in my application. When I sent 
forms using GET metod I receive question marks instead of some 
iso-8859-2 characters. There is no problem when I send same form with 
same data using POST metdod - all letters look properly.


I set proper character set both for response and request.

Any suggerstions (Tomcat 5.5.12)?

Thanks in advance,
Przemek

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



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Help me

2006-02-09 Thread Mike Sabroff
Setting a classpath will not work as tomcat doesn't use it. At least 
that is what I have read and experienced.  putting you stuff in the 
CLASSPATH tomcat uses is a more likely scenario.

On my system I can only find it in one place:
/usr/local/server/webapps/manager/WEB-INF/lib/commons-fileupload-1.0.jar

Do you have the manager app installed?

Mir Kasim Ali wrote:

I am getting following error
*
org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
Only a type can be imported.
org.apache.commons.fileupload.DiskFileUpload resolves to a package

Generated servlet error:
Only a type can be imported. org.apache.commons.fileupload.FileItem
resolves to a package

An error occurred at line: 12 in the jsp file: /ProcessFileUpload.jsp
Generated servlet error:
DiskFileUpload cannot be resolved to a type

An error occurred at line: 12 in the jsp file: /ProcessFileUpload.jsp
Generated servlet error:
DiskFileUpload cannot be resolved to a type

An error occurred at line: 12 in the jsp file: /ProcessFileUpload.jsp
Generated servlet error:
FileItem cannot be resolved to a type

An error occurred at line: 12 in the jsp file: /ProcessFileUpload.jsp
Generated servlet error:
FileItem cannot be resolved to a type
WHEN I AM COMPILING THE A JSP FILE(REQESTING THE JSP FILE THROUGH BROWSER)
IN JSP I IMPORTED FOLLOWINGS
%@ page import=org.apache.commons.fileupload.DiskFileUpload%
%@ page import=org.apache.commons.fileupload.FileItem%
%@ page import=java.util.List%
%@ page import=java.util.Iterator%
%@ page import=java.io.File%

sO PLEASE HELP ME TO GET IT WORK.IS THIS ERROR IS DUE TO
CLASS PATH.IF YES THEN PLS SUGGEST ME WHAT PATH I SET FOR IT
  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Basic modjk + ssl + tomcat question

2006-02-08 Thread Mike Sabroff
Because ssl only works through https:// You should really split that 
up though


Bill Barker wrote:
Ed [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
  

Hi!

(modjk newbie)
I'm using a modjk+SSL config (I did not make myself) that is mapped to a 
single worker.

Behind, a single AJP connector recieves everything.
The question is : how do I know from my webapp that a request is using SSL 
or not.





Httpd/IIS/SunOne sends this information to Tomcat as part of the AJP/1.3 
protocol.  As a result, you can just use:

  if(request.isSecure()) {
  // SSL processing
  } else {
 // non-SSL processing
  }


  
I saw the secure configuration attribute to the connector, and this 
leads me to think I actually need 2 AJP connectors (one for each case) and 
thus 2 workers. Am I wrong? *
What's the right way of discriminating SSL and non-SSL requests within my 
webapp ?  Do I need to change my current Apache/modjk config?





Nope, the secure configuration attribute is ignored by the AJP/1.3 
connector (which causes a few complaints ;-).


  

Any advice welcome :)

cheers 






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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat + Linux Server + Jasper Reports problem

2006-02-08 Thread Mike Sabroff
Why not just set the environment variable to wherever the reports are 
expected to be produced.
In other words, if it is the macine you are on, use unix:0.0 if it is 
another machine, get ip of that machine and set the DISPLAY variable to 
whateverip:0.0 that is providing there is an XServer running on that box.


� wrote:

the Anyone?

On 2/7/06, Let�cia �lvares Barbalho [EMAIL PROTECTED] wrote:
  

Hello everyone,

I developed my webapp using netbeans and its embedded tomcat. I did some
reports in jasper reports and they were working just fine with the embedded
tomcat.

Then, I moved my app to the tomcat directory in the server (which is the
same machine) and the reports stopped working. They don't work locally in
the server and they don't work when accessing the app from any other client
machine (being linux or windows).

At first, I was getting the following error:

java.lang.InternalError: Can't connect to X11 window server using ':0.0
' as the value of the DISPLAY variable.
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
sun.awt.X11GraphicsEnvironment.clinit(X11GraphicsEnvironment.java:134)
java.lang.Class.forName0(Native Method)

java.lang.Class.forName(Class.java:141)

java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)



Through google I found out that I should use the catalina.sh file to set:

 JAVA_OPTS=-Djava.awt.headless=true



I did it, but it did not solve the problem. It changed the error. Now I
have:

java.awt.HeadlessException
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:121)
java.awt.Window.init(Window.java:274)
java.awt.Frame.init(Frame.java:401)
java.awt.Frame
.init(Frame.java:366)
javax.swing.JFrame.init(JFrame.java:154)
net.sf.jasperreports.view.JasperViewer.init(JasperViewer.java:144)

I tried google, but couldn't find a solution for it. Can someone help,
please? Other important data about my server:

leticia:/home/leticia # java -version
java version 1.4.2_06 Java(TM) 2 Runtime Environment, Standard Edition
(build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)
leticia:/home/leticia # echo $JAVA_HOME
/usr/lib/jvm/java
leticia:/home/leticia # echo $PATH
/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin

Since it's working fine in the netbeans embedded tomcat and not in my
linux server tomcat, I suppose the problem is in tomcat configuration. Both
tomcat's are in the same computer.

Any help is appreciated

Thanks

--
Let�cia �lvares Barbalho
[EMAIL PROTECTED]






--
Let�cia �lvares Barbalho
[EMAIL PROTECTED]

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Problem with setting up an SSL secure page

2006-02-08 Thread Mike Sabroff


What firewall are you using..if any? Is it on or off?

Parsons Technical Services wrote:

What is in the logs?



- Original Message - From: Mark Whitby [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Wednesday, February 08, 2006 11:02 AM
Subject: Problem with setting up an SSL secure page


Dear all,

I am currently designing a final year project for my University course 
and I am having problems getting a working SSL connection.  I have 
Tomcat set up and working fine, but when it comes to accessing a page 
over the https setup, I am having no luck.


Firstly a few technical details.  I am using Windows XP Home, with 
Internet Explorer 6.0.2900.2180.  I am using the latest Java 
installation, jdk 1.5.0_05 and so the JSSE comes installed with that.  
I'm using Tomcat 5.0, the latest installation available (it's only 
been installed on my system for the last few weeks).  I have McAffe 
Security Centre installed but the problem occurs even with this turned 
off.


Now the problem.  I have followed word by word the set up instructions 
in the Tomcat manual.  I have created the certificate and verified it 
using the command line.  I have altered the server.xml file to include 
the path keystorePath=D:/FYPCode/keystore where I have copied the 
keystore to. I've done everything.  Yet when I type 
https://localhost:8443 in the browser window I get nothing.  When 
using IE it takes ages to search for the page, then eventually I get 
This page cannot be displayed and in Mozilla I get a message after a 
couple of minutes saying the page has timed out and get left with a 
blank page.  So I can't load the page up at all.


I've tried everything I can think of to get it to work.  I have 3 
different books on this subject and I've followed the instructions in 
every one to try and get this to work.  Nothing has worked.  I did a 
Google search using as many different combinations of words I can 
think of but the only help I get is for Tomcat 3 and the old JSSE 
installation.  So I'm lost.  I did even think about installing the 
JSSE 1.3 to see if that had an effect, as I can't find any of the jar 
files that are mentionned in that area.  However, I felt it best to 
ignore that as it says.


So as you can see I've tried everything I can think of.  Nothing as 
worked. If anyone can help me I would be extremely grateful.


Many thanks

Mark Whitby
[EMAIL PROTECTED]


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



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Can we stop tomcat using System.exit(int)

2006-02-07 Thread Mike Sabroff
when you call System.exit(), you shut down the jvm. It is no wonder that 
tomcat gets hung.
you don't want to make your code specific to tomcat, but yet you want to 
shut tomcat down??
write a method that does a system call, kill -9 pid catalina.pid is a 
file containing the pid of the tomcat instance (found in CATALINA_HOME 
or wherever your environment is set to put in. If you switch servlet 
engines, this will still work with minor modifications. crude, but so is 
System.exit().


[EMAIL PROTECTED] wrote:

Hi,

My web application requires database pool connection while startup, when
it fails for any reason I need to stop the tomcat server as well.
I have used System.exit(int); int here I tried with Zero and non-zero
value.

The result is tomcat gets hung.

I understand it has to do with Java rather than Tomcat, however I'm
looking for a suggestion to stop tomcat in a way similar to the above.

I have learnt to stop tomcat
a) programmatically using Bootstrap classes, (stops successfully only if
you start programmatically)
b) by invoking shutdown.sh
c) by connecting to the server at port 8005, and send the shutdown
string.

All the above methods have yielded the same result, moreover it would
make my application coded specific to tomcat or Linux;

I have also googled with the phrase ~tomcat crash, stop ~tomcat,
system.exit ~tomcat, system.exit ~jvm; to at least find out that
the task cannot be done, however it helped me a little.

Here are the versions of server, os and java I'm using.
Tomcat: 5.x
OS : Red Hat Enterprise Linux AS 3.0
Java: 1.5

Can somebody help me regarding the same.

Regards,
Kiran Tadepalli




The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com
  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: tomcat/linux no xserver problem

2006-02-06 Thread Mike Sabroff

why not just install the Xserver

Abhilash Kumar wrote:

You have Batik (ships with FOP distribution itself) in Tomcat's classpath ?

Pls see wheter this link is helpful.
http://xmlgraphics.apache.org/fop/0.20.5/graphics.html#batik

thanks and regards,

-- Kannan.

-Original Message-
From: Eickvonder Bjoern [mailto:[EMAIL PROTECTED]
Sent: Monday, February 06, 2006 11:50 AM
To: users@tomcat.apache.org
Subject: tomcat/linux no xserver problem


Hi,

one of our customers is using tomcat 5.0.28 with jdk 1.4.2_05 on linux
without a running xserver. In fact there is not even one installed. Now
our application produces the following exceptions on generating pdfs
using fop:

1.) java.lang.UnsatisfiedLinkError:
/usr/java/j2sdk1.4.2_05/jre/lib/i386/libawt.so: libXp.so.6: cannot open
shared object file: No such file or directory

2.) java.lang.NoClassDefFoundError at
org.apache.fop.svg.SVGUserAgent.getViewportSize(SVGUserAgent.java:145)
[This line of code is just: return new Dimension(100, 100);]

The first we solved by setting the headless parameter and installing
some basic x-win libraries, but the second exception is still thrown in
some cases. To be more precise it seems that now all pdfs are generated
except those with embedded svg (using fo:foreign-instream-object).
Anyone an idea what might be still missing or misconfigured on the
server?

Bjoern Eickvonder

Besuchen Sie uns vom 14.02. bis zum 16.02.2006 auf der Learntec in Karlsruhe
auf unserem Messestand 342. Vereinbaren Sie einen Termin mit uns...

Diese E-Mail enthalt vertrauliche und/oder rechtlich geschutzte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
irrtumlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail bzw. Inhalte hieraus ist nicht gestattet.



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






--
Amritha Institute of Medical Sciences, Cochin, India
   Sent using PostMaster by QuantumLink Communications
 One Internet account, unlimited personal e-mail addresses
Get your free copy of PostMaster at http://www.mailserve.net/



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

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Strange problem with tomcat Please help

2006-02-03 Thread Mike Sabroff
no route to host is a dns or network problem. it would not be in the 
catalina.out do a ps on apache...you will probably find that the default 
fedora setup (unless you did not set up web server on installation) is 
to install and run apache on boot-up which would be on port 80.


[EMAIL PROTECTED] wrote:


Hi all

I am a newbie to tomcat.

 I installed jarkarta tomcat 5.5.9 with  fedoracore3 OS. I already have
j2sdk1.5.2 installed on it.
I downloaded and configured tomcat from
http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat5.5-files/jakarta-=

tomcat-5.5.9-preconfigured.ziphttp://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat5.5-files/jakarta-=tomcat-5.5.9-preconfigured.zip

After configuring tomcat, and i run http://localhost:8080/  from 
firefox in
my pc, it works fine and shows me the index.html in webapps directory. 
Other

files like index.jsp, hello.jsp are working fine too.
However, when i access it from any other pc saying 
http://mypcname:8080/ it

gives me an error saying No route to host . However when i type
http://mypcname/  it works fine and is accessible. That is on port 80, it
works fine. Even other hosts like http://someotherhost:8080/ , my pc isnt
accessible.
I dont understand my it is giving me the error saying No route to host
when accessing from other pc.
I am using the server.xml  from coreservelets.com

The following seems to be running when i saw in ps -x
 9908 pts/1Sl 0:03 /usr/local/j2sdk1.4.2_10/bin /java -
Djava.util.logging.manager =3Dorg.apache.juli.ClassLoaderLogManage

I checked out catalina.out, but that didnt not contain any errors for No
route to host.
Please help

thanks
-Rsh



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Port 8443 won't become active (UNCLASSIFIED)

2006-02-03 Thread Mike Sabroff
I don't know if that will take care of it, but I would try changing the 
catalina.properties (tomcat/conf)
it has some references to sun. There may be some access problems on 
the IBM classes or packages that need to be set in heremaybe just 
adding the equivalent IBM packages may solve the problem.


This is an uneducated guess, not a fact.


BTW...have you checked IBM's site for info on tomcat integration?

Jeffery G. Summers wrote:

Mike,

In our JAVA_HOME/jre/lib/security/java.security the following exists:

ssl.KeyManagerFactory.algorithm=IbmX509
ssl.TrustManagerFactory.algorithm=IbmX509

We have no JAVA_HOME/jre/lib/deploy.jar or jsse.jar.

Our error log says SunX509 while the above obviously has IbmX509.  I'm
guessing that Tomcat has a setting somewhere that specifies SunX509 - can
anyone tell me where that is?  I'm assuming I can change it to IbmX509???

Please advise!

Thanks!

jeff

-Original Message-
From: Mike Sabroff [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 11:43 AM

To: Tomcat Users List
Subject: Re: Port 8443 won't become active (UNCLASSIFIED)

JAVA_HOME/jre/lib/security/java.security:ssl.KeyManagerFactory.algorithm=Sun
X509
JAVA_HOME/jre/lib/deploy.jar - found in here
JAVA_HOME/jre/lib/jsse.jar - and here

This is the default for a normal sun installation.

What IBM does is unknown, but if tomcat sees the IBM release and NOT the 
Sun/java release.I don't know, but I would thing IBM would have 
taken care of this


Samara, Fadi N Mr ACSIM/ASPEX wrote:
  
Classification:  UNCLASSIFIED 
Caveats: NONE


Have you generated key pairs yet ? 


-Original Message-
From: Jeffery G. Summers [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 11:24 AM

To: 'Tomcat Users List'
Subject: RE: Port 8443 won't become active

OK, so it isn't the java version.  I've ensured JAVA_HOME is correct and
that the PATH is pointing to the right version.  All the jars are running
through 1.4.2.

I'm stumped.  I've gone through various docs/faqs and can't find anything
that helps.  I know port 8443 can be activated because I changed the http
port 80 connector to port 8443.  I connected to my site using :8443 in the
url but, of course, it's not https.

The only thing I can see that appears to be an issue is this error in the
logs:

Feb 3, 2006 6:57:54 AM org.apache.catalina.startup.Catalina start

SEVERE: Catalina.start:   LifecycleException:  Protocol handler start
failed: java.io.IOException: Algorithm SunX509 not available

I've no idea how to resolve this issue.  Any clues?  I've found some


obscure
  

info on changing something called java.secure and making sure a few jar
files exist, but I don't know where this java.secure file is, how it


should
  

be edited (if it really needs it) or where I should get the jar files


since
  

we don't have them (Jcert.JAR , jNET.JAR,jSSE.jar in jre/lib/ext)

Thanks!

Jeff

-Original Message-
From: Jeffery G. Summers [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 1:53 PM
To: 'Tomcat Users List'
Subject: RE: Port 8443 won't become active

When we contracted our upgrades the consultant installed version 1.4.2 but
when I just ran java -version the box tells me that 1.3.1 is the one
running in memory!  I've never stopped/started java, etc. and I plan on
making the consultant finish the job on this...but, if I want to try it


does
  

anyone have a Quickie Guide I could use?

Thanks!

Jeff

-Original Message-
From: Peter Crowther [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 02, 2006 12:28 PM
To: Tomcat Users List
Subject: RE: Port 8443 won't become active

  

From: Jeffery G. Summers [mailto:[EMAIL PROTECTED] Our webserver is 
an IBM P615C AIX 5.2 box.

  
 
Whose JVM and what version?
 
- Peter



Successfully scanned by McAfee SIG 3200 Appliance.



Successfully Scanned by the McAfee SIG 3200 Appliance.

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



Successfully scanned by McAfee SIG 3200 Appliance.



Successfully Scanned by the McAfee SIG 3200 Appliance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Classification:  UNCLASSIFIED 
Caveats: NONE



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

  



  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat 4.1.31 IBM JDK JSSE crash

2006-02-02 Thread Mike Sabroff
The error is for com.ibm.jsse.bd not com.sun.jsse or whatever. Youneed 
IBM's jsse it appears



Philippe Couas wrote:


Hi,

I use an Tomcat 4.1.31 wit IBM JDK 1.4.1 and i want Implement JSSE on my
Tomcat
I have add Sun jsse.jar on $JAVA_HOME/jre/lib/ext but i have following
error, where is my mistake ??

Regards
Philippe
- Root Cause -

java.security.NoSuchAlgorithmException: Class com.ibm.jsse.bd 
configured for

SSL
Context not a SSLContext

at com.sun.net.ssl.SunJSSE_b.a(DashoA12275)


Philippe COUAS
Responsable D�veloppement
INFODEV S.A.



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: can't send email from tomcat using javamail api

2006-02-01 Thread Mike Sabroff
it is the smtp server that is rejecting the connection.do you need 
to authenticate to your smtp server?


Matthew Evans wrote:

I don't think so. The webapp is currently able to make SOAP calls to another 
server on the network. And connect to a SQL Server database.

Where would you suggest I check to be sure?

Cheers

Matt

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 2 February 2006 3:01 AM

To: Tomcat Users List
Subject: Re: can't send email from tomcat using javamail api

just shooting from the hip...

do you have any java policies configured, which forbids connections to another 
server?

Leon

On 2/1/06, Matthew Evans [EMAIL PROTECTED] wrote:
  

No, it's running on a different server.

-Original Message-
From: Steve Ochani [mailto:[EMAIL PROTECTED]
Sent: Thursday, 2 February 2006 1:59 AM
To: Tomcat Users List; Matthew Evans
Subject: Re: can't send email from tomcat using javamail api

On 2 Feb 2006 at 0:12, Matthew Evans wrote:



Hi Guys

I'm running a web application on Tomcat 5.5.12, and I cannot connect 
to my SMTP server using javamail from it for some reason. The error 
I am getting is the following:- javax.mail.MessagingException: Could 
not connect to SMTP host: smtpServer, port: 25; nested exception is:

java.net.ConnectException: Connection refused: connect

What has me totally confused though is that I can telnet to the SMTP 
server on port 25. I also made a little test java application to run 
outside of tomcat and it succesfully sent an email to the same server!


Does anyone know what might be causing this. Why would it be failing 
only from the web application? I have tried just about everything i 
can think of.
  

Is the webapp running on the same server as the SMTP server? If so then you 
have to run telnet on that server itselft and connect to localhost on port 25 
to do a true test.

The reason why I'm suggesting this is that the smtp server may not be 
configured to accept localhost connections.

-Steve O.



$BS!kTS!!)S!kTS!!)S!kTS!!)S!kTS!!)S!kTS!!)S!kTS!!)S!kTS!(J There's no 
obfuscated Perl contest because it's pointless.
 - Jeff Polk

Steve O.
http://www.steveo.us

New pics: B17G and B24
http://www.steveo.us/B17-B24

B17G WWII Bomber Yankee Lady Flight
http://www.steveo.us/b17ride

SUNY NCC MATH/COMPUTER Dept.
http://www.matcmp.ncc.edu


-
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]

  


--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: can't send email from tomcat using javamail api

2006-02-01 Thread Mike Sabroff
There are also a few other things. I had this happen one time, and it 
was a dns problemanother time it was another networking problem. 
Whatever it is, like I said beforeor should have restated as:
it appears that java is attempting to make the connection, but is being 
refused for some reason or anotherpossibly authentication, or very 
possibly a network issue (this is very likely)


Mike Sabroff wrote:
it is the smtp server that is rejecting the connection.do you need 
to authenticate to your smtp server?


Matthew Evans wrote:
I don't think so. The webapp is currently able to make SOAP calls to 
another server on the network. And connect to a SQL Server database.


Where would you suggest I check to be sure?

Cheers

Matt

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] Sent: 
Thursday, 2 February 2006 3:01 AM

To: Tomcat Users List
Subject: Re: can't send email from tomcat using javamail api

just shooting from the hip...

do you have any java policies configured, which forbids connections 
to another server?


Leon

On 2/1/06, Matthew Evans [EMAIL PROTECTED] wrote:
 

No, it's running on a different server.

-Original Message-
From: Steve Ochani [mailto:[EMAIL PROTECTED]
Sent: Thursday, 2 February 2006 1:59 AM
To: Tomcat Users List; Matthew Evans
Subject: Re: can't send email from tomcat using javamail api

On 2 Feb 2006 at 0:12, Matthew Evans wrote:

   

Hi Guys

I'm running a web application on Tomcat 5.5.12, and I cannot 
connect to my SMTP server using javamail from it for some reason. 
The error I am getting is the following:- 
javax.mail.MessagingException: Could not connect to SMTP host: 
smtpServer, port: 25; nested exception is:

java.net.ConnectException: Connection refused: connect

What has me totally confused though is that I can telnet to the 
SMTP server on port 25. I also made a little test java application 
to run outside of tomcat and it succesfully sent an email to the 
same server!


Does anyone know what might be causing this. Why would it be 
failing only from the web application? I have tried just about 
everything i can think of.
  
Is the webapp running on the same server as the SMTP server? If so 
then you have to run telnet on that server itselft and connect to 
localhost on port 25 to do a true test.


The reason why I'm suggesting this is that the smtp server may not 
be configured to accept localhost connections.


-Steve O.



$BS!kTS!!)S!kTS!!)S!kTS!!)S!kTS!!)S!kTS!!)S!kTS!!)S!kTS!(J There's 
no obfuscated Perl contest because it's pointless.

 - Jeff Polk

Steve O.
http://www.steveo.us

New pics: B17G and B24
http://www.steveo.us/B17-B24

B17G WWII Bomber Yankee Lady Flight
http://www.steveo.us/b17ride

SUNY NCC MATH/COMPUTER Dept.
http://www.matcmp.ncc.edu


-
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]

  




--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: How to identify version of a running Tomcat and similar trivia

2006-02-01 Thread Mike Sabroff


go to tomcat/bin
type catalina.sh version
output will look like:
Using CATALINA_BASE:   /usr/local/tomcat
Using CATALINA_HOME:   /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME:   /usr/local/java
Server version: Apache Tomcat/5.5.12
Server built:   Sep 23 2005 09:40:42
Server number:  5.5.12.0
OS Name:Linux
OS Version: 2.6.11-1.1369_FC4
Architecture:   i386
JVM Version:1.5.0_06-b05
JVM Vendor: Sun Microsystems Inc.



Tim Funk wrote:
Tomcat is like any server based java app. It will always require a 
convulted classpath as well as multiple classloaders to do anything 
interesting.


The most failsafe way to get the version regarless of the packaging is 
to do the following: (no, i'm not kidding)
1) find catalina.jar. It *should* be in server/lib/catalina.jar of 
your tomcat installation

2) Open it with winzip like program
3) Look for ServerInfo.properties (in org/apache/catalina/util/)
4) In that file is ther server version

The version.sh script is just a wrapper the created the appropriate 
classpath so that the properties file can be loaded.



-Tim

[EMAIL PROTECTED] wrote:


Hi Tim,
SNIP

Only problem is, my Tomcat depot on this box (randomly picked one
of our HP-UX boxes, but we also have Tomcats running on Linux,
AIX, Solaris (and probably Win32) doesn't seem to have bundled
such a wrapper script.



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



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat 5.5.9 + JDK 1.4.2 + Freebsd 5.3

2006-01-31 Thread Mike Sabroff

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



--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Tomcat 5.5.9 + JDK 1.4.2 + Freebsd 5.3

2006-01-31 Thread Mike Sabroff
I can't answer that, but it seems to make a difference. It also helps to 
have a setenv.sh which contains all of the environment variables i.e 
CATALINA_HOME JAVA_HOME, etc.

catalina.sh looks for this.

Actually, I never tried to go straight to the catalina.sh

Vinu Varghese wrote:

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







--
Mike Sabroff
Web Services
Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: mod_jk / 503 Error

2006-01-26 Thread Mike Sabroff
   modJk=/dh/apache/template/libexec/mod_jk.so
   jkDebug=trace
   workersConfig=/home/usr/tomcat/conf/workers.properties
   jkLog=/home/usr/tomcat/logs/mod_jk.log /


   Service name=Tomcat-Apache debug=99


 !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 --
   Connector className=org.apache.coyote.tomcat4.CoyoteConnector
port=8080 minProcessors=5 maxProcessors=75
enableLookups=true redirectPort=8443
acceptCount=100 debug=99 connectionTimeout=2
useURIValidationHack=false
disableUploadTimeout=true URIEncoding=UTF-8 /


Connector port=8009 enableLookups=false debug=99
minProcessors=5 maxProcessors=75 connectionTimeout=2
acceptCount=100 redirectPort=8443 address=66.33.192.77
protocol=AJP/1.3 URIEncoding=UTF-8 /

  Engine name=Apache defaultHost=www.site.com debug=99


   Logger className=org.apache.catalina.logger.FileLogger
   prefix=catalina_log. suffix=.txt
   timestamp=true/

   !-- Because this Realm is here, an instance will be shared 
globally --

   Realm className=org.apache.catalina.realm.MemoryRealm /


   Host name=www.site.com debug=99
appBase=webapps
docBase=
unpackWARs=true autoDeploy=true

Listener 
className=org.apache.ajp.tomcat4.config.ApacheConfig

  append=true
  forwardAll=false
  jkWorker=ajp13
  
workersConfig=/home/usr/tomcat/conf/workers.properties

  modJk=/dh/apache/template/libexec/mod_jk.so /


 Logger className=org.apache.catalina.logger.FileLogger
  directory=logs  prefix=site_log. suffix=.txt
 timestamp=true/


   Context path=
docBase=ROOT
debug=99 reloadable=true crossContext=true/


 !-- Tomcat Examples Context --
 Context path=/examples docBase=examples debug=10
  reloadable=true crossContext=true


   Logger className=org.apache.catalina.logger.FileLogger
   prefix=localhost_examples_log. suffix=.txt
   timestamp=true/

 /Context
   /Host
 /Engine
   /Service
/Server


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



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: Problem in tomcat configuration...

2006-01-26 Thread Mike Sabroff

module not included in the server configurationthis is the key
mod_jk is a third party module and is not in the apache distribution.
It must be downloaded and compiled.
Best way is to compile it into the apache executable. You will have to 
go to the tomcat docs and maybe google to find info on how to do 
this..plan on spending some time.


Bharat Soni wrote:


Hi,
I have RH9, apache 2.0.40,tomcat 4.3.11  jdk 1.3.1_11. with mysql 3.23.54.
I am installing a server with apache+mod jk + tomcat + mysql.
The problem is that after writing
Include /usr/local/tomcat/conf/auto/mod_jk.so
in my httpd.conf file and trying to start the httpd server i got error as

Syntax error on line 28 of /usr/local/tomcat/conf/auto/mod_jk.conf:
Invalid command 'JkMount', perhaps mis-spelled or defined by a module not
included in the server configuration

. I have build my apache as
./configure  --prefix=/usr/local/apache --enable-openssl --enable-so

on net I found this below command.
./configure --prefix=/usr/local/apache --enable-ssl --enable-so

But for my setup this command was not working and gives some ssl error . I
query for the RPM and find openssl on my system. so i used the command 
with

openssl included. is this correct ot this is the cause for the problem.

By the way Tomcat is working fine individually . but due to the error 
apache

is not starting. if i comment the line apache also works fine .

Thanks in anticipation


Bharat Soni
+91-9826098373



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: APR Connector Shutdown Problem

2006-01-26 Thread Mike Sabroff
Try switching to a ajp1.3 connector - cyote if you can...AJP are 
fairly new and problematic from what I have seen and heard


Fenlason, Josh wrote:
I'm running into a problem with the APR connector not shutting down 
properly.  Tomcat runs fine and there are no errors on shutdown, but 
if I shut Tomcat down and start it up again I get a socket bind failed 
error in the catalina log (attached).  I have to wait for several 
minutes between shutdown and startup for Tomcat to be able to startup 
correctly.  If I run Tomcat without the APR connector, I don't have 
this issue.  This does not occur on Windows, but does on Solaris and AIX.
Has anyone else seen this? 
One thing I noticed is that the first thing logged on shutdown is an 
AjpAprProtocol pause entry, but there is no shutdown, stop or destroy.
Is there any chance the APR connector is just getting paused and 
nothing is actually stopping it?

Any help would be greatly appreciated.  Thanks in advance.
,
Josh.


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


--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: mod_jk with httpd tomcat

2006-01-24 Thread Mike Sabroff
Yeh, I remember getting that too and I too had the right path, but just 
could not get it to work. Must be some environment variable like 
LD_LIBRARY_PATH on sun boxes or some unresolved piece of extraneous 
information.


When you compile it into apache, that problem does not exist as it 
becomes part of the apache build. I do remember I had to run a configure 
script to make it all work...Getting old is not fun


Greg Bobak wrote:


Hi,

Thansk for the reply.  I think I had found some documentation about 
rebuild Apache with mod_jk bound.  I'll have to look again. 

I've been trying to rebuild mod_jk (to no avail) in  hopes that would 
work, but keep getting this error:


could not find /usr/local/apache2/bin/apxs
configure: error: You must specify a valid --with-apxs path

Of course it is the right path.

G.

Mike Sabroff [EMAIL PROTECTED] wrote: I had the same problem 
a while back. I had to do some googling and find

the mod_jk source. Trying to compile it was problematic and I also got
the unresolved errors I had to rebuild apache with jk as part of the
build in order to get it to work.

I wish I could remember where I got the source and the instructions, but
I am old and forget easily (actually age has nothing to do with
italways been like that)
I appologize, especially since I spent many hours trying this and that
and I know what you are going through
I do remember, that the proceedure was different with apache 2.x than it
was with 1.3x that I have installed.


Greg Bobak wrote:

 I am using Tomcat 5.0.28 BTW.

 G.

 Greg Bobak  wrote:  I am trying to get mod_jk to
 work with apache 2.0.55 and get this error on the load module:

 Syntax error on line 276 of /usr/local/apache2/conf/httpd.conf:
 Cannot load /usr/local/apache2/modules/mod_jk.so into server: ld.so.1:
 /usr/local/apache2/bin/httpd: fatal: relocation error: file
 /usr/local/apache2/modules/mod_jk.so: symbol ap_null_cleanup:
 referenced symbol not found


 I have looked everywhere, and have been advised to recompile apache,
 which I have done successfully a few times.  This is how I have
 recompiled:

 ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all
 --enable-ssl=shared --enable-ssl --with-ssl=/usr/local/ssl
 --enable-proxy --enable-proxy-connect --enable-proxy-ftp
 --enable-proxy-http --enable-so --enable-rule=SHARED_CORE

 make

 make install

 I use make clean between attempts..Ihave tried withou the
 SHARED_CORE and without the --enable-so because
 --enable-mods-shared=all should cover that.  Still no luck.

 I am using Solaris 9.  Here is some diag info:

 [EMAIL PROTECTED]:/usr/local/apache2/bin # ldd -d 
 /usr/local/apache2/modules/mod_jk.so

 libc.so.1 = /usr/lib/libc.so.1
 libdl.so.1 =/usr/lib/libdl.so.1
 symbol not found: ap_server_root   
 (/usr/local/apache2/modules/mod_jk.so)
 symbol not found: ap_null_cleanup  
 (/usr/local/apache2/modules/mod_jk.so)
 symbol not found: dir_module   
 (/usr/local/apache2/modules/mod_jk.so)

 /usr/platform/SUNW,Serverblade1/lib/libc_psr.so.1

 [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -V
 Server version: Apache/2.0.55
 Server built:   Jan 23 2006 13:17:34
 Server's Module Magic Number: 20020903:11
 Architecture:   32-bit
 Server compiled with
  -D APACHE_MPM_DIR=server/mpm/prefork
  -D APR_HAS_SENDFILE
  -D APR_HAS_MMAP
  -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
  -D APR_USE_FCNTL_SERIALIZE
  -D APR_USE_PTHREAD_SERIALIZE
  -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
  -D APR_HAS_OTHER_CHILD
  -D AP_HAVE_RELIABLE_PIPED_LOGS
  -D HTTPD_ROOT=/usr/local/apache2
  -D SUEXEC_BIN=/usr/local/apache2/bin/suexec
  -D DEFAULT_PIDLOG=logs/httpd.pid
  -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
  -D DEFAULT_LOCKFILE=logs/accept.lock
  -D DEFAULT_ERRORLOG=logs/error_log
  -D AP_TYPES_CONFIG_FILE=conf/mime.types
  -D SERVER_CONFIG_FILE=conf/httpd.conf

 [EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -v
 Server version: Apache/2.0.55
 Server built:   Jan 23 2006 13:17:34


 Please advise as to what info would be helpful in determining the root
 cause.

 Thanks for your help,
 Greg





 
 -


  What are the most popular cars?  Find out at Yahoo! Autos


   
 -


  What are the most popular cars?  Find out at Yahoo! Autos


--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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




   
-

Yahoo! Photos
 Got holiday prints? See all the ways to get quality prints in your 
hands ASAP.




--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


-
To unsubscribe, e-mail: [EMAIL PROTECTED

Re: mod_jk with httpd tomcat

2006-01-23 Thread Mike Sabroff
I had the same problem a while back. I had to do some googling and find 
the mod_jk source. Trying to compile it was problematic and I also got 
the unresolved errors I had to rebuild apache with jk as part of the 
build in order to get it to work.


I wish I could remember where I got the source and the instructions, but 
I am old and forget easily (actually age has nothing to do with 
italways been like that)
I appologize, especially since I spent many hours trying this and that 
and I know what you are going through
I do remember, that the proceedure was different with apache 2.x than it 
was with 1.3x that I have installed.



Greg Bobak wrote:


I am using Tomcat 5.0.28 BTW.

G.

Greg Bobak [EMAIL PROTECTED] wrote:  I am trying to get mod_jk to 
work with apache 2.0.55 and get this error on the load module:


Syntax error on line 276 of /usr/local/apache2/conf/httpd.conf:
Cannot load /usr/local/apache2/modules/mod_jk.so into server: ld.so.1: 
/usr/local/apache2/bin/httpd: fatal: relocation error: file 
/usr/local/apache2/modules/mod_jk.so: symbol ap_null_cleanup: 
referenced symbol not found



I have looked everywhere, and have been advised to recompile apache, 
which I have done successfully a few times.  This is how I have 
recompiled:


./configure --prefix=/usr/local/apache2 --enable-mods-shared=all 
--enable-ssl=shared --enable-ssl --with-ssl=/usr/local/ssl 
--enable-proxy --enable-proxy-connect --enable-proxy-ftp 
--enable-proxy-http --enable-so --enable-rule=SHARED_CORE


make

make install

I use make clean between attempts..Ihave tried withou the 
SHARED_CORE and without the --enable-so because 
--enable-mods-shared=all should cover that.  Still no luck.


I am using Solaris 9.  Here is some diag info:

[EMAIL PROTECTED]:/usr/local/apache2/bin # ldd -d  
/usr/local/apache2/modules/mod_jk.so

libc.so.1 = /usr/lib/libc.so.1
libdl.so.1 =/usr/lib/libdl.so.1
symbol not found: ap_server_root
(/usr/local/apache2/modules/mod_jk.so)
symbol not found: ap_null_cleanup   
(/usr/local/apache2/modules/mod_jk.so)
symbol not found: dir_module
(/usr/local/apache2/modules/mod_jk.so)

/usr/platform/SUNW,Serverblade1/lib/libc_psr.so.1

[EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -V
Server version: Apache/2.0.55
Server built:   Jan 23 2006 13:17:34
Server's Module Magic Number: 20020903:11
Architecture:   32-bit
Server compiled with
 -D APACHE_MPM_DIR=server/mpm/prefork
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_FCNTL_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D HTTPD_ROOT=/usr/local/apache2
 -D SUEXEC_BIN=/usr/local/apache2/bin/suexec
 -D DEFAULT_PIDLOG=logs/httpd.pid
 -D DEFAULT_SCOREBOARD=logs/apache_runtime_status
 -D DEFAULT_LOCKFILE=logs/accept.lock
 -D DEFAULT_ERRORLOG=logs/error_log
 -D AP_TYPES_CONFIG_FILE=conf/mime.types
 -D SERVER_CONFIG_FILE=conf/httpd.conf

[EMAIL PROTECTED]:/usr/local/apache2/bin # httpd -v
Server version: Apache/2.0.55
Server built:   Jan 23 2006 13:17:34


Please advise as to what info would be helpful in determining the root 
cause.


Thanks for your help,
Greg





 
-


 What are the most popular cars?  Find out at Yahoo! Autos


   
-


 What are the most popular cars?  Find out at Yahoo! Autos



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: (newb) Tomcat servlet mapping problem

2006-01-23 Thread Mike Sabroff

url-pattern/simple-servlet/url-pattern
should be
url-pattern/simple-servlet/*/url-pattern



Georg Sauer-Limbach wrote:

Darren,

if I look at your original configuration


servlet-mapping
servlet-nameSimpleServlet/servlet-name
url-pattern/simple-servlet/url-pattern
/servlet-mapping

---snip---
Context path=/simple-servlet docBase=SimpleServlet 
reloadable=true

debug=99


then, if I am not overlooking something,
the correct URL to invoke the servlet is

http://localhost/simple-servlet/simple-servlet

because the first simple-servlet is the
Context path where the webapp resides, and
the second simple-servlet is the URL for
the servlet inside the webapp, like correctly
configured in the webapp descriptor.

Georg

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



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



Re: tomcat 5 and cgi execution

2006-01-18 Thread Mike Sabroff
The executable is the executable file name...perl is the name of the 
perl executable


Mark Thomas wrote:


Linda Solomon wrote:
 


I followed the instructions for configuring tomcat 5 for cgi.
However, tomcat 5 contains a new xml variable:
executable - The of the executable to be used to run the script. Default
is perl.

Using the default allows the perl cgis to work fine, but the c++ cgi's
do not work.
   


This is unlikely to be a factor. Before it was configurable it was
hard-coded to perl so if you leave it as the default there should be
no functional change.

There are, however, a whole stack of other changes that may be a
factor. The following (rather long) URL should show you the changes.
http://svn.apache.org/viewcvs.cgi/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?p1=tomcat%2Fcontainer%2Fcatalina%2Ftrunk%2Fcatalina%2Fsrc%2Fshare%2Forg%2Fapache%2Fcatalina%2Fservlets%2FCGIServlet.javarev=366305r1=302487r2=366305diff_format=h

Mark


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

 



--
Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379


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



RE: Please help, i have to be missing something very simple

2006-01-06 Thread Mike Sabroff
Do you have a package statement in your servlet?

You should


Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379 

-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 06, 2006 3:24 PM
To: users@tomcat.apache.org
Subject: Please help, i have to be missing something very simple

Hello,
I am moving an App from a devel server to a production server

When i run the app everything works fine except the new stuff (of
course)

in my servlet i am calling
Color bgcolor = new Color(
Integer.parseInt(album.getBGcolor().substring(1), 16) ) ;

and as soon as i do i get Class not found

FYI
i am using tomcat-5.0.24

./catalina.sh run
Using CATALINA_BASE:   /usr/java/jakarta-tomcat
Using CATALINA_HOME:   /usr/java/jakarta-tomcat
Using CATALINA_TMPDIR: /usr/java/jakarta-tomcat/temp
Using JAVA_HOME:   /usr/java/j2sdk1.4.2_04
classpath=/usr/java/j2sdk1.4.2_04/lib/tools.jar:/usr/java/jakarta-tomcat
/bin/bootstrap.jar:/usr/java/j2sdk1.4.2_04:/usr/java/j2sdk1.4.2_04/lib

path=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin
:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/java/j2sdk1.4.2_04/bi
n:/root/bin

java_home=/usr/java/j2sdk1.4.2_04


Any ideas what i am overlooking. It has to be simple
==


StandardWrapperValve[galleryPubServlet]: Servlet.service() for servlet
galleryPubServlet threw exception
java.lang.NoClassDefFoundError
at galleryPubServlet.startUpload(galleryPubServlet.java:245)
at galleryPubServlet.MYdoGet(galleryPubServlet.java:156)
at galleryPubServlet.doGet(galleryPubServlet.java:101)
at galleryPubServlet.doPost(galleryPubServlet.java:66)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
textValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:535
)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
ntext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
20)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:296)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:372)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:694)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
626)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:807)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:644)
at java.lang.Thread.run(Thread.java:534)

-
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]



RE: Please help, i have to be missing something very simple

2006-01-06 Thread Mike Sabroff
Looks more like libawt.so has an unsatisfied link to libXp.so.6
  this is a security exeption first so maybe libXp.so.6 is in a
protected area somehow...either through java's sandbox or some stupid
windows permissions thing


Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379 

-Original Message-
From: Randy Paries [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 06, 2006 3:36 PM
To: Tomcat Users List
Subject: Re: Please help, i have to be missing something very simple

I created a little test program(see below), and i get the following
error

 java com.unitnet.utils.testcolor
Just Before
Exception in thread main java.lang.UnsatisfiedLinkError:
/usr/java/j2sdk1.4.2_04/jre/lib/i386/libawt.so: libXp.so.6: cannot
open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1477)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at
sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1437)
at java.awt.Toolkit.clinit(Toolkit.java:1458)
at java.awt.Color.clinit(Color.java:250)
at com.unitnet.utils.testcolor.main(testcolor.java:13)

yet
ls -ls /usr/java/j2sdk1.4.2_04/jre/lib/i386/libawt.so
2972 -rwxr-xr-x  1 root bin 3034008 Feb 24  2004
/usr/java/j2sdk1.4.2_04/jre/lib/i386/libawt.so


package com.unitnet.utils;

import java.awt.*;

public class testcolor {
public static void main (String[] args){
try{

System.out.println( Just Before );

Color bgcolor = new Color( 1 , false ) ;

System.out.println( Just After );

}catch (Exception ex){
ex.printStackTrace();
}
}

}
===







On 1/6/06, Mike Sabroff [EMAIL PROTECTED] wrote:
 Do you have a package statement in your servlet?

 You should


 Mike Sabroff
 Web Services Developer
 [EMAIL PROTECTED]
 920-568-8379

 -Original Message-
 From: Randy Paries [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 06, 2006 3:24 PM
 To: users@tomcat.apache.org
 Subject: Please help, i have to be missing something very simple

 Hello,
 I am moving an App from a devel server to a production server

 When i run the app everything works fine except the new stuff (of
 course)

 in my servlet i am calling
 Color bgcolor = new Color(
 Integer.parseInt(album.getBGcolor().substring(1), 16) ) ;

 and as soon as i do i get Class not found

 FYI
 i am using tomcat-5.0.24

 ./catalina.sh run
 Using CATALINA_BASE:   /usr/java/jakarta-tomcat
 Using CATALINA_HOME:   /usr/java/jakarta-tomcat
 Using CATALINA_TMPDIR: /usr/java/jakarta-tomcat/temp
 Using JAVA_HOME:   /usr/java/j2sdk1.4.2_04

classpath=/usr/java/j2sdk1.4.2_04/lib/tools.jar:/usr/java/jakarta-tomcat
 /bin/bootstrap.jar:/usr/java/j2sdk1.4.2_04:/usr/java/j2sdk1.4.2_04/lib


path=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin

:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/java/j2sdk1.4.2_04/bi
 n:/root/bin

 java_home=/usr/java/j2sdk1.4.2_04


 Any ideas what i am overlooking. It has to be simple
 ==


 StandardWrapperValve[galleryPubServlet]: Servlet.service() for servlet
 galleryPubServlet threw exception
 java.lang.NoClassDefFoundError
at galleryPubServlet.startUpload(galleryPubServlet.java:245)
at galleryPubServlet.MYdoGet(galleryPubServlet.java:156)
at galleryPubServlet.doGet(galleryPubServlet.java:101)
at galleryPubServlet.doPost(galleryPubServlet.java:66)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:237)
at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:157)
at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
 e.java:214)
at

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
 ntext.java:104)
at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5
 20)
at

org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCon
 textValve.java:198)
at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:152)
at

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo
 ntext.java:104

RE: JSPs on Tomcat

2005-11-21 Thread Mike Sabroff
And make sure that the imported classes are part of some package

Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379 

-Original Message-
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 12:55 PM
To: Tomcat Users List
Subject: Re: JSPs on Tomcat

Milan Tomic wrote:
  
 
 I have problems running JSPs on Tomcat. I'm using latest release. I
got
 compiler error that some imported classes could not be found. Where
should I
 copy those classes? In the lib folder? Do I need to edit some
configuration
 (xml) files also?

Place the jars in the lib folder. No config required.

Mark


-
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]