Problems with Tomcat and xml files

2006-11-07 Thread Juanjo Cuadrado

Hi,

I'm developing a Web application and I'm having problems to deploy it in a
Tomcat server.
To develop, I use NetBeans 5.0 (jdk 1.5) and I debug with Tomcat 5.5.9 that
NetBeans has inside.

In the development environment all works fine, but when I try to deploy it
(the application) in a
pre-production environment(with Tomcat 5.0.27 and jdk 1.5), Tomcat give me
the follow error:
java.lang.NoSuchMethodError: org.w3c.dom.Element.getTextContent()

I have been looking for in forums and I have read that the problem could be
related with any compatibility
library that Tomcat uses, but I'm not sure...

Any idea?


Re: Why can java.io.NotSerializableException occur?

2006-11-07 Thread Juanjo Cuadrado

Hi,

   maybe the problem is that tomcat is trying to do anything with the
session and it is trying to write you object for sesion persistence...


2006/11/7, starki78 [EMAIL PROTECTED]:


We have a crash at tomcat 4.
The thing I don't understand is the fact that
the class causing this error has no default constructor and
does not implement serializable.

So why can this error occur?

THANKS A LOT


2006-11-07 11:25:49 StandardManager[/pss] IOException while loading persi=
sted sessions: java.io.WriteAbortedException: writing aborted; java.io.No=
tSerializableException: com.struts.statistics.Deviation

.Measures
java.io.WriteAbortedException: writing aborted; java.io.NotSerializableEx=
ception: com.struts.statistics.Deviation
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at java.util.ArrayList.readObject(ArrayList.java:547)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces=
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838=
)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746)=

at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1=
646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at org.apache.catalina.session.StandardSession.readObject(StandardSessio=
n.java:1369)
at org.apache.catalina.session.StandardSession.readObjectData(StandardSe=
ssion.java:864)
at org.apache.catalina.session.StandardManager.load(StandardManager.java=
:440)
at org.apache.catalina.session.StandardManager.start(StandardManager.jav=
a:655)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3=
585)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)=

at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)=

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363=
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4=
97)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:219=
0)
at org.apache.catalina.startup.CatalinaService.start(CatalinaService.jav=
a:273)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.=
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces=
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.BootstrapService.start(BootstrapService.j=
ava:245)
at org.apache.catalina.startup.BootstrapService.main(BootstrapService.ja=
va:307)=0A




-
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: Include Directive

2006-11-07 Thread Juanjo Cuadrado

Hi,

  Can you try the follow:

%@ include file=*/header.jsp* %

   I think that this will work fine.

2006/11/7, Justin Jaynes [EMAIL PROTECTED]:


Hello,

I am trying to eliminate unnecessary duplication of code by using include
directives.  Currently my directory structure is like this:

[main app directory]
index.jsp
header.jsp
footer.jsp
[admin subdirectory]
index.jsp

The index.jsp file in the main directory contains the code %@ include
file=header.jsp % and it works great.

In the admin directory the index.jsp file contains this code %@ include
file=../header.jsp % obviously referencing to the parent directory, where
the header.jsp file sits.  I don't want to have to copy it to the child
directory and maintain two copies of it.

But when I do this, I get an error every time.  What am I doing
wrong?  You can find the error below.

Justin

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(4,0) File /../header.jsp
not found
   org.apache.jasper.servlet.JspServletWrapper.handleJspException(
JspServletWrapper.java:512)
   org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:377)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:314)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.jasper.JasperException: /index.jsp(4,0) File /../header.jsp
not found
   org.apache.jasper.compiler.DefaultErrorHandler.jspError(
DefaultErrorHandler.java:39)
   org.apache.jasper.compiler.ErrorDispatcher.dispatch(
ErrorDispatcher.java:405)
   org.apache.jasper.compiler.ErrorDispatcher.jspError(
ErrorDispatcher.java:86)
   org.apache.jasper.compiler.Parser.processIncludeDirective(
Parser.java:339)
   org.apache.jasper.compiler.Parser.parseIncludeDirective(Parser.java
:372)
   org.apache.jasper.compiler.Parser.parseDirective(Parser.java:484)
   org.apache.jasper.compiler.Parser.parseElements(Parser.java:1556)
   org.apache.jasper.compiler.Parser.parse(Parser.java:126)
   org.apache.jasper.compiler.ParserController.doParse(
ParserController.java:211)
   org.apache.jasper.compiler.ParserController.parse(
ParserController.java:100)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:155)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
   org.apache.jasper.JspCompilationContext.compile(
JspCompilationContext.java:563)
   org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:305)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:314)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)





-
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: About connections

2006-10-24 Thread Juanjo Cuadrado

Thanks Chuck

2006/10/23, Caldarale, Charles R [EMAIL PROTECTED]:


 From: Juanjo Cuadrado [mailto:[EMAIL PROTECTED]
 Subject: About connections

 When I try to recover a connection, I use the Tomcat's
 pool connections, that it work fine too if I previously
 have put the Oracle's jar into 'common' directory.

 I have put the jar (classes12) into lib directory of
 application

You can't do both.  If you're using DBCP, the jar must go in common/lib
- and only in common/lib.  If you're not using Tomcat's connection
pooling, the jar may go in common/lib, shared/lib, or WEB-INF/lib of
each application - but it must not appear in more than one layer of the
classloading hiearchy:

 Bootstrap
 |
  System
 |
  Common
 /  \
Catalina   Shared
/   \
   Webapp1  Webapp2 ...

Its presence in multiple layers will cause the kinds of errors you're
seeing.

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




About connections

2006-10-23 Thread Juanjo Cuadrado

Hi
   I'm trying to deploy an app and it needs to use the Oracle's drivers (
classes12.jar).

   When I try to recover a connection, I use the Tomcat's pool connections,
that it work fine too if
   I previously have put the Oracle's jar into 'common' directory. If by
some razon, I didn't recover
   a connection through the pool, the application would try to recover a
direct connection (Class.forname)

   Is in this point when I don't achieve that the app recover a connection.
I have put the jar (classes12)
   into lib directory of application, but it don't work fine for me and it
give me a error message it don't
   find the Oracle's class driver .

   Any idea?

   Sorry for me English.


Problem with HttpSessionListener

2006-10-11 Thread Juanjo Cuadrado

Hi,

   I'm trying to create a listener in my application. I have created a
listener class that implements HttpSessionLister and I have put the element
listener in my web.xml.

   My listener class only sets a object in the session
(getSession().getAttribute(k, kk)), but when I try to recover this
object from a class (a servlet), not exist in session.

   Any idea?

P.D.
   I'm using NetBeans 5.0 and its envebed Tomcat 5.5.9


Re: Problem with HttpSessionListener

2006-10-11 Thread Juanjo Cuadrado

I'm going to try to explain it better, if my English allows me.

I have this classe:
...
public class HttpTestListener implements HttpSessionListener {

   public void sessionCreated(HttpSessionEvent e){
   e.getSession().setAttribute(test, new String(testValue);
   }
...

In my web.xml I have put the follow:
...
   listener
   listener-classcom.test.HttpTestListener/listener-class
   /listener
...

And, finally, in a servlet I try to recover the value of test:
...
String test = (String)request.getSession().getAttribute(test);
...

After this, the value of de variable test is null

What have I to do if I want to recover the value of test?




2006/10/11, Martin Gainty [EMAIL PROTECTED]:


message was cutoff

which object are you attempting to recover?
Servlet?
SessionListener?
Session?
SessionAttribute?

also you will not set any object in Session thru getAttribute as this is
an accessor method and not a mutator

Martin --
This e-mail communication and any attachments may contain confidential and
privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
you are hereby notified that you have received
this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its
contents
- Original Message -
From: Juanjo Cuadrado [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Wednesday, October 11, 2006 8:09 AM
Subject: Problem with HttpSessionListener


 Hi,

I'm trying to create a listener in my application. I have created a
 listener class that implements HttpSessionLister and I have put the
element
 listener in my web.xml.

My listener class only sets a object in the session
 (getSession().getAttribute(k, kk)), but when I try to recover this
 object from a class (a servlet), not exist in session.

Any idea?

 P.D.
I'm using NetBeans 5.0 and its envebed Tomcat 5.5.9



Re: Run class in the start up of Tomcat

2006-05-29 Thread Juanjo Cuadrado
/tomcat-5.5-doc/class-loader-howto.html



Doug





- Original Message -

From: Juanjo Cuadrado [EMAIL PROTECTED]

To: users@tomcat.apache.org

Sent: Monday, May 15, 2006 5:08 PM

Subject: Run class in the start up of Tomcat





Hi,



   I'm trying to run a class in startup of Tomcat. I think that this was

possible in others versions of Tomcat (I just started with Tomcat 5). I

think that it was a property in someone element of server.xml that allowed

this.



Anyone can help me? I hope that yes ;) tx







-

To unsubscribe, e-mail: [EMAIL PROTECTED]

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





Run class in the start up of Tomcat

2006-05-15 Thread Juanjo Cuadrado

Hi,

  I'm trying to run a class in startup of Tomcat. I think that this was
possible in others versions of Tomcat (I just started with Tomcat 5). I
think that it was a property in someone element of server.xml that allowed
this.

   Anyone can help me? I hope that yes ;) tx