You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Iris <ir...@enix.org> on 2002/10/18 16:26:55 UTC

JSP compilation problem

Hello,

I work with a platform which regroups JBoss3.0.0, tomcat 4.1.12 and 
Struts1.1b2 and
I don't know from where comes my problem.

I have an EJB User like wich interface is:
package com.alkinos.kernel.user ;

import javax.ejb.EJBLocalObject ;
import java.util.Collection ;

/**
* This interface defines the local interface for the User Bean
*/
public interface User extends EJBLocalObject {
public Integer getId() ;
public String getName() ;
public String getPassword() ;
public void setPassword(String password) ;
public Collection getProfiles() ;
public boolean verifyPassword(String password) ;
}

and a JSP which use this EJB:
String name = user.getName() ;
String password = user.getPassword() ;

At the compilation I have this error:
jboss-3.0.0_tomcat-4.0.3/catalina/work/localhost/userwebui/components/editUser$jsp.java:131: 

cannot resolve symbol
symbol : method getPassword ()
location: interface com.alkinos.kernel.user.User
form.setPassword(user.getPassword()) ;
                                              ^
1 error

I found that strange, so I changed my JSP code by:
ava.lang.reflect.Method method =
user.getClass().getMethod("getPassword", null);
System.out.println("method: " + method) ;
String password = (String)method.invoke(user, null) ;

And this works fine.

It's clear that there is a compilation problem but at the execution all
works fine.

An idea ?

Iris


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>