How to access the C# file in server from Lightswitch HTML Client

Hi,
In that LightSwitch HTML Application i have some c# file in the server project.How can i access those C# file in the screens (HTML Client project )
thanks,
goblalakrishnan s
gobalakrishnan S

Hi,
with implementing Generic File Handlers (.ashx)
See follow link:
http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/174/Full-Control-LightSwitch-ServerApplicationContext-And-Generic-File-Handlers-And-Ajax-Calls.aspx
regards
j.nord

Similar Messages

  • How to access the *.java file corresponding to a TypeElement T?

    Here is a problem:
    How to access the *.java file corresponding to a TypeElement T from a AnnotationProcessor environment?
    Let us say the hook method
    public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
    is invoked with a TypeElement T such that T.getQualifiedname() = "a.b.c.X"
    And the problem is how to locate the file that has the *.java source code for a.b.c.X?
    That is the file that has the source code for a.b.c.X say "some/path/a/b/c/X.java"?
    For simplicity, let us assume that TypeElement T corresponds to a top-level Java class.

    Pinaki wrote:
    That is not something you as the annotation processor author should be asking about. That is something you the person configuring the javac environment should set up via the -d option or its equivalent.
    I strongly recommend using a separate output directory hierarchy.That is the way the current implementation is. The annotation processor takes a -Aout= <some directory path> to write generated output relative to a user-specified location (which defaults to the class output location).That is contrary to the design of the annotation processing facility. The intended use is for that information to be configured via options like "javac -d".
    Additionally, IMO it is a serious configuration error to put generated files and input files, presumably tracked under version control, in the same directory. Interesting you said that. We are just running some "field trial" with these things and some users want them to be in the same directory of the original *.java files (especially when their source files are spread across many roots) .
    Who knows what the user wants?The user does and the user is free to (mis)configure their environment however they like ;-) However, that is the user's option and the user has control of this via the javac command line. The annotation processor is not the proper place to configure this setting; see slide 7 of http://blogs.sun.com/darcy/resource/J1_2006-BOF-0606.pdf for some thoughts on different roles in annotation processing.
    presumably tracked under version control, in the same directory.version control is another 'usability issues' that we are trying to get our heads around with this stuff. "To check-in or not?" - that seems to be the question. When presented these facilities without any cue, "the users" were divided -- some wanted them to be checked-in, some did not. The context where these generated files being used -- there exists some rationale to check them in a version control system.The right answer depends on the circumstances, but IMO generally generated files should not be checked in under version control, especially if they are derived from other source files. Checking in generated files of this nature just creates the opportunity for them to get out of date with the originating files.

  • How to  access the ORACLE APPS table structures from SAP

    Hi Experts,
        How to  access the ORACLE APPS table structures from SAP? Is it possible from SAP?
    Thanks in advance
    Thomas

    Hi Silviya,
    you can access this database using a technique called DB Multiconnect - sometimes written as multi-connect.
    Search the SAP documentation and notes for this term and you will find how to do it.
    Essentially you configure the remote database connection via transaction DBCON.
    If your SAP system is not running on Oracle you will need to install the db-specific kernel files for Oracle along with the Oracel db client software - SQL*Net.
    Then you can access the Oracle database from ABAP using native-SQL. It works a treat!
    Cheers
    Graham Robbo

  • How to access the java stack table "xi_af_msg" from the ABAP engine.

    Hello Guys,
    How to access the java stack table "xi_af_msg" from the ABAP engine.
    I need to access this table.

    These 3 are the tables that are for XI Adapter in ABAP Stack.
    SWFRXICNT
    SWFRXIHDR
    SWFRXIPRC
    You can also try the following tables.
    SXMSAEADPMOD                   XI: Adapter and Module Information
    SXMSAEADPMODCHN                XI: Adapter Module Chains
    SXMSAEAGG                      XI: Adapter Runtime Data (Aggregated)
    SXMSAERAW                      XI: Adapter Runtime Data (Raw Data)
    Cheers,
    Sarath.
    Award if helpful.

  • How to Access the value(Ex: Delivery no) From Web to R/3 side.

    How to Access the value(Ex: Delivery no) From Web to R/3 side.
    Any sample code please suggest.
    sai

    Hi,
    Try RSA3.
    Extract Checker
    /people/sajeed.ms/blog/2006/02/12/extract-checker
    Thanks,
    JituK

  • How to access JNDI tree of Admin Server from Managed Server

    Hello,
    I created Managed and Admin Server for Domain.
    On Managed Server I use:
    InitialContext con = new InitialContext()
    It points to Managed Server local JNDI tree and
    Managed Server can't find JNDI tree of Admin Server.
    Looks like Managed Server is regular remote client of Admin Server.
    How to access JNDI tree of Admin Server from Managed Server?
    Thanks.
    Oleg.

    Hello,
    I created Managed and Admin Server for Domain.
    On Managed Server I use:
    InitialContext con = new InitialContext()
    It points to Managed Server local JNDI tree and
    Managed Server can't find JNDI tree of Admin Server.
    Looks like Managed Server is regular remote client of Admin Server.
    How to access JNDI tree of Admin Server from Managed Server?
    Thanks.
    Oleg.

  • How to access the local files (Excelsheet) in bsp application

    Hi sdn,
    I created a bsp application my requirement is if i click the link it should display the excelsheet and if i perform any updations those updations will be modified int that excel sheet so can any one plz help me out in solving this issue.

    Hi,
    I think you shouldn't try to modifiy local files from a server application for security reasons.
    But, let's say you have your reasons.
    In your BSP, you have a link that points to an MS Excel file. Clicking this link will open the file in MS Excel and users will be able to modify and register it (and save the file in another path/name...).
    Another solution would be: create a table form (like ALV?) from the Excel file and save any modifications of the table form into the Excel file. Maybe HTMLB can supports such approach but I don't know HTMLB. I only use HTML and ABAP.
    All I said here is just overview of potential solutions. I'm not sure I exactly understood your need. Perhaps other Experts would have better answer for you.
    But I hope this will help you.
    Good luck!
    Thomas.

  • How to find the log file on server

    Hi All,
    Here we have installed J2EE Engine & JDI on seperate machine.We have developed a new FPM application. The application is not working it is giving the error when run the application. It is giving the error "500 Internal Server Error Failed to process request. Please contact your system administrator". We want to see the log file what the error is, where can we find the log file.
    Regards
    Suresh

    Hi
    See this thread
    /message/1656215#1656215 [original link is broken]
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/e2/75a74046033913e10000000a155106/frameset.htm">Logging</a>
    See this blogs
    <a href="/people/karsten.geiseler/blog/2005/06/06/netweaver-portal-log-configuration-viewing-part-1 Portal Log Configuration & Viewing (Part 1)</a>
    Kind Regards
    Mukesh

  • How to achieve the maximum file transfer rate from PXI to local host?

    I will have to copy a huge amount of data (as big as 50 GB) from a PXI-8106 unit on site to a laptop. Currently it would take several hours. It is critical to max out the data transfer rate.
    The standard method we've been using is just drag and drop using Windows Explorer via FTP. I tried to use FTP VIs with Filezilla Server as well but the transfer rate is only like 1.5 MB/s. Is this normal? Once I saw it was 3.0 MB/s but for some reason, that isn't happening now.
    For another option, I tried to transfer data to a USB flash drive but it's even slower. As far as I know, USB 2.0 transfer rate is supposed to be around 60 MB/s but why would it be slower than 1.5 MB/s? What could be the speed limiting factor in my file transfer setup?
    Any tips on improving file transfer rate would be appreciated!

    Sustained 40 MB/s? That is my dream speed! The maximum speed I've ever seen here was about 25 MB/s, which is still very good, and that happened only after copying back and forth, which I explained above. Let me go through what I did with screencaps first.
    These are the test tdms files to transfer in the PXI: an original file witten in the PXI and its copy file. I copied the original file from PXI to laptop and renamed it (added '_copy') and then copied it back to PXI.
    FTP module is transferring the original file to the Filezilla server on laptop. Note the low speed.
    FTP module is transferring the copy file to the Filezilla server on laptop. Note the higher speed.
    This is the FTP sub VI I'm using. It transfers files in sub-folders (one level lower), too. The data connection is set to 'passive' on the FTP Put Multiple Files VI but it doesn't seem to make any difference. I attach the sub VI.
    You tried the file transfer with a 500 MB text file. Would there be any difference if the file type was tdms? Would the RAM size matter? It is 2GB here.
    And the LED is orange, which means Gigabit.
    Another question: Is there any way to programmatically stop file transfer in progress? Currently, I just have to restart the PXI.
    Thank you!
    Attachments:
    FTP.vi ‏40 KB

  • Unable to connect the server, while open the rpt file in server from java.

    Hi,
    I have written one java class, that class deployed in solaris server. The BO server is avilable in another solaris server. i want to convert the rpt file to pdf format. for that i try to give the file path to the server for opening the rpt file, that time i got the follwoing error:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException:
    Unable to connect to the server: uinbrdcsap02. --- Connection refused
    (errno:239)---- Error code:-2147217387 Error code name:connectServer
            at
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKServerException.throwR
    eportSDKServerException(Unknown Source)
            at
    com.crystaldecisions.proxy.remoteagent.TCPIPCommunicationAdapter.connect
    (Unknown Source)
            at com.crystaldecisions.proxy.remoteagent.z.a(Unknown Source)
            at
    com.crystaldecisions.sdk.occa.report.application.ReportAppSession.int(Un
    known Source)
            at
    com.crystaldecisions.sdk.occa.report.application.ReportAppSession.initia
    lize(Unknown Source)
    *My java code is the following ..*
    package com.ramco.report;
    //Crystal Java Reporting Component (JRC) imports.     
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.ByteArrayInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.ByteArrayOutputStream;
    import java.sql.Connection;
    import java.sql.CallableStatement;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.text.SimpleDateFormat;
    import com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat;
    import com.crystaldecisions.sdk.occa.report.exportoptions.ExportOptions;
    import java.util.Calendar;
    import java.util.Properties;
    import org.apache.log4j.Logger;
    import org.apache.log4j.SimpleLayout;
    import org.apache.log4j.FileAppender;
    import java.net.InetAddress;
    import java.net.UnknownHostException;
    // Class file starting.
    public class StandardReconReport
         private Connection objConnection = null;
         private DBConnection dbconnection = null;
         private ByteArrayInputStream byteArrayInputStream =null;
         private FileOutputStream fileOutputStream = null;     
         private ByteArrayOutputStream byteArrayOutputStream = null;
         private CallableStatement callablestatement = null;
         private CallableStatement callablestatement1 = null;     
         private ResultSet resultset1 = null;
         private ResultSet resultset = null;
         private String Deal_No = null;
         private String Job_Date = null;     
         private String Reportservername = null;
         private SimpleLayout layout   = null;
         private FileAppender appender = null;
         private Logger logger            = null;
         private String     DateTimeFormat = null;
         private String Report_File_path =null;
         private String Pdf_File_Name = null;     
         private Properties properties = null;
         private String LogFilePath = null;
         private String FileName = null;
         private String FullLogFilePath = null;
         private Statement statement = null;
         private String Report_upload_path = null;
         private String StanReconDir = null;
         private String winandsol = null;
         private com.crystaldecisions.sdk.occa.report.application.ReportClientDocument  reportClientDoc = null;
         private int count_tmp=0;
         private String DATE_FORMAT = null;
         private String dateformat = null;
         private Calendar cal = null;
        private SimpleDateFormat sdf = null;
        private String reconfilename = null;    
         // Method for Generating Report.....
         private void stanReportGeneration()
              try
                   properties = new Properties();
                   properties.clear();
                 properties.load(new FileInputStream("GeneralInfo.properties"));
                 Reportservername = properties.getProperty("reportservername");
                 reconfilename = properties.getProperty("reconfilename");
                 layout = new SimpleLayout();
                   LogFilePath = properties.getProperty("logfilepath");               
                   dateformat = dateTime1(properties.getProperty("dateformat1"));
                   StanReconDir = properties.getProperty("stanrecondir");
                  winandsol = properties.getProperty("windowsandsolaris");        
                  if (new File(LogFilePath).exists())
                       LogFilePath = LogFilePathdateformatwinandsol;
                       if (new File(LogFilePath).exists())
                       else
                            new File(LogFilePath).mkdirs();
                  FileName = "STANRECONLOGFILE-";             
                  FileName = FileNamedateformat".txt";             
                  FullLogFilePath = LogFilePath+FileName;
                  appender = new FileAppender(layout,FullLogFilePath,false);
                 logger = Logger.getLogger("MyLogger");
                 logger.addAppender(appender);
                 DateTimeFormat = properties.getProperty("datetimeformat");       
                 logger.info("The Start Recon Report Start Time: " +dateTime(DateTimeFormat));             
                 logger.info("");            
                 try
                      InetAddress address[] = InetAddress.getAllByName(Reportservername);                 
                     for (int i=0; i<address.length;i++)
                          logger.info("Report Server Name: " + address<i>.getHostName());
                          logger.info("Report Server Address: " + address<i>.getHostAddress());
                          logger.info("Report Server Canonical: " + address<i>.getCanonicalHostName());
                 catch (UnknownHostException e)
                      logger.error("The host "Reportservername"is not avilable");
                 Report_File_path = properties.getProperty("StandardReconReportpath");          
                  logger.info("The Report File Name is : "+Report_File_path " - "dateTime(DateTimeFormat));
                  //Report_File_path="rassdk://"+Report_File_path;
                  try
                       //Getting the Database connection....
                       dbconnection = new DBConnection();
                      objConnection = dbconnection.getConnections();
                      statement = objConnection.createStatement();
                      String sqlQuery = "SELECT TRIM(PARAM_VALUE) FROM SYS_USER_PARAM WHERE COMPONENT = 'REPORT' AND LINE_NO = 1 AND PARAM_NAME = 'REPORT_DOWNLOADPATH' AND STATUS = 'A'";
                      resultset = statement.executeQuery(sqlQuery);
                      while(resultset.next())
                           Report_upload_path = resultset.getString(1);
                           logger.info("Report_upload_path from the DB: "+Report_upload_path);
                  catch (SQLException ex)
                       ex.printStackTrace();
                       System.out.println(ex);
                       logger.error(ex);
                  catch(Exception ex)
                       ex.printStackTrace();
                       System.out.println(ex);
                       logger.error(ex);
                  finally
                       if(statement!=null)
                            statement.close();
                       if(resultset!=null)
                            resultset.close();
                  if (new File(Report_upload_path).exists())
                       Report_upload_path = Report_upload_path+StanReconDir;
                       if (new File(Report_upload_path).exists())
                            System.out.println("Directory is avilable"+Report_upload_path);
                       else
                            new File(Report_upload_path).mkdirs();
                  Report_upload_path = Report_upload_pathwinandsoldateformat+winandsol;              
                  if (new File(Report_upload_path).exists())
                  else
                       new File(Report_upload_path).mkdirs();
                  logger.info("Report_upload_path : "Report_upload_path" : "+dateTime(DateTimeFormat));
                  try
                       logger.info("Calling the REPORT_STAN_RECON_CON SP : "+dateTime(DateTimeFormat));
                      callablestatement = objConnection.prepareCall("{call REPORT_STAN_RECON_CON(?)}");
                      callablestatement.registerOutParameter(1, oracle.jdbc.driver.OracleTypes.CURSOR);
                        callablestatement.execute();
                        resultset=(ResultSet)callablestatement.getObject(1);
                        if(resultset!=null)
                             while(resultset.next())
                                  count_tmp = count_tmp+1;
                                  logger.info("");                              
                                 Deal_No   = resultset.getString(1);
                                  Job_Date = resultset.getString(2);
                                  DATE_FORMAT = resultset.getString(3);
                                  Job_Date = Job_Date.substring(0,10);
                                  logger.info("*********** PDF Convertion Starting for a Deal No: " +Deal_No " :: "dateTime(DateTimeFormat));
                                  Pdf_File_Name = Report_upload_pathreconfilenameDeal_No"-"DATE_FORMAT+".pdf";                              
                                  Job_Date = Job_Date.replace('-', '/');
                                  logger.info("The Deal_No is : "+Deal_No " - "dateTime(DateTimeFormat));
                                  logger.info("The Job_Date is : "+Job_Date " - "dateTime(DateTimeFormat));
                                  try
                                     reportClientDoc = new com.crystaldecisions.sdk.occa.report.application.ReportClientDocument();
                                       reportClientDoc.setReportAppServer(Reportservername);                                   
                                       logger.info("Report App server Name := "+ reportClientDoc.getReportAppServer());
                                       logger.info("Report_File_path  := "+ Report_File_path);                             
                                       reportClientDoc.preCreateServerAgent(true);                            
                                       reportClientDoc.open(Report_File_path,0);                         
                                       logger.info("After opening the RTF file for : "+Deal_No " Deal_No - "dateTime(DateTimeFormat));
                                                 callablestatement1 = objConnection.prepareCall("{call REPORT_STANDARD_RECON(?,?,?,?)}");
                                       callablestatement1.setString(1, Job_Date);
                                       callablestatement1.setString(2, Deal_No);
                                       callablestatement1.setString(3,"");
                                       callablestatement1.registerOutParameter(4, oracle.jdbc.driver.OracleTypes.CURSOR);
                                       callablestatement1.execute();
                                       resultset1=(ResultSet)callablestatement1.getObject(4);
                                       String tableAlias = reportClientDoc.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
                                       reportClientDoc.refreshReportDocument();
                                       reportClientDoc.getDatabaseController().setDataSource(resultset1, tableAlias , "Result Set");
                                       reportClientDoc.refreshReportDocument();                         
                                       ExportOptions oExportOptions = new ExportOptions();
                                       oExportOptions.setExportFormatType(ReportExportFormat.RTF);
                                       byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
                                       logger.info("After exporting the report file to PDF file for the : "+Deal_No " Deal_No - "dateTime(DateTimeFormat));
                                       //Use the Java I/O libraries to write the exported content to the file system.
                                       byte byteArray[] = new byte[byteArrayInputStream.available()];     
                                       //Create a new file that will contain the exported result.
                                       logger.info("Successfully exported report to " + Report_File_path" - "dateTime(DateTimeFormat));
                                       logger.info("*********** PDF Convertion Ending for a Deal : "Deal_No" "+dateTime(DateTimeFormat));
                                       logger.info("");
                                       Deal_No   = null;
                                       Job_Date  = null;
                                  catch (SQLException ex)
                                      ex.printStackTrace();
                                      System.out.println(ex);
                                      logger.error(ex);
                                  catch (IOException ex)
                                      ex.printStackTrace();
                                      System.out.println(ex);
                                      logger.error(ex);
                                  catch (Exception ex)
                                       ex.printStackTrace();
                                      System.out.println(ex);
                                      logger.error(ex);
                                  finally
                                       if(byteArrayInputStream!=null)
                                            byteArrayInputStream.close();
                                       if(byteArrayOutputStream!=null)
                                            byteArrayOutputStream.close();
                                       if(fileOutputStream!=null)
                                            fileOutputStream.close();
                                       if(callablestatement1!=null)
                                            callablestatement1.close();
                                       if(resultset1!=null)
                                            resultset1.close();
                                       if(reportClientDoc!=null)
                                            reportClientDoc.close();
                        if(count_tmp==0)
                             logger.info("");
                             logger.info(" $$$$$$$$ There is NO DATA for generating the Report $$$$$$$: " +dateTime(DateTimeFormat));
                  catch (SQLException ex)
                       ex.printStackTrace();
                       System.out.println(ex);
                       logger.error(ex);
                  catch (Exception ex)
                        ex.printStackTrace();
                       System.out.println(ex);
                       logger.error(ex);
                  finally
                       if(callablestatement!=null)
                            callablestatement.close();
                       if(resultset!=null)
                            resultset.close();
                       if(objConnection!=null)
                            objConnection.close();
                       if(callablestatement1!=null)
                            callablestatement1.close();
                       if(resultset1!=null)
                            resultset1.close();
              catch (IOException ex)
                  ex.printStackTrace();
                  System.out.println(ex);
                  logger.error(ex);
              catch (Exception ex)
                   ex.printStackTrace();
                  System.out.println(ex);
                  logger.error(ex);
              finally
                  properties.clear();              
              logger.info("");
              logger.info("*******Standard Recon Report End Time*******: "+dateTime(DateTimeFormat));
         // Getting the current date and time..
         public String dateTime(String dateFormat)
              cal = Calendar.getInstance();
             sdf = new SimpleDateFormat(dateFormat);
             return sdf.format(cal.getTime());
         //Getting the Yesterday Date and time...
         public String dateTime1(String dateFormat)
              cal = Calendar.getInstance();
              cal.add(Calendar.DATE, -1);            
             sdf = new SimpleDateFormat(dateFormat);
             return sdf.format(cal.getTime());
         public static void main(String[] args) {
              StandardReconReport  SR = new StandardReconReport();
              SR.stanReportGeneration();
    For the above code  i given the report parameter from  the property file.
    reportservername=servername
    datagenreportpath=rassdk\://C\:
    MyEclipseWorkPlace
    IDSREPORTGENERATION
    REPORTFILES
    STANDARD_RECON_REPORT.rpt
    The code is working fin, while i try to connect the BO which is avilble in Windows server, but this is not working if the BO is avilble in solaris server.
    Any bodies please help
    Edited by: velmurugan.spn on Sep 12, 2009 6:38 AM

    Hi,
    Not able to find Report - Standard templates or Report - Custom templates view in Administration - BIP reports in Siebel 8.1.1.3?
    We have applied 8.1.1.3 patch on 8.1.1.0
    below are the steps followed
    Reports are not generated after 8.1.1.3 patch installtion.
    we have also followed to below steps mentioned for this issue in oracle support.
    "In order to resolve this behavior it is necessary to ensure that the 8.1.1.3 FixPack has been applied to the Siebel Tools installation. This will provide an additional .zip file in the REPPATCH folder of the Siebel Tools installation. Once this has been done please then follow the configuration steps as documented :
    change sysprefix to X_ before sif import and chage back to SBL_ after sif import.
    1) Import the sif files from Siebel\8.1\Tools_1\REPPATCH\12-1VMBCSV.zip
    2) Import the 4 SIF files in the following order:
    S_XMLP_REP_TMPL_02112010.sif
    SBL_XMLP_REPORT_SELECTION_FLG.sif
    Report Template BC.sif
    Report Template Registration Applet.sif
    3)Apply the DDL for table S_XMLP_REP_TMPL and compile repository
    Once the above steps have been completed the Selected Record flag will appear in the Report Template Registration views."
    we still not able to generated able to generate reports even after following above steps.
    Thanks
    Sean

  • How to get the user input while server is waiting for client's message

    I have a server/client program (using sockets)
    I used a thread to let a server always waiting for client's request, but how should I found that
    there is no message pass to server from client.
    public void run(){
    while (true){
    Socket server = serverP.accept();
    ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
    inMessage = (Message)inFromClient.readObject();
    System.out.println("Deadlock may occurred, please enter your command: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();
    The server is waiting for the inMessage that is passed from multiple clients. But if the server
    received no message after some time, it will assume something is wrong (eg, there is a
    deadlock), then it will ask the user to input the command to execute the method.
    If I put
    "System.out.println("Do you want to take Snapshot: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();"
    inside the while loop, it will keep asking user to enter the input when every time the client
    connect to the server. But I want to ask the user to enter the command only when the server
    can't get the response from clients.
    How should I do?
    Please help.

    Your statement:
    Socket server = serverP.accept();
    it will block until Server receive connect request from client.
    So, what u can do is, create a seperate Thread which check if server is idle (no client connect to it) for a certain time.
    public class xxxxx extends Thread {
    public void run(){
       (new WatcherThread()).start()
       while (true){
       Socket server = serverP.accept();
       WatcherThread.acceptFlag();  
       ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
       inMessage = (Message)inFromClient.readObject();
       Do something with client request ...
       I suggest you to create a WorkerThread for
       each client request.
       For example:
       new (WorkerThread(inMessage)).start();
       This way, your server thread will immediately serve
       the next client request ASAP.
    public class WatcherThread extends Thread {
       private static accept = false;
       public static void acceptFlag() {
            flag = true;
       public void run() {
           while(true) {
               try { sleep(10000); } catch (Exception ex) { }
               if (!accept) { // never accepted after 10000 msecs
                  ... do your System.in here ...
               flag=false;          
    }The idea is, your server notify WatcherThread if a client connect. WathcerThread runs at seperate thread. It waits for 10000 msecs and check if Server ever gets connect request from server. If it doesn't then you can do your System.in, otherwise, it will wait for 10000 again..
    FYI, next time, please use [ code ] and [ / code ] to format your code. It discourage me to read plain whole-left-aligned code like yours.
    See: http://forum.java.sun.com/features.jsp#Formatting
    rgds,
    Alex

  • How to access the Java plugin certifcate store from a signed applet?

    Is there any easy way I can access the certificates in the Java plugin certificate store?
    I think I can load the C:\Documents and Settings\<login user>\ Application Data\Sun\Java\Deployment\security\trusted.certs into a KeyStore and examine the certificates that way.
    But I just wonder if there is more robust way to do this without loading up an external file since an applet is executed within a Java plugin.
    Thank you :)

    Is there any easy way I can access the certificates in the Java plugin certificate store?
    I think I can load the C:\Documents and Settings\<login user>\ Application Data\Sun\Java\Deployment\security\trusted.certs into a KeyStore and examine the certificates that way.
    But I just wonder if there is more robust way to do this without loading up an external file since an applet is executed within a Java plugin.
    Thank you :)

  • How to customize the class files needed to run webcam applet client side?

    Hi... Each time i try to transmit the stream to client, i got the following error in my Apache log file:
    File does not exist : javax
    File does not exist : jmfsample
    File does not exist : media
    I've customized the jar file using customizer and it does not help at all.
    Could anyone please help?
    All helps are appreciated.
    Thanks.

    You can't delete it. I wouldn't worry about it at this point. I'm just taking a guess here that you would like to execute a method, then stop execution of the method. The thing to do is forget about writing code for a minute. You know how to execute methods, right? So the tricky part is 1) getting it to stop and 2) knowing whether it's running (or maybe you don't need to know) and 3) knowing whether you should stop it or start it. For number 1, it's pretty easy if the method is running over a loop some number of times. Each time through the loop, have the method check for a stop condition that you can set elsewhere. If it's not doing a loop, you (or some kind soul) will have to come up with something else. I'll let you work on 2 and 3.

  • How to schedule the Batch file to run from task scheduler

    Hello Everyone,
    I have a batch file which kills the wscript.exe process, I am doing this manually, I need to schedule this batch file to run from task scheduler whenever the process wscript.exe reaches to specific numbers,  i.e if the wscript.exe process count in task
    manager reaches to 30,  the task schedular should execute this batch file,
    Is there a way to do so.
    dibu

    Hi,
    àI need to schedule
    this batch file to run from task scheduler whenever the process wscript.exe reaches to specific numbers.
    As I know, it will not help you to achieve this target via Scheduled Task. When configure Scheduled Task, there
    seems no Trigger option that help you specify this condition (process counts reaches to specific numbers) to trigger the batch file.
    You could consider that improve this batch file. Adding the
    Check function to the script will be a better option. For script issue, you can post it in the
    Official Scripting Guys Forum. I believe we will get a better assistance there.
    If any update, please feel free to let me know.
    Best regards,
    Justin Gu

  • How to get data passed back to server from Web Start client ?

    dear experts,
    my web application allows users to launch a web start window from the jsp page, after users enters some data in the web start page and press "OK", the data entered should be passed back server for process. i just have not much clue how to do this....
    thanks.

    Use the java networking library to send a request to a url that takes the arguments you want to pass in.
    Example:
    URL url = new URL("http://yourserver/yourhandler.do?arg1=foo&arg2=bar");
    HttpURLConnection conn = (HttpURLConnection) URL.openConnection(url);
    ... any output testing, etc...
    conn.disconnect();It's not the prettiest, but it ought to get the job done.
    You should probably (at least) use the BasicService to get the codebase back to the server that served up the jnlp file.
    -Mike

Maybe you are looking for

  • Can I print an objects fields' values in a loop without having to cast?

    Hi, I have a Class with about 30 (public)fields and I need to print the values of each of them to a file. I tried the getFields() method of the Class object, but couldn't get the desired result, especially that the documentation says no order is guar

  • Is keynote just for os x mavericks?

    Is keynote just for os x mavericks? I want to uninstall os x mavericks, but I don't know can I have it again or not?

  • Upgrading to lager Hard Drive

    Hi, I recently purchased my MacBook. I have already used about 27 GB of the 120 GB HDD. I have a feeling I'm going to fill the rest of that up pretty fast due to the amount of video and music content I put on this computer. I have decided the best wa

  • New iLife 11 Disk not working

    I just got the iLife 11 disk and when I put it in my MAC mini it did nothing. Sat there spinning for a min and then spit it back out. Any ideas why? I'm running 10.6.8

  • Attach Database running for more than 2 days

    Hi, I have a sql sever 2005 database of SAP development which is having a deferred transaction error while DBCC.  After restart the SQL log says the below. Still the DBCC error exists. 2013-04-19 14:27:22.10 spid14s     Recovery of database 'BDS' (5)