FileNotFoundException

Ads

 
 
 

Share on Google+Share on Google+

B.sucharitha
FileNotFoundException
0 Answer(s)      6 years ago
Posted in : Java Beginners

<[email protected] 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

Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
FileNotFoundException
FileNotFoundException    <[email protected] 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
illegal start of type
()); fos.close(); } catch(FileNotFoundException e) { System.out.println("FileNotFoundException : " + ex); }catch(IOException ioe) { System.out.println...(); } catch(FileNotFoundException e
Uploading a file using UploadBean
an FileNotFoundException ,After refresh and again upload the same file then it is working
Property File
(FileNotFoundException e) { e.printStackTrace(); } catch
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
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
FileInputStream (new File (args[0])); } catch (FileNotFoundException e){ System.out.println... name to read from will throw FileNotFoundException if the file couldn't be found... FileNotFoundException in a catch block as the constructor is capable of throwing
Program to count the number of unique words in a file using HashMap
[]) throws FileNotFoundException { File f = new File("C:/547647/word
Java File Handling Test Results
FileNotFoundException { new File("team.html").delete(); Scanner scan = new
Java file not found exception
FileNotFoundException { public static void main(String[] args) { try { FileReader
SCJP Module-10 Question-4
; } catch (FileNotFoundException e) { 9    System.out.println("
Java IO FileReader
file) throws FileNotFoundException FileReader(FileDescriptor fd...) throws FileNotFoundException Methods in this class are inherited from its super
vowels and consonants
) throws FileNotFoundException, IOException { if (aFile == null) { throw...."); } if (!aFile.exists()) { throw new FileNotFoundException ("File does not exist
java program - Java Beginners
FileNotFoundException, IOException { if(aFile == null){ throw new IllegalArgumentException... FileNotFoundException ("File does not exist: " + aFile); } if(!aFile.isFile()){ throw new
How to format text file? - Java Beginners
FileNotFoundException, IOException { if (aFile == null) { throw new...()) { throw new FileNotFoundException ("File does not exist: " + aFile
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
groupby functionality in java
); } }catch(FileNotFoundException fnot){} catch(IOException io
Retrieving specific data from excel
(FileNotFoundException e) { e.printStackTrace(); } catch (IOException e
Java Write to properties file
(FileNotFoundException e){ e.printStackTrace(); } catch (IOException e
Difference between error and exception ????????
FileNotFoundException will be thrown if the specified file does not exist
file class
); } } catch (FileNotFoundException e) { e.printStackTrace
filling pdf by itext
private static void editField() throws IOException,FileNotFoundException
Creating Shapes using Shape Groups
[]) throws FileNotFoundException { Workbook workbook = new HSSFWorkbook(); Sheet
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
Java tree map trouble
inputFileName) throws FileNotFoundException { Set<String> tail
Example to show exception handling in java
(); System.out.println(s); } catch(FileNotFoundException
class cast Exception - Development process
(FileNotFoundException ffne) { } if (textStream == null) { return; } DocFlavor
Tutorials   
Java Spring Hibernate Struts Training ClassNotFoundException HttpRequestInterceptor java.lang.noclassdeffounderror: org/apache/http/httprequest noclassdeffounderror: org/apache/http/client/methods/httpurirequest java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient How do I resolve this Java Class not found exception? httpclient java.lang.NoClassDefFoundError Apache Commons ioutils maven dependency Read/Convert an inputStream to a String What is the meaning of Java Platform? Why Java is a platform independent language? What is the benefits of learning Core Java? Which technology should I learn after Java? What is array in java with example? How to Convert ArrayList to Array? How to substring in Java? How to format number in Java? What is instance variable in Java? How to download MySQL JDBC driver? What is Calendar class in Java? Which is the best Java tutorials for beginners? How to rename a file in Java? How to delete file in Java code? How to get day from date in Java using Calendar? How to get day of week in Java? How to calculate Date Difference in Java? How to compare date in Java? How to declare array in Java? How to calculate average of array in Java? What is Array in Java? write a java program to find the summation of all the integers entered on command line Sum of two numbers using command line arguments in Java How to create and use Array in Java? How to pass command line arguments in Java? How to create Applet Hello World? Appending String efficiently in Java How to append String in Java? How to list even numbers between 1 and 100? How to add BigDecimal in Java? What is Abstraction In Java? Which is best Beginners Java Tutorial? What is java.util package? Create list from array in Java Filter collection in Java 8 What is the best way to filter a Java Collection? Easy way to transform Collection to Array? How to convert Collection to Array in Java? What are Basic Java Language Elements? Advanced Java Tutorials in 2017 Java brief history Best Reasons to learn Java

Ads

 
Advertisement null

Ads