SORRY!! NOW IT WORKS PERFECTLY! (forgot the / at the end of <env>, how painful!!)
Have a fine weekend, Sunny Arnaud H�ritier schrieb: > Context, InitialContext, NamingException are classes from the package javax.naming.* > > let's see : > http://java.sun.com/products/jndi/1.2/javadoc/index.html > > So put <%@ page import="javax.naming.*" %> in your JSP page and all will work >correctly (normally ;-) ) > > Arno > > > -----Message d'origine----- > > De: Sunhild Copony [SMTP:[EMAIL PROTECTED]] > > Date: jeudi 29 novembre 2001 11:45 > > �: Tomcat Users List > > Objet: Re: Class in org.apache.jsp not found - please help!! > > > > Hi Arno, > > thanks a lot for your quick reply! > > > > What do you mean exacly? > > > > I tryed in the jsp > > <%@ page import="org.apache.jsp.*" %> > > but got the same error... > > Maybe you mean something else? > > > > Here is my complete server.xml, web.xml, and jsp. > > I hope you find out whats wrong, I cann't see anything! > > > > Tx, Sunny > > > > WEB-INF/web.xml : > > ... > > <env-entry> > > <env-entry-name>inobase</env-entry-name> > > <env-entry-value>"/home/inovit/inorms"</env-entry-value> > > <env-entry-type>java.lang.String</env-entry-type> > > </env-entry> > > > > server.xml, in my context section : > > ... > > <Environment name="inobase" type="java.lang.String" > > value="/home/inovit/inorms"/> > > > > >From a jsp I want to read this variable and pass it to a class. > > > > jsp: > > <% > > inovit.webadmin.InterimApp ia = new inovit.webadmin.InterimApp(); > > org.apache.jsp.Context ctx = null; > > String value = "" ; > > try { ctx = new org.apache.jsp.InitialContext(); } > > catch (org.apache.jsp.NamingException e) {value = "no ctx";} > > if (!value.equals("no ctx")) > > try { value = ctx.lookup("java:/comp/env/inobase"); } > > catch (org.apache.jsp.NamingException e) {value = "no path";} > > %> > > > > another try: > > <% > > inovit.webadmin.InterimApp ia = new inovit.webadmin.InterimApp(); > > Context ctx = null; > > String value = "" ; > > try { ctx = new InitialContext(); } > > catch (NamingException e) {value = "no ctx";} > > if (!value.equals("no ctx")) > > try { value = ctx.lookup("java:/comp/env/inobase"); } > > catch (NamingException e) {value = "no path";} > > %> > > > > I allways get the same error: > > > > A Servlet Exception Has Occurred > > org.apache.jasper.JasperException: Unable to compile class for JSP > > > > An error occured between lines: 50 and 59 in the jsp file: > > /inopacs/statusrf.jsp > > Generated servlet error: > > /mirror/tools/tomcat/work/localhost/webadmin/inopacs/statusrf$jsp.java:60: > > Class org.apache.jsp.Context not found. > > Context ctx = null; > > ^ > > An error occured between lines: 50 and 59 in the jsp file: > > /inopacs/statusrf.jsp > > Generated servlet error: > > /mirror/tools/tomcat/work/localhost/webadmin/inopacs/statusrf$jsp.java:62: > > Class org.apache.jsp.InitialContext not found. > > try { ctx = new InitialContext(); } > > ^ > > An error occured between lines: 50 and 59 in the jsp file: > > /inopacs/statusrf.jsp > > Generated servlet error: > > /mirror/tools/tomcat/work/localhost/webadmin/inopacs/statusrf$jsp.java:63: > > Class org.apache.jsp.NamingException not found. > > catch (NamingException e) {value = "no ctx";} > > ^ > > An error occured between lines: 50 and 59 in the jsp file: > > /inopacs/statusrf.jsp > > Generated servlet error: > > /mirror/tools/tomcat/work/localhost/webadmin/inopacs/statusrf$jsp.java:66: > > Class org.apache.jsp.NamingException not found. > > catch (NamingException e) {value = "no path";} > > ^ > > 4 errors > > > > > > Arnaud H�ritier schrieb: > > > > > The package org.apache.jsp is a virtual package. > > > This package is used to generate servlet sources from JSP pages. > > > All classes generated under TC/work/.... belong by default to this package. > > > I think that you need to add the import of the Context class in the JSP page >which uses it. > > > > > > Arno > > > > > > > -----Message d'origine----- > > > > De: Sunhild Copony [SMTP:[EMAIL PROTECTED]] > > > > Date: jeudi 29 novembre 2001 10:27 > > > > �: [EMAIL PROTECTED] > > > > Objet: Class in org.apache.jsp not found - please help!! > > > > > > > > Hi, > > > > > > > > I'm using Tomcat 4.0b rc1 on Solaris and J2SDK 1.3.1. > > > > > > > > Where can I find org.apache.jsp? I searched the complete jars, but > > > > didn't found it... > > > > I want to use the environment settings in server.xml, and than use the > > > > variable in my jsp, but get the error: > > > > > > > > Class org.apache.jsp.Context not found. > > > > Context ctx = null; > > > > ^ > > > > > > > > Could you please help me! > > > > Thanks a lot, > > > > Sunny > > > > > > > > > > > > -- > > > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > > > For additional commands: <mailto:[EMAIL PROTECTED]> > > > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > -- > > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > > For additional commands: <mailto:[EMAIL PROTECTED]> > > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > > > > > -- > > To unsubscribe: <mailto:[EMAIL PROTECTED]> > > For additional commands: <mailto:[EMAIL PROTECTED]> > > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
