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 Tue, 24 Oct 2000 07:22:08 GMT

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