Project

General

Profile

« Previous | Next » 

Revision 3010

Added by Duane Costa over 18 years ago

Change relative path to the login page.

View differences:

src/edu/ucsb/nceas/metacat/advancedsearch/LoginServlet.java
51 51
   */
52 52
  private static final String CONFIG_DIR = "WEB-INF";
53 53
  private static final String CONFIG_NAME = "metacat.properties";
54
  static final long serialVersionUID = 0;  // Needed for Eclipse warning.
54 55
				   
55 56
  // Instance Variables
56 57
  private String contextString = "";
......
70 71
    Metacat metacat = (Metacat) httpSession.getAttribute("metacat");
71 72
    MetacatLogin metacatLogin;
72 73
    String metacatURL;
73
    String organization;
74
    String result;
75 74
    ServletContext servletContext = httpSession.getServletContext();
76 75
    String username;
77 76
    
......
84 83
      MetacatHelper metacatHelper = new MetacatHelper();
85 84
      String serverName = request.getServerName();
86 85
      int serverPort = request.getServerPort();
87
      metacatURL = metacatHelper.constructMetacatURL(serverName, serverPort, "knb");
86
      metacatURL = 
87
       metacatHelper.constructMetacatURL(serverName, serverPort, contextString);
88 88
    }
89 89
    
90 90
    if (metacat == null) {
......
107 107
      httpSession.setAttribute("loggedIn", new Boolean(true));
108 108
      username = loginBean.getUsername();
109 109
      httpSession.setAttribute("username", username);
110
      dispatcher = request.getRequestDispatcher("/metacatsearch.jsp");
110
      //dispatcher = request.getRequestDispatcher("/style/skins/lter/metacatsearch.jsp");
111
      dispatcher = request.getRequestDispatcher("/style/skins/lter/index.jsp");
111 112
    }
112 113
    else {
113
      request.setAttribute("loginFailure", new Boolean(true));
114
      dispatcher = request.getRequestDispatcher("/metacatlogin.jsp");
114
      httpSession.setAttribute("loggedIn", new Boolean(false));
115
      request.setAttribute("loginFailure", "true");
116
      dispatcher = request.getRequestDispatcher("/style/skins/lter/index_login.jsp");
115 117
    }
116 118

  
117 119
    dispatcher.forward(request, response);

Also available in: Unified diff