Filter cuts response in Tomcat 5.5.20

2008-09-02 Thread Jesse Klaasse

For a few days, I have been breaking my head over this issue:

My goal is to create a filter which detects Ajax calls (using jQuery for
Ajax, which adds "X-Requested-With: XMLHttpRequest" to the request headers).
If some jsp is requested by an Ajax call, I want to process the jsp's output
with this filter (extract the body, correct some entities and stuff, but
this is not really important to know for this issue, especially since I
don't even get this far).

I have implemented the filter structure as outlined here:
http://download.oracle.com/docs/cd/B32110_01/web.1013/b28959/filters.htm

With one adaptation: in the Filter I check for the "X-Requested-With:
XMLHttpRequest" header, and when it is there, I do the pre-post thing
mentioned in the article. If it's not, it just continues the chain. I left
the rest of the files untouched.

However, it isn't working as it should be. I actually see the "PRE" and
"POST" lines in the Ajax output, however, most of the time there is nothing
between them. And when I print the response length, it's 0 most of the time.
This is all working fine using our old development platform (based on Resin
3.0.14), but it isn't working on the new one (based on Tomcat 5.5.20).

When I request the same url via a browser, all is working fine. Also, when I
disable the filter, all is working fine (however, without my desired
changes). So it has to be in the filter's code.

An idea, anyone?

I have attached the relevant java code for the filter to this message in one
tar file:
http://www.nabble.com/file/p19265999/AjaxPreparationFilter.tar
AjaxPreparationFilter.tar 
-- 
View this message in context: 
http://www.nabble.com/Filter-cuts-response-in-Tomcat-5.5.20-tp19265999p19265999.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: adding a virtual host with jmx

2008-09-02 Thread Olivier Vergès
yeah i've followed it, but i'm just lost with the first lines:

* ObjectName loader = getServerLoader(); // depends on the settings and*
* version
   ObjectName registry = getRegistry(); // depends on the settings and
version
   MBeanServer server = getTCMBeansServer(); // generally the first one,
unless you (or your J2EE) are playing games
*

For now; I get a MBeanServerConnection and I can invoke the differents
methods like this:

  JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" +
hostIPAddress + "/jmxrmi");
  JMXConnector   conn = JMXConnectorFactory.connect(url);
   MBeanServerConnectionmbsc = conn.getMBeanServerConnection();


ObjectName objectName = new
ObjectName("Catalina:type=MBeanFactory");
Object[] params =
{"Catalina:type=Host,host="+nameVH,"/manager","/data/tomcat/server/manager"};
String[] signature = {String.class.getName(),
String.class.getName(), String.class.getName()};

 mbsc.invoke(objectName, "createStandardContext", params,
signature);

That's how i create a context for a given host. But like the there is no
addSSOAgentValve, that's why i'm trying to use bill's code .

O.V



2008/9/1 Martin Gainty <[EMAIL PROTECTED]>

>
> did you follow bill's code sample ?...did you have different result?also
> please display the exact structure and calls you are making to instantiate
> your javax.management.MBeanServerand which class is executing the addChild
>
> javadocs located at
>
> http://java.sun.com/j2ee/1.4/docs/api/javax/management/package-summary.htmlthanks/Martin__
>  Disclaimer and
> confidentiality note Everything in this e-mail and any attachments relates
> to the official business of Sender. This transmission is of a confidential
> nature and Sender does not endorse distribution to any party other than
> intended recipient. Sender does not necessarily endorse content contained
> within this transmission. > Date: Mon, 1 Sep 2008 21:57:55 +0200> From:
> [EMAIL PROTECTED]> To: users@tomcat.apache.org> Subject: Re: adding
> a virtual host with jmx> > hi,> so i'm using tomcat 6.0.15.> > I'm trying
> now to add a josso valve: 
> className="org.josso.tc60.agent.SSOAgentValve" debug="1"/> always by jmx.> >
> I don't get your lines, in fact...> > Could you please help me a little
> more?> > O.V> > > > > 2008/7/31 Bill Barker <[EMAIL PROTECTED]>> > >
> It's a lot of lines of code, but not that hard. You haven't mentioned your>
> > Tomcat version, so I'll give a sort of generic setup.> > ObjectName loader
> = getServerLoader(); // depends on the settings and> > version> > ObjectName
> registry = getRegistry(); // depends on the settings and> > version> >
> MBeanServer server = getTCMBeansServer(); // generally the first one,> >
> unless you (or your J2EE) are playing games> >> > String hname =
> "Catalina:type=Host,host="+hostName; // Assuming the> > default Engine name
> of "Catalina"> > ObjectName ohost = new ObjectName(hname);> > Object host =
> server.instantiate(HOST_CLASS, loader);> > server.invoke(registry,
> "registerComponent",> > new Object[] {host, hname, null},> > new String[]> >
> {"java.lang.Object","java.lang.String","java.lang.String"});> >
> server.setAttribute(ohost, new Attribute("appBase", appBase));> > // Set
> more attributes, and aliases etc here> > // Things like Realms and Contexts
> work much the same way if you follow> > Tomcat's naming conventions> >
> server.invoke(ohost, "start", null, null);> > // Start your contexts here,
> if you don't have automatic deployment set.> >> > As long as you follow
> Tomcat's naming conventions for ObjectNames, invoking> > "start" will
> automagically add the new elements to where they should live.> > You can get
> the values for the "loader" and "registry" by hooking up a JMX> > console to
> your existing Tomcat.> >> > "Olivier Vergès" <[EMAIL PROTECTED]>
> wrote in message> >
> news:[EMAIL PROTECTED]> > >
> hi all,> > >> > > I'm creating a web application for auto deploying virtual
> host through> > > apache and tomcat on a production server.> > > Everything
> is ok except for the Tomcat part:> > > As tomcat can't be reloaded and as i
> can't restart anytime I want, I> > 've> > > heard jmx was great cause it was
> possible to modify a running tomcat (is> > > the> > > english expression is
> "on the fly"?).> > >> > > So, Connection to Mbean server is ok...> > >> > >
> My problem is :> > > when i invoke the addChild
> (org.apache.catalina.core.Container) method of> > > Engine I get this
> error:> > > "java.io.NotSerializableException:> > >
> org.apache.catalina.util.LifecycleSupport> > > at> > >
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)> > >
> at> > >> >
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)...">
> > >> > >> > > So i try to create my own
> addChildByString(String;String,String,String)> > > which takes the appabase
> and the name of th virtual host

help with virtual hosting

2008-09-02 Thread Sathish Vadhiyar

Hi,

I have tried various solutions regarding virtual hosts in tomcat and none
of them work.

I have in my server.xml:



Under my webapps directory, I have vh1 directory

I have vh1.com in my DNS.
So, when I type http://v1.com, it is opening the project corresponding to
webapps/vh1.

Now, I have webapps/vh2-apps corresponding to 2nd virtual host. I also
have vh2.com in DNS corresponding to the same machine.

What should I do in order to get http://vh2.com open the corresponding web
page?

Thanks,
Sathish


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



Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Steve G.B.

Hi,

I need to install multiple instances of Tomcat on my server.

I changed all the connection and redirect ports, but the second Tomcat still
doesn't start.

What should I do?

Thank you,

Steve
-- 
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread bhooshanpandit

Can you post the error that it spits out while starting up?


-Original Message-
From: Steve G.B. <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Tue, 2 Sep 2008 3:49 pm
Subject: Installing Multiple Instances on Windows Server 2003











Hi,

I need to install multiple instances of Tomcat on my server.

I changed all the connection and redirect ports, but the second Tomcat 
still

doesn't start.

What should I do?

Thank you,

Steve
--
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html

Sent from the Tomcat - User mailing list archive at Nabble.com.


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








You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


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



RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Peter Crowther
> From: Steve G.B. [mailto:[EMAIL PROTECTED]
> I need to install multiple instances of Tomcat on my server.
>
> I changed all the connection and redirect ports, but the
> second Tomcat still
> doesn't start.
>
> What should I do?

Give us more information - that's far too vague for us to help you.

Post:
- Tomcat versions;
- Any error messages you get in either set of logs while starting Tomcat.

Also: If you start the two services in the opposite order, which one fails?  Is 
it always one instance of Tomcat (in which case you should be looking for 
config errors in that Tomcat) or is it always the second one started (in which 
case you should be looking for contention issues)?

- Peter

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



Re: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Steve G.B.

in catalina.log I have this:

Sep 2, 2008 12:34:44 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]: 
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.(Unknown Source)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
at org.apache.catalina.startup.Catalina.await(Catalina.java:642)
at org.apache.catalina.startup.Catalina.start(Catalina.java:602)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 2, 2008 12:34:44 PM org.apache.coyote.http11.Http11AprProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Sep 2, 2008 12:34:44 PM org.apache.coyote.ajp.AjpAprProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
Sep 2, 2008 12:34:45 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina


the problem is:

I have Tomcat 6.0 on Connection port 8080 and redirect port 8443. AJP port
is 8009 (standard installation ports)
I then have Tomcat 4.1 on Connection port 8083 and redirect port 8447. AJP
is 8011.

Still it logs me there's an address already in use.


bhooshanpandit wrote:
> 
> Can you post the error that it spits out while starting up?
> 
> 
> -Original Message-
> From: Steve G.B. <[EMAIL PROTECTED]>
> To: users@tomcat.apache.org
> Sent: Tue, 2 Sep 2008 3:49 pm
> Subject: Installing Multiple Instances on Windows Server 2003
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Hi,
> 
> I need to install multiple instances of Tomcat on my server.
> 
> I changed all the connection and redirect ports, but the second Tomcat 
> still
> doesn't start.
> 
> What should I do?
> 
> Thank you,
> 
> Steve
> --
> View this message in context: 
> http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> 
> 
> You are invited to Get a Free AOL Email ID. - http://webmail.aol.in
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267834.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Steve G.B.

I posted logs and ports in the other reply.

Here I can tell you that the first service started is running quite good,
the seconds starts and then crashes.


Peter Crowther wrote:
> 
>> From: Steve G.B. [mailto:[EMAIL PROTECTED]
>> I need to install multiple instances of Tomcat on my server.
>>
>> I changed all the connection and redirect ports, but the
>> second Tomcat still
>> doesn't start.
>>
>> What should I do?
> 
> Give us more information - that's far too vague for us to help you.
> 
> Post:
> - Tomcat versions;
> - Any error messages you get in either set of logs while starting Tomcat.
> 
> Also: If you start the two services in the opposite order, which one
> fails?  Is it always one instance of Tomcat (in which case you should be
> looking for config errors in that Tomcat) or is it always the second one
> started (in which case you should be looking for contention issues)?
> 
> - Peter
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267883.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread bhooshanpandit
The error clearly indicates that something is running on port 8080. 
It's not the other tomcat but probably some other process.. if you 
have oracle it's app server runs on 8080 by default


Try changing the connector and redirector ports to non default values 
(say 18080 and 18443) and see if it works.



-Original Message-
From: Steve G.B. <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Tue, 2 Sep 2008 4:10 pm
Subject: Re: Installing Multiple Instances on Windows Server 2003











in catalina.log I have this:

Sep 2, 2008 12:34:44 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8005]:
java.net.BindException: Address already in use: JVM_Bind
   at java.net.PlainSocketImpl.socketBind(Native Method)
   at java.net.PlainSocketImpl.bind(Unknown Source)
   at java.net.ServerSocket.bind(Unknown Source)
   at java.net.ServerSocket.(Unknown Source)
at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:373)

   at org.apache.catalina.startup.Catalina.await(Catalina.java:642)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:602)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 2, 2008 12:34:44 PM org.apache.coyote.http11.Http11AprProtocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Sep 2, 2008 12:34:44 PM org.apache.coyote.ajp.AjpAprProtocol pause
INFO: Pausing Coyote AJP/1.3 on ajp-8009
Sep 2, 2008 12:34:45 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina


the problem is:

I have Tomcat 6.0 on Connection port 8080 and redirect port 8443. AJP 
port

is 8009 (standard installation ports)
I then have Tomcat 4.1 on Connection port 8083 and redirect port 8447. 
AJP

is 8011.

Still it logs me there's an address already in use.


bhooshanpandit wrote:


Can you post the error that it spits out while starting up?


-Original Message-
From: Steve G.B. <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Tue, 2 Sep 2008 3:49 pm
Subject: Installing Multiple Instances on Windows Server 2003











Hi,

I need to install multiple instances of Tomcat on my server.

I changed all the connection and redirect ports, but the second 

Tomcat

still
doesn't start.

What should I do?

Thank you,

Steve
--
View this message in context:


http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html

Sent from the Tomcat - User mailing list archive at Nabble.com.


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











You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


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





--
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267834.html

Sent from the Tomcat - User mailing list archive at Nabble.com.


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








You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


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



Re: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Steve G.B.

Ok got it.

It was the server port 8005 that should be changed.

Thank you!


bhooshanpandit wrote:
> 
> The error clearly indicates that something is running on port 8080. 
> It's not the other tomcat but probably some other process.. if you 
> have oracle it's app server runs on 8080 by default
> 
> Try changing the connector and redirector ports to non default values 
> (say 18080 and 18443) and see if it works.
> 
> 
> -Original Message-
> From: Steve G.B. <[EMAIL PROTECTED]>
> To: users@tomcat.apache.org
> Sent: Tue, 2 Sep 2008 4:10 pm
> Subject: Re: Installing Multiple Instances on Windows Server 2003
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> in catalina.log I have this:
> 
> Sep 2, 2008 12:34:44 PM org.apache.catalina.core.StandardServer await
> SEVERE: StandardServer.await: create[8005]:
> java.net.BindException: Address already in use: JVM_Bind
> at java.net.PlainSocketImpl.socketBind(Native Method)
> at java.net.PlainSocketImpl.bind(Unknown Source)
> at java.net.ServerSocket.bind(Unknown Source)
> at java.net.ServerSocket.(Unknown Source)
>  at 
> org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
> at org.apache.catalina.startup.Catalina.await(Catalina.java:642)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:602)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Sep 2, 2008 12:34:44 PM org.apache.coyote.http11.Http11AprProtocol pause
> INFO: Pausing Coyote HTTP/1.1 on http-8080
> Sep 2, 2008 12:34:44 PM org.apache.coyote.ajp.AjpAprProtocol pause
> INFO: Pausing Coyote AJP/1.3 on ajp-8009
> Sep 2, 2008 12:34:45 PM org.apache.catalina.core.StandardService stop
> INFO: Stopping service Catalina
> 
> 
> the problem is:
> 
> I have Tomcat 6.0 on Connection port 8080 and redirect port 8443. AJP 
> port
> is 8009 (standard installation ports)
> I then have Tomcat 4.1 on Connection port 8083 and redirect port 8447. 
> AJP
> is 8011.
> 
> Still it logs me there's an address already in use.
> 
> 
> bhooshanpandit wrote:
>>
>> Can you post the error that it spits out while starting up?
>>
>>
>> -Original Message-
>> From: Steve G.B. <[EMAIL PROTECTED]>
>> To: users@tomcat.apache.org
>> Sent: Tue, 2 Sep 2008 3:49 pm
>> Subject: Installing Multiple Instances on Windows Server 2003
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hi,
>>
>> I need to install multiple instances of Tomcat on my server.
>>
>> I changed all the connection and redirect ports, but the second 
> Tomcat
>> still
>> doesn't start.
>>
>> What should I do?
>>
>> Thank you,
>>
>> Steve
>> --
>> View this message in context:
>> 
> http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267576.html
>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>>
>>
>> 
> 
>> You are invited to Get a Free AOL Email ID. - http://webmail.aol.in
>>
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
> 
> --
> View this message in context: 
> http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19267834.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> 
> 
> You are invited to Get a Free AOL Email ID. - http://webmail.aol.in
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19268122.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL

Re: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Steve G.B.

I have another question.

I'm trying to overload the Virtual Machine on which I've installed the two
Tomcats.
But I can't exceed a 50% of CPU Utilization.

I believe it's a JVM limitation. Is there a way to change jvm configurations
in order, for example, to create even more threads?


Thank you!
-- 
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19268553.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: EJB with Tomcat 6.0.16

2008-09-02 Thread Gaurav Pruthi
Hi,

I have installed openejb with tomcat. Has anybody tried openEJB before? Does
it provide all the functionality that EJB provides with websphere, weblogic,
Jboss, etc...


Regards,
Gaurav Pruthi

On Mon, Sep 1, 2008 at 1:22 PM, András Csányi <[EMAIL PROTECTED]> wrote:

> 2008/9/1 Gaurav Pruthi <[EMAIL PROTECTED]>:
> > Dear Friends,
> >
> > Is it possible to integrate EJB with tomcat v6 and higher? If yes then
> > kindly provide the How-To link. I googled but didn't find anything
> > information which is worthy.
>
> Hi!
>
> A few week ago I read a hungarian java list, and there was a guy who
> sad: "if I want ejb I put openejb in tomcat".
> So i think the keyword is "openejb".
>
> I hope this is help for you.
>
> András
>
> --
> - -
> -- Csanyi Andras -- http://sayusi.hu -- Sayusi Ando
> -- "Bízzál Istenben és tartsd szárazon a puskaport!".-- Cromwell
>


RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Peter Crowther
> From: Steve G.B. [mailto:[EMAIL PROTECTED]
> I'm trying to overload the Virtual Machine on which I've
> installed the two Tomcats.

To check: this is a virtual computer (on a physical host computer) running a 
virtual operating system on which you are running two copies of Tomcat in two 
separate Java virtual machines?

> But I can't exceed a 50% of CPU Utilization.

How many virtual cores have you set up?  How many physical cores on the host 
computer do you have?  How many of those are allocated to the virtual computer?

> I believe it's a JVM limitation.

What JVM are you using?  If it's a Sun one, I don't believe you ;-).  I've 
saturated 8-core processors on 1.4 and 1.5 with no issues; I can't see that 
having regressed in 1.6, although I don't have personal experience.

> Is there a way to change jvm configurations
> in order, for example, to create even more threads?

Depends on your JVM.  But I'm willing to bet that the bottleneck is in one or 
more of:
- Your test harness;
- Your web app (do all the threads access a common object?);
- A library you're using that single-threads;
- Your back-end systems, such as your database server.

- Peter

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



Re: adding a virtual host with jmx

2008-09-02 Thread Olivier Vergès
I've found these

*  ObjectName loader = new
ObjectName("Catalina:type=ServerClassLoader,name=common");
**
   MBeanServer server =
java.lang.management.ManagementFactory.getPlatformMBeanServer();
  *
but registry is not in my JMX.

O.V

2008/9/2 Olivier Vergès <[EMAIL PROTECTED]>

>
> yeah i've followed it, but i'm just lost with the first lines:
>
> * ObjectName loader = getServerLoader(); // depends on the settings and*
> * version
>ObjectName registry = getRegistry(); // depends on the settings and
> version
>MBeanServer server = getTCMBeansServer(); // generally the first one,
> unless you (or your J2EE) are playing games
> *
>
> For now; I get a MBeanServerConnection and I can invoke the differents
> methods like this:
>
>   JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://" +
> hostIPAddress + "/jmxrmi");
>   JMXConnector   conn = JMXConnectorFactory.connect(url);
>MBeanServerConnectionmbsc = conn.getMBeanServerConnection();
>
>
> ObjectName objectName = new
> ObjectName("Catalina:type=MBeanFactory");
> Object[] params =
> {"Catalina:type=Host,host="+nameVH,"/manager","/data/tomcat/server/manager"};
> String[] signature = {String.class.getName(),
> String.class.getName(), String.class.getName()};
>
>  mbsc.invoke(objectName, "createStandardContext", params,
> signature);
>
> That's how i create a context for a given host. But like the there is no
> addSSOAgentValve, that's why i'm trying to use bill's code .
>
> O.V
>
>
>
> 2008/9/1 Martin Gainty <[EMAIL PROTECTED]>
>
>
>> did you follow bill's code sample ?...did you have different result?also
>> please display the exact structure and calls you are making to instantiate
>> your javax.management.MBeanServerand which class is executing the addChild
>>
>> javadocs located at
>>
>> http://java.sun.com/j2ee/1.4/docs/api/javax/management/package-summary.htmlthanks/Martin__
>>  Disclaimer and
>> confidentiality note Everything in this e-mail and any attachments relates
>> to the official business of Sender. This transmission is of a confidential
>> nature and Sender does not endorse distribution to any party other than
>> intended recipient. Sender does not necessarily endorse content contained
>> within this transmission. > Date: Mon, 1 Sep 2008 21:57:55 +0200> From:
>> [EMAIL PROTECTED]> To: users@tomcat.apache.org> Subject: Re:
>> adding a virtual host with jmx> > hi,> so i'm using tomcat 6.0.15.> > I'm
>> trying now to add a josso valve: 
>> className="org.josso.tc60.agent.SSOAgentValve" debug="1"/> always by jmx.> >
>> I don't get your lines, in fact...> > Could you please help me a little
>> more?> > O.V> > > > > 2008/7/31 Bill Barker <[EMAIL PROTECTED]>> > >
>> It's a lot of lines of code, but not that hard. You haven't mentioned your>
>> > Tomcat version, so I'll give a sort of generic setup.> > ObjectName loader
>> = getServerLoader(); // depends on the settings and> > version> > ObjectName
>> registry = getRegistry(); // depends on the settings and> > version> >
>> MBeanServer server = getTCMBeansServer(); // generally the first one,> >
>> unless you (or your J2EE) are playing games> >> > String hname =
>> "Catalina:type=Host,host="+hostName; // Assuming the> > default Engine name
>> of "Catalina"> > ObjectName ohost = new ObjectName(hname);> > Object host =
>> server.instantiate(HOST_CLASS, loader);> > server.invoke(registry,
>> "registerComponent",> > new Object[] {host, hname, null},> > new String[]> >
>> {"java.lang.Object","java.lang.String","java.lang.String"});> >
>> server.setAttribute(ohost, new Attribute("appBase", appBase));> > // Set
>> more attributes, and aliases etc here> > // Things like Realms and Contexts
>> work much the same way if you follow> > Tomcat's naming conventions> >
>> server.invoke(ohost, "start", null, null);> > // Start your contexts here,
>> if you don't have automatic deployment set.> >> > As long as you follow
>> Tomcat's naming conventions for ObjectNames, invoking> > "start" will
>> automagically add the new elements to where they should live.> > You can get
>> the values for the "loader" and "registry" by hooking up a JMX> > console to
>> your existing Tomcat.> >> > "Olivier Vergès" <[EMAIL PROTECTED]>
>> wrote in message> >
>> news:[EMAIL PROTECTED]> > >
>> hi all,> > >> > > I'm creating a web application for auto deploying virtual
>> host through> > > apache and tomcat on a production server.> > > Everything
>> is ok except for the Tomcat part:> > > As tomcat can't be reloaded and as i
>> can't restart anytime I want, I> > 've> > > heard jmx was great cause it was
>> possible to modify a running tomcat (is> > > the> > > english expression is
>> "on the fly"?).> > >> > > So, Connection to Mbean server is ok...> > >> > >
>> My problem is :> > > when i invoke the addChild
>> (org.apache.catalina.core.Container) method of> > > Engine I get this
>> error:> > > "java.io.NotSeria

RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Steve G.B.

It's a Quad Core Intel Xeon with 4GB of RAM and ESX running on it.

I've created a VM with 4 VCores, and all of the cores are allocated to the
VM.

I'm using Sun JVM 1.6, and stressing the Guest with Loadrunner on another
machine (if you ask: this machine with loadrunner isn't the bottleneck)

No Databases, no I/O requests, no Network saturation.

that's why I think it's the JVM.
For my tests I used the standard demo webapp in Loarunner (Mercury Tours),
and a couple of stupid jsp pages. So Apache and Tomcat both. 

Fun thing is that when using Tomcat and Apache combined, I can get an 80-85%
CPU Utilization. Problem is that for my tests I need something more simple
and the same server.

So today I've installed the second Tomcat running calling the same jsp page
of the other.

No think time set.

How do you saturate an 8-core host?

Please help me :)

Stefano


Peter Crowther wrote:
> 
>> From: Steve G.B. [mailto:[EMAIL PROTECTED]
>> I'm trying to overload the Virtual Machine on which I've
>> installed the two Tomcats.
> 
> To check: this is a virtual computer (on a physical host computer) running
> a virtual operating system on which you are running two copies of Tomcat
> in two separate Java virtual machines?
> 
>> But I can't exceed a 50% of CPU Utilization.
> 
> How many virtual cores have you set up?  How many physical cores on the
> host computer do you have?  How many of those are allocated to the virtual
> computer?
> 
>> I believe it's a JVM limitation.
> 
> What JVM are you using?  If it's a Sun one, I don't believe you ;-).  I've
> saturated 8-core processors on 1.4 and 1.5 with no issues; I can't see
> that having regressed in 1.6, although I don't have personal experience.
> 
>> Is there a way to change jvm configurations
>> in order, for example, to create even more threads?
> 
> Depends on your JVM.  But I'm willing to bet that the bottleneck is in one
> or more of:
> - Your test harness;
> - Your web app (do all the threads access a common object?);
> - A library you're using that single-threads;
> - Your back-end systems, such as your database server.
> 
> - Peter
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Installing-Multiple-Instances-on-Windows-Server-2003-tp19267576p19269403.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Re: Can't execute servlet project

2008-09-02 Thread David Smith

Do you have jstl.jar and standard.jar in your WEB-INF/lib directory?

--David

sam wun wrote:

Hi,



I have added testdb.jsp in the following path in Suse linux (the tomcat 
server):


/tomcat/apache-tomcat-5.5.26/webapps/DBTest/



The content of the testdb.jsp code is:



<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select FIRST_NAME from DBTest.Customer



  
DB Test
  
  

  Results


Foo ${row.foo}
Bar ${row.bar}


  




when I execute url 10.1.9.1:8080/testdb.jsp in firefox web browser, it 
shown the following error:


HTTP Status 500 - 


type Exception report

message 

description The server encountered an internal error () that prevented it 
from fulfilling this request.


exception org.apache.jasper.JasperException: The absolute uri: 
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or 
the jar files deployed with this application


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

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

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

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

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

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

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

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

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

Here is the web.xml file I got:

(in the path /tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/)




xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>


DBTest


Create customer servlet

CreateCustomerServlet

CreateCustomerServlet



servlet.CreateCustomerServlet




CreateCustomerServlet

/CreateCustomerServlet



index.html
index.htm
index.jsp
default.html
default.htm
default.jsp



DB Connection

jdbc/TestDB

javax.sql.DataSource

Container

  





Thanks

Sam

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  

- Original Message -
From: Martin Gainty
Sent: 28/08/08 10:07 pm
To: [EMAIL PROTECTED]
Subject: RE: Can't execute servlet project

david's advice is correct..

configure ./META-INF/ApplicationContext.xml 

debug="5" reloadable="true" crossContext="true">














  type="javax.sql.DataSource"

   maxActive="100" maxIdle="30" maxWait="1"
   username="javauser" password="javadude" 
driverClassName="com.mysql.jdbc.Driver"
   
url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>



//sub in the username and password for the DB
also in /WEB-INF/web.xml you would need this entry
http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
  MySQL Test App
  
  DB Connection
  jdbc/TestDB
  javax.sql.DataSource
  Container
  

then put in this test code changing :
DBNAME to the name of your Database
TABLE to the name of the table in DBNAME you want to query
COLUMN for the specific attribute to query
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select COLUMN from DBNAME.TAB

Re: ERROR Starting 2nd instance of Tomcat

2008-09-02 Thread David Smith
I'm not sure about your install layout at the moment -- whether you 
installed via a tomcat original distribution or some third party 
packaged version. If you used a third party package version, undo your 
efforts to duplicate the first tomcat. Then download, unarchive, and 
customize the second tomcat in it's own directory. Lastly customize the 
service scripts for the second one to look at the second one specifically.


--David

Eduardo Ponce de Leon wrote:

David,
I can´t start the newly stock tomcat version. When I try to start up tomcat
by ./catalina.sh run I am getting an error which is pointing to the original
tomcat version.. how can I avoid that and just start the instance Ive just
installed?


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 10:08 AM

To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

I mean your command line for starting the second tomcat includes the 
phrase 'In the config file'. Why is that there? I doubt it's coincidence 
your error message contains the exact same phrase that you have on the 
command line. It's most likely the source of your problem. 'tomcat5-test 
start' should be more than enough to get the second instance going.


--David

Eduardo Ponce de León wrote:
  

I'vedone that to start my second instance! Don’t I need a script to start


it
  

up?

Eduardo Ponce de León
Desarrollador
 
Latino Mobile 
---

Moliere 450A-101, México D.F.
(T) +5255 -   52 50 65 52
(M)+5255 -   55 06 37 16
(E) [EMAIL PROTECTED]
---
www.latinomobile.com.mx
El Mejor Contenido Latino para Móviles

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2008 11:38 PM

To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

Ok ... taking a second look at this, why on earth are you using the 
command 'tomcat5-test start In the config file' to start tomcat?  In 
particular, 'In the config file' phrase has no place on the command line.


--David

Eduardo Ponce de León wrote:
  

 


I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
tomcat folder and modified the server.xml files with different ports.
  

I've
  

also created a startup script, but when I run the script I am getting
  

this
  

error... Can anyone help please!!

[EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
Starting tomcat5-test: [ FAILED ] 

This is what i get in my catalina.out 


-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied
-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied

This is my startup script... #!/bin/bash # # tomcat5 This shell script

  

takes
  


care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN

  

INIT
  


INFO
# Provides: tomcat5
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Description: Release implementation for Servlet 2.4 and JSP 2.0
# Short-Description: start and stop tomcat
### END INIT INFO
# # - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
# - heavily rewritten by Deepak Bhole and Jason Corley
# # commented out until the RHEL and FC daemon functions converge
# Source the function library
#if [ -r "/etc/rc.d/init.d/functions" ]; then
#. /etc/rc.d/init.d/functions
#fi
NAME="$(basename $0)"
unset ISBOOT
if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
NAME="${NAME:3}"
ISBOOT="1"
fi
# For SELinux we need to use 'runuser' not 'su'
if [ -x "/sbin/runuser" ]; then
SU="/sbin/runuser"
else
SU="su"
fi
# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG="/etc/tomcat5/tomcat5.conf"
if [ -r "$TOMCAT_CFG" ]; then
. ${TOMCAT_CFG}
fi
# Get instance specific config file
if [ -r "/etc/sysconfig/${NAME}" ]; then
. /etc/sysconfig/${NAME}
fi
# Define which connector port to use
CONNECTOR_PORT="${CONNECTOR_PORT:-8080}"
# Path to the tomcat launch script TOMCAT_SCRIPT="/usr/bin/tomcat5-test"
# Path to the script that will refresh jar symlinks on startup
TOMCAT_RELINK_SCRIPT="${CATALINA_HOME}/bin/relink"
# Tomcat program name
TOMCAT_PROG="$NAME"
# Define the tomcat username
TOMCAT_USER="${TOMCAT_USER:-tomcat}"
# Define the tomcat log file
TOMCAT_LOG="${TOMCAT_LOG:-/usr/share/tomcat5-test/logs/logscatalina.out}"
RETVAL="0"
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function checkpid() {
local i
for i in $* ; do
if [ -d "/proc/${i}" ]; then
return 0
fi
done
return 1
}
# remove when the RHEL and FC daemon functions converge
# (pulled from /etc/rc.d/init.d/functions)
function echo_failure() {
echo -en "\\033[60G  "
echo -n "[ "
echo -n $"FAILED"
echo -n " ]"
echo -ne "\r"
return 1

Re: Re: Can't execute servlet project

2008-09-02 Thread sam wun
Hi David,



No, I don't have this 2 jar files in the common/lib/ directory.

where can I download it from?



Thanks

Sam




> - Original Message -
> From: David Smith
> Sent: 02/09/08 10:39 pm
> To: Tomcat Users List
> Subject: Re: Can't execute servlet project
> 
> Do you have jstl.jar and standard.jar in your WEB-INF/lib directory?
> 
> --David
> 
> sam wun wrote:
> > Hi,
> >
> >
> >
> > I have added testdb.jsp in the following path in Suse linux (the tomcat 
> > server):
> >
> > /tomcat/apache-tomcat-5.5.26/webapps/DBTest/
> >
> >
> >
> > The content of the testdb.jsp code is:
> >
> >
> >
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> >
> > 
> > select FIRST_NAME from DBTest.Customer
> > 
> >
> > 
> >   
> > DB Test
> >   
> >   
> >
> >   Results
> >
> > 
> > Foo ${row.foo}
> > Bar ${row.bar}
> > 
> >
> >   
> > 
> >
> >
> >
> > when I execute url 10.1.9.1:8080/testdb.jsp in firefox web browser, it 
> > shown the following error:
> >
> > HTTP Status 500 - 
> >
> > type Exception report
> >
> > message 
> >
> > description The server encountered an internal error () that prevented 
> it 
> > from fulfilling this request.
> >
> > exception org.apache.jasper.JasperException: The absolute uri: 
> > http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml 
> or 
> > the jar files deployed with this application
> > 
> > 
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
> > 
> > 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
> > 
> > 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
> > 
> > 
> org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
> > 
> > 
> org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:148)
> > 
> org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
> > org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
> > org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
> > org.apache.jasper.compiler.Parser.parse(Parser.java:127)
> > 
> > 
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
> > 
> > 
> org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
> > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
> > 
> > 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> >
> > Here is the web.xml file I got:
> >
> > (in the path /tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/)
> >
> >
> >
> > 
> >  > xmlns="http://java.sun.com/xml/ns/j2ee"; 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> > http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> > 
> > DBTest
> > 
> > 
> > Create customer servlet
> > 
> > CreateCustomerServlet
> > 
> > CreateCustomerServlet
> > 
> > 
> > servlet.CreateCustomerServlet
> > 
> > 
> > 
> > CreateCustomerServlet
> > 
> > /CreateCustomerServlet
> > 
> > 
> > index.html
> > index.htm
> > index.jsp
> > default.html
> > default.htm
> > default.jsp
> > 
> > 
> > 
> > DB Connection
> > 
> > jdbc/TestDB
> > 
> > javax.sql.DataSource
> > 
> > Container
> >   
> > 
> >
> >
> >
> >
> > Thanks
> >
> > Sam
> >
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> >   
> >> - Original Message -
> >> From: Martin Gainty
> >> Sent: 28/08/08 10:07 pm
> >> To: [EMAIL PROTECTED]
> >> Subject: RE: Can't execute servlet project
> >>
> >> david's advice is correct..
> >>
> >> configure ./META-INF/ApplicationContext.xml 
> >>  >> debug="5" reloadable="true" crossContext="true">
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >> 
> >>
> >>>> type="javax.sql.DataSource"
> >>maxActive="100" maxIdle="30" maxWait="1"
> >>username="javauser" pa

RE: Tomcat connector receives 404, IIS logs 200

2008-09-02 Thread Karim Zaki
I checked and there's no custom error page. As for the browser, it shows 
Tomcat's 404 error page. However, the IIS logs still show a 200.


From: Rainer Jung [EMAIL PROTECTED]
Sent: Monday, September 01, 2008 04:43
To: Tomcat Users List
Subject: Re: Tomcat connector receives 404, IIS logs 200

[EMAIL PROTECTED] wrote:
> Are you sure you don't have something like this in your Tomcat's web.xml:
>
> 
>  404
>  /Failure.jsp
> 
>
> What response do you get in browser when you try to access a resource
> that does not exist on TC, after by-passing IIS i.e.
> http://:/?

And what result do you get in your Browser, when using IIS/isapi
redirector/Tomcat? Do you get back a 404 or a 200?

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

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



Question regarding FormAutenticator

2008-09-02 Thread Gregor Schneider
Hi guys,

I have quite a bit of a problem here.

Status quo:

We have some heavily framed static html, which now should be served by
Tomcat (5.5) only via SSL.
The whole content needs to be protected, so I've implemented a
FormAuthenticator.

However, the heavy framing *yuck* of this static html is giving me headaches:

When the Tomcat-session times out, the loginForm shows up as expected, however:

When the URl requested is something like



all the outer frames are lost and only the page
"/somehwre/in/my/directory/stuff.html" is displayed.

What I'd like to achieve is a redirect to "/" (index.html" after
entering the credentials into the LoginForm.

My hope was that I could solve this with the error-page-directive and
a 403-errorpage, however, there's no HTTP403-status.

I know that a while ago we had a similar problem, subclassed
"org.apache.catalina.authenticator.FormAuthenticator" and patched
Tomcat, but this is something I'd like to avoid.

So any ideas how a direct request to the root-context after every
login could be achieved?

TIA

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



RE: ERROR Starting 2nd instance of Tomcat

2008-09-02 Thread Eduardo Ponce de Leon
e" ]; then
>>> export randomPort3="$port"
>>> isSet3="true"
>>> fi
>>> fi
>>> done
>>> }
>>> function makeHomeDir() {
>>> if [ ! -d "$CATALINA_HOME" ]; then
>>> echo "$CATALINA_HOME does not exist, creating"
>>> if [ ! -d "/var/lib/${NAME}" ]; then
>>> mkdir -p /var/lib/${NAME}
>>> cp -pLR /var/lib/tomcat5-test/* /var/lib/${NAME}
>>> fi
>>> mkdir -p $CATALINA_HOME ${CATALINA_HOME}/conf
>>> >> /var/cache/${NAME}/work /var/log/${NAME}
>>> for i in temp work; do
>>> ln -fs /var/cache/${NAME}/${i} 
>>> ${CATALINA_HOME}/${i}
>>> done
>>> for i in common server shared webapps; do
>>> ln -fs /var/lib/${NAME}/${i} 
>>> ${CATALINA_HOME}/${i}
>>> done
>>> ln -fs /var/log/${NAME} ${CATALINA_HOME}/logs
>>> cp -pLR /usr/share/tomcat5-test/* 
>>> ${CATALINA_HOME}/conf/
>>> cp -pLR /usr/share/tomcat5-test/bin $CATALINA_HOME
>>> cp -pLR /usr/share/tomcat5-test/* 
>>> ${CATALINA_HOME}/work/
>>> chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME} fi
>>> }
>>> function parseOptions() {
>>> options=""
>>> options="$options $(
>>> awk '!/^#/ && !/^$/ { ORS=" "; print 
>>> "export ", $0, ";" }' \
>>> $TOMCAT_CFG
>>> )"
>>> if [ -r "/etc/sysconfig/${NAME}" ]; then
>>> options="$options $(
>>> awk '!/^#/ && !/^$/ { ORS=" ";
>>> print "export ", $0, ";" }' \
>>> /etc/sysconfig/${NAME}
>>> )"
>>> fi
>>> TOMCAT_SCRIPT="$options $TOMCAT_SCRIPT"
>>> }
>>> # See how we were called.
>>> function start() {
>>> echo -n "Starting ${TOMCAT_PROG}: "
>>> if [ -f "/var/lock/subsys/${NAME}" ] ; then if [ -f
>>>   
> "/var/run/${NAME}.pid"
>   
>>> ]; then
>>> read kpid < /var/run/${NAME}.pid
>>> if checkpid $kpid 2>&1; then
>>> echo "$NAME process already running"
>>> return -1
>>> else
>>> echo "lock file found but no process running for" echo "pid $kpid,
>>> continuing"
>>> fi
>>> fi
>>> fi
>>> export CATALINA_PID="/var/run/${NAME}.pid"
>>> touch $CATALINA_PID
>>> chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
>>> if [ "$CATALINA_HOME" != "/usr/share/tomcat5-test" ];
>>> then
>>> # Create a tomcat directory if it doesn't exist
>>> makeHomeDir
>>> # If CATALINA_HOME doesn't exist modify port number so that
>>> # multiple instances don't interfere with each other findFreePorts
>>> sed -i -e "s/8005/${randomPort1}/g" -e "s/8080/${CONNECTOR_PORT}/g" \
>>> -e "s/8009/${randomPort2}/g" -e "s/8443/${randomPort3}/g" \
>>> ${CATALINA_HOME}/conf/server.xml
>>> fi
>>> $TOMCAT_RELINK_SCRIPT
>>> $SU - $TOMCAT_USER -c "$TOMCAT_SCRIPT start" >>
>>> $TOMCAT_LOG 2>&1
>>> RETVAL="$?"
>>> if [ "$RETVAL" -eq 0 ]; then
>>> echo_success
>>> touch /var/lock/subsys/${NAME}
>>> else
>>> echo_failure
>>> fi
>>> echo
>>> return $RETVAL
>>> }
>>> function status() {
>>> RETVAL="1"
>>> if [ -f "/var/run/${NAME}.pid" ]; then
>>> read kpid < /var/run/${NAME}.pid
>>> if checkpid $kpid 2>&1; then
>>> echo "$0 is already running (${kpid})"
>>> RETVAL="0"
>>> else
>>> echo "lock file found but no process running for pid $kpid"
>>> fi
>>> else
>>> pid="$(pgrep -u tomcat java)"
>>> if [ -n "$pid" ]; then
>>> echo "$0 running (${pid}) but no PID file exists"
>>> RETVAL="0"
>>> else
>>> echo "$0 is stopped"
>>> fi
>>> fi
>>> return $RETVAL
>>> }
>>> function stop() {
>>> local STOP_VERBOSE="false"
>>> echo -n "Stopping $TOMCAT_PROG: "
>>> if [ -f "/var/lock/subsys/${NAME}" ]; then
>>> $SU - $TOMCAT_USER -c "$TOMCAT_SCRIPT stop" >> 
>>> $TOMCAT_LOG 2>&1
>>> RETVAL="$?"
>>> if [ "$RETVAL" -eq "0" ]; then
>>> count="0"
>>> if [ -f "/var/run/${NAME}.pid" ]; then
>>> read kpid < /var/run/${NAME}.pid
>>> until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \
>>> [ "$count" -gt "$SHUTDOWN_WAIT" ]; do
>>> if [ "$STOP_VERBOSE" = "true" ]; then
>>> echo -n -e "\nwaiting for processes $kpid to exit"
>>> fi
>>> sleep 1
>>> let count="${count}+1"
>>> done
>>> if [ "$count" -gt "$SHUTDOWN_WAIT" ]; then
>>> if [ "$STOP_VERBOSE" = "true" ]; then
>>> echo -n -e "\nkilling processes which didn't stop"
>>> echo -n -e "after "
>>> echo -n "$SHUTDOWN_WAIT seconds"
>>> fi
>>> kill -9 $kpid
>>> fi
>>> echo_success
>>> if [ "$count" -gt "0" ]; then
>>> echo -n -e "\n"
>>> fi
>>> fi
>>> rm -f /var/lock/subsys/$NAME /var/run/$NAME.pid
>>> else
>>> echo_failure
>>> fi
>>> fi
>>> }
>>> # See how we were called.
>>> case "$1" in
>>> start)
>>> parseOptions
>>> start
>>> ;;
>>> stop)
>>> parseOptions
>>> stop
>>> ;;
>>> restart)
>>> parseOptions
>>> stop
>>> sleep 2 
>>> start
>>> ;;
>>> condrestart)
>>> if [ -f "/var/run/${NAME}.pid" ]; then
>>> parseOptions
>>> stop
>>> start
>>> fi
>>> ;;
>>> status)
>>> status
>>> ;;
>>> version)
>>> parseOptions
>>> "${JAVA_HOME}/bin/java" \ -classpath
>>> "${CATALINA_HOME}/server/lib/catalina.jar" \
>>> org.apache.catalina.util.ServerInfo ;; *) echo "Usage: $TOMCAT_PROG 
>>> {start|stop|restart|condrestart|status|version}"
>>> exit 1
>>> esac
>>> exit $RETVAL
>>>
>>>  
>>>
>>> Eduardo Ponce de León
>>>
>>> Desarrollador
>>>
>>>  
>>>
>>> Latino Mobile 
>>>
>>> ---
>>>
>>> Moliere 450A-101, México D.F.
>>>
>>> (T) +5255 -   52 50 65 52
>>>
>>> (M)+5255 -   55 06 37 16
>>>
>>> (E)  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
>>>
>>> ---
>>>
>>>  <http://www.latinomobile.com.mx/> www.latinomobile.com.mx
>>>
>>> El Mejor Contenido Latino para Móviles
>>>
>>>  
>>>   
>>> 
>>>   
>>   
>> 
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> __ Information from ESET Smart Security, version of virus
signature
> database 3397 (20080828) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>   


-- 
David Smith
Programmer/Analyst
College of Agriculture and Life Sciences
Cornell University
B32 Morrison Hall
Ithaca, NY 14853
Phone: (607) 255-4521


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


__ Information from ESET Smart Security, version of virus signature
database 3406 (20080902) __

The message was checked by ESET Smart Security.

http://www.eset.com



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



Re: ERROR Starting 2nd instance of Tomcat

2008-09-02 Thread David Smith
Don't edit your profile. Any environment variables needed by tomcat 
should be provided by the service script. Just define them at the top 
before an processing. That isolates the second one from the first.


--David

Eduardo Ponce de Leon wrote:

David,
Thanks for the response, that is what I did. I installed a stock version in
a different directory and customize it. Created a global variable for my
home directory (in my profile file) but I when I run ./catalina.sh run to
start it I am getting this error. Any ideas?

[EMAIL PROTECTED] bin]# ./catalina.sh run
Using CATALINA_BASE: /usr/local/tomcat-test 
Using CATALINA_HOME_TEST: /usr/local/tomcat-test 
Using CATALINA_TMPDIR_TEST: /usr/local/tomcat-test/temp 
Using JRE_HOME: /usr/lib/jvm/java

WARNING: error instantiating 'org.apache.juli.ClassLoaderLogManager'
referenced by java.util.logging.manager, class not found
java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager not
found <>
WARNING: error instantiating '1catalina.org.apache.juli.FileHandler,'
referenced by handlers, class not found
java.lang.ClassNotFoundException: 1catalina.org.apache.juli.FileHandler,
<>
Exception during runtime initialization
java.lang.ExceptionInInitializerError
<>
Caused by: java.lang.NullPointerException <>

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 02, 2008 7:45 AM

To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

I'm not sure about your install layout at the moment -- whether you 
installed via a tomcat original distribution or some third party 
packaged version. If you used a third party package version, undo your 
efforts to duplicate the first tomcat. Then download, unarchive, and 
customize the second tomcat in it's own directory. Lastly customize the 
service scripts for the second one to look at the second one specifically.


--David

Eduardo Ponce de Leon wrote:
  

David,
I can´t start the newly stock tomcat version. When I try to start up


tomcat
  

by ./catalina.sh run I am getting an error which is pointing to the


original
  

tomcat version.. how can I avoid that and just start the instance Ive just
installed?


-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 29, 2008 10:08 AM

To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

I mean your command line for starting the second tomcat includes the 
phrase 'In the config file'. Why is that there? I doubt it's coincidence 
your error message contains the exact same phrase that you have on the 
command line. It's most likely the source of your problem. 'tomcat5-test 
start' should be more than enough to get the second instance going.


--David

Eduardo Ponce de León wrote:
  


I'vedone that to start my second instance! Don’t I need a script to start

  

it
  


up?

Eduardo Ponce de León
Desarrollador
 
Latino Mobile 
---

Moliere 450A-101, México D.F.
(T) +5255 -   52 50 65 52
(M)+5255 -   55 06 37 16
(E) [EMAIL PROTECTED]
---
www.latinomobile.com.mx
El Mejor Contenido Latino para Móviles

-Original Message-
From: David Smith [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 28, 2008 11:38 PM

To: Tomcat Users List
Subject: Re: ERROR Starting 2nd instance of Tomcat

Ok ... taking a second look at this, why on earth are you using the 
command 'tomcat5-test start In the config file' to start tomcat?  In 
particular, 'In the config file' phrase has no place on the command line.


--David

Eduardo Ponce de León wrote:
  

  
 


I am trying to run a 2nd instace of tomcat. For this, ive duplicated the
tomcat folder and modified the server.xml files with different ports.
  


I've
  


also created a startup script, but when I run the script I am getting
  


this
  


error... Can anyone help please!!

[EMAIL PROTECTED] tomcat5-test]# tomcat5-test start In the config file
Starting tomcat5-test: [ FAILED ] 

This is what i get in my catalina.out 


-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied
-sh: line 0: export: `In the config file': not a valid identifier
/bin/bash: /usr/bin/tomcat5-test: Permission denied

This is my startup script... #!/bin/bash # # tomcat5 This shell script

  


takes
  

  

care of starting and stopping Tomcat # # chkconfig: - 80 20 # ### BEGIN

  


INIT
  

  

INFO
# Provides: tomcat5
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start:
# Default-Stop:
# Description: Release implementation for Servlet 2.4 and JSP 2.0
# Short-Description: start and stop tomcat
### END INIT INFO
# # - originally written by Henri Gomez, Keith Irwin, and Nicolas


Mailhot
  

# - heavily rewritten by Deepak Bhole and Jason

Cannot access remote web app

2008-09-02 Thread felix l
Hi all,

I have a Java web app that has shown to be working while accessing via
http://localhost:8080/webapp1. I have two machines, 1 laptop and 1 desktop,
both installed Tomcat 5.5 on WinXP. The problem is when I start Tomcat on my
laptop, both machine can access the web app. On the other hand, if I start
Tomcat on my desktop, my laptop cannot access it and give me a good old 404
error. Where should I first look into in order to fix the problem? Would
Spybot or anti-virus app be a cause of this?

Thanks,
Felix


Re: Can't execute servlet project

2008-09-02 Thread David Smith
Hmmm... good question.  I moved over to Maven and don't manually 
download these any more.  This looks like it should do the trick:


Try http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi

--David

sam wun wrote:

Hi David,



No, I don't have this 2 jar files in the common/lib/ directory.

where can I download it from?



Thanks

Sam




  

- Original Message -
From: David Smith
Sent: 02/09/08 10:39 pm
To: Tomcat Users List
Subject: Re: Can't execute servlet project

Do you have jstl.jar and standard.jar in your WEB-INF/lib directory?

--David

sam wun wrote:


Hi,



I have added testdb.jsp in the following path in Suse linux (the tomcat 
server):


/tomcat/apache-tomcat-5.5.26/webapps/DBTest/



The content of the testdb.jsp code is:



<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select FIRST_NAME from DBTest.Customer



  
DB Test
  
  

  Results


Foo ${row.foo}
Bar ${row.bar}


  




when I execute url 10.1.9.1:8080/testdb.jsp in firefox web browser, it 
shown the following error:


HTTP Status 500 - 


type Exception report

message 

description The server encountered an internal error () that prevented 
  
it 


from fulfilling this request.

exception org.apache.jasper.JasperException: The absolute uri: 
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml 
  
or 


the jar files deployed with this application


  

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




  

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




  

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




  

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




  

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:148)



  

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)


org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
org.apache.jasper.compiler.Parser.parse(Parser.java:127)


  

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




  

org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)


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


  

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




  

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)



  

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

Here is the web.xml file I got:

(in the path /tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/)




xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>


DBTest


Create customer servlet

CreateCustomerServlet

CreateCustomerServlet



servlet.CreateCustomerServlet




CreateCustomerServlet

/CreateCustomerServlet



index.html
index.htm
index.jsp
default.html
default.htm
default.jsp



DB Connection

jdbc/TestDB

javax.sql.DataSource

Container

  





Thanks

Sam

javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  
  

- Original Message -
From: Martin Gainty
Sent: 28/08/08 10:07 pm
To: [EMAIL PROTECTED]
Subject: RE: Can't execute servlet project

david's advice is correct..

configure ./META-INF/ApplicationContext.xml 

debug="5" reloadable="true" crossContext="true">














  type="javax.sql.DataSource"

   maxActive="100" maxIdle="30" maxWait="1"
   username="javauser" password="javadude" 
driverClassName="com.mysql.jdbc.Driver"
   
url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>



//sub in the username and password for the DB
also in 

Re: Re: Can't execute servlet project

2008-09-02 Thread sam wun
I just went to the website , very confused.

The taglib file is not a jar file. they are binary or source file.

And I couldn't find standard.jar file either.



Thanks



> - Original Message -
> From: David Smith
> Sent: 02/09/08 11:44 pm
> To: Tomcat Users List
> Subject: Re: Can't execute servlet project
> 
> Hmmm... good question.  I moved over to Maven and don't manually 
> download these any more.  This looks like it should do the trick:
> 
> Try 
> http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
> 
> --David
> 
> sam wun wrote:
> > Hi David,
> >
> >
> >
> > No, I don't have this 2 jar files in the common/lib/ directory.
> >
> > where can I download it from?
> >
> >
> >
> > Thanks
> >
> > Sam
> >
> >
> >
> >
> >   
> >> - Original Message -
> >> From: David Smith
> >> Sent: 02/09/08 10:39 pm
> >> To: Tomcat Users List
> >> Subject: Re: Can't execute servlet project
> >>
> >> Do you have jstl.jar and standard.jar in your WEB-INF/lib directory?
> >>
> >> --David
> >>
> >> sam wun wrote:
> >> 
> >>> Hi,
> >>>
> >>>
> >>>
> >>> I have added testdb.jsp in the following path in Suse linux (the 
> tomcat 
> >>> server):
> >>>
> >>> /tomcat/apache-tomcat-5.5.26/webapps/DBTest/
> >>>
> >>>
> >>>
> >>> The content of the testdb.jsp code is:
> >>>
> >>>
> >>>
> >>> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
> >>> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> >>>
> >>> 
> >>> select FIRST_NAME from DBTest.Customer
> >>> 
> >>>
> >>> 
> >>>   
> >>> DB Test
> >>>   
> >>>   
> >>>
> >>>   Results
> >>>
> >>> 
> >>> Foo ${row.foo}
> >>> Bar ${row.bar}
> >>> 
> >>>
> >>>   
> >>> 
> >>>
> >>>
> >>>
> >>> when I execute url 10.1.9.1:8080/testdb.jsp in firefox web browser, 
> it 
> >>> shown the following error:
> >>>
> >>> HTTP Status 500 - 
> >>>
> >>> type Exception report
> >>>
> >>> message 
> >>>
> >>> description The server encountered an internal error () that 
> prevented 
> >>>   
> >> it 
> >> 
> >>> from fulfilling this request.
> >>>
> >>> exception org.apache.jasper.JasperException: The absolute uri: 
> >>> http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml 
> >>>   
> >> or 
> >> 
> >>> the jar files deployed with this application
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
> >> 
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
> >> 
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
> >> 
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:317)
> >> 
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:148)
> >> 
> >>>   
> >>>   
> >> 
> org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
> >> 
> >>>   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
> >>>   org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
> >>>   org.apache.jasper.compiler.Parser.parse(Parser.java:127)
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
> >> 
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
> >> 
> >>>   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
> >>>   org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
> >>>   org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
> >>>   org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
> >> 
> >>>   
> >>>
> >>>   
> >> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
> >> 
> >>>   
> >>>   
> >> 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> >> 
> >>>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> >>>
> >>> Here is the web.xml file I got:
> >>>
> >>> (in the path /tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/)
> >>>
> >>>
> >>>
> >>> 
> >>>  >>> xmlns="http://java.sun.com/xml/ns/j2ee"; 
> >>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> >>> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> >>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
> >>> 
> >>> DBTest
> >>> 
> >>> 
> >>> Create customer servlet
> >>> 
> >>> CreateCustomerServlet
> >>> 
> >>> CreateCustomerServlet
> >>> 
> >>> 
> >>> servlet.CreateCustomerServlet
> >>> 
> >>> 
> >>>   

Re: Can't execute servlet project

2008-09-02 Thread David Smith
Download the binary zip file and expand it.  Within it is a lib 
directory with just standard.jar and jstl.jar.


--David

sam wun wrote:

I just went to the website , very confused.

The taglib file is not a jar file. they are binary or source file.

And I couldn't find standard.jar file either.



Thanks



  

- Original Message -
From: David Smith
Sent: 02/09/08 11:44 pm
To: Tomcat Users List
Subject: Re: Can't execute servlet project

Hmmm... good question.  I moved over to Maven and don't manually 
download these any more.  This looks like it should do the trick:


Try 
http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi


--David

sam wun wrote:


Hi David,



No, I don't have this 2 jar files in the common/lib/ directory.

where can I download it from?



Thanks

Sam




  
  

- Original Message -
From: David Smith
Sent: 02/09/08 10:39 pm
To: Tomcat Users List
Subject: Re: Can't execute servlet project

Do you have jstl.jar and standard.jar in your WEB-INF/lib directory?

--David

sam wun wrote:



Hi,



I have added testdb.jsp in the following path in Suse linux (the 
  
tomcat 


server):

/tomcat/apache-tomcat-5.5.26/webapps/DBTest/



The content of the testdb.jsp code is:



<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select FIRST_NAME from DBTest.Customer



  
DB Test
  
  

  Results


Foo ${row.foo}
Bar ${row.bar}


  




when I execute url 10.1.9.1:8080/testdb.jsp in firefox web browser, 
  
it 


shown the following error:

HTTP Status 500 - 


type Exception report

message 

description The server encountered an internal error () that 
  
prevented 

  
  
it 



from fulfilling this request.

exception org.apache.jasper.JasperException: The absolute uri: 
http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml 
  
  
or 



the jar files deployed with this application


  
  

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






  
  

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






  
  

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






  
  

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






  
  

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:148)





  
  

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)




org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
org.apache.jasper.compiler.Parser.parse(Parser.java:127)


  
  

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






  
  

org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)




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


  
  

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






  
  

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)





  
  

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)




org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

Here is the web.xml file I got:

(in the path /tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/)




xmlns="http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>


DBTest


Create customer servlet

CreateCustomerServlet

CreateCustomerServlet



servlet.CreateCustomerServlet




CreateCustomerServlet

/CreateCustomerServlet



index.html
index.htm
index.jsp
default.html
default.htm
default.jsp



DB Connection

jdbc

Open source web-site management utility based on Tomcat

2008-09-02 Thread Toby White
Hi guys,

I am a completely newbie in tomcat.

Just wondering if there is any open-source tool which would help me create
and organize the contents of our company's web-site (about us, our services,
our clients etc..).
I am only familiar with pure HTML, but it does not provide any tools to
manage content and I would like our company's web-site to look quite pretty
(i.e servlet-based).

Do you know if I can afford this using tomcat?
Any tomcat projects concentrating on this?

I know there are some forum-engine projects or photo-gallery engine's. Is
there anything for simple company's web-sites?


Thank you.

Regards,
Toby


Re: Re: Can't execute servlet project

2008-09-02 Thread sam wun
Thanks David,



After copied the jstl and standard dot jar files into the directory:

linux:~/tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/lib # ls
.  ..  jstl.jar  mysql-connector-java-5.1.3-rc-bin.jar  standard.jar



I got the following different errors:

(In line 4, what is jdbc/TestDB? I have database called javatest, and table 
testdata. Should I rename it to jdbc/javatest?





HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented it 
from fulfilling this request.

exception org.apache.jasper.JasperException: Exception in JSP: 
/testdb.jsp:4

1: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
2: <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
3: 
4: 
5: select id, foo, bar from testdata
6: 
7: 


Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.ServletException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.jsp.JspException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)

org.apache.jsp.testdb_jsp._jspx_meth_sql_005fquery_005f0(testdb_jsp.java:101)
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)   
 
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)





> - Original Message -
> From: David Smith
> Sent: 03/09/08 01:23 am
> To: Tomcat Users List
> Subject: Re: Can't execute servlet project
> 
> Download the binary zip file and expand it.  Within it is a lib 
> directory with just standard.jar and jstl.jar.
> 
> --David
> 
> sam wun wrote:
> > I just went to the website , very confused.
> >
> > The taglib file is not a jar file. they are binary or source file.
> >
> > And I couldn't find standard.jar file either.
> >
> >
> >
> > Thanks
> >
> >
> >
> >   
> >> - Original Message -
> >> From: David Smith
> >> Sent: 02/09/08 11:44 pm
> >> To: Tomcat Users List
> >> Subject: Re: Can't execute servlet project
> >>
> >> Hmmm... good question.  I moved over to Maven and don't manually 
> >> download these any more.  This looks like it should do the trick:
> >>
> >> Try 
> >> 
> http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
> >>
> >> --David
> >>
> >> sam wun wrote:
> >> 
> >>> Hi David,
> >>>
> >>>
> >>>
> >>> No, I don't have this 2 jar files in the common/lib/ directory.
> >>>
> >>> where can I download it from?
> >>>
> >>>
> >>>
> >>> Thanks
> >>>
> >>> Sam
> >>>
> >>>
> >>>
> >>>
> >>>   
> >>>   
>  - Original Message -
>  From: David Smith
>  Sent: 02/09/08 10:39 pm
>  To: Tomcat Users List
>  Subject: Re: Can't execute servlet project
> 
>  Do you have jstl.jar and standard.jar in your WEB-INF/lib directory?
> 
>  --David
> 
>  sam wun wrote:
>  
>  
> > Hi,
> >
> >
> >
> > I have added testdb.jsp in the following path in Suse linux (the 
> >   
> >> tomcat 
> >> 
> > server):
> >
> > /tomcat/apache-tomcat-5.5.26/webapps/DBTest/
> >
> >
> 

Re: IIS connector issue?

2008-09-02 Thread Jamie Robert Thompson
2008/9/1 Jamie Robert Thompson <[EMAIL PROTECTED]>

> Hi, I'm currently stuck at the last hurdle of a task which involves
> integrating JavaHelp into an ASP.net application. I know little about Java,
> even less about JSP, but my boss likes server-side JavaHelp *sigh*. I chose
> Tomcat 6.0.18 and the connector (1.2.26) as my path to integrating it with
> our application. Now, I've set everything up on my XP workstation (IIS5) and
> it all works fine, but when I test it on the deployment servers (Win2K3
> Server with IIS6), I have a strange problem. Namely, if I go directly to the
> Tomcat URL first i.e. "http://localhost:8080/test/Help/help.jsp";, it
> works, and continues to work if I then go to IIS via "
> http://localhost/test/Help/help.jsp";. If I go to IIS first however, and
> then Tomcat, then both fail with nulls being returned from the help objects.
> Something is causing the object to be created differently.
>
> Now, the reason I get the same response thereafter is probably because the
> help objects are being persisted in the session (or so I take it from the
> Java bean stuff in the JSP), but I don't know why I get different outcomes
> depending on the initial access route.
>
> I'd like to be able to debug this, but as I say, I've not experience with
> Java (and no-one else here does), and accordingly, I haven't the foggiest
> how to set up a debugger to dig into the matter. Settings-wise, everything
> is set to the defaults, and my connector settings are as given in the
> associated tutorial (except I changed the uri worker map to only handle jsp
> files). Only bit of magic is that I've added a context node to the localhost
> in server.xml to match up with the virtual directories used in our IIS
> setup.
>
> Can anyone think of things I can try to get this working?
>
> - Jamie
>

Replying to my own message as I hate it when people solve their problems and
leaves threads dangling without the helpful conclusion.

Basically, the problem was that IIS 6 didn't have a MIME type assigned to
the map file (*.jhm) and thus JavaHelp silently failed when it was unable to
construct that part of the HelpSet object. At least when the helpset
definition (*.hs) didn't have a MIME type the failure was reported. Anyway,
hopefully that will help someone at some point. Drove me nuts working out
what was going wrong and I now know far more Java than I was hoping to for
this task...

- Jamie


Re: Can't execute servlet project

2008-09-02 Thread David Smith
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create JDBC driver of class '' for connect URL 'null'"


This error typically indicates the JNDI db pool hasn't been setup 
correctly.  Some config option isn't setup.  What's in this webapp's 
context xml file?  Also what's in it's WEB-INF/web.xml?  Lastly, you 
should have your database driver jar file in tomcat's common/lib (for 
tomcat v 5.5) or /lib (tomcat v 6). 

You can also take a look at tomcat's JDBC Datasource howto's on the 
tomcat website for your version of tomcat which offer a lot of help.


--David

sam wun wrote:

Thanks David,



After copied the jstl and standard dot jar files into the directory:

linux:~/tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/lib # ls
.  ..  jstl.jar  mysql-connector-java-5.1.3-rc-bin.jar  standard.jar



I got the following different errors:

(In line 4, what is jdbc/TestDB? I have database called javatest, and table 
testdata. Should I rename it to jdbc/javatest?






HTTP Status 500 - 


type Exception report

message 

description The server encountered an internal error () that prevented it 
from fulfilling this request.


exception org.apache.jasper.JasperException: Exception in JSP: 
/testdb.jsp:4


1: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
2: <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
3: 
4: 

5: select id, foo, bar from testdata
6: 
7: 



Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.ServletException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"


org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.jsp.JspException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"


org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)

org.apache.jsp.testdb_jsp._jspx_meth_sql_005fquery_005f0(testdb_jsp.java:101)
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:58)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)






  

- Original Message -
From: David Smith
Sent: 03/09/08 01:23 am
To: Tomcat Users List
Subject: Re: Can't execute servlet project

Download the binary zip file and expand it.  Within it is a lib 
directory with just standard.jar and jstl.jar.


--David

sam wun wrote:


I just went to the website , very confused.

The taglib file is not a jar file. they are binary or source file.

And I couldn't find standard.jar file either.



Thanks



  
  

- Original Message -
From: David Smith
Sent: 02/09/08 11:44 pm
To: Tomcat Users List
Subject: Re: Can't execute servlet project

Hmmm... good question.  I moved over to Maven and don't manually 
download these any more.  This looks like it should do the trick:


Try 



http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi


--David

sam wun wrote:



Hi David,



No, I don't have this 2 jar files in the common/lib/ directory.

where can I download it from?



Thanks

Sam




  
  
  

- Original Message -
From: David Smith
Sent: 02/09/08 10:39 pm
To: Tomcat Users List
Subject: Re: Can't execute servlet project

Do you have jstl.ja

Re: Can't execute servlet project

2008-09-02 Thread sam wun
The URL I put in the firefox browser is:

10.1.9.1:8080/DBtest/testdb.jsp


Here is the /tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/web.xml 
file:




http://java.sun.com/xml/ns/j2ee"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>
    
    DBTest
    
    
    Create customer servlet
    
    CreateCustomerServlet
    
CreateCustomerServlet
    
    
servlet.CreateCustomerServlet
    
    
    
CreateCustomerServlet
    
/CreateCustomerServlet
    
    
    index.html
    index.htm
    index.jsp
    default.html
    default.htm
    default.jsp
    
    
    
DB Connection
    
jdbc/TestDB
    
javax.sql.DataSource
    
Container
  






> - Original Message -
> From: sam wun
> Sent: 03/09/08 01:41 am
> To: Tomcat Users List
> Subject: Re: Re: Can't execute servlet project
> 
> Thanks David,
> 
> 
> 
> After copied the jstl and standard dot jar files into the directory:
> 
> linux:~/tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/lib # ls
> .  ..  jstl.jar  mysql-connector-java-5.1.3-rc-bin.jar  standard.jar
> 
> 
> 
> I got the following different errors:
> 
> (In line 4, what is jdbc/TestDB? I have database called javatest, and 
> table 
> testdata. Should I rename it to jdbc/javatest?
> 
> 
> 
> 
> 
> HTTP Status 500 - 
> 
> type Exception report
> 
> message 
> 
> description The server encountered an internal error () that prevented it 
> from fulfilling this request.
> 
> exception org.apache.jasper.JasperException: Exception in JSP: 
> /testdb.jsp:4
> 
> 1: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
> 2: <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> 3: 
> 4: 
> 5: select id, foo, bar from testdata
> 6: 
> 7: 
> 
> 
> Stacktrace:
> 
> 
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
> 
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
>   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> root cause javax.servlet.ServletException: Unable to get connection, 
> DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> create JDBC driver of class '' for connect URL 'null'"
> 
> 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
> 
> 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
>   org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> root cause javax.servlet.jsp.JspException: Unable to get connection, 
> DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> create JDBC driver of class '' for connect URL 'null'"
> 
> 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
> 
> 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
> 
> 
> org.apache.jsp.testdb_jsp._jspx_meth_sql_005fquery_005f0(testdb_jsp.java:101)
>   org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:58)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)   
>  
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> 
> 
> 
> 
> > - Original Message -
> > From: David Smith
> > Sent: 03/09/08 01:23 am
> > To: Tomcat Users List
> > Subject: Re: Can't execute servlet project
> > 
> > Download the binary zip file and expand it.  Within it is a lib 
> > directory with just standard.jar and jstl.jar.
> > 
> > --David
> > 
> > sam wun wrote:
> > > I just went to the website , very confused.
> > >
> > > The taglib file is not a jar file. they are binary or sou

Re: Open source web-site management utility based on Tomcat

2008-09-02 Thread David Smith
Sounds like you're considering a CMS package.  Google around -- you'll 
find a lot of them.  Some are open source, some are commercial.  I have 
Magnolia here and it works very well.


--David

Toby White wrote:

Hi guys,

I am a completely newbie in tomcat.

Just wondering if there is any open-source tool which would help me create
and organize the contents of our company's web-site (about us, our services,
our clients etc..).
I am only familiar with pure HTML, but it does not provide any tools to
manage content and I would like our company's web-site to look quite pretty
(i.e servlet-based).

Do you know if I can afford this using tomcat?
Any tomcat projects concentrating on this?

I know there are some forum-engine projects or photo-gallery engine's. Is
there anything for simple company's web-sites?


Thank you.

Regards,
Toby

  



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



Re: Re: Can't execute servlet project

2008-09-02 Thread sam wun
This is the only context.xml file I got in the tomcat (5.5.26) directory:

/tomcat/apache-tomcat-5.5.26/conf/context.xml:








    
    WEB-INF/web.xml

    
    




> - Original Message -
> From: David Smith
> Sent: 03/09/08 01:49 am
> To: Tomcat Users List
> Subject: Re: Can't execute servlet project
> 
> DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot create JDBC driver of class '' for connect URL 'null'"
> 
> This error typically indicates the JNDI db pool hasn't been setup 
> correctly.  Some config option isn't setup.  What's in this webapp's 
> context xml file?  Also what's in it's WEB-INF/web.xml?  Lastly, you 
> should have your database driver jar file in tomcat's common/lib (for 
> tomcat v 5.5) or /lib (tomcat v 6). 
> 
> You can also take a look at tomcat's JDBC Datasource howto's on the 
> tomcat website for your version of tomcat which offer a lot of help.
> 
> --David
> 
> sam wun wrote:
> > Thanks David,
> >
> >
> >
> > After copied the jstl and standard dot jar files into the directory:
> >
> > linux:~/tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/lib # ls
> > .  ..  jstl.jar  mysql-connector-java-5.1.3-rc-bin.jar  standard.jar
> >
> >
> >
> > I got the following different errors:
> >
> > (In line 4, what is jdbc/TestDB? I have database called javatest, and 
> table 
> > testdata. Should I rename it to jdbc/javatest?
> >
> >
> >
> >
> >
> > HTTP Status 500 - 
> >
> > type Exception report
> >
> > message 
> >
> > description The server encountered an internal error () that prevented 
> it 
> > from fulfilling this request.
> >
> > exception org.apache.jasper.JasperException: Exception in JSP: 
> > /testdb.jsp:4
> >
> > 1: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
> > 2: <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> > 3: 
> > 4: 
> > 5: select id, foo, bar from testdata
> > 6: 
> > 7: 
> >
> >
> > Stacktrace:
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > root cause javax.servlet.ServletException: Unable to get connection, 
> > DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> > create JDBC driver of class '' for connect URL 'null'"
> > 
> > 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
> > 
> > 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
> > org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > root cause javax.servlet.jsp.JspException: Unable to get connection, 
> > DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> > create JDBC driver of class '' for connect URL 'null'"
> > 
> > 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
> > 
> > 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
> > 
> > 
> org.apache.jsp.testdb_jsp._jspx_meth_sql_005fquery_005f0(testdb_jsp.java:101)
> > org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:58)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)  
>   
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> >
> >
> >
> >
> >   
> >> - Original Message -
> >> From: David Smith
> >> Sent: 03/09/08 01:23 am
> >> To: Tomcat Users List
> >> Subject: Re: Can't execute servlet project
> >>
> >> Download the binary zip file and expand it.  Within it is a lib 
> >> directory with just standard.jar and jstl.jar.
> >>
> >> --David
> >>
> >> sam wun wrote:
> >> 
> >>> I just went to the website , very confused.
> >>>
> >>> The taglib file is not a jar file. they are binary or source file.
> >>>
> >>> And I couldn't find standard.jar file either.
> >>>
> >>>
> 

Re: Re: Can't execute servlet project

2008-09-02 Thread sam wun
Here is the mysql-connector jar file I got in the common/lib directory:

linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls mysql*
mysql-connector-java-5.1.3-rc-bin.jar



Is thsi the correct mysql jar file?



Thanks

Sam





> - Original Message -
> From: David Smith
> Sent: 03/09/08 01:49 am
> To: Tomcat Users List
> Subject: Re: Can't execute servlet project
> 
> DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot create JDBC driver of class '' for connect URL 'null'"
> 
> This error typically indicates the JNDI db pool hasn't been setup 
> correctly.  Some config option isn't setup.  What's in this webapp's 
> context xml file?  Also what's in it's WEB-INF/web.xml?  Lastly, you 
> should have your database driver jar file in tomcat's common/lib (for 
> tomcat v 5.5) or /lib (tomcat v 6). 
> 
> You can also take a look at tomcat's JDBC Datasource howto's on the 
> tomcat website for your version of tomcat which offer a lot of help.
> 
> --David
> 
> sam wun wrote:
> > Thanks David,
> >
> >
> >
> > After copied the jstl and standard dot jar files into the directory:
> >
> > linux:~/tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/lib # ls
> > .  ..  jstl.jar  mysql-connector-java-5.1.3-rc-bin.jar  standard.jar
> >
> >
> >
> > I got the following different errors:
> >
> > (In line 4, what is jdbc/TestDB? I have database called javatest, and 
> table 
> > testdata. Should I rename it to jdbc/javatest?
> >
> >
> >
> >
> >
> > HTTP Status 500 - 
> >
> > type Exception report
> >
> > message 
> >
> > description The server encountered an internal error () that prevented 
> it 
> > from fulfilling this request.
> >
> > exception org.apache.jasper.JasperException: Exception in JSP: 
> > /testdb.jsp:4
> >
> > 1: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
> > 2: <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> > 3: 
> > 4: 
> > 5: select id, foo, bar from testdata
> > 6: 
> > 7: 
> >
> >
> > Stacktrace:
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > root cause javax.servlet.ServletException: Unable to get connection, 
> > DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> > create JDBC driver of class '' for connect URL 'null'"
> > 
> > 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
> > 
> > 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
> > org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > root cause javax.servlet.jsp.JspException: Unable to get connection, 
> > DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> > create JDBC driver of class '' for connect URL 'null'"
> > 
> > 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
> > 
> > 
> org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
> > 
> > 
> org.apache.jsp.testdb_jsp._jspx_meth_sql_005fquery_005f0(testdb_jsp.java:101)
> > org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:58)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)  
>   
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> >
> >
> >
> >
> >   
> >> - Original Message -
> >> From: David Smith
> >> Sent: 03/09/08 01:23 am
> >> To: Tomcat Users List
> >> Subject: Re: Can't execute servlet project
> >>
> >> Download the binary zip file and expand it.  Within it is a lib 
> >> directory with just standard.jar and jstl.jar.
> >>
> >> --David
> >>
> >> sam wun wrote:
> >> 
> >>> I just went to the website , very confused.
> >>>
> >>> The taglib file is not a jar file. they are binary or source file.
> >>>
> >>> A

RE: Installing Multiple Instances on Windows Server 2003

2008-09-02 Thread Peter Crowther
> From: Steve G.B. [mailto:[EMAIL PROTECTED]
> I've created a VM with 4 VCores, and all of the cores are
> allocated to the VM.

OK, so 50% CPU = 2 cores maxed out.  Out of interest, is it 25% with only one 
Tomcat started?

> I'm using Sun JVM 1.6, and stressing the Guest with
> Loadrunner on another
> machine (if you ask: this machine with loadrunner isn't the
> bottleneck)
>
> No Databases, no I/O requests, no Network saturation.

OK.

Given that you're getting exactly 50% CPU use (it *is* exact, right?) that 
indicates the test harness is very unlikely to be the problem.  It would almost 
certainly bottleneck at some other CPU value.

> that's why I think it's the JVM.
> For my tests I used the standard demo webapp in Loarunner
> (Mercury Tours),
> and a couple of stupid jsp pages. So Apache and Tomcat both.

I'll highlight that to the folks who know the demo app better: does it run 
properly under load?  I'd assume so...

> Fun thing is that when using Tomcat and Apache combined, I
> can get an 80-85% CPU Utilization.

Yes.  If you've got httpd passing everything through it as well, you'll 
increase the CPU load - that's expected!

> Problem is that for my tests I need
> something more simple and the same server.

Yes.  Why add complexity when it's not required? :-)

> How do you saturate an 8-core host?

With some reasonably complex code in the JSPs :-).  Out of interest, if your 
JSPs call something that loops a couple of million times before returning, what 
happens to the CPU use?

- Peter

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



case (in)sensitive mime-mapping

2008-09-02 Thread Joel McKee Cooper
The mime-mappings in web.xml look like:

   
   doc
   application/msword
   

Which works fine if your document is named "foo.doc", but fails
miserably for "foo.Doc", "foo.DOC", etc.  Is there a way to configure
Tomcat so that the extensions are case-insensitive?

Thanks!

-Joel

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



Re: Open source web-site management utility based on Tomcat

2008-09-02 Thread Ken Bowen

Google is your friend:  open source web site management

On Sep 2, 2008, at 11:31 AM, Toby White wrote:


Hi guys,

I am a completely newbie in tomcat.

Just wondering if there is any open-source tool which would help me  
create
and organize the contents of our company's web-site (about us, our  
services,

our clients etc..).
I am only familiar with pure HTML, but it does not provide any tools  
to
manage content and I would like our company's web-site to look quite  
pretty

(i.e servlet-based).

Do you know if I can afford this using tomcat?
Any tomcat projects concentrating on this?

I know there are some forum-engine projects or photo-gallery  
engine's. Is

there anything for simple company's web-sites?


Thank you.

Regards,
Toby



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



Re: Can't execute servlet project

2008-09-02 Thread David Smith


Here is the mysql-connector jar file I got in the common/lib directory:

linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls mysql*
mysql-connector-java-5.1.3-rc-bin.jar



Is thsi the correct mysql jar file?
  
Yes ... looks good.  Just be sure this is the only place you have a 
mysql JDBC driver installed.  There should not be one in 
webapps/DBTest/WEB-INF/lib if it exists here.



This is the only context.xml file I got in the tomcat (5.5.26) directory:

/tomcat/apache-tomcat-5.5.26/conf/context.xml: ...
That is the universal one.  The context xml file should be either in 
your webapp's META-INF folder named context.xml or in tomcat's 
conf/Catalina/localhost named DBTest.xml.  It only contains a ... > xml element and it's contents.  Something like:



username="javauser" password="javadude" 
driverClassName="com.mysql.jdbc.Driver"
  url="jdbc:mysql://localhost:3306/javatest"  
validationQuery="select 1" />



Obviously replace the username, password, and URL with what's 
appropriate to your database environment.


You can read more on this at 
http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html


--David

sam wun wrote:

Here is the mysql-connector jar file I got in the common/lib directory:

linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls mysql*
mysql-connector-java-5.1.3-rc-bin.jar



Is thsi the correct mysql jar file?



Thanks

Sam





  

- Original Message -
From: David Smith
Sent: 03/09/08 01:49 am
To: Tomcat Users List
Subject: Re: Can't execute servlet project

DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot create JDBC driver of class '' for connect URL 'null'"


This error typically indicates the JNDI db pool hasn't been setup 
correctly.  Some config option isn't setup.  What's in this webapp's 
context xml file?  Also what's in it's WEB-INF/web.xml?  Lastly, you 
should have your database driver jar file in tomcat's common/lib (for 
tomcat v 5.5) or /lib (tomcat v 6). 

You can also take a look at tomcat's JDBC Datasource howto's on the 
tomcat website for your version of tomcat which offer a lot of help.


--David

sam wun wrote:


Thanks David,



After copied the jstl and standard dot jar files into the directory:

linux:~/tomcat/apache-tomcat-5.5.26/webapps/DBTest/WEB-INF/lib # ls
.  ..  jstl.jar  mysql-connector-java-5.1.3-rc-bin.jar  standard.jar



I got the following different errors:

(In line 4, what is jdbc/TestDB? I have database called javatest, and 
  
table 


testdata. Should I rename it to jdbc/javatest?





HTTP Status 500 - 


type Exception report

message 

description The server encountered an internal error () that prevented 
  
it 


from fulfilling this request.

exception org.apache.jasper.JasperException: Exception in JSP: 
/testdb.jsp:4


1: <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
2: <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
3: 
4: 

5: select id, foo, bar from testdata
6: 
7: 



Stacktrace:


  

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)




  

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)



  

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.ServletException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
  
Cannot 


create JDBC driver of class '' for connect URL 'null'"


  

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)




  

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)


org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


  

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)



  

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)


org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.jsp.JspException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
  
Cannot 


create JDBC driver of class '' for connect URL 'null'"


  

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)




  

org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)




  

org.apac

Re: How to make to Apache-Tomcat 6.0.13 to support all of SSLv2/SSLv3 and TLS protocols

2008-09-02 Thread Suresh Kumar J
The issue turns out to be that the Apache-Tomcat is not able to handle 
the full set of cipher suites implemented in the latest FireFox v3.0.1. 
When I try to the establish the https connection, the tomcat server 
seems to choke with the set of cipher suites negotiated by the FireFox 
browser and eventually errors out with the error:

java.net.SocketException: SSL handshake error
javax.net.ssl.SSLException: INTERNAL ERROR

I had to disable the following cipher suites in the FireFox (v3.0.1) 
browser via the "about:config" option:

security.ssl3.dhe_dss_camellia_128_sha
security.ssl3.dhe_dss_camellia_256_sha
security.ssl3.dhe_rsa_camellia_128_sha
security.ssl3.dhe_rsa_camellia_256_sha
security.ssl3.rsa_camellia_128_sha
security.ssl3.rsa_camellia_256_sha

Wonder if anybody else has encountered this issue while using Tomcat 
server with the FireFox browser.


Thanks,
Suresh

Suresh Kumar J wrote:

Hi!

Am running the Apache Tomcat (v6.0.13) on Redhat Linux. Below is the
snippet of the server.xml config:




The https connection(TLS based) works fine with IE6.0/7.x and FireFox
2.0.x. But am having issues with the FireFox 3.0.1 on Windows XP with
the default settings. When I try to connect(https on 443) to Apache
Tomcat (v6.0.14), I get the following error on the FireFox 3.0.1 window:
---
Secure Connection Failed
An error occurred during a connection to 10.xx.xx.xx
Cannot communicate securely with peer: no common encryption algorithm(s):
(Error code: ssl_error_no_cypher_overlap)
---

Have observed the following error in the Catalina.out file:
--
Aug 29, 2008 2:52:52 PM 
org.apache.tomcat.util.net.JIoEndpoint$Acceptor run

SEVERE: Socket accept failed
Throwable occurred: java.net.SocketException: SSL handshake error
javax.net.ssl.SSLException: INTERNAL ERROR
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:150) 


   at
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)
   at java.lang.Thread.run(Thread.java:657)
--

In the FireFox 3.0.1, both SSL3.0 and TLS1.0 are enabled(and SSLv2 is
disabled) in the browser security settings. The web-server is correctly
configured for secured http on TLS. Earlier with Firefox2.0.x, it was
working fine. Also checked with Linux version of FireFox3.0.1 and the
TLS connection is working fine.

When I tried to analysis the packets capture of the browser/web-server
communication via "WireShark/Ethereal" tools, I observed that the
FireFox3.0 on Windows uses "SSLv2 Record layer(Client Hello)" for SSL
handshake negotiations. As my Tomcat webserver is configured for TLS, it
doesn't seem to understand the SSLv2 record layer format, eventually
errors out with "javax.net.ssl.SSLException: INTERNAL ERROR.

Since SSLv2 is generally considered to be a weaker protocol than SSLv3
and TLS, am not sure why FireFox3.0.1 on Windows uses SSLv2 Record
protocol, also SSLv2 is disabled by default. On Redhat Linux, the same
FF3.0.1(firefox-3.0.1-1.el5) uses "TLSv1 Record Layer(Client Hello)" for
security negotiations. The FireFox v2.0.x on Windows uses "SSLv3 Record
Layer(Client Hello)" which seems to fine. Am able to launch the https
webpages on IE6.x and IE7.x and also FireFox2.0. The only issue is on
FireFox3.0 which uses "SSLv2 Record layer(Client Hello)" for SSL
handshake negotiations. Tomcat works well with TLS protocol, but when
the browser uses SSLv2 then it fails.

I tried changing the "sslProtocol" attribute in the "Connector" element
in conf/server.xml file and when the Tomcat couldn't start. Observed the
following error in catalina.out:
--
Aug 29, 2008 3:10:18 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
Throwable occurred: java.io.IOException: SSLContext SSL implementation
not found
   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:394) 


   at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:125) 


   at
org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)
   at
org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
   at
org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
   at
org.apache.catalina.core.StandardService.initialize(StandardService.java:677) 


   at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:792) 


   at org.apache.catalina.startup.Catalina.load(Catalina.java:518)
   at org.apache.catalina.startup.Catalina.load(Catalina.java:538)
   at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
   at java.lang.reflect.Method.invoke(Method.java:317)
   at org.apache.catalina.startup.Bootstrap.load(Bo

Re: case (in)sensitive mime-mapping

2008-09-02 Thread bhooshanpandit
I don't think it is possible, because in tomcat file names are case 
sensitive so foo.doc is not same as foo.Doc (if u try to access foo.doc 
as foo.Doc tomcat will return 404).


I think - however not sure - the reason for this case sensitive 
implemenatation is to get rid of security vulnerability where someone 
might be able to see the source code of a jsp file by accessing it as 
.Jsp or .JSP



-Original Message-
From: Joel McKee Cooper <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Tue, 2 Sep 2008 10:20 pm
Subject: case (in)sensitive mime-mapping










The mime-mappings in web.xml look like:

  
  doc
  application/msword
  

Which works fine if your document is named "foo.doc", but fails
miserably for "foo.Doc", "foo.DOC", etc.  Is there a way to configure
Tomcat so that the extensions are case-insensitive?

Thanks!

-Joel

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








You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


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



Re: Cannot access remote web app

2008-09-02 Thread bhooshanpandit

If the case is:

* webapp1 deployed on Desktop
* accessible from desktop using http://localhost:8080/webapp1
* not accessible (404) from laptop using http://:8080/webapp1

... then I think you should check the access logs in Tomcat to see what 
request in coming from the laptop. To enable access logging on tomcat 
you just need to uncomment the AccessLog valve in server.xml. 
Alternative you can use a proxy / intercepter to capture the HTTP 
traffic b/w laptop and desktop.


-Original Message-
From: felix l <[EMAIL PROTECTED]>
To: users@tomcat.apache.org
Sent: Tue, 2 Sep 2008 7:22 pm
Subject: Cannot access remote web app










Hi all,

I have a Java web app that has shown to be working while accessing via
http://localhost:8080/webapp1. I have two machines, 1 laptop and 1 
desktop,
both installed Tomcat 5.5 on WinXP. The problem is when I start Tomcat 
on my
laptop, both machine can access the web app. On the other hand, if I 
start
Tomcat on my desktop, my laptop cannot access it and give me a good old 
404

error. Where should I first look into in order to fix the problem? Would
Spybot or anti-virus app be a cause of this?

Thanks,
Felix







You are invited to Get a Free AOL Email ID. - http://webmail.aol.in


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



Re: adding a virtual host with jmx

2008-09-02 Thread Olivier Vergès
it works in part, i have done  this to add a ssoagentvalve:
*
String vname = "Catalina:type=Valve,name=SSOAgentValve,host=" + nameVH;
ObjectName ovalve = new ObjectName(vname);

Object valve =
server.instantiate("org.josso.tc60.agent.SSOAgentValve");


org.apache.tomcat.util.modeler.Registry.getRegistry().registerComponent(valve,
vname, null);

  *
but the *controller* and *containerName* stay empty. So I've tried to use
that :
* server.setAttribute(ovalve, new
Attribute("containerName","Catalina:type=Host,host=" + nameVH ));

  *And it doesn't work for both of them cause theses are not writable.
I'm going to try to use the host's function addchild  but that was my first
problem: this function doesnt' seem to work and i'm not sure that it will
fill the two missing parameters on the valve...

So, anyone got an idea?

O.V


Re: Ignorance about some things.

2008-09-02 Thread Bill Davidson

Gregor Schneider wrote:

No, in fact the 64-bit-jvm is able to adress (thus use) more memory
than on 32-bit-jvm.

just make sure that a 64-bit-jvm (java-virtual-machine) is installed.
  


Actually, in machine terms, pointers in a 64-bit system are twice as
wide and thus take up twice as much space.  Every reference is a pointer.
Depending upon the machine implementation, even loops and conditionals
could possibly use 64-bit pointers as well so those would use more
memory if they did.  So yes, a 64-bit system will always use at least
somewhat more memory than a 32-bit system that does the same thing.
This is not to say that there couldn't be a memory leak in the 64-bit
JVM that doesn't exist in the 32-bit JVM.  I'm just saying that all else
being equal, the 64-bit version will use more memory -- because it has to.

I remember when I was first playing with 64-bit systems in the mid 1990's
(C/C++) and was surprised to find that many programs actually ran slower
when recompiled for 64-bits.  One of the reasons for that was because
they're moving around more memory just to move their pointers around.

Unless you have big memory and need big memory, or you're doing a lot
of arithmetic with 64-bit integers, it's usually best to stay with the
32-bit version.  It will usually be at least as fast if not faster and
use less memory.  Of course, if you need the big memory, or lots of
64-bit arithmetic then you need it so you go with 64-bit.

As for the OP, you'll want to play around with -vmargs settings to your
JVM.  -Xmx is the obvious one.  -XX:MaxPermSize is another less well known
one that can help in many cases.  PermGen space is one of those sneaky
things they don't tell you about.  You can set -Xmx really big and still
have memory problems because not enough of it is available to PermGen.




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



Re: How to make to Apache-Tomcat 6.0.13 to support all of SSLv2/SSLv3 and TLS protocols

2008-09-02 Thread Gregor Schneider
Suresh,

I guess no one is having the same problem like what you're having.

As a first guess, within your connector I'd change

 clientAuth="false" sslProtocol="TLS" keystoreType="PKCS12"

to

 clientAuth="false" sslProtocol="ALL" keystoreType="PKCS12"

2nd, I'd have a look how it behaves with Sun's original JDK

If all that failes (what would puzzle me since you're the first to
have this problem), I'd give OpenSSL a try:

I'm running Tomcat 5.5 on Debian using APR with OpenSSL, and this is
my Connector working like charm, even with the latest version of
Firefox:



HTH

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

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



Re: Tomcat 6 and images

2008-09-02 Thread Filip Hanik - Dev Lists

sure there is,

you can deploy it by using a context



Filip

Mathias P.W Nilsson wrote:

Hi!

I'm using tomcat with wicket framework for my webapplication. My images,
css, flashes resides outside the container and therefor I'm using a Servlet
to serve the files.

Is there any builtin function to get files outside the container?
  



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



Re: APR & SSL not working

2008-09-02 Thread Filip Hanik - Dev Lists

SSLEngine="on" should be SSLEnabled="true"

Gregor Schneider wrote:

Hi there,

I'm about to give it up.

One final question though:

Anybody out there who has the following combination up & running:

- Linux (Debian preferred, other distributions also welcome)
- Tomcat 5.5
- APR
- SSL

?

I'm sucessful getting Tomcat running together with the APR, however,
when I'm inserting the connector



into server.xml, Tomcat-startup hangs when initializing Coyote HTTP/1.1:

2008-08-29 17:15:31,722 INFO[main]: An older
version 1.1.3 of the Apache Tomcat Native library is installed, while
Tomcat recommends versi
on greater than 1.1.4
2008-08-29 17:15:32,142 INFO[main]: Initializing
Coyote HTTP/1.1 on http-8080

However, netstat shows me that Tomcat is listening on port 8443

So, if anybody has the configuration Tomcat & APR & SSL up & running,
I'd be happy about any confirmation, otherwise I'll consider Tomcat &
APR & SSL as simply not functional.

Gregor
  



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



Re: help with virtual hosting

2008-09-02 Thread Johnny Kewl


- Original Message - 
From: "Sathish Vadhiyar" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, September 02, 2008 11:51 AM
Subject: help with virtual hosting




Hi,

I have tried various solutions regarding virtual hosts in tomcat and none
of them work.

I have in my server.xml:



Under my webapps directory, I have vh1 directory

I have vh1.com in my DNS.
So, when I type http://v1.com, it is opening the project corresponding to
webapps/vh1.

Now, I have webapps/vh2-apps corresponding to 2nd virtual host. I also
have vh2.com in DNS corresponding to the same machine.

What should I do in order to get http://vh2.com open the corresponding web
page?

Thanks,
Sathish


This is covered really well in your tomcat docs
http://localhost:8080/tomcat-docs/virtual-hosting-howto.html

or try this...

http://www.onjava.com/pub/a/onjava/2003/06/25/tomcat_tips.html

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
--- 



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



Tomcat Native library for Windows

2008-09-02 Thread Brian Clark
Hello,

I am getting the following error when starting up Tomcat 6.0.16 on Windows 2003:

"Sep 2, 2008 4:18:13 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat
Native library which allows optimal performance in production
environments was not found on the java.library.path: C:\Program
Files\Apache Software Foundation\Tomcat
6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Perl\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS"

Here's
the catch, I do have the library installed in the bin directory (the
very same bin referenced in the PATH above). I downloaded version 1.1.14.0 from 
http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ and tried to just "drop 
it in" the bin directory. I don't know why it
doesn't work. I also tried putting it in my windows\system32 directory,
but with the same result. 

I've done a lot of research on the
'net, and found lots of other people that have this problem. However,
most seem to have the problem resolved by putting the library in the
right place, such as described in this earlier mailing list posting:
http://www.mail-archive.com/users@tomcat.apache.org/msg29111.html

Any ideas on what is going on here? 

Brian Clark


  

Re: Tomcat Native library for Windows

2008-09-02 Thread Mark Thomas
Brian Clark wrote:
> Hello,
> 
> I am getting the following error when starting up Tomcat 6.0.16 on Windows 
> 2003:
> 
> "Sep 2, 2008 4:18:13 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat
> Native library which allows optimal performance in production
> environments was not found on the java.library.path: C:\Program
> Files\Apache Software Foundation\Tomcat
> 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Perl\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS"
> 
> Here's
> the catch, I do have the library installed in the bin directory (the
> very same bin referenced in the PATH above). I downloaded version 1.1.14.0 
> from http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ and tried to just 
> "drop it in" the bin directory. I don't know why it
> doesn't work. I also tried putting it in my windows\system32 directory,
> but with the same result. 
> 
> I've done a lot of research on the
> 'net, and found lots of other people that have this problem. However,
> most seem to have the problem resolved by putting the library in the
> right place, such as described in this earlier mailing list posting:
> http://www.mail-archive.com/users@tomcat.apache.org/msg29111.html
> 
> Any ideas on what is going on here?

Which file did you download. What is its current name?

Mark



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



RE: Tomcat Native library for Windows

2008-09-02 Thread Martin Gainty

AprLifecycleListener reads java.library.path
so either start Java with -Djava.library.path
java -Djava.library.path=LocationOfBinary bootstrap.jar
(easier to place -Djava.library.path into JAVA_OPTS)
OR
set LD_LIBRARY_PATH=LocationOfBinary

YMMV/
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Tue, 2 Sep 2008 23:38:45 +0100
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Re: Tomcat Native library for Windows
> 
> Brian Clark wrote:
> > Hello,
> > 
> > I am getting the following error when starting up Tomcat 6.0.16 on Windows 
> > 2003:
> > 
> > "Sep 2, 2008 4:18:13 PM org.apache.catalina.core.AprLifecycleListener init
> > INFO: The APR based Apache Tomcat
> > Native library which allows optimal performance in production
> > environments was not found on the java.library.path: C:\Program
> > Files\Apache Software Foundation\Tomcat
> > 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Perl\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS"
> > 
> > Here's
> > the catch, I do have the library installed in the bin directory (the
> > very same bin referenced in the PATH above). I downloaded version 1.1.14.0 
> > from http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ and tried to 
> > just "drop it in" the bin directory. I don't know why it
> > doesn't work. I also tried putting it in my windows\system32 directory,
> > but with the same result. 
> > 
> > I've done a lot of research on the
> > 'net, and found lots of other people that have this problem. However,
> > most seem to have the problem resolved by putting the library in the
> > right place, such as described in this earlier mailing list posting:
> > http://www.mail-archive.com/users@tomcat.apache.org/msg29111.html
> > 
> > Any ideas on what is going on here?
> 
> Which file did you download. What is its current name?
> 
> Mark
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_
Get ideas on sharing photos from people like you.  Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008

Re: Tomcat Native library for Windows

2008-09-02 Thread Johnny Kewl


- Original Message - 
From: "Brian Clark" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, September 03, 2008 12:17 AM
Subject: Tomcat Native library for Windows



Hello,

I am getting the following error when starting up Tomcat 6.0.16 on Windows 
2003:


"Sep 2, 2008 4:18:13 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat
Native library which allows optimal performance in production
environments was not found on the java.library.path: C:\Program
Files\Apache Software Foundation\Tomcat
6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Perl\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS"

Here's
the catch, I do have the library installed in the bin directory (the
very same bin referenced in the PATH above). I downloaded version 1.1.14.0 
from http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ and tried to 
just "drop it in" the bin directory. I don't know why it

doesn't work. I also tried putting it in my windows\system32 directory,
but with the same result.

I've done a lot of research on the
'net, and found lots of other people that have this problem. However,
most seem to have the problem resolved by putting the library in the
right place, such as described in this earlier mailing list posting:
http://www.mail-archive.com/users@tomcat.apache.org/msg29111.html

Any ideas on what is going on here?

Brian Clark


Brian, dont know...
Its a file called
tcnative-1.dll
and it normally lives in the TC bin...

But you dont have to think if your use the tomcat.exe installer... it does 
it for you if you just select the native option... click ;)
What I do is get the zip version as well, and after the EXE has done its 
thing, I copy the missing bin scripts from zip to exe version.


have fun...

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---




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



Re: Tomcat Native library for Windows

2008-09-02 Thread Brian Clark
I downloaded the file 
http://tomcat.heanet.ie/native/1.1.14/binaries/win32/tcnative-1.dll
I didn't change the name. 



- Original Message 
From: Mark Thomas <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, September 2, 2008 5:38:45 PM
Subject: Re: Tomcat Native library for Windows

Brian Clark wrote:
> Hello,
> 
> I am getting the following error when starting up Tomcat 6.0.16 on Windows 
> 2003:
> 
> "Sep 2, 2008 4:18:13 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The APR based Apache Tomcat
> Native library which allows optimal performance in production
> environments was not found on the java.library.path: C:\Program
> Files\Apache Software Foundation\Tomcat
> 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Perl\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS"
> 
> Here's
> the catch, I do have the library installed in the bin directory (the
> very same bin referenced in the PATH above). I downloaded version 1.1.14.0 
> from http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ and tried to just 
> "drop it in" the bin directory. I don't know why it
> doesn't work. I also tried putting it in my windows\system32 directory,
> but with the same result. 
> 
> I've done a lot of research on the
> 'net, and found lots of other people that have this problem. However,
> most seem to have the problem resolved by putting the library in the
> right place, such as described in this earlier mailing list posting:
> http://www.mail-archive.com/users@tomcat.apache.org/msg29111.html
> 
> Any ideas on what is going on here?

Which file did you download. What is its current name?

Mark



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


  

Re: Tomcat Native library for Windows

2008-09-02 Thread Brian Clark
Hmmm...on Windows, what is the difference between java.library.path and the 
Windows environmental variable PATH?

I am not sure I understand your suggestion. I have my Java Classpath set to 
this, which contains my bootstrap.jar. 
C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\bootstrap.jar

Should I just set, via JAVA_OPTS, my java.library.path to the same directory, 
since that's where I put my tcnative-1.dll file?
-Djava.library.path=C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin

I don't want to break anything. Setting the java.library.path won't make Tomcat 
stop looking at other libraries in other locations (like the built-in /lib 
directory) will it?

Thanks,
Brian



- Original Message 
From: Martin Gainty <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, September 2, 2008 5:59:10 PM
Subject: RE: Tomcat Native library for Windows


AprLifecycleListener reads java.library.path
so either start Java with -Djava.library.path
java -Djava.library.path=LocationOfBinary bootstrap.jar
(easier to place -Djava.library.path into JAVA_OPTS)
OR
set LD_LIBRARY_PATH=LocationOfBinary

YMMV/
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Tue, 2 Sep 2008 23:38:45 +0100
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Re: Tomcat Native library for Windows
> 
> Brian Clark wrote:
> > Hello,
> > 
> > I am getting the following error when starting up Tomcat 6.0.16 on Windows 
> > 2003:
> > 
> > "Sep 2, 2008 4:18:13 PM org.apache.catalina.core.AprLifecycleListener init
> > INFO: The APR based Apache Tomcat
> > Native library which allows optimal performance in production
> > environments was not found on the java.library.path: C:\Program
> > Files\Apache Software Foundation\Tomcat
> > 6.0\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Perl\bin;C:\Perl\bin;C:\WINDOWS\system32;C:\WINDOWS"
> > 
> > Here's
> > the catch, I do have the library installed in the bin directory (the
> > very same bin referenced in the PATH above). I downloaded version 1.1.14.0 
> > from http://tomcat.heanet.ie/native/1.1.14/binaries/win32/ and tried to 
> > just "drop it in" the bin directory. I don't know why it
> > doesn't work. I also tried putting it in my windows\system32 directory,
> > but with the same result. 
> > 
> > I've done a lot of research on the
> > 'net, and found lots of other people that have this problem. However,
> > most seem to have the problem resolved by putting the library in the
> > right place, such as described in this earlier mailing list posting:
> > http://www.mail-archive.com/users@tomcat.apache.org/msg29111.html
> > 
> > Any ideas on what is going on here?
> 
> Which file did you download. What is its current name?
> 
> Mark
> 
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_
Get ideas on sharing photos from people like you.  Find new ways to share.
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008


  

Re: Cannot access remote web app

2008-09-02 Thread Johnny Kewl


- Original Message - 
From: "felix l" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, September 02, 2008 3:52 PM
Subject: Cannot access remote web app



Hi all,

I have a Java web app that has shown to be working while accessing via
http://localhost:8080/webapp1. I have two machines, 1 laptop and 1 
desktop,
both installed Tomcat 5.5 on WinXP. The problem is when I start Tomcat on 
my

laptop, both machine can access the web app. On the other hand, if I start
Tomcat on my desktop, my laptop cannot access it and give me a good old 
404

error. Where should I first look into in order to fix the problem? Would
Spybot or anti-virus app be a cause of this?

Thanks,
Felix


Felix XP has a built in fire wall thing...
control panel -> security center -> firewall - > exceptions -> open up port 
8080


Then if your machine name is SERVER

type

http://SERVER:8080

and you should get the standard TC page.

If you have messed with the standard settings in web.xml
put them back to the defaults

have fun

---
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---




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



Problem with JNDI environment entry resources

2008-09-02 Thread Paul Pepper
Tomcat 6.0.18
java version "1.6.0_06" (sun-java6-jdk on Ubuntu 8.04 i386)

I'm attempting to create environment entry resources, of type
java.lang.String, within conf/server.xml and access them from web
applications using JNDI. I've created a bare-bones test web app,
jndistring, with the following conf/server.xml configuration:

server.xml (snipped):
-
  






  

For the purpose of this test I've used jsp to access the value of teststring.

jndistring.jsp (snipped):

<%
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");

String teststring = (String) envCtx.lookup("teststring");
out.println("teststring: " + teststring);
%>

Accessing this page throws an exception:
org.apache.jasper.JasperException: An exception occurred processing
JSP page /test.jsp at line 18
15: Context initCtx = new InitialContext();
16: Context envCtx = (Context) initCtx.lookup("java:comp/env");
17:
18: String teststring = (String) envCtx.lookup("teststring");
19: out.println("teststring: " + teststring);
20: %>

The top frame of the root cause is shown as:
javax.servlet.ServletException: javax.naming.NameNotFoundException:
Name teststring is not bound in this Context

If I attempt to create an environment entry resource using
 (and sub-elements) within web.xml, then the resource is
created and I can access it!!!

I've read the "JNDI resources howto", docs regarding the ,
 and  elements (and others), but don't see
that I have missed anything.

Can anyone suggest what I might have missed? Has anyone else had
similar problems?

Thanks,

Paul.

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



Re: Tomcat 6 and images

2008-09-02 Thread Mathias P.W Nilsson

Thanks!

I'm currently deploying using ROOT.war. Here is the server.xml content.

How can I fit the images into this beacuse I don't quite follow.


  
 myhost
  

-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-and-images-tp19260262p19280777.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



RE: Tomcat Native library for Windows

2008-09-02 Thread Caldarale, Charles R
> From: Brian Clark [mailto:[EMAIL PROTECTED]
> Subject: Re: Tomcat Native library for Windows
>
> Hmmm...on Windows, what is the difference between
> java.library.path and the Windows environmental variable PATH?

By default, none.

> I have my Java Classpath set to this, which contains
> my bootstrap.jar.

Hopefully that's what shows in the tomcat6w.exe program, not something you're 
setting in the system environment variables.  (If you do have a CLASSPATH 
environment variable, get rid of it - it will only break things.)

> Should I just set, via JAVA_OPTS, my java.library.path to the
> same directory, since that's where I put my tcnative-1.dll file?
> -Djava.library.path=C:\Program Files\Apache Software
> Foundation\Tomcat 6.0\bin

Don't bother, the JVM is already looking there, as shown by the INFO message.

> I don't want to break anything. Setting the java.library.path
> won't make Tomcat stop looking at other libraries in other
> locations (like the built-in /lib directory) will it?

No, it won't break anything, but it's also not going to make it work.  The 
java.library.path is used for native library DLLs only, not for classes.

Check for ownership and access permissions on the file - insure that the 
account the Tomcat service is running under can access the DLL.

By any chance, is this a 64-bit version of Windows Server?  If so, and you're 
using a 64-bit JVM, you'll need the 64-bit version of the DLL.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with JNDI environment entry resources

2008-09-02 Thread Caldarale, Charles R
> From: Paul Pepper [mailto:[EMAIL PROTECTED]
> Subject: Problem with JNDI environment entry resources
>
> Can anyone suggest what I might have missed?

What happens if you follow the (strongly) recommended practice of not putting 
 elements in server.xml?  If you don't want to put the  
inside your .war file (understandable), put it in 
conf/Catalina/localhost/jndistring.xml, and remove the illegal docBase and path 
attributes.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problem with JNDI environment entry resources

2008-09-02 Thread Martin Gainty

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
/WEB-INF/web.xml contents which contain a jndi reference http://java.sun.com/xml/ns/j2ee";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">
  MySQL Test App
  
  DB Connection
  teststring
  javax.sql.DataSource
  Container
  


the lookup to teststring will get you a connection to the DB

HTH
Martin
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


> Date: Wed, 3 Sep 2008 01:01:40 +0100
> From: [EMAIL PROTECTED]
> To: users@tomcat.apache.org
> Subject: Problem with JNDI environment entry resources
> 
> Tomcat 6.0.18
> java version "1.6.0_06" (sun-java6-jdk on Ubuntu 8.04 i386)
> 
> I'm attempting to create environment entry resources, of type
> java.lang.String, within conf/server.xml and access them from web
> applications using JNDI. I've created a bare-bones test web app,
> jndistring, with the following conf/server.xml configuration:
> 
> server.xml (snipped):
> -
>appBase="webapps"
> unpackWARs="true"
> autoDeploy="false"
> deployOnStarup="true"
> xmlValidation="false"
> xmlNamespaceAware="false">
> 
>  path="jndistring"
> useNaming="true">
> 
>  value="a test value"
> type="java.lang.String"
> override="false"
> />
> 
> 
>   
> 
> For the purpose of this test I've used jsp to access the value of teststring.
> 
> jndistring.jsp (snipped):
> 
> <%
> Context initCtx = new InitialContext();
> Context envCtx = (Context) initCtx.lookup("java:comp/env");
> 
> String teststring = (String) envCtx.lookup("teststring");
> out.println("teststring: " + teststring);
> %>
> 
> Accessing this page throws an exception:
> org.apache.jasper.JasperException: An exception occurred processing
> JSP page /test.jsp at line 18
> 15: Context initCtx = new InitialContext();
> 16: Context envCtx = (Context) initCtx.lookup("java:comp/env");
> 17:
> 18: String teststring = (String) envCtx.lookup("teststring");
> 19: out.println("teststring: " + teststring);
> 20: %>
> 
> The top frame of the root cause is shown as:
> javax.servlet.ServletException: javax.naming.NameNotFoundException:
> Name teststring is not bound in this Context
> 
> If I attempt to create an environment entry resource using
>  (and sub-elements) within web.xml, then the resource is
> created and I can access it!!!
> 
> I've read the "JNDI resources howto", docs regarding the ,
>  and  elements (and others), but don't see
> that I have missed anything.
> 
> Can anyone suggest what I might have missed? Has anyone else had
> similar problems?
> 
> Thanks,
> 
> Paul.
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

_
Get thousands of games on your PC, your mobile phone, and the web with Windows®.
http://clk.atdmt.com/MRT/go/108588800/direct/01/

RE: Tomcat 6 and images

2008-09-02 Thread Caldarale, Charles R
> From: Mathias P.W Nilsson [mailto:[EMAIL PROTECTED]
> Subject: Re: Tomcat 6 and images
>
> How can I fit the images into this beacuse I don't quite follow.

Do what Filip suggested; create a  element in 
conf/Catalina/localhost/images.xml with this value:



This creates another webapp named "images" (specified by the name of the .xml 
file) located outside of Tomcat's directory tree.  Point your static content 
URLs to /images/[filename.type] to have Tomcat's DefaultServlet deliver them.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Can't execute servlet project

2008-09-02 Thread sam wun
After moved the context.xml file to 
/tomcat/apache-tomcat-5.5.26/conf/Catalina/localhost/

with the content changed to:



    
    WEB-INF/web.xml

    
    
   

(I have the exact db, table and username/password created like this).

And I have removed the context.xml file in webapps/DBTest/WEB-INF/lib/

My testdb.jsp in /tomcat/apache-tomcat-5.5.26/webapps/DBTest looks is shown 
below:

<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select id, foo, bar from testdata



  
    DB Test
  
  

  Results


    Foo ${row.foo}
    Bar ${row.bar}


  




Then shudown and restarted tomcat server.


I m still getting the DataSource Invalid errors:



HTTP Status 500 - 

type Exception report

message 

description The server encountered an internal error () that prevented it 
from fulfilling this request.

exception org.apache.jasper.JasperException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.ServletException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

...





javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

> - Original Message -
> From: David Smith
> Sent: 03/09/08 03:06 am
> To: Tomcat Users List
> Subject: Re: Can't execute servlet project
> 
> >
> > Here is the mysql-connector jar file I got in the common/lib directory:
> >
> > linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls mysql*
> > mysql-connector-java-5.1.3-rc-bin.jar
> >
> >
> >
> > Is thsi the correct mysql jar file?
> >   
> Yes ... looks good.  Just be sure this is the only place you have a 
> mysql JDBC driver installed.  There should not be one in 
> webapps/DBTest/WEB-INF/lib if it exists here.
> 
> > This is the only context.xml file I got in the tomcat (5.5.26) 
> directory:
> >
> > /tomcat/apache-tomcat-5.5.26/conf/context.xml: ...
> That is the universal one.  The context xml file should be either in 
> your webapp's META-INF folder named context.xml or in tomcat's 
> conf/Catalina/localhost named DBTest.xml.  It only contains a  ... > xml element and it's contents.  Something like:
> 
> 
> type="javax.sql.DataSource"
>maxActive="100" maxIdle="30" maxWait="1"
>username="javauser" password="javadude" 
> driverClassName="com.mysql.jdbc.Driver"
>url="jdbc:mysql://localhost:3306/javatest"  
> validationQuery="select 1" />
> 
> 
> Obviously replace the username, password, and URL with what's 
> appropriate to your database environment.
> 
> You can read more on this at 
> 
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> 
> --David
> 
> sam wun wrote:
> > Here is the mysql-connector jar file I got in the common/lib directory:
> >
> > linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls mysql*
> > mysql-connector-java-5.1.3-rc-bin.jar
> >
> >
> >
> > Is thsi the correct mysql jar file?
> >
> >
> >
> > Thanks
> >
> > Sam
> >
> >
> >
> >
> >
> >   
> >> - Original Message -
> >> From: David Smith
> >> Sent: 03/09/08 01:49 am
> >> To: Tomcat Users List
> >> Subject: Re: Can't execute servlet project
> >>
> >> DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> >> Cannot create JDBC driver of class '' for connect URL 'null'"
> >>
> >> This error typically indicates the JNDI db pool hasn't been setup 
> >> correctly.  Some config option isn't setup.  What's in this webapp's 
> >> context xml file?  Also what's in it's WEB-INF/web.xml?  Lastly, you 
> >> should have your database driver jar file in tomcat's common/lib (for 
> >> tomcat v 5.5) or /lib (tomcat v 6). 
> >>
> >> You can also take a look at tomcat's JDBC Datasour

Re: Tomcat Native library for Windows

2008-09-02 Thread Brian Clark
Thanks for the suggestions. I just re-downloaded the file and now it works. I 
guess it was corrupted during the original download or something. Go figure. 

Brian



- Original Message 
From: "Caldarale, Charles R" <[EMAIL PROTECTED]>
To: Tomcat Users List 
Sent: Tuesday, September 2, 2008 7:19:32 PM
Subject: RE: Tomcat Native library for Windows

> From: Brian Clark [mailto:[EMAIL PROTECTED]
> Subject: Re: Tomcat Native library for Windows
>
> Hmmm...on Windows, what is the difference between
> java.library.path and the Windows environmental variable PATH?

By default, none.

> I have my Java Classpath set to this, which contains
> my bootstrap.jar.

Hopefully that's what shows in the tomcat6w.exe program, not something you're 
setting in the system environment variables.  (If you do have a CLASSPATH 
environment variable, get rid of it - it will only break things.)

> Should I just set, via JAVA_OPTS, my java.library.path to the
> same directory, since that's where I put my tcnative-1.dll file?
> -Djava.library.path=C:\Program Files\Apache Software
> Foundation\Tomcat 6.0\bin

Don't bother, the JVM is already looking there, as shown by the INFO message.

> I don't want to break anything. Setting the java.library.path
> won't make Tomcat stop looking at other libraries in other
> locations (like the built-in /lib directory) will it?

No, it won't break anything, but it's also not going to make it work.  The 
java.library.path is used for native library DLLs only, not for classes.

Check for ownership and access permissions on the file - insure that the 
account the Tomcat service is running under can access the DLL.

By any chance, is this a 64-bit version of Windows Server?  If so, and you're 
using a 64-bit JVM, you'll need the 64-bit version of the DLL.

- 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

Re: Re: Re: Can't execute servlet project

2008-09-02 Thread sam wun
I found there are some xml file in the conf/ directory:

linux:~/tomcat/apache-tomcat-5.5.26/conf # ls
.   Catalina    catalina.policy  logging.properties  
server.xml    web.xml
..  DBTest.xml  catalina.properties  server-minimal.xml  
tomcat-users.xml
linux:~/tomcat/apache-tomcat-5.5.26/conf #

do I need to remove DBTest.xml and web.xml here?

Thanks

Sam



> - Original Message -
> From: sam wun
> Sent: 03/09/08 11:13 am
> To: Tomcat Users List
> Subject: Re: Re: Can't execute servlet project
> 
> After moved the context.xml file to 
> /tomcat/apache-tomcat-5.5.26/conf/Catalina/localhost/
> 
> with the content changed to:
> 
> 
> 
>     
>     WEB-INF/web.xml
> 
>     
>     
>     type="javax.sql.DataSource"
>    maxActive="100" maxIdle="30" maxWait="1"
>    username="javauser" password="javadude" 
> driverClassName="com.mysql.jdbc.Driver"
>    url="jdbc:mysql://localhost:3306/javatest"  
> validationQuery="select 1" />
> 
> (I have the exact db, table and username/password created like this).
> 
> And I have removed the context.xml file in webapps/DBTest/WEB-INF/lib/
> 
> My testdb.jsp in /tomcat/apache-tomcat-5.5.26/webapps/DBTest looks is 
> shown 
> below:
> 
> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
> <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> 
> 
> select id, foo, bar from testdata
> 
> 
> 
>   
>     DB Test
>   
>   
> 
>   Results
> 
> 
>     Foo ${row.foo}
>     Bar ${row.bar}
> 
> 
>   
> 
> 
> 
> 
> Then shudown and restarted tomcat server.
> 
> 
> I m still getting the DataSource Invalid errors:
> 
> 
> 
> HTTP Status 500 - 
> 
> type Exception report
> 
> message 
> 
> description The server encountered an internal error () that prevented it 
> from fulfilling this request.
> 
> exception org.apache.jasper.JasperException: Unable to get connection, 
> DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> create JDBC driver of class '' for connect URL 'null'"
> 
> 
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
> 
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
>   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> root cause javax.servlet.ServletException: Unable to get connection, 
> DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> create JDBC driver of class '' for connect URL 'null'"
> 
> 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
> 
> 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
>   org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
>   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
>   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
>   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> 
> ...
> 
> 
> 
> 
> 
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> 
> > - Original Message -
> > From: David Smith
> > Sent: 03/09/08 03:06 am
> > To: Tomcat Users List
> > Subject: Re: Can't execute servlet project
> > 
> > >
> > > Here is the mysql-connector jar file I got in the common/lib 
> directory:
> > >
> > > linux:~/tomcat/apache-tomcat-5.5.26/common/lib # ls mysql*
> > > mysql-connector-java-5.1.3-rc-bin.jar
> > >
> > >
> > >
> > > Is thsi the correct mysql jar file?
> > >   
> > Yes ... looks good.  Just be sure this is the only place you have a 
> > mysql JDBC driver installed.  There should not be one in 
> > webapps/DBTest/WEB-INF/lib if it exists here.
> > 
> > > This is the only context.xml file I got in the tomcat (5.5.26) 
> > directory:
> > >
> > > /tomcat/apache-tomcat-5.5.26/conf/context.xml: ...
> > That is the universal one.  The context xml file should be either in 
> > your webapp's META-INF folder named context.xml or in tomcat's 
> > conf/Catalina/localhost named DBTest.xml.  It only contains a  > ... > xml element and it's contents.  Something like:
> > 
> > 
> > > type="javax.sql.DataSource"
> >maxActive="100" maxIdle="30" maxWait="1"
> >username="javauser" password="javadude" 
> > driverClassName="com.mysql.jdbc.Driver"
> >url="jdbc:mysql://localhost:3306/javatest"  
> > validationQuery="select 1" />
> > 
> > 
> > Obviously replace the username, password, and URL with what's 
> > appropriate to your database environment.
> > 
> > You can read more on this at 
> > 
> > 
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-example

Re: Cannot access remote web app

2008-09-02 Thread felix l
Amazing. Firewall was the problem.

Thanks again, everyone.

On Tue, Sep 2, 2008 at 7:55 PM, Johnny Kewl <[EMAIL PROTECTED]> wrote:

>
> - Original Message - From: "felix l" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, September 02, 2008 3:52 PM
> Subject: Cannot access remote web app
>
>
>  Hi all,
>>
>> I have a Java web app that has shown to be working while accessing via
>> http://localhost:8080/webapp1. I have two machines, 1 laptop and 1
>> desktop,
>> both installed Tomcat 5.5 on WinXP. The problem is when I start Tomcat on
>> my
>> laptop, both machine can access the web app. On the other hand, if I start
>> Tomcat on my desktop, my laptop cannot access it and give me a good old
>> 404
>> error. Where should I first look into in order to fix the problem? Would
>> Spybot or anti-virus app be a cause of this?
>>
>> Thanks,
>> Felix
>>
>
> Felix XP has a built in fire wall thing...
> control panel -> security center -> firewall - > exceptions -> open up port
> 8080
>
> Then if your machine name is SERVER
>
> type
>
> http://SERVER:8080
>
> and you should get the standard TC page.
>
> If you have messed with the standard settings in web.xml
> put them back to the defaults
>
> have fun
>
> ---
> HARBOR : http://www.kewlstuff.co.za/index.htm
> The most powerful application server on earth.
> The only real POJO Application Server.
> See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
> ---
>
>
>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Can't execute servlet project

2008-09-02 Thread David Smith
Leave web.xml -- it's the global web.xml.  DBTest.xml can be removed 
without error.  It isn't harming anything here but at the same time it 
doesn't belong here.


--David

sam wun wrote:

I found there are some xml file in the conf/ directory:

linux:~/tomcat/apache-tomcat-5.5.26/conf # ls
.   Catalinacatalina.policy  logging.properties  
server.xmlweb.xml
..  DBTest.xml  catalina.properties  server-minimal.xml  
tomcat-users.xml

linux:~/tomcat/apache-tomcat-5.5.26/conf #

do I need to remove DBTest.xml and web.xml here?

Thanks

Sam



  

- Original Message -
From: sam wun
Sent: 03/09/08 11:13 am
To: Tomcat Users List
Subject: Re: Re: Can't execute servlet project

After moved the context.xml file to 
/tomcat/apache-tomcat-5.5.26/conf/Catalina/localhost/


with the content changed to:




WEB-INF/web.xml




   type="javax.sql.DataSource"

   maxActive="100" maxIdle="30" maxWait="1"
   username="javauser" password="javadude" 
driverClassName="com.mysql.jdbc.Driver"
   url="jdbc:mysql://localhost:3306/javatest"  
validationQuery="select 1" />


(I have the exact db, table and username/password created like this).

And I have removed the context.xml file in webapps/DBTest/WEB-INF/lib/

My testdb.jsp in /tomcat/apache-tomcat-5.5.26/webapps/DBTest looks is 
shown 
below:


<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select id, foo, bar from testdata



  
DB Test
  
  

  Results


Foo ${row.foo}
Bar ${row.bar}


  




Then shudown and restarted tomcat server.


I m still getting the DataSource Invalid errors:



HTTP Status 500 - 


type Exception report

message 

description The server encountered an internal error () that prevented it 
from fulfilling this request.


exception org.apache.jasper.JasperException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot 
create JDBC driver of class '' for connect URL 'null'"



org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.ServletException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
Cannot 
create JDBC driver of class '' for connect URL 'null'"



org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)


org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

...





javax.servlet.http.HttpServlet.service(HttpServlet.java:803)





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



Re: Can't execute servlet project

2008-09-02 Thread David Smith
If the context xml file is in 
/tomcat/apache-tomcat-5.5.26/conf/Catalina/localhost, it should be named 
after your webapp (e.g.: DBTest.xml).  It's only named context.xml when 
in your webapp's META-INF folder.


--David

sam wun wrote:
After moved the context.xml file to 
/tomcat/apache-tomcat-5.5.26/conf/Catalina/localhost/


with the content changed to:




WEB-INF/web.xml




   type="javax.sql.DataSource"

   maxActive="100" maxIdle="30" maxWait="1"
   username="javauser" password="javadude" 
driverClassName="com.mysql.jdbc.Driver"
   url="jdbc:mysql://localhost:3306/javatest"  
validationQuery="select 1" />


(I have the exact db, table and username/password created like this).

And I have removed the context.xml file in webapps/DBTest/WEB-INF/lib/

My testdb.jsp in /tomcat/apache-tomcat-5.5.26/webapps/DBTest looks is shown 
below:


<%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>


select id, foo, bar from testdata



  
DB Test
  
  

  Results


Foo ${row.foo}
Bar ${row.bar}


  




Then shudown and restarted tomcat server.


I m still getting the DataSource Invalid errors:



HTTP Status 500 - 


type Exception report

message 

description The server encountered an internal error () that prevented it 
from fulfilling this request.


exception org.apache.jasper.JasperException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"


org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

root cause javax.servlet.ServletException: Unable to get connection, 
DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot 
create JDBC driver of class '' for connect URL 'null'"


org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)

...





javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

  



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



Re: Re: Can't execute servlet project - it works now

2008-09-02 Thread sam wun
After this final changed (renamed the context.xml file to DBTest.xml), it 
works fine now.

Thank you very much for the help along the way.

Without your patient and effort, I wouldn't be able to get this going.



Thanks

Sam



> - Original Message -
> From: David Smith
> Sent: 03/09/08 12:35 pm
> To: Tomcat Users List
> Subject: Re: Can't execute servlet project
> 
> If the context xml file is in 
> /tomcat/apache-tomcat-5.5.26/conf/Catalina/localhost, it should be named 
> after your webapp (e.g.: DBTest.xml).  It's only named context.xml when 
> in your webapp's META-INF folder.
> 
> --David
> 
> sam wun wrote:
> > After moved the context.xml file to 
> > /tomcat/apache-tomcat-5.5.26/conf/Catalina/localhost/
> >
> > with the content changed to:
> >
> > 
> >
> > 
> > WEB-INF/web.xml
> >
> > 
> > 
> > > type="javax.sql.DataSource"
> >maxActive="100" maxIdle="30" maxWait="1"
> >username="javauser" password="javadude" 
> > driverClassName="com.mysql.jdbc.Driver"
> >url="jdbc:mysql://localhost:3306/javatest"  
> > validationQuery="select 1" />
> > 
> > (I have the exact db, table and username/password created like this).
> >
> > And I have removed the context.xml file in webapps/DBTest/WEB-INF/lib/
> >
> > My testdb.jsp in /tomcat/apache-tomcat-5.5.26/webapps/DBTest looks is 
> shown 
> > below:
> >
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/sql"; prefix="sql" %>
> > <%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
> >
> > 
> > select id, foo, bar from testdata
> > 
> >
> > 
> >   
> > DB Test
> >   
> >   
> >
> >   Results
> >
> > 
> > Foo ${row.foo}
> > Bar ${row.bar}
> > 
> >
> >   
> > 
> >
> >
> >
> > Then shudown and restarted tomcat server.
> >
> >
> > I m still getting the DataSource Invalid errors:
> >
> >
> >
> > HTTP Status 500 - 
> >
> > type Exception report
> >
> > message 
> >
> > description The server encountered an internal error () that prevented 
> it 
> > from fulfilling this request.
> >
> > exception org.apache.jasper.JasperException: Unable to get connection, 
> > DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> > create JDBC driver of class '' for connect URL 'null'"
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:460)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > root cause javax.servlet.ServletException: Unable to get connection, 
> > DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException: 
> Cannot 
> > create JDBC driver of class '' for connect URL 'null'"
> > 
> > 
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
> > 
> > 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
> > org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:82)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> > 
> > 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
> > 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
> >
> > ...
> >
> >
> >
> >
> >
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> >   
> 
> 
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


RE: Tomcat 6 and images

2008-09-02 Thread Mathias P.W Nilsson

Thank you very much it works perfectly and I got rid of my servlets :)
-- 
View this message in context: 
http://www.nabble.com/Tomcat-6-and-images-tp19260262p19282295.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Trying to build tomcat 6.0.18

2008-09-02 Thread Jack Woehr
Trying to build tomcat 6.0.18 ...  ant 
-Dbase.dir=/usr/local/work/Java/Tomcat download bombs around here ... 
tips? :


build-tomcat-dbcp:
[copy] Copying 63 files to 
/usr/local/work/Java/Tomcat/tomcat6-deps/dbcp
[move] Moving 63 files to 
/usr/local/work/Java/Tomcat/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp
   [javac] Compiling 63 source files to 
/usr/local/work/Java/Tomcat/tomcat6-deps/dbcp/classes
   [javac] 
/usr/local/work/Java/Tomcat/tomcat6-deps/dbcp/src/java/org/apache/tomcat/dbcp/dbcp/BasicDataSource.java:44: 
org.apache.tomcat.dbcp.dbcp.BasicDataSource is not abstract and does not 
override abstract method 
createQueryObject(java.lang.Class,javax.sql.DataSource) in 
javax.sql.DataSource


--
Jack J. Woehr# "Self-delusion is
http://www.well.com/~jax #  half the battle!"
http://www.softwoehr.com #  - Zippy the Pinhead


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



RE: Trying to build tomcat 6.0.18

2008-09-02 Thread Caldarale, Charles R
> From: Jack Woehr [mailto:[EMAIL PROTECTED]
> Subject: Trying to build tomcat 6.0.18
>
> Trying to build tomcat 6.0.18 ...

The first question: why are you trying to build it?  It's pure Java, so the 
binary downloads will run on any platform.

> does not override abstract method
> createQueryObject(java.lang.Class,javax.sql.DataSource) in
> javax.sql.DataSource

You need to build with a 1.5 JDK, even if you're going to run on 1.6 (setting 
source and target is not sufficient - it has to be a 1.5 JDK).  Sun added a new 
method to the javax.sql.DataSource interface in 1.6, and Tomcat does not yet 
implement it.  (This is really a JDK versioning issue that Sun needs to 
resolve, but hasn't yet.)

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



User Directories and context.xml?

2008-09-02 Thread Tim J Schumacher

Hello,

I am running suse linux, java version "1.6.0_06", tomcat 6.0.16 and I 
have the Listener for user directories configured so I can access 
webapps at eg: localhost/~myUserName.  All was working great until I 
tried to configure a jdbc data source in my public_html/META-INF 
directory


In the tomcat documentation regarding this feature at 
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#User%20Web%20Applications 
it says:


   * Each user web application will be deployed with characteristics
 established by any DefaultContext
 
 element you have configured for this Host

My question is this:  Does this mean TC will not read a context.xml 
placed at /home/myUserName/public_html/META-INF/context.xml?  I have a 
jdbc data source configured but I cannot get it to work from the 
context.xml file located in my public_html.  It does work when I put the 
Resource in the $CATALINA_HOME/conf/context.xml. 


Thanks in advance for any help!
-Tim


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



Re: Trying to build tomcat 6.0.18

2008-09-02 Thread Jack Woehr

Caldarale, Charles R wrote:

You need to build with a 1.5 JDK,

Thank you so kindly!

--
Jack J. Woehr# "Self-delusion is
http://www.well.com/~jax #  half the battle!"
http://www.softwoehr.com #  - Zippy the Pinhead


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



Re: How to make to Apache-Tomcat 6.0.13 to support all of SSLv2/SSLv3 and TLS protocols

2008-09-02 Thread Suresh Kumar J

Haven't yet tried with Sun JRE.

When I try setting the sslProtocol="ALL" in server.xml, the tomcat 
error'd out the following in catalina.out:


SEVERE: Error starting endpoint
Throwable occurred: java.io.IOException: SSLContext ALL implementation 
not found
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:394)
at 
org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:125)
at 
org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:496)
at 
org.apache.tomcat.util.net.JIoEndpoint.start(JIoEndpoint.java:515)
at 
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:204)
at 
org.apache.catalina.connector.Connector.start(Connector.java:1132)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:531)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
at java.lang.reflect.Method.invoke(Method.java:317)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 2, 2008 11:17:49 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
Throwable occurred: LifecycleException:  service.getName(): "Catalina";  
Protocol handler start failed: java.io.IOException: SSLContext ALL 
implementation not found
at 
org.apache.catalina.connector.Connector.start(Connector.java:1139)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:531)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
at java.lang.reflect.Method.invoke(Method.java:317)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)


Am runing Harmony JRE in this case. Is this error related to Harmony JRE 
or Tomcat?.


Thanks,
Suresh

Gregor Schneider wrote:

Suresh,

I guess no one is having the same problem like what you're having.

As a first guess, within your connector I'd change

 clientAuth="false" sslProtocol="TLS" keystoreType="PKCS12"

to

 clientAuth="false" sslProtocol="ALL" keystoreType="PKCS12"

2nd, I'd have a look how it behaves with Sun's original JDK

If all that failes (what would puzzle me since you're the first to
have this problem), I'd give OpenSSL a try:

I'm running Tomcat 5.5 on Debian using APR with OpenSSL, and this is
my Connector working like charm, even with the latest version of
Firefox:



HTH

Gregor
  


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