FileNotFoundException

FileNotFoundException

<%@page import="com.kit.db.*,

                com.kit.db.kb.*,
                com.kit.log.*,
                java.util.*,
                com.kit.db.mysqldb.*,
                com.kit.db.util.*,
                com.kit.db.seats.*,
                java.sql.*,
                com.kit.db.multilocationbilling.MultiLocationBilling,
                 com.kit.db.util.LoginAutenticate,
                    com.kit.db.phoneprovisioning.BLAProvisioningManager,
        com.kit.db.mobilesuite.*,java.net.*,java.io.*"
        %>
<%
           // System.out.println("LoginLogout");
            try {
                String status = request.getParameter("status").toString();
                String agentid = request.getParameter("agentid").toString();
                int extension = Integer.parseInt(request.getParameter("extension").toString());
                int siteid = Integer.parseInt(request.getParameter("siteid").toString());
                String query = "";
                String serverIP = "", serverPort = "",  url = "", protocol = "";
                serverIP = System.getProperty("threepcserverIP");
                serverPort = System.getProperty("threepcserverPort");
                protocol = System.getProperty("threepcabsoluteurl");
                String agent = agentid.replace('@', '-');
                BufferedReader br = null;
                URLConnection urlcon = null;
                URL urlObj = null;
               // System.out.println("status" + status + "extension" + extension + "siteid" + siteid + agentid);
                 //11111111111111111111111
                    URLConnection urlcontest = null;
                    URL urlObjtest = null;
                    url = System.getProperty("threepcabsoluteurl") + serverIP + ":" + serverPort;
                    urlObjtest = new URL(url);
                    urlcontest = urlObjtest.openConnection();
                    try {
                            urlcontest.connect();
                            System.out.println("Connected::::::::::::::::::::::::::::::::::::");
                            if (urlObjtest != null) {
                            urlObjtest = null;
                        }
                        if (urlcontest != null) {
                            urlcontest = null;
                        }


                    } catch (Exception e) {
                            System.out.println("Exception on sending recording url to 3pcc server::::::::;;;" + e);
                            session.setAttribute("3pccproblem","Problem with 3pcc server");
                            out.write("Problem with 3pcc server");
                            return;
                    }
                    //22222222222222222222
                if (status.equals("login")) {
                    url = protocol + serverIP + ":" + serverPort + "/agtlogin?agent=" + agent;
                    //System.out.println("url1:::" + url);
                    //out.println(agentid + " :Click OK to Login into ACD ");
                } else {
                    url = protocol + serverIP + ":" + serverPort + "/agtlogoff?agent=" + agent;
                   // System.out.println("url2:::" + url);
                    //out.println(agentid + " :Click OK to Logout from ACD");
                }
               System.out.println("urllllllllllll:"+url);
                urlObj = new URL(url);
                urlcon = urlObj.openConnection();
                try {
                    urlcon.connect();
                    System.out.println("Connected::::");
                } catch (Exception e) {
                    System.out.println("Exception on sending recording url to 3pcc server::::::::;;;" + e);
                }
                br = new BufferedReader(new InputStreamReader(urlcon.getInputStream()));
                String stemp = "";
                System.out.println("Response:");
                while ((stemp = br.readLine()) != null) {
                    System.out.println(stemp);
                }
                if (urlObj != null) {
                    urlObj = null;
                }
                if (urlcon != null) {
                    urlcon = null;
                }
                if (br != null) {
                    br.close();
                }
                Thread.sleep(500);
                if (status.equals("login")) {
                   // url = protocol + serverIP + ":" + serverPort + "/agtlogin?agent=" + agent;
                    //System.out.println("url1:::" + url);
                    out.println(agentid + " : Login into ACD ");
                } else {
                    //url = protocol + serverIP + ":" + serverPort + "/agtlogoff?agent=" + agent;
                    //System.out.println("url2:::" + url);
                    out.println(agentid + " : Logout from ACD");
                }

            } catch (Throwable gsi) {
                gsi.printStackTrace();
            }





%>


**********************\

Error:

java.io.FileNotFoundException: http://192.168.68.53:7777/agtlogin?agent=acda-pbxtesting at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1151) at org.apache.jsp.AdminSaaS.LoginLogoutjsp.jspService(LoginLogout_jsp.java:118) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:495) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)


please anyone help me for this issue

View Answers









Related Tutorials/Questions & Answers:
FileNotFoundException
FileNotFoundException    <%@page import="com.kit.db.*, com.kit.db.kb.*, com.kit.log.*, java.util.*, com.kit.db.mysqldb.*, com.kit.db.util.
java
java  write a java program using filenotfoundexception
Advertisements
java help - Java Beginners
should catch the FileNotFoundException if it occurs and print the message ?File... the FileNotFoundException class Test{ public static void main(String args... (new File (args[0])); } catch (FileNotFoundException e){ System.out.println
Running faces config file without using internet - Java Server Faces Questions
of fileNotFoundException i m using jboss 3.2.7
Uploading a file using UploadBean
an FileNotFoundException ,After refresh and again upload the same file then it is working
illegal start of type
()); fos.close(); } catch(FileNotFoundException e) { System.out.println("FileNotFoundException : " + ex); }catch(IOException ioe) { System.out.println...(); } catch(FileNotFoundException e
how to read file line by line using filereader in java
) throws FileNotFoundException, IOException { String fileName = "data.txt
How display a image on servlet from file upload - JSP-Servlet
How display a image on servlet from file upload   Dear Sir, My Question is: How display a image on servlet from file upload Your Answer: Hi friend, public class FileNotFoundException extends IOException Signals
Property File
(FileNotFoundException e) { e.printStackTrace(); } catch
FILE
(FileNotFoundException fnfe) { System.out.println("Exception: "+fnfe.toString()); } catch...); } } catch(FileNotFoundException fnfe) { System.out.println...); } } catch(FileNotFoundException fnfe) { System.out.println
Catching Normal Exceptions
= new FileInputStream (new File (args[0])); } catch (FileNotFoundException e... takes a file name to read from will throw FileNotFoundException if the file... the exception FileNotFoundException in a catch block as the constructor is capable
how to read a text file with scanner in java
void main(String[] args) throws FileNotFoundException { // File to read
how to read file using InputStreamReader in java
main(String[] args) throws FileNotFoundException, IOException { //File
SCJP Module-10 Question-4
; } catch (FileNotFoundException e) { 9    System.out.println("
Java file not found exception
FileNotFoundException { public static void main(String[] args) { try
Java File Handling Test Results
FileNotFoundException { new File("team.html").delete(); Scanner scan = new
Program to count the number of unique words in a file using HashMap
[]) throws FileNotFoundException { File f = new File("C:/547647/word
How to format text file? - Java Beginners
FileNotFoundException, IOException { if (aFile == null) { throw new...()) { throw new FileNotFoundException ("File does not exist: " + aFile
java program - Java Beginners
FileNotFoundException, IOException { if(aFile == null){ throw new IllegalArgumentException... FileNotFoundException ("File does not exist: " + aFile); } if(!aFile.isFile()){ throw new
vowels and consonants
) throws FileNotFoundException, IOException { if (aFile == null) { throw...."); } if (!aFile.exists()) { throw new FileNotFoundException ("File does not exist
I/O Program output error
*/ public static void main(String[] args)throws FileNotFoundException...; pTypes(String inputFileName) throws FileNotFoundException //Construct...) throws FileNotFoundException { TreeSet<String> tail = new
Using throw keyword in exception handling in Core Java
fileInStrm = new FileInputStream(fileName); } catch (FileNotFoundException ex
calling zipping function - JSP-Servlet
); } catch (FileNotFoundException fnfe){ fnfe.printStackTrace
How to copy files from one folder to another based on lastmodified date - Java Beginners
(); System.out.println("File copied."); } catch(FileNotFoundException ex
convert jpeg to gif - Swing AWT
(FileNotFoundException e){ System.out.println("Error:"+e.getMessage()); }catch
Serialization and deserialization - Java Beginners
()); } catch(FileNotFoundException fe){ System.out.println("File
class cast Exception - Development process
(FileNotFoundException ffne) { } if (textStream == null) { return; } DocFlavor
Example to show exception handling in java
); } catch(FileNotFoundException fne) { System.out.println("File
Java tree map trouble
inputFileName) throws FileNotFoundException { Set<String> tail
Excel Prompt User on Focus
[]) throws FileNotFoundException { Workbook workbook = new HSSFWorkbook(); Sheet
Excel Validating Value in Range
static void main(String args[]) throws FileNotFoundException{ Workbook workbook
Creating Shapes using Shape Groups
[]) throws FileNotFoundException { Workbook workbook = new HSSFWorkbook(); Sheet
filling pdf by itext
private static void editField() throws IOException,FileNotFoundException
file class
); } } catch (FileNotFoundException e) { e.printStackTrace
Difference between error and exception ????????
FileNotFoundException will be thrown if the specified file does not exist
Java Write to properties file
(); } catch (FileNotFoundException e){ e.printStackTrace(); } catch
Retrieving specific data from excel
(FileNotFoundException e) { e.printStackTrace(); } catch (IOException e
groupby functionality in java
); } }catch(FileNotFoundException fnot){} catch(IOException io
How would I get this linked list in alphabetical order?
FileNotFoundException{ Scanner scan = new Scanner(new File("Names.txt
How can i extract email ids from xls/xlsx file in java?
FileNotFoundException, IOException { String fileName = "bv1.xls... printCellDataToConsole(Vector dataHolder) throws FileNotFoundException, IOException
Java IO FileReader
FileReader(File file) throws FileNotFoundException FileReader...(String fileName) throws FileNotFoundException Methods in this class
Catching and Handling Exceptions
])); } catch (FileNotFoundException e){ System.out.println("File...); } } catch (FileNotFoundException e...:-ADS_TO_REPLACE_8 throw new FileNotFoundException("Could not find
JDBC:Runtime error - Java Beginners
length=" + strConsumerName); } catch (FileNotFoundException ex) { System.out.println("FileNotFoundException ..." + ex.getMessage
JDBC DataSource Interface Example
(FileNotFoundException e) { // TODO Auto-generated catch block... (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace
I need help on my Java code.... please please help me out!?
); } } } catch(FileNotFoundException e... = currentWordSignature; } }catch(FileNotFoundException e
java - JDBC
(FileNotFoundException fe){ System.out.println("File Not Found Exception occured :"+fe
java - Java Beginners
."); } catch(FileNotFoundException ex){ System.out.println
java - Java Beginners
){ System.out.println(e.getMessage()); } catch(FileNotFoundException fe
Why the null Pointer exception is comming? - Java Beginners
(String[]args) throws FileNotFoundException, IOException
Java get Stack Trace
, FileNotFoundException occurs. Here is the code of GetStackTrace.java

Ads