Taglib error

2004-05-17 Thread Ivan Venuti
Hi,

I'm trying to use cache taglib.

I did the following steps :

 1. Copy the tag library descriptor file to the /WEB-INF subdirectory of my
web application.

 2. Copy the tag library JAR file to the /WEB-INF/lib subdirectory of my web
application.

 3. Add a taglib element to your web application deployment descriptor in
/WEB-INF/web.xml like this:

taglib
taglib-urihttp://jakarta.apache.org/taglibs/cache-1.0/taglib-uri
taglib-location/WEB-INF/cache.tld/taglib-location
/taglib

 but when tomcat(4.1.29) starts, I've this error:

17-mag-2004 10.36.05 org.apache.commons.digester.Digester error
GRAVE: Parse Error at line 7 column 50: Attribute xmlns:xalan must be
declared
 for element type taglib.
org.xml.sax.SAXParseException: Attribute xmlns:xalan must be declared for
elem
ent type taglib.
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValid
ate(Unknown Source)


In my lib I've
xalan-2.5.1.jar
xercesImpl.jar
xercesSamples.jar
xml-apis.jar
xmlParserAPIs.jar

Any idea?

thankx



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



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

2004-04-05 Thread Ivan Venuti
I had your same problem. I couldn't find any solution but I solved the
problem in this way:

I have set the URL string and the driver name in server.xml as Strings:

Environment name=ISAS_CS
type=java.lang.String
value=jdbc:... /

Environment name=ISAS_DN type=java.lang.String
value=com.informix.jdbc.IfxDriver /

and then I use JNDI lookups for them and I create a connection with:

Class.forName(driverName);
conn=DriverManager.getConnection(connectionString);

-- Ivan

-Messaggio originale-
Da: Andy Grove [mailto:[EMAIL PROTECTED]
Inviato: lunedì 5 aprile 2004 12.03
A: [EMAIL PROTECTED]
Oggetto: Cannot create JDBC driver of class '' for connect URL 'null'


Hi,

I am trying to convert my Tomcat web application to use JNDI to lookup a
DataSource rather than using DriverManager directly. My application
works fine using DriverManager so I know I have my classpath set up
correctly.

The problem I have seems to be a very common one yet I cannot find a
solution to it using Google. I am getting the following error message
when I attempt to look up a DataSource:

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

This implies to me that Tomcat is recognizing my Resource declaration
in my conf/server.xml but is not loading the associated
ResourceParams. I get this problem with Tomcat 4.1 and 5.0 on Red Hat
9 with Sun JDK 1.4.2.

My web.xml contains:

  resource-ref
descriptionDB Connection/description
res-ref-namejdbc/mydb/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
  /resource-ref

My $TOMCAT_HOME/conf/server.xml contains the following (I have tried
defining this within the context of my webapp and also in the
GlobalNamingResources section).

 Resource name=jdbc/mydb auth=Container type=javax.sql.DataSource
/

ResourceParams name=jdbc/mydb
parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
parameter
  namemaxActive/name
  value100/value
/parameter
parameter
  namemaxIdle/name
  value30/value
/parameter
parameter
  namemaxWait/name
  value1/value
/parameter
parameter
 nameusername/name
 valueebay/value
/parameter
parameter
 namepassword/name
 value/value
/parameter
parameter
   namedriverClassName/name
   valueorg.postgresql.Driver/value
/parameter
parameter
  nameurl/name
  valuejdbc:postgresql://localhost/mydb/value
/parameter
  /ResourceParams

Lastly, my Java code is as follows:

InitialContext initCtx = new InitialContext();
Object obj = initCtx.lookup( java:comp/env/jdbc/mydb );
DataSource ds = (DataSource) obj;
return ds.getConnection();

Does anyone have JNDI working with Tomcat? Any help would be much
appreciated!

Thanks,

Andy Grove.




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



Error compiling mod_jk on Red Hat 9

2004-04-02 Thread Ivan Venuti
Hi,

I'm trying to compile the AJP connectors from source in order to communicate
with Apache 2.0.40 installed in my Red Hat 9a. I've installed tomcat 4.1.29
and I've done:

$ unzip jakarta-tomcat-connectors-jk-1.2-src-current.zip
$ cd jakarta-tomcat-connectors-jk-1.2.5-src/jk/native
$ ./buildconf.sh
$ ./configure --with-apxs=/usr/sbin/apxs --enable-EAPI
$ make

This command doesn't terminate correctly. This is the error:

i386-redhat-linux-gcc: ../common/jk_ajp12_worker.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_connect.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_msg_buff.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_util.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp13.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_pool.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_worker.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp13_worker.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_lb_worker.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_sockbuf.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_map.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_uri_worker_map.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_ajp14.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp14_worker.lo: No such file or
directory
i386-redhat-linux-gcc: ../common/jk_md5.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_ajp_common.lo: No such file or directory
i386-redhat-linux-gcc: ../common/jk_context.lo: No such file or directory
make[1]: *** [mod_jk.la] Error 1
make[1]: Leaving directory
`/home/caribel/INSTALL.d/jakarta-tomcat-connectors-jk
-1.2.5-src/jk/native/apache-2.0'
make: *** [all-recursive] Error 1

anyone can help me?
Thanks in advance

-- Ivan Venuti



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



[OT] Error compiling mod_jk (linux)

2003-10-29 Thread Ivan Venuti
Hello,

I'd like to use a Apache+Tomcat for using SSL  Certificates.
I need to build the mod_jk module for Apache.

I have downloaded jakarta-tomcat-connectors-jk-1.2-src-current.zip from
Jakarta Web Site.
I have unzipped it and:

1) cd (DIR)/jk/native
2) ./configure --with-apxs=(APACHE DIR)/bin/apxs
3) make

and I'm optaining these errors:

gcc -I/usr/local/apache/include -g -O2 -DLINUX=22 -DMOD_SSL=208115 -DUSE_HSR
EGEX
 -DEAPI -DUSE_EXPAT -I../lib/expat-lite -g -O2 -I
/usr/java/j2sdk1.4.0//include
-I /usr/java/j2sdk1.4.0//include/ -c jk_connect.c  -fPIC -DPIC -o
.libs/jk_conne
ct.lo
jk_connect.c: In function `jk_resolve':
jk_connect.c:123: `in_addr_t' undeclared (first use in this function)
jk_connect.c:123: (Each undeclared identifier is reported only once
jk_connect.c:123: for each function it appears in.)
jk_connect.c:123: parse error before `laddr'
jk_connect.c:167: `laddr' undeclared (first use in this function)
make[1]: *** [jk_connect.lo] Error 1
make[1]: Leaving directory
`/home/javauser/apache/jakarta-tomcat-connectors-jk-1
.2.5-src/jk/native/common'
make: *** [all-recursive] Error 1

Anyone can help me with this?

I'm using RH 7, on a i686

-- Ivan



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



servlet problem with tomcat 4.0.4

2003-10-22 Thread Ivan Venuti
Hello,

I have a servlet that generates a PDF document. The generation task is quite
long, so I have decided to do it in an asyncronous way:

the servlet receives the request of generating the document and outputs a
waiting HTML page that submit a request to the servlet, after a predefined
lap of time (using a javascript setTimeout function), asking if the
document is ready:


HTMLHEAD
TITLEL675FoServlet/TITLE
/HEAD
BODY bgcolor='#99ccff' link=blue vlink=purple
table bgcolor='FF' cellpadding=0 cellspacing=0td width=652
align='center'
script language = JavaScript
window.setTimeout(window.location.href = 'http://...servlet 
URL with
parameters';, 15000);
/script
/BODY
/HTML



If the document is ready it is presented to the user else the servlet
generates another HTML page with the same lap of time of the previous HTML
page

Everything works nice with Netscape (4.7).
The problems arise with MS Explorer (tested with versions 5.0, 5.5 or 6.0).

Testing the application we notice that:

1) The servlet generates the first HTML waiting page correctly
2) The first invocation of the subsequent page fails to be activated after
the predefined amount of time but is waiting until the completation of the
generation of document from the servlet

So we decided to comment out the setTimeout function and to put an HTML
button:

HTML
HEAD
 script
function reload(){window.location.href ='URL';}
 /script
/HEAD
BODY bgcolor=#99ccff

form
input type=button onClick=javascript:reload(); value=Ricarica
/form

/BODY
/HTML

when the user pushes it the page should make another invocation.
This doesn't happend until the completation of the document.
Most strange if the user clicks two times, the second invocation has effect
immediatly, but finally, when the document is generated, fails to retrieve
it because someone else seems to be listing for it (maybe is the first
invocation hanging up?).
We are using Tomcat 4.0.4.

Please help me if someone can imagine a possible solution.
Thanks in advance

Ivan Venuti



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



bug in Tomcat 4 or .... what?

2002-12-17 Thread Ivan Venuti
Hi,

I have a servlet that opens a DataInputStrem on the request (see below)

public void doPost(HttpServletRequest request, HttpServletResponse response)
   throws ServletException{

 try{
   // Open the I/O streams
DataInputStream in = new DataInputStream(request.getInputStream() );

After this pice of code I cant' access any more to the request parameters.
Infact this code:

request.getParameter(anyParameter)

retrieves ALWAYS null.
The strange thing is that this servlet was Ok for tomcat 3, but can't work
any more with Tomcat4.

Anyone can explain why opening a DataInputStream alters the
HttpServletRequest?

Thanks

-- Ivan Venuti --



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




Can't read POST parameters in a Servlet

2002-12-09 Thread Ivan Venuti
Hi,

I have this problem: from an HTML page I call a Servlet via a form like this:

form name=richiesta method=post action=servletName

input type=hidden name=in_file value=9177.doc

...

input type=hidden name=port value=8787

/form

In the Servlet I retrieve the parameters with request.getParameter(paramName);

With Tomcat3.x everithing goes well, but with Tomcat 4.0.3 I can't retrieve the 
parameters in the Servlet: every getParameter returns null, and printing all with

for (Enumeration namesList = request.getParameterNames(); namesList.hasMoreElements();)

{

String curName =(String)namesList.nextElement();

System.out.println(Param +curName+ value: '+request.getParameter(curName)+');

}

prints nothing!

I really can't figure out where to look for a solution. Any help is welcome!

-- Ivan Venuti --