The following piece of code cannot initialise any servlet, although all servlets used, exist in the given directory ( ie %CATALINA_HOME%\webapps\eDevPro\WEB-INF\classes) and although they can be called from applets.
Can you please, have a sanity check. Thanks in advance
public class DPDataSelectionServ extends HttpServlet
{
....
private Vector callInterServlet(String lStringServletName,Vector lVectorArgv, HttpSession httpsession,HttpServletRequest req)
{
try{
DPDataSelectionServInterface dataTabbedPane = (DPDataSelectionServInterface)
getServletConfig().getServletContext().getServlet(lStringServletName);
if(dataTabbedPane ==null) //Servlet not initialised
{
//Making fresh url connection to servlet, this will initialise the servlet
try{
URL urlservlet = new URL(" DPUtility.println(" URLConnection urlConnection = urlservlet.openConnection();
urlConnection.connect();
//urlConnection
errorLog(req.getServerName() + req.getServerPort());
DPUtility.println(req.getServerName() + " " + req.getServerPort());
DPUtility.println("calling dataTabbedPane");
dataTabbedPane = (DPDataSelectionServInterface) getServletConfig().getServletContext().getServlet(lStringServletName);
if(dataTabbedPane==null)
{
DPUtility.println("dataTabbedPane==null exit callInterServlet");
return null;
}
DPUtility.println("Servlet Loaded :"+ lStringServletName);
}catch(Exception eUnableToLaodApplet) {
DPUtility.println("DPDataSelectionServ 1B " + "unableToLoadApplet"+lStringServletName + " " + eUnableToLaodApplet);
eUnableToLaodApplet.printStackTrace();
return null;
}
}
Vector lVectorData = new Vector();
lVectorData.addElement("true");
Vector temp = dataTabbedPane.getInitData(lVectorArgv,httpsession);
lVectorData.addElement(temp);
errorLog("CALLENDS :"+ lStringServletName);
return lVectorData;
}catch(Exception eInterServ){
return null;
}
}
}
Can you please, have a sanity check. Thanks in advance
public class DPDataSelectionServ extends HttpServlet
{
....
private Vector callInterServlet(String lStringServletName,Vector lVectorArgv, HttpSession httpsession,HttpServletRequest req)
{
try{
DPDataSelectionServInterface dataTabbedPane = (DPDataSelectionServInterface)
getServletConfig().getServletContext().getServlet(lStringServletName);
if(dataTabbedPane ==null) //Servlet not initialised
{
//Making fresh url connection to servlet, this will initialise the servlet
try{
URL urlservlet = new URL(" DPUtility.println(" URLConnection urlConnection = urlservlet.openConnection();
urlConnection.connect();
//urlConnection
errorLog(req.getServerName() + req.getServerPort());
DPUtility.println(req.getServerName() + " " + req.getServerPort());
DPUtility.println("calling dataTabbedPane");
dataTabbedPane = (DPDataSelectionServInterface) getServletConfig().getServletContext().getServlet(lStringServletName);
if(dataTabbedPane==null)
{
DPUtility.println("dataTabbedPane==null exit callInterServlet");
return null;
}
DPUtility.println("Servlet Loaded :"+ lStringServletName);
}catch(Exception eUnableToLaodApplet) {
DPUtility.println("DPDataSelectionServ 1B " + "unableToLoadApplet"+lStringServletName + " " + eUnableToLaodApplet);
eUnableToLaodApplet.printStackTrace();
return null;
}
}
Vector lVectorData = new Vector();
lVectorData.addElement("true");
Vector temp = dataTabbedPane.getInitData(lVectorArgv,httpsession);
lVectorData.addElement(temp);
errorLog("CALLENDS :"+ lStringServletName);
return lVectorData;
}catch(Exception eInterServ){
return null;
}
}
}