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 Mon, 23 Oct 2000 08:12:42 GMT

Hi Piotr,

case sensitivity of file names on UNIX is not that problem, because
mesto.jsp and Mesto.class are two different files. And mesto.jsp is finded
by Tomcat, but problem is, when Tomcat has to execute command
<jsp:useBean id="mes" class="Mesto" scope="page"/>
It is a Mesto.class, that Tomcat couldn't find.

But thank you for your quick sugestion!

Has anybody else any sugestions?



                                                                                     
                    "Piotr Lipski"                                                   
                    <piotr.lipski@cafa        To:                                    
                    fs.com.pl>                <tomcat-user@jakarta.apache.org>  
    
                                              cc:                                    
                    23.10.2000 10:01          Subject:     Re: JavaBean at JSP       
                    Please respond to                                                
                    tomcat-user                                                      
                                                                                     
                                                                                     




Hi!
Maybe case sensitivity of file names on UNIX has something to do with it.
Have you tried to change mesto.jsp to Mesto.jsp?

Piotr Lipski


----- Original Message -----
From: <Mirek.Subrt@intax.cz>
To: <tomcat-user@jakarta.apache.org>
Sent: Monday, October 23, 2000 9:46 AM
Subject: JavaBean at JSP


: Helow Tomcat-friends!
:
: Can somebody help me with the problem of unfinded JavaBean class?
:
: I use an JavaBean Mesto (that means "city" in czech language) at JSP page
: (under Tomcat 3.2 beta 6):
:
: <jsp:useBean id="mes" class="Mesto" scope="page"/> .
:
: Note: this JavaBean has no package directive inside Mesto.java.
:
: When I had installed Tomcat under Windows 95 (and JDK 1.2.2), all worked
: well, but when I had installed Tomcat under unix (AIX 4.1 and JDK 1.1.8),
: my JSP page displays error, that it cannot find my JavaBean class Mesto.
:
: 1) Displayed error
:     *******************
: Error: 500
: Location: /pok_JSP/SB/vzor/mesto.jsp
: Internal Servlet Error:
: org.apache.jasper.JasperException: Unable to load class Mesto
: ..............
: Root cause:
: java.lang.ClassNotFoundException: Unable to load class Mesto
: ..............
:
: 2) Location of my JSP page mesto.jsp
:     *******************************************
:
: My JSP page mesto.jsp is at directory /usr/adissys/pok_JSP/SB/vzor. This
: directory has (!) subdirectory WEB-INF/classes, where I have JavaBean
: Mesto.class.
:
: 3) Calling of my JSP page mesto.jsp from Internet Explorer 5.0
:
*********************************************************************
:
: I call my JSP page mesto.jsp with HTTP address
: http://intax5:8080/pok_JSP/SB/vzor/mesto.jsp.
:
: 4) Defining of context /pok_JSP at server.xml
:      **************************************************
:
: My context /pok_JSP is defined (at server.xml) correctly (I hope):
:
: <Context path="/pok_JSP"
:          docBase="/usr/adissys/pok_JSP"
:          debug="9"
:          reloadable="true" >
: </Context>
:
: 5) JavaBean class Mesto.java
:      *********************************
: The class Mesto.java is this:
:
: public class Mesto implements Cloneable {
:    int     id_mes;
:    String  naz_mes;
:    public void   setId_mes  (int id_mes)     { this.id_mes = id_mes; }
:    public int    getId_mes  ()               { return id_mes; }
:    public void   setNaz_mes (String naz_mes) { this.naz_mes = naz_mes; }
:    public String getNaz_mes ()               { return naz_mes; }
:    public        Mesto      ()               {}
:    public        Mesto      (int id_mes,
:                              String naz_mes) { this.id_mes  = id_mes;
:                                                this.naz_mes = naz_mes; }
:    protected Object clone ()
:      throws CloneNotSupportedException       { return super.clone(); }
: }
:
: 6) Possible cause of problem
:     ********************************
:
: Is possible, that this problem is caused by absence of package directive
at
: Mesto.java?
: But, I repeat, when I tested the same mesto.jsp (and the same Mesto.java)
: under Windows 95 + JDK 1.2.2, all worked very nice! I do not want to have
: package here, but if i will be necessary, I would be accept that fact, of
: course.
:
: I think, that Mesto.class must be find, when Mesto class is located at
: subdirectory WEB-INF/classes under directory pok_JSP. The text
: "ContextManager: Adding context Ctx( /pok_JSP )" was displayed during
: started of Tomcat (I think, it is correct).
:
: Thank you for your any sugestions!
:
:      Mirek Subrt
:
:
:
:





Mime
View raw message