You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alexandre <as...@fazenda.sp.gov.br> on 2002/07/17 00:39:51 UTC
error on startup
hi all
im a newbe in this server o !
when i type
[root@dtiso /usr/local/jakarta-tomcat-4/bin]# ./catalina.sh start
Using CATALINA_BASE: /usr/local/jakarta-tomcat-4
Using CATALINA_HOME: /usr/local/jakarta-tomcat-4
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4/temp
Using JAVA_HOME: /usr/local/JDK_1.2.2
[root@dtiso /usr/local/jakarta-tomcat-4/bin]#
the catalina.out send me this error
Starting service Tomcat-Standalone
Apache Tomcat/4.0.4
Exception during startup processing
java.lang.reflect.InvocationTargetException:
java.lang.NoSuchMethodError: javax.servlet.ServletContext:
method setAttribute(Ljava/lang/String;Ljava/lang/Object;)V not found
at
org.apache.catalina.core.StandardContext.postWorkDirectory(StandardContext.java:3992)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3365)
at org.apache.catalina.core.ContainerBase.start(Compiled Code)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
at org.apache.catalina.core.ContainerBase.start(Compiled Code)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
at org.apache.catalina.core.StandardService.start(Compiled Code)
at org.apache.catalina.core.StandardServer.start(Compiled Code)
at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Compiled Code)
at org.apache.catalina.startup.Bootstrap.main(Compiled Code)
my ls /usr/local/include/javax/
naming servlet transaction
and the others
ls /usr/local/include/javax/servlet
Filter.class ServletContextListener.class
FilterChain.class ServletException.class
FilterConfig.class ServletInputStream.class
GenericServlet.class ServletOutputStream.class
LocalStrings.properties ServletRequest.class
RequestDispatcher.class ServletRequestWrapper.class
Servlet.class ServletResponse.class
ServletConfig.class ServletResponseWrapper.class
ServletContext.class SingleThreadModel.class
ServletContextAttributeEvent.class UnavailableException.class
ServletContextAttributeListener.class http
ServletContextEvent.class
[root@dtiso /usr/local/jakarta-tomcat-4/bin]
i have this softwares installed in a Solaris 8 sparc
jakarta-tomcat-4.0.4
jakarta-ant-1.4.1
j2re1.4.0_01
j2sdk1.4.0_01
JDK_1.2.2
jakarta-tomcat-connectors-4.0.2-01-src
jndi112.zip
my profile is
PATH=/usr/local/bin:/usr/local/sbin:/usr/openwin/bin:/usr/bin:/usr/sbin:/usr/dt/bin:/usr/ccs/bin:/usr/j2se/bin:/usr/j2se/jre/bin:/sbin:/usr/platform/sun4u/sbin
MANPATH=/usr/local/man:/usr/openwin/man:/usr/dt/man:/usr/man:/usr/j2se/man
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/openwin/lib:/usr/share/lib:/usr/dt/lib:/usr/ccs/lib:/usr/j2se/lib:/usr/j2se/jre/lib:/etc/lib:/lib:/usr/local/Apache2/modules:/usr/local/JDK_1.2.2/lib
JAVA_HOME=/usr/local/JDK_1.2.2
TOMCAT_HOME=/usr/local/jakarta-tomcat-4
#CATALINA_HOME=/usr/local/jakarta-tomcat-4
CATALINA_HOME=/usr/local/include/java
ANT_HOME=/usr/local/jakarta-ant-1.5
export CLASSPATH=/usr/local/JDK_1.2.2/lib/xalan.jar
trap "" 2 3
export LOGNAME PATH MANPATH LD_LIBRARY_PATH PS1 HISTFILESIZE JAVA_HOME
TOMCAT_HOME CATALINA_HOME ANT_HOME CLASSPATH
any people can help me ?
thanks a lot
Re: error on startup
Posted by Alexandre <as...@fazenda.sp.gov.br>.
hi Nikolas
don`t way ...
this is my profile:
# The profile that all logins get before using their own .profile.
PS1="[\u@\h \w]\\$ "
HISTFILESIZE=10000
PATH=/usr/local/bin:/usr/local/sbin:/usr/openwin/bin:/usr/bin:/usr/sbin:/usr/dt/bin:/usr/ccs/bin:/usr/j2se/bin:/usr/j2se/jre/bin:/sbin:/usr/platform/sun4u/sbin:/usr/local/jakarta-tomcat-4/bin
MANPATH=/usr/local/man:/usr/openwin/man:/usr/dt/man:/usr/man:/usr/j2se/man
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/openwin/lib:/usr/share/lib:/usr/dt/lib:/usr/ccs/lib:/usr/j2se/lib:/usr/j2se/jre/lib:/etc/lib:/lib:/usr/local/Apache2/modules:/usr/local/JDK_1.2.2/lib
JAVA_HOME=/usr/local/j2sdk1.4.0_01
TOMCAT_HOME=/usr/local/jakarta-tomcat-4
CATALINA_HOME=/usr/local/jakarta-tomcat-4
ANT_HOME=/usr/local/jakarta-ant-1.4.1
CLASSPATH=/usr/local/JDK_1.2.2/lib/jsdk.jar:/usr/local/JDK_1.2.2/lib/ApacheJServ.jar:/usr/local/JDK_1.2.2/lib/activation.jar:/usr/local/JDK_1.2.2/lib/collections.jar:/usr/local/JDK_1.2.2/lib/dt.jar:/usr/local/JDK_1.2.2/lib/jasper.jar:/usr/local/JDK_1.2.2/lib/jdbcpool-0.94.jar:/usr/local/JDK_1.2.2/lib/jdbcpool.jar:/usr/local/JDK_1.2.2/lib/jdom.jar:/usr/local/JDK_1.2.2/lib/jrefactory.jar:/usr/local/JDK_1.2.2/lib/junit.jar:/usr/local/JDK_1.2.2/lib/mail.jar:/usr/local/JDK_1.2.2/lib/servlet.jar:/usr/local/JDK_1.2.2/lib/sybase.jar:/usr/local/JDK_1.2.2/lib/tools.jar:/usr/local/JDK_1.2.2/lib/webserver.jar:/usr/local/JDK_1.2.2/lib/xalan.jar:/usr/local/JDK_1.2.2/lib/xerces.jar
trap "" 2 3
export LOGNAME PATH MANPATH LD_LIBRARY_PATH PS1 HISTFILESIZE JAVA_HOME TOMCAT_HOME CATALINA_HOME ANT_HOME CLASSPATH PATH=${PATH}:${JAVA_HOME}/bin
> >
> >
> >
> >
> > "Nikolas A. Rathert" wrote:
> >
> >
> >>Try pointing your JAVA_HOME to the J2SDK.
> >>
> >>Cheers,
> >>
> >>Nick
> >>
> >>Alexandre wrote:
> >>
> >>>hi all
> >>>im a newbe in this server o !
> >>>when i type
> >>>
> >>>[root@dtiso /usr/local/jakarta-tomcat-4/bin]# ./catalina.sh start
> >>>Using CATALINA_BASE: /usr/local/jakarta-tomcat-4
> >>>Using CATALINA_HOME: /usr/local/jakarta-tomcat-4
> >>>Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4/temp
> >>>Using JAVA_HOME: /usr/local/JDK_1.2.2
> >>>[root@dtiso /usr/local/jakarta-tomcat-4/bin]#
> >>>
> >>>the catalina.out send me this error
> >>>
> >>>Starting service Tomcat-Standalone
> >>>Apache Tomcat/4.0.4
> >>>Exception during startup processing
> >>>java.lang.reflect.InvocationTargetException:
> >>>java.lang.NoSuchMethodError: javax.servlet.ServletContext:
> >>>method setAttribute(Ljava/lang/String;Ljava/lang/Object;)V not found
> >>> at
> >>>org.apache.catalina.core.StandardContext.postWorkDirectory(StandardContext.java:3992)
> >>>
> >>> at
> >>>org.apache.catalina.core.StandardContext.start(StandardContext.java:3365)
> >>>
> >>> at org.apache.catalina.core.ContainerBase.start(Compiled Code)
> >>> at
> >>>org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
> >>> at org.apache.catalina.core.ContainerBase.start(Compiled Code)
> >>> at
> >>>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> >>> at org.apache.catalina.core.StandardService.start(Compiled Code)
> >>>
> >>> at org.apache.catalina.core.StandardServer.start(Compiled Code)
> >>> at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> >>>
> >>> at
> >>>org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> >>> at
> >>>org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> >>> at java.lang.reflect.Method.invoke(Native Method)
> >>> at java.lang.reflect.Method.invoke(Compiled Code)
> >>> at org.apache.catalina.startup.Bootstrap.main(Compiled Code)
> >>>
> >>>my ls /usr/local/include/javax/
> >>>naming servlet transaction
> >>>
> >>>and the others
> >>>
> >>>ls /usr/local/include/javax/servlet
> >>>Filter.class ServletContextListener.class
> >>>FilterChain.class ServletException.class
> >>>FilterConfig.class ServletInputStream.class
> >>>GenericServlet.class ServletOutputStream.class
> >>>LocalStrings.properties ServletRequest.class
> >>>RequestDispatcher.class ServletRequestWrapper.class
> >>>Servlet.class ServletResponse.class
> >>>ServletConfig.class ServletResponseWrapper.class
> >>>ServletContext.class SingleThreadModel.class
> >>>ServletContextAttributeEvent.class UnavailableException.class
> >>>ServletContextAttributeListener.class http
> >>>ServletContextEvent.class
> >>>[root@dtiso /usr/local/jakarta-tomcat-4/bin]
> >>>
> >>>i have this softwares installed in a Solaris 8 sparc
> >>>
> >>>jakarta-tomcat-4.0.4
> >>>jakarta-ant-1.4.1
> >>>j2re1.4.0_01
> >>>j2sdk1.4.0_01
> >>>JDK_1.2.2
> >>>jakarta-tomcat-connectors-4.0.2-01-src
> >>>jndi112.zip
> >>>
> >>>my profile is
> >>>PATH=/usr/local/bin:/usr/local/sbin:/usr/openwin/bin:/usr/bin:/usr/sbin:/usr/dt/bin:/usr/ccs/bin:/usr/j2se/bin:/usr/j2se/jre/bin:/sbin:/usr/platform/sun4u/sbin
> >>>
> >>>MANPATH=/usr/local/man:/usr/openwin/man:/usr/dt/man:/usr/man:/usr/j2se/man
> >>>
> >>>LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/openwin/lib:/usr/share/lib:/usr/dt/lib:/usr/ccs/lib:/usr/j2se/lib:/usr/j2se/jre/lib:/etc/lib:/lib:/usr/local/Apache2/modules:/usr/local/JDK_1.2.2/lib
> >>>
> >>>JAVA_HOME=/usr/local/JDK_1.2.2
> >>>TOMCAT_HOME=/usr/local/jakarta-tomcat-4
> >>>#CATALINA_HOME=/usr/local/jakarta-tomcat-4
> >>>CATALINA_HOME=/usr/local/include/java
> >>>ANT_HOME=/usr/local/jakarta-ant-1.5
> >>>export CLASSPATH=/usr/local/JDK_1.2.2/lib/xalan.jar
> >>>trap "" 2 3
> >>>export LOGNAME PATH MANPATH LD_LIBRARY_PATH PS1 HISTFILESIZE JAVA_HOME
> >>>TOMCAT_HOME CATALINA_HOME ANT_HOME CLASSPATH
> >>>
> >>>any people can help me ?
> >>>
> >>>thanks a lot
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>------------------------------------------------------------------------
> >>>
> >>>--
> >>>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> >>>For additional commands, e-mail: <ma...@jakarta.apache.org>
> >>
> >>--
> >>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> >>For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> Nikolas A. Rathert
> Fraunhofer Institute for Computer Graphics
> e-Learning & Knowledge Management
>
> Fraunhoferstrasse 5
> D-64283 Darmstadt
> Germany
> Fon +49 6151 155 552
> Fax +49 6151 155 569
> email: nikolas.rathert@igd.fhg.de
> www: http://www.igd.fhg.de
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: error on startup
Posted by "Nikolas A. Rathert" <ni...@igd.fhg.de>.
Hi,
try this:
export JAVA_HOME=/usr/local/j2sdk1.4.0_01
export PATH=${PATH}:${JAVA_HOME}/bin
This should set JAVA_HOME and add it to the systems $PATH.
Cheers,
Nick
Alexandre wrote:
> hi NIkolas
> i put this in my /etc/profile
> JAVA_HOME=/usr/local/j2sdk1.4.0_01
> but when i try start i get this error:
>
>
> [root@dtiso /]# /usr/local/jakarta-tomcat-4/bin/catalina.sh start
> The JAVA_HOME environment variable is not defined correctly
> This environment variable is needed to run this program
> [root@dtiso /]#
>
> thanks a lot
>
> Alexandre
>
>
>
>
> "Nikolas A. Rathert" wrote:
>
>
>>Try pointing your JAVA_HOME to the J2SDK.
>>
>>Cheers,
>>
>>Nick
>>
>>Alexandre wrote:
>>
>>>hi all
>>>im a newbe in this server o !
>>>when i type
>>>
>>>[root@dtiso /usr/local/jakarta-tomcat-4/bin]# ./catalina.sh start
>>>Using CATALINA_BASE: /usr/local/jakarta-tomcat-4
>>>Using CATALINA_HOME: /usr/local/jakarta-tomcat-4
>>>Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4/temp
>>>Using JAVA_HOME: /usr/local/JDK_1.2.2
>>>[root@dtiso /usr/local/jakarta-tomcat-4/bin]#
>>>
>>>the catalina.out send me this error
>>>
>>>Starting service Tomcat-Standalone
>>>Apache Tomcat/4.0.4
>>>Exception during startup processing
>>>java.lang.reflect.InvocationTargetException:
>>>java.lang.NoSuchMethodError: javax.servlet.ServletContext:
>>>method setAttribute(Ljava/lang/String;Ljava/lang/Object;)V not found
>>> at
>>>org.apache.catalina.core.StandardContext.postWorkDirectory(StandardContext.java:3992)
>>>
>>> at
>>>org.apache.catalina.core.StandardContext.start(StandardContext.java:3365)
>>>
>>> at org.apache.catalina.core.ContainerBase.start(Compiled Code)
>>> at
>>>org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
>>> at org.apache.catalina.core.ContainerBase.start(Compiled Code)
>>> at
>>>org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
>>> at org.apache.catalina.core.StandardService.start(Compiled Code)
>>>
>>> at org.apache.catalina.core.StandardServer.start(Compiled Code)
>>> at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
>>>
>>> at
>>>org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
>>> at
>>>org.apache.catalina.startup.Catalina.process(Catalina.java:179)
>>> at java.lang.reflect.Method.invoke(Native Method)
>>> at java.lang.reflect.Method.invoke(Compiled Code)
>>> at org.apache.catalina.startup.Bootstrap.main(Compiled Code)
>>>
>>>my ls /usr/local/include/javax/
>>>naming servlet transaction
>>>
>>>and the others
>>>
>>>ls /usr/local/include/javax/servlet
>>>Filter.class ServletContextListener.class
>>>FilterChain.class ServletException.class
>>>FilterConfig.class ServletInputStream.class
>>>GenericServlet.class ServletOutputStream.class
>>>LocalStrings.properties ServletRequest.class
>>>RequestDispatcher.class ServletRequestWrapper.class
>>>Servlet.class ServletResponse.class
>>>ServletConfig.class ServletResponseWrapper.class
>>>ServletContext.class SingleThreadModel.class
>>>ServletContextAttributeEvent.class UnavailableException.class
>>>ServletContextAttributeListener.class http
>>>ServletContextEvent.class
>>>[root@dtiso /usr/local/jakarta-tomcat-4/bin]
>>>
>>>i have this softwares installed in a Solaris 8 sparc
>>>
>>>jakarta-tomcat-4.0.4
>>>jakarta-ant-1.4.1
>>>j2re1.4.0_01
>>>j2sdk1.4.0_01
>>>JDK_1.2.2
>>>jakarta-tomcat-connectors-4.0.2-01-src
>>>jndi112.zip
>>>
>>>my profile is
>>>PATH=/usr/local/bin:/usr/local/sbin:/usr/openwin/bin:/usr/bin:/usr/sbin:/usr/dt/bin:/usr/ccs/bin:/usr/j2se/bin:/usr/j2se/jre/bin:/sbin:/usr/platform/sun4u/sbin
>>>
>>>MANPATH=/usr/local/man:/usr/openwin/man:/usr/dt/man:/usr/man:/usr/j2se/man
>>>
>>>LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/openwin/lib:/usr/share/lib:/usr/dt/lib:/usr/ccs/lib:/usr/j2se/lib:/usr/j2se/jre/lib:/etc/lib:/lib:/usr/local/Apache2/modules:/usr/local/JDK_1.2.2/lib
>>>
>>>JAVA_HOME=/usr/local/JDK_1.2.2
>>>TOMCAT_HOME=/usr/local/jakarta-tomcat-4
>>>#CATALINA_HOME=/usr/local/jakarta-tomcat-4
>>>CATALINA_HOME=/usr/local/include/java
>>>ANT_HOME=/usr/local/jakarta-ant-1.5
>>>export CLASSPATH=/usr/local/JDK_1.2.2/lib/xalan.jar
>>>trap "" 2 3
>>>export LOGNAME PATH MANPATH LD_LIBRARY_PATH PS1 HISTFILESIZE JAVA_HOME
>>>TOMCAT_HOME CATALINA_HOME ANT_HOME CLASSPATH
>>>
>>>any people can help me ?
>>>
>>>thanks a lot
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>------------------------------------------------------------------------
>>>
>>>--
>>>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>>
>>--
>>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
> ------------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
Nikolas A. Rathert
Fraunhofer Institute for Computer Graphics
e-Learning & Knowledge Management
Fraunhoferstrasse 5
D-64283 Darmstadt
Germany
Fon +49 6151 155 552
Fax +49 6151 155 569
email: nikolas.rathert@igd.fhg.de
www: http://www.igd.fhg.de
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How do I determine the error code
Posted by Tim Funk <fu...@joedog.org>.
I believe you can say:
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/error.jsp</location>
</error-page>
This would take care of any exceptions being thrown. As for error codes
- you might need to hard code these (but it isn't very many). There
could be a chance that the error codes are handled as exceptions -
therefore the above would handle ALL errors.
Mark O'Driscoll wrote:
> Great. Just what I wanted!
>
> Now is there anyway to specify a single <error-page><error-code> set that
> works for all error codes. I can't just say
>
> <error-page><location>/error.jsp</location></error-page>
>
> and hope that error.jsp gets caled for all error-code & exception errors
>
>
> ----- Original Message -----
> From: "Tim Funk" <fu...@joedog.org>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Wednesday, July 17, 2002 3:17 PM
> Subject: Re: How do I determine the error code
>
>
>
>>Section 9.8 of Java Servlet Specification Version 2.3:
>>
>>A web application may specify that when errors occur, other resources in
>>the application are used. These resources are specified in the
>>deployment descriptor. If the location of the error handler is a servlet
>>or a JSP, the following request attributes can be set:
>>- javax.servlet.error.status_code
>>- javax.servlet.error.exception_type
>>- javax.servlet.error.message
>>- javax.servlet.error.exception
>>- javax.servlet.error.request_uri
>>
>>-Tim
>>
>>Mark O'Driscoll wrote:
>>
>>>Using the <error-page><error-code> directive in my web.xml, I am
>>
> redirecting
>
>>>errors & exceptions to one error page. I know I can query the exception
>>
> but
>
>>>how do I query the error that may have caused the page to be invoked.
>>>
>>>e.g.
>>>
>>>if I call response.sendError(234), how do I tell in CheckError.jsp that
>>
> the
>
>>>error that cased the page to be invoked was 234 (and any other
>>
> information).
>
>>>I don't want to have to put in a separate directive for each possible
>>
> error.
>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>
> <ma...@jakarta.apache.org>
>
>>>For additional commands, e-mail:
>>
> <ma...@jakarta.apache.org>
>
>>>
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>
> <ma...@jakarta.apache.org>
>
>>For additional commands, e-mail:
>
> <ma...@jakarta.apache.org>
>
>>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How do I determine the error code
Posted by Mark O'Driscoll <ma...@eircom.net>.
Great. Just what I wanted!
Now is there anyway to specify a single <error-page><error-code> set that
works for all error codes. I can't just say
<error-page><location>/error.jsp</location></error-page>
and hope that error.jsp gets caled for all error-code & exception errors
----- Original Message -----
From: "Tim Funk" <fu...@joedog.org>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, July 17, 2002 3:17 PM
Subject: Re: How do I determine the error code
> Section 9.8 of Java Servlet Specification Version 2.3:
>
> A web application may specify that when errors occur, other resources in
> the application are used. These resources are specified in the
> deployment descriptor. If the location of the error handler is a servlet
> or a JSP, the following request attributes can be set:
> - javax.servlet.error.status_code
> - javax.servlet.error.exception_type
> - javax.servlet.error.message
> - javax.servlet.error.exception
> - javax.servlet.error.request_uri
>
> -Tim
>
> Mark O'Driscoll wrote:
> > Using the <error-page><error-code> directive in my web.xml, I am
redirecting
> > errors & exceptions to one error page. I know I can query the exception
but
> > how do I query the error that may have caused the page to be invoked.
> >
> > e.g.
> >
> > if I call response.sendError(234), how do I tell in CheckError.jsp that
the
> > error that cased the page to be invoked was 234 (and any other
information).
> > I don't want to have to put in a separate directive for each possible
error.
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How do I determine the error code
Posted by Tim Funk <fu...@joedog.org>.
Section 9.8 of Java Servlet Specification Version 2.3:
A web application may specify that when errors occur, other resources in
the application are used. These resources are specified in the
deployment descriptor. If the location of the error handler is a servlet
or a JSP, the following request attributes can be set:
- javax.servlet.error.status_code
- javax.servlet.error.exception_type
- javax.servlet.error.message
- javax.servlet.error.exception
- javax.servlet.error.request_uri
-Tim
Mark O'Driscoll wrote:
> Using the <error-page><error-code> directive in my web.xml, I am redirecting
> errors & exceptions to one error page. I know I can query the exception but
> how do I query the error that may have caused the page to be invoked.
>
> e.g.
>
> if I call response.sendError(234), how do I tell in CheckError.jsp that the
> error that cased the page to be invoked was 234 (and any other information).
> I don't want to have to put in a separate directive for each possible error.
>
>
>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
How do I determine the error code
Posted by Mark O'Driscoll <ma...@eircom.net>.
Using the <error-page><error-code> directive in my web.xml, I am redirecting
errors & exceptions to one error page. I know I can query the exception but
how do I query the error that may have caused the page to be invoked.
e.g.
if I call response.sendError(234), how do I tell in CheckError.jsp that the
error that cased the page to be invoked was 234 (and any other information).
I don't want to have to put in a separate directive for each possible error.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: error on startup
Posted by Alexandre <as...@fazenda.sp.gov.br>.
hi NIkolas
i put this in my /etc/profile
JAVA_HOME=/usr/local/j2sdk1.4.0_01
but when i try start i get this error:
[root@dtiso /]# /usr/local/jakarta-tomcat-4/bin/catalina.sh start
The JAVA_HOME environment variable is not defined correctly
This environment variable is needed to run this program
[root@dtiso /]#
thanks a lot
Alexandre
"Nikolas A. Rathert" wrote:
> Try pointing your JAVA_HOME to the J2SDK.
>
> Cheers,
>
> Nick
>
> Alexandre wrote:
> > hi all
> > im a newbe in this server o !
> > when i type
> >
> > [root@dtiso /usr/local/jakarta-tomcat-4/bin]# ./catalina.sh start
> > Using CATALINA_BASE: /usr/local/jakarta-tomcat-4
> > Using CATALINA_HOME: /usr/local/jakarta-tomcat-4
> > Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4/temp
> > Using JAVA_HOME: /usr/local/JDK_1.2.2
> > [root@dtiso /usr/local/jakarta-tomcat-4/bin]#
> >
> > the catalina.out send me this error
> >
> > Starting service Tomcat-Standalone
> > Apache Tomcat/4.0.4
> > Exception during startup processing
> > java.lang.reflect.InvocationTargetException:
> > java.lang.NoSuchMethodError: javax.servlet.ServletContext:
> > method setAttribute(Ljava/lang/String;Ljava/lang/Object;)V not found
> > at
> > org.apache.catalina.core.StandardContext.postWorkDirectory(StandardContext.java:3992)
> >
> > at
> > org.apache.catalina.core.StandardContext.start(StandardContext.java:3365)
> >
> > at org.apache.catalina.core.ContainerBase.start(Compiled Code)
> > at
> > org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
> > at org.apache.catalina.core.ContainerBase.start(Compiled Code)
> > at
> > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> > at org.apache.catalina.core.StandardService.start(Compiled Code)
> >
> > at org.apache.catalina.core.StandardServer.start(Compiled Code)
> > at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
> >
> > at
> > org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> > at
> > org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at java.lang.reflect.Method.invoke(Compiled Code)
> > at org.apache.catalina.startup.Bootstrap.main(Compiled Code)
> >
> > my ls /usr/local/include/javax/
> > naming servlet transaction
> >
> > and the others
> >
> > ls /usr/local/include/javax/servlet
> > Filter.class ServletContextListener.class
> > FilterChain.class ServletException.class
> > FilterConfig.class ServletInputStream.class
> > GenericServlet.class ServletOutputStream.class
> > LocalStrings.properties ServletRequest.class
> > RequestDispatcher.class ServletRequestWrapper.class
> > Servlet.class ServletResponse.class
> > ServletConfig.class ServletResponseWrapper.class
> > ServletContext.class SingleThreadModel.class
> > ServletContextAttributeEvent.class UnavailableException.class
> > ServletContextAttributeListener.class http
> > ServletContextEvent.class
> > [root@dtiso /usr/local/jakarta-tomcat-4/bin]
> >
> > i have this softwares installed in a Solaris 8 sparc
> >
> > jakarta-tomcat-4.0.4
> > jakarta-ant-1.4.1
> > j2re1.4.0_01
> > j2sdk1.4.0_01
> > JDK_1.2.2
> > jakarta-tomcat-connectors-4.0.2-01-src
> > jndi112.zip
> >
> > my profile is
> > PATH=/usr/local/bin:/usr/local/sbin:/usr/openwin/bin:/usr/bin:/usr/sbin:/usr/dt/bin:/usr/ccs/bin:/usr/j2se/bin:/usr/j2se/jre/bin:/sbin:/usr/platform/sun4u/sbin
> >
> > MANPATH=/usr/local/man:/usr/openwin/man:/usr/dt/man:/usr/man:/usr/j2se/man
> >
> > LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/openwin/lib:/usr/share/lib:/usr/dt/lib:/usr/ccs/lib:/usr/j2se/lib:/usr/j2se/jre/lib:/etc/lib:/lib:/usr/local/Apache2/modules:/usr/local/JDK_1.2.2/lib
> >
> > JAVA_HOME=/usr/local/JDK_1.2.2
> > TOMCAT_HOME=/usr/local/jakarta-tomcat-4
> > #CATALINA_HOME=/usr/local/jakarta-tomcat-4
> > CATALINA_HOME=/usr/local/include/java
> > ANT_HOME=/usr/local/jakarta-ant-1.5
> > export CLASSPATH=/usr/local/JDK_1.2.2/lib/xalan.jar
> > trap "" 2 3
> > export LOGNAME PATH MANPATH LD_LIBRARY_PATH PS1 HISTFILESIZE JAVA_HOME
> > TOMCAT_HOME CATALINA_HOME ANT_HOME CLASSPATH
> >
> > any people can help me ?
> >
> > thanks a lot
> >
> >
> >
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: error on startup
Posted by "Nikolas A. Rathert" <ni...@igd.fhg.de>.
Try pointing your JAVA_HOME to the J2SDK.
Cheers,
Nick
Alexandre wrote:
> hi all
> im a newbe in this server o !
> when i type
>
> [root@dtiso /usr/local/jakarta-tomcat-4/bin]# ./catalina.sh start
> Using CATALINA_BASE: /usr/local/jakarta-tomcat-4
> Using CATALINA_HOME: /usr/local/jakarta-tomcat-4
> Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-4/temp
> Using JAVA_HOME: /usr/local/JDK_1.2.2
> [root@dtiso /usr/local/jakarta-tomcat-4/bin]#
>
> the catalina.out send me this error
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.4
> Exception during startup processing
> java.lang.reflect.InvocationTargetException:
> java.lang.NoSuchMethodError: javax.servlet.ServletContext:
> method setAttribute(Ljava/lang/String;Ljava/lang/Object;)V not found
> at
> org.apache.catalina.core.StandardContext.postWorkDirectory(StandardContext.java:3992)
>
> at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3365)
>
> at org.apache.catalina.core.ContainerBase.start(Compiled Code)
> at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:638)
> at org.apache.catalina.core.ContainerBase.start(Compiled Code)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343)
> at org.apache.catalina.core.StandardService.start(Compiled Code)
>
> at org.apache.catalina.core.StandardServer.start(Compiled Code)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:781)
>
> at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
> at
> org.apache.catalina.startup.Catalina.process(Catalina.java:179)
> at java.lang.reflect.Method.invoke(Native Method)
> at java.lang.reflect.Method.invoke(Compiled Code)
> at org.apache.catalina.startup.Bootstrap.main(Compiled Code)
>
> my ls /usr/local/include/javax/
> naming servlet transaction
>
> and the others
>
> ls /usr/local/include/javax/servlet
> Filter.class ServletContextListener.class
> FilterChain.class ServletException.class
> FilterConfig.class ServletInputStream.class
> GenericServlet.class ServletOutputStream.class
> LocalStrings.properties ServletRequest.class
> RequestDispatcher.class ServletRequestWrapper.class
> Servlet.class ServletResponse.class
> ServletConfig.class ServletResponseWrapper.class
> ServletContext.class SingleThreadModel.class
> ServletContextAttributeEvent.class UnavailableException.class
> ServletContextAttributeListener.class http
> ServletContextEvent.class
> [root@dtiso /usr/local/jakarta-tomcat-4/bin]
>
> i have this softwares installed in a Solaris 8 sparc
>
> jakarta-tomcat-4.0.4
> jakarta-ant-1.4.1
> j2re1.4.0_01
> j2sdk1.4.0_01
> JDK_1.2.2
> jakarta-tomcat-connectors-4.0.2-01-src
> jndi112.zip
>
> my profile is
> PATH=/usr/local/bin:/usr/local/sbin:/usr/openwin/bin:/usr/bin:/usr/sbin:/usr/dt/bin:/usr/ccs/bin:/usr/j2se/bin:/usr/j2se/jre/bin:/sbin:/usr/platform/sun4u/sbin
>
> MANPATH=/usr/local/man:/usr/openwin/man:/usr/dt/man:/usr/man:/usr/j2se/man
>
> LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/openwin/lib:/usr/share/lib:/usr/dt/lib:/usr/ccs/lib:/usr/j2se/lib:/usr/j2se/jre/lib:/etc/lib:/lib:/usr/local/Apache2/modules:/usr/local/JDK_1.2.2/lib
>
> JAVA_HOME=/usr/local/JDK_1.2.2
> TOMCAT_HOME=/usr/local/jakarta-tomcat-4
> #CATALINA_HOME=/usr/local/jakarta-tomcat-4
> CATALINA_HOME=/usr/local/include/java
> ANT_HOME=/usr/local/jakarta-ant-1.5
> export CLASSPATH=/usr/local/JDK_1.2.2/lib/xalan.jar
> trap "" 2 3
> export LOGNAME PATH MANPATH LD_LIBRARY_PATH PS1 HISTFILESIZE JAVA_HOME
> TOMCAT_HOME CATALINA_HOME ANT_HOME CLASSPATH
>
> any people can help me ?
>
> thanks a lot
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>