tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Chaney <a...@compulsivecreative.com>
Subject Re: The type <. . .> is not visible
Date Fri, 23 May 2008 13:02:26 GMT
Er... shouldn't you be making K00, GenK00 and its constructor public? 
They will only be visible to classes in .../test/k00

As to tc loading generic classes - works fine for me on Java 5 and Java 6


Regards

Alan



Albretch Mueller wrote:
>  Hi
> 
>  I need to check if the tc classloaders are able to load/reload generic classes.
> 
>  So I created two sample classes in /webapps/ROOT/WEB-INF/classes/test/k00:
> 
> package test.k00;
> 
> class K00{
>  public int i0;
>  public long l0;
> }
> 
>  and
> 
> package test.k00;
> 
> import java.util.*;
> 
> // __
> class GenK00{
>  private String aS;
>  public ArrayList<K00> ALK00;
> // __
>  GenK00(String aS){
>   this.aS = aS;
>   ALK00 = new ArrayList<K00>();
>  }
> }
> 
>  which as you can see are in package test.k00
> 
>  Then I simply rearrange the welcome-file-list so that index.jsp is
> loaded first and included some test code right before theline "If
> you're seeing this page ..."
> 
>           <p>
> Loading Generic classes:<br/>
> <%@page import="test.k00.*"%>
> <%
>  K00 k0 = new K00();
>  k0.i0 = 0;
>  k0.l0 = 0L;
> %>
>           </p>
> 
>  However I am getting "The type" K00 "is not visible" kinds of errors
> 
>  How can I fix this error and make tc load the classes?
> 
>  Once the classes are loaded, would tc reload them if K00 is changed to, say:
> 
> class K00{
>  public int i0;
>  public String aS0;
> }
> 
>  after you recompile it, or if a new class is dropped in this
> directory, would tc load it?
> 
>  Thanks
>  lbrtchx
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 
> !DSPAM:4836bd74309611909011899!
> 

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message