tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mirek.Su...@intax.cz
Subject Re: JavaBean at JSP
Date Wed, 25 Oct 2000 07:17:35 GMT

Hi Julio,

thank  you very much for your advice - it is exactly (!) as you write (the
WEB-INF directory MUST be directly under the docBase directory and JSP can
then be located at any subdirectory below the docBase directory).

The similar advice I got also from Gorard Bozic and Kurt Bernhard Pruener
(with their "Re: JavaBean at JSP").

     Mirek Subrt



                                                                                
                    "Julio Serje                                                
                    (@Canada)"           To:                                    
                    <jserje              <tomcat-user@jakarta.apache.org>       
                                         cc:                                    
                    24.10.2000           Subject:     Re: JavaBean at JSP       
                    21:06                                                       
                    Please                                                      
                    respond to                                                  
                    tomcat-user                                                 
                                                                                
                                                                                




Hi, Mirek

I think that your problem is that you are probably adding two directory
levels between your docbase and your WEB-INF...

If your docBase is /usr/adissys/pok_JSP  then your WEB-INF directory should
be located at

/usr/adissys/pok_JSP/WEB-INF

,  and you say you have it at

/usr/adissys/pok_JSP/SB/vzor/WEB-INF

Try moving WEB-INF two levels up, so that your class is located at:

/usr/adissys/pok_JSP/WEB-INF/classes/mesto/Mesto.class


I think it will fix your problem. Note that there is no problem invoking
the
JSP in any subdirectory below your docbase, but the WEB-INF, classes and
lib
(the default classpath for your app)  should adhere to the standard.

Julio Serje
Calian Tech.
Kanata, ON, Canada.


----- Original Message -----
From: <Mirek.Subrt@intax.cz>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, October 24, 2000 3:22 AM
Subject: Re: JavaBean at JSP


>
> Hi Kurt,
>
> thank you for your advice, but I think that I don't understand to it.
>
> I want to have my JSP page mesto.jsp at some directory and my JavaBean
> Mesto.class at directory under it (at WEB-INF/classes/mesto). Is this my
> demand not standard? That is, must I to have JSP page and JavaBean at the
> same directory? Or must I define context (at server.xml) for any
> subdirectory, where I want to place my JSP pages?
>
> My problem persists:
> *******************
>
> My JSP page (mesto.jsp) couldn't find my JavaBean (mesto.Mesto): it
> produces error page, where is
> the line "java.lang.ClassNotFoundException: Unable to load class
> mesto.Mesto".
>
> server.xml:
> **********
>
> <Context path="/pok_JSP"
>          docBase="/usr/adissys/pok_JSP"
>          debug="9"
>          reloadable="true" >
> </Context>
>
> Location of my JSP page mesto.jsp:
> *********************************
>
> /usr/adissys/pok_JSP/SB/vzor/mesto.jsp
>
> Location of my JavaBean Mesto.class:
> ***********************************
>
> /usr/adissys/pok_JSP/SB/vzor/WEB-INF/classes/mesto/Mesto.class
>
> Its source file (Mesto.java) has "package mesto;" inside.
>
> Defining of my JavaBean Mesto.class at my JSP page mesto.jsp:
> ************************************************************
>
> <jsp:useBean id="mes" class="mesto.Mesto" scope="page" />
>
> Calling of my JSP page mesto.jsp from Web browser:
> *************************************************
>
> http://intax5:8080/pok_JSP/SB/vzor/mesto.jsp
>
>      Thank for any help!
>
>           Mirek Subrt
>
>
>
>
>                     Kurt Bernhard
>                     Pruenner             To:
tomcat-user@jakarta.apache.org
>                     <leak@gmx.at>        cc:
>                                          Subject:     Re: JavaBean at JSP
>                     23.10.2000
>                     19:02
>                     Please
>                     respond to
>                     tomcat-user
>
>
>
>
>
>
> Mirek.Subrt@intax.cz wrote:
> <snip>
> > 1) I created new directory
> > /usr/adissys/pok_JSP/SB/vzor/WEB-INF/classes/mesto;
> <snip>
> > Can you advise why?
>
> Since "pok_JSP" is the context you defined in your server.xml that you
had
> in
> your first post, I think you want to have your WEB-INF directory there
> instead
> of the SB/vzor subdirectory...
>
> Try using /usr/adissys/pok_JSP/WEB-INF/classes/mesto - it really should
> work
> there, unless I'm totally bonkers... :)
>
> --
> Kurt Pruenner - Haendelstrasse 17, 4020 Linz, Austria | Briareos at Olymp
> BBS:
> http://www.mp3.com/Leak http://www.ssw.uni-linz.ac.at | ssh
> bbs@138.232.112.32
> ...........It might be written "Mindfuck", but it's spelt
> "L-A-I-N"...........
> np: Up, Bustle & Out - Los Locos Cuban (Xen Cuts comp.)
>
>
>





Mime
View raw message