Project

General

Profile

« Previous | Next » 

Revision 231

Added by bojilova over 24 years ago

testing login

View differences:

src/edu/ucsb/nceas/metacat/MetaCatServlet.java
278 278
 out.println("Username:" + un);
279 279
 out.println("Password:" + pw);
280 280
    MetaCatSession sess = new MetaCatSession(request, un, pw);
281
    //try {  
282
        //if (sess.userAuth(pw)) {
281
    try {  
282
        if (sess.userAuth(pw)) {
283 283
            try {
284 284
                response.sendRedirect(
285 285
                    response.encodeRedirectUrl("/xmltodb/lib/index.html"));
......
290 290
                            ioe.getMessage());
291 291
            }                
292 292
                
293
//        } else {
294
//            sess.disconnect();            
295
//            out.println("SRB Connection failed. " +
296
//                        "SRB RMI Server is not running now or " +
297
//                        "user " + un + 
298
//                        " has not been authenticated to use the system.");
299
//        }    
300
//    } catch ( java.rmi.RemoteException re) {
301
//            sess.disconnect();            
302
//            out.println("SRB Connection failed. " + re.getMessage());
303
//    }        
293
        } else {
294
            sess.disconnect();            
295
            out.println("SRB Connection failed. " +
296
                        "SRB RMI Server is not running now or " +
297
                        "user " + un + 
298
                        " has not been authenticated to use the system.");
299
        }    
300
    } catch ( java.rmi.RemoteException re) {
301
            sess.disconnect();            
302
            out.println("SRB Connection failed. " + re.getMessage());
303
    }        
304 304
  }
305 305

  
306 306
  /** 

Also available in: Unified diff