Re: Question about JNDI + Connection Pool + Mysql (Tomcat 6)

2007-09-18 Thread Titi Wangsa
try changing
username=usuarioweb
to
user=usuarioweb

from
http://www.docjar.com/docs/api/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.html#setUser(java.lang.String)


On 9/19/07, Fredy Provoste [EMAIL PROTECTED] wrote:
 Hi again, i've been deployed a webapp called libreria in Tomcat 6, i tried
 to configure a mysql connection pool, so in the path

 libreria
 .
 .  META-INF/context.xml

 put the lines

 Context path=/libreria docBase=libreria  debug=5 privileged=true
 reloadable=true

 Resource name=jdbc/basededatos auth=Container type=
 com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
 factory=com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory
 driverClassName=com.mysql.jdbc.Driver  username=usuarioweb
 password=usuarioweb
 url=jdbc:mysql://localhost:3306/prueba1?autoReconnect=true/

 /Context



 in  the path

 libreria
 .
 WEB-INF/web.xml

 the lines to use the JNDI resource


 resource-ref
   description
 Pool a la Base de Datos
   /description
   res-ref-name
 jdbc/basededatos
   /res-ref-name
   res-type
 com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
   /res-type
   res-auth
 Container
   /res-auth
   /resource-ref


 so trying using JSTL, and pure JSP to access the pool, i get the next
 message

 ERROR java.sql.SQLException: Access denied for user ''@'localhost' (using
 password: YES)
 seems like tomcat ignores my user i've created in mysql server (I verify the
 connection through dreamweaver conection feature and it works)

 thanks for any help

 Fredy


-
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: Logging all data sent to client

2007-07-24 Thread Titi Wangsa

create a httpservlet filter?

On 7/24/07, ben short [EMAIL PROTECTED] wrote:

Hi Tim,

Thanks for that, but it only seems to log out the request/response
headers. Is It possible to log everything sent to the client?

Ben

On 7/24/07, Tim Funk [EMAIL PROTECTED] wrote:
 Look at the RequestDumperValve

 -Tim

 ben short wrote:
  Hi,
 
  I using Tomcat 6.0.13 and Spring 2.0.6. I have been involved in
  developing a website that products pages in various formats , such as
  www, xml, wap and pda. We are having some issues with wap and pda, but
  cant ciew the html source thats being shown on the devices.
  We can view the html source in firefox using a wap and pda plugin, but
  the issues are not always the same or there at all.
 
  What I would like to do is log all the data sent to the client. I have
  been looking at encapsulating the HttpServletRequest and log out the
  data to a log file.
 
  Is there any easier way to do this with tomcat?
 

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




-
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: bad workers.properties configuration

2007-07-20 Thread Titi Wangsa

ommit lbfactor ?

On 7/20/07, Joe Riopel [EMAIL PROTECTED] wrote:

On 7/19/07, Raffaele Viola [EMAIL PROTECTED] wrote:
 I write this workers.properties

 worker.list=default
 worker.default.port=8009
 worker.default.host=localhost
 worker.default.type=ajp13
 worker.default.lbfactor=1

Is that all you have in the worker.properties file ?

My worker.properties file has this at the top of it:

worker.tomcat_home = /usr/local/tomcat
worker.java_home = /usr/local/java
ps = /

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



Re: Tomcat - All threads (200) are currently busy

2007-07-11 Thread Titi Wangsa

probably some threads are performing database operation
and it takes too long so new threads are being spawned,
the new threads are also taking too long, so newer threads are being spawned.
too much spawning,  that is what is causing the limit break.

On 7/12/07, André Vila Cova [EMAIL PROTECTED] wrote:

I don't think so... I will see..but, why i get the error?
SEVERE: All threads (200) are currently *busy*, waiting. *Increase


On 7/11/07, Mladen Turk [EMAIL PROTECTED] wrote:

 André Vila Cova wrote:
  Hello!
 
  I get lot of times the following error:
 
  SEVERE: All threads (200) are currently *busy*, waiting. *Increase
  maxThreads*
  **
  *Strange is that i've configured in server.xml the following
  (maxThreads=400):*
  *
 

 You have probably done that for a wrong connector.

 Regards,
 Mladen.

 -
 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: Advice about Tomcat on x86_64 architecture..

2007-07-09 Thread Titi Wangsa

we have 3 instances on the same hardware
we did this due to a memory/thread constraint
correct me if i'm mistaken, but i've read that
the more memory you allocate for you Heap, the less thread you have,
we want a lot of memory
and a lot of threads
so we opted to do 3 instances on the same hardware

On 7/10/07, Christopher Schultz [EMAIL PROTECTED] wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Prt,

Please do not post more than once. We forgive spelling and grammar
mistakes. There is no reason to re-post your question with trivial changes.

prt wrote:
 I have Dell PE 2950 with tow Intel xeon dual core 5130 processors.
 I have three tomcat work in balance in mod_jk, and one Apache in front on
 port 80.

Three instances on the same piece of hardware? Why not just run a single
instance? Load balancing doesn't get you anything when it's all on the
same hardware.

 The JVM and the tomcat that i have on the server are 32 bit architecture.

:(

Note that Tomcat is architecture-less. Tomcat is neither 32-bit nor
64-bit. Only the JVM makes these distinctions.

 Is it good to do so or will be better to install 64 bit architecture JVM and
 compile tomcat on the server ?

You should definitely use a 64-bit JVM on your server. You will have
access to much more memory and overall performance should improve
significantly. You do not have to recompile anything. Tomcat should work
exactly as it does today.

 Thank you all for help and sorry about my English.

No problem. My Hebrew would probably be horrible. ;)

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

iD8DBQFGkmQU9CaO5/Lv0PARAn5hAKCt5+aOHDnHF64o5Ft1V8bEt2ZNxwCfbJr0
rR3sVgqhGYbIVgUJOmkTF98=
=V1oW
-END PGP SIGNATURE-

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



Re: Tomcat adding files

2007-07-02 Thread Titi Wangsa

looks like the can't be included..
try zeroing the file
of set the content to this is the header file
or move the file to the root directory and try to access the file
directly to see what kind of error you are dealing with
i mean move the file so that
you can view the header using http://server:port/appname/v2header.jsp


On 7/2/07, coder5436uk [EMAIL PROTECTED] wrote:


my web xml:
jsp-config
jsp-property-group
url-pattern*.jsp/url-pattern

include-prelude/WEB-INF/headers/v2header.jsp/include-prelude
/jsp-property-group
/jsp-config

file does exist in location

I get

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: /index.jsp(1,1) The absolute uri:
http://java.sun.com/jstl/xml cannot be resolved in either web.xml or the jar
files deployed with this application

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

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

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

org.apache.jasper.compiler.Parser.processIncludeDirective(Parser.java:334)
org.apache.jasper.compiler.Parser.addInclude(Parser.java:385)
org.apache.jasper.compiler.Parser.parse(Parser.java:130)

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

org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)

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

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



I have been able to get it NOT to break the code but it seems to ignore the
file I want to include





Tim Funk wrote:

 Look at projects such as tiles.

 An alternative is to use jsp preludes. Which allow you to add stuff to
 the beginning or end of all jsp pages.

 For example: put this in web.xml:
 jsp-config
jsp-property-group
  url-pattern*.jsp/url-pattern
  include-prelude/WEB-INF/prelude1.jspf/include-prelude
/jsp-property-group
 /jsp-config


 -Tim

 coder5436uk wrote:
 I have an install of tomcat and I wish to add a default header and footer
 to
 each page, any one know how to do this ?

 I am running files which come out with simple text, I want to include
 them
 all in a site template without having to change the code in each page.


 eg.

 simple page

 %= hello %


 will out put the java variable hello on a blank page, I want to
 simulate
 the code


 %@ include file=header.html %

 %= hello %

 %@ include file=header.html %

 without having to put the JSP include in every page
 I would appreciate some help on how to do this within the tomcat config


 -
 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/Tomcat-adding-files-tf3999518.html#a11390634
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]




-
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: problems with mod_jk modifying headers

2007-07-02 Thread Titi Wangsa

i'm guessing you need to modify the mime type in you httpd.conf
to set .jsp as text/html
just my guess...
that's what i'd do if my system exhibited that symptom


On 7/2/07, Richard Kaye [EMAIL PROTECTED] wrote:

I saw your first post and was interested.  I am running a
very similar system with no problems (I take that back: there
are problems, but not this problem).
Q1. Is there something in your apache config file(s) to do
with mimetypes that is messing things up?
Q2. Are you working with strange charsets? Tomcat likes to
add the charset=... parameter to the Content-Type header.

 This doesn't seem to bother IE7...
I know this, from experience. (sigh.) IE7 always know better
than you do how you want a document displayed. If you choose
to serve an example HTML source in a tutorial on HTML as
text/plain so that the user can see the source, IE7 (and IE6)
ignores the mimetype in the HTTP header that you carefully put
there and displays something else just to spite you.

Richard


On Mon, 2007-07-02 at 16:09 +0200, Anton Melser wrote:
 (maybe a repost?)
 Hi all,
 We are running tomcat 5.5.23 on java 1.6.0 (suse 10.0 with addon java6
 rpms for suse 10.1). These machines are load balanced behind an apache
 2.2.2 with mod_jk jakarta-tomcat-connectors-1.2.15 (both compiled from
 sources). We have a page that is showing the html source instead of
 the page on firefox2. The funny thing is that when the page is
 accessed directly then the content type is text/html (and the page
 shows correctly) but when coming through mod_jk, it is coming as
 text/plain (and showing the source). This doesn't seem to bother
 IE7...
 Does anyone have any ideas?
 Cheers

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




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



coyote problem

2007-07-01 Thread Titi Wangsa

hello to all..
i;m using tomcat 5.5.23 and apache 2.0.52
and mod_jk 1.2.23 on centos 4.4
amd 64
i'm running it in load balancer mode


i get a few errors.. roughly 0.1%
statistics after reset, a few hours after reset shows
the access is 59697
CE (client error) is 93
Err = 0


WARN: Exception thrown whilst processing POSTed parameters
java.net.SocketTimeoutException: Read timed out
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(SocketInputStream.java:129)
   at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
   at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
   at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
   at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:626)
   at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:564)
   at org.apache.jk.common.JkInputStream.receive(JkInputStream.java:200)
   at org.apache.jk.common.JkInputStream.doRead(JkInputStream.java:179)
   at org.apache.coyote.Request.doRead(Request.java:419)
   at 
org.apache.catalina.connector.InputBuffer.realReadBytes(InputBuffer.java:265)
   at org.apache.tomcat.util.buf.ByteChunk.substract(ByteChunk.java:403)
   at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:280)
   at 
org.apache.catalina.connector.CoyoteInputStream.read(CoyoteInputStream.java:193)
   at org.apache.catalina.connector.Request.readPostBody(Request.java:2400)
   at 
org.apache.catalina.connector.Request.parseParameters(Request.java:2379)
   at org.apache.catalina.connector.Request.getParameter(Request.java:1005)
   at 
org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:353)
   at 
org.apache.myfaces.context.servlet.RequestParameterMap.getAttribute(RequestParameterMap.java:42)


any hints on what is causing this?
should i increase the timout?
where do i do this?

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