Я новичок в GWT и Java
Вот пример, чтобы понять мою проблему
код
.Client
Class A(){
// design Part with 2 text box for user name and password
//On click event of Button asyncInterface is called (RPC) to create a session
service.getConnection(authentication, callback);// authentication is array with username password
}
на стороне SERVER
.server
public class ServiceIMPL extends RemoteServiceServlet implements ServiceInterface{
public String getConnection(String[] authentication) {
connectionParameter = new ConnectionParameter(authentication,repositoryName);
session=connectionParameter.getSession();
}
}
Этот сеанс используется для добавления и удаления папки в хранилище.
методы addFolder, getFolder, getDocment написаны в том же классе, что и Session, необходимый для этого. Все работает нормально.
Теперь мне нужно добавить документ в хранилище. Для которого у меня есть дизайн сервлета на сервере
public class FileUpload extends HttpServlet implements Servlet {
// servlet is also working fine i have the content of file in buffer.
//but to add file in a repository I need Session which is in ServiceIMPL Class
//if I create a object of ServiceIMPL class then the authentication will be null
//Without Username and Pass word session cannot be created.
}
Пожалуйста, помогите мне, как это сделать.