Project

General

Profile

« Previous | Next » 

Revision 226

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)) {
283
            try {
284
                response.sendRedirect(
285
                    response.encodeRedirectUrl("/xmltodb/lib/index.html"));
286
            } catch ( java.io.IOException ioe) {
287
                sess.disconnect();            
288
                out.println("MetaCatServlet.handleLoginAction() - " +
289
                            "Error on redirect of HttpServletResponse: " + 
290
                            ioe.getMessage());
291
            }                
281
    //try { 
282
        //if (sess.userAuth(pw)) {
283
//            try {
284
//                response.sendRedirect(
285
//                    response.encodeRedirectUrl("/xmltodb/lib/index.html"));
286
//            } catch ( java.io.IOException ioe) {
287
//                sess.disconnect();            
288
//                out.println("MetaCatServlet.handleLoginAction() - " +
289
//                            "Error on redirect of HttpServletResponse: " + 
290
//                            ioe.getMessage());
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