Problem with the code autocomplete feature.

I'm having a problem related to the code autocomplete feature in JDeveloper 10.1.3.2.0 Studio Edition. When I'm typing the code to create a new instance of a class, JDev doesn't display the list of constructors this class has, regardless whether this class belongs to the standard Java framework, or is it part of my own project. Instead, it offers me to add the import statement for this class, even though the class was already imported. Even if I accept the advice, and click the option to import the class, the constructors still aren't being displayed. However, when working with the objects, it still lists the methods and variables belonging to that class correctly. Here it is how it looks like:
http://veleri.hr/~ddobrec/Java/isense_jdev10.png
This same feature worked perfectly in the earlier version (JDeveloper 9i), so this is how it should look like:
http://veleri.hr/~ddobrec/Java/isense_jdev9i.png
Is there any way to fix this?
Thanks.

Thank you for the answer, but even if I follow these steps precisely, it still doesn't work. I press Alt + Enter, and if the class isn't already imported, it adds the import statement at the top, but the list of constructors still isn't being displayed. I also noticed another problem, which may be related to this one: When I'm doing step by step debugging of my application, when a new object is being created, I cannot trace the code to the inside of a constructor (even though the class I'm creating an instance of, is my own class inside the same project, not a part of Java framework). If I try to trace the code to the inside of a constructor, JDeveloper shows me the window saying it cannot find the source file, and gives me the option to generate a stub file, or search for the file myself. Even if a select the option to search for the file, and manually point it to that file, it still says that the file couldn't be found. I can trace the code to the inside of the methods of these classes properly, so these two problems are probably closely related.
All the code however, compiles and runs properly. My copy of JDeveloper 10.1.3.2 was freshly installed on my H: drive, but I have jdev9i installed on my G: drive, I didn't select the option to import the settings from an older installation to the new installation when I was prompted to, however. CLASSPATH on my PC is set to:
G:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
Where my Java runtime is installed. I don't know if this could be the problem.

Similar Messages

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • What is the problem with the code to get all  opportunities

    Hello All,
    I have wrote the java code as below to get the all opportunities.But i did not get the opportunities i.e its returns null . Any one,Please suggest me what is the problem with the below code.
    OpportunityWS_OpportunityQueryPage_Output opportunityWS_OpportunityQueryPage_Output = new OpportunityWS_OpportunityQueryPage_Output();
                   Opportunity[] opportunities=opportunityWS_OpportunityQueryPage_Output.getListOfOpportunity();
    Thanks,
    --bdr_09                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hi Dinesh,
    Please check out the code and give me your suggestions
    *try{*
    String address="MY URL"+getSessionId();
    Default_BindingStub dbs=new Default_BindingStub();
    dbs.setMaintainSession(true);
    OpportunityLocator loc = new OpportunityLocator();
    loc.setDefaultEndpointAddress(address);
    loc.setMaintainSession(true);
    OpportunityWS_OpportunityQueryPage_Output opportunityWS_OpportunityQueryPage_Output = new OpportunityWS_OpportunityQueryPage_Output();
                   Opportunity[] opportunities= opportunityWS_OpportunityQueryPage_Output.getListOfOpportunity();
    System.out.println("opportunities size::"+opportunities.length);
    *}catch(Exception e){*
    e.printStackTrace();
    Thanks,
    --bdr_09                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • What is the problem with the code?

    Hello, the following is a segment of code that I have written recently:
            IF DATA+1(5) <> TEXT-035.
              CATCH SYSTEM-EXCEPTIONS WEIRD_ERROR = 4
                                     OTHERS = 8.
                END CATCH.
              ENDIF.
    When I tried to compile the code, it says:
    Unable to interpret "SYSTEM-EXCEPTIONS". Possible causes: Incorrect spelling or comma error.          
    May I know where is the problem with this code? Thanks a lot!
    Regards,
    Anyi

    Here is a list of the system exceptions.
    Alphabetical List of Catchable Runtime Errors
    ,,ADDF_INT_OVERFLOW
    Overflow in addition with type I ( ADD ... UNTIL / ADD ... FROM ... TO)
    ,,ASSIGN_CASTING_ILLEGAL_CAST
    The offset and type of the source field and the target type do not match exactly in the components that are strings, tables, or references.
    ,,ASSIGN_CASTING_UNKNOWN_TYPE
    The type specified at runtime is unknown.
    ,,BCD_FIELD_OVERFLOW
    Overflow in conversion or arithmetic operations (type P with specified length)
    ,,BCD_OVERFLOW
    Overflow in conversion or arithmetic operation (type P)
    ,,BCD_ZERODIVIDE
    Division by 0 (type P)
    ,,CALL_METHOD_NOT_IMPLEMENTED
    Call of a non-implemented interface method
    ,,COMPUTE_ACOS_DOMAIN
    Invalid call of mathematical function ACOS
    ,,COMPUTE_ASIN_DOMAIN
    Invalid call of mathematical function ASIN
    ,,COMPUTE_ATAN_DOMAIN
    Invalid call of mathematical function ATAN
    ,,COMPUTE_BCD_OVERFLOW
    Overflow in arithmetic operation (all operands type P)
    ,,COMPUTE_COSH_DOMAIN
    Invalid call of mathematical function COSH
    ,,COMPUTE_COSH_OVERFLOW
    Overflow in mathematical function COSH
    ,,COMPUTE_COS_DOMAIN
    Invalid call of mathematical function COS
    ,,COMPUTE_COS_LOSS
    Result of COS function is inexact
    ,,COMPUTE_EXP_DOMAIN
    Invalid call of mathematical function EXP
    ,,COMPUTE_EXP_RANGE
    Over- or underflow in mathematical function EXP
    ,,COMPUTE_FLOAT_DIV_OVERFLOW
    Overflow in division (type F)
    ,,COMPUTE_FLOAT_MINUS_OVERFLOW
    Overflow in subtraction (type F)
    ,,COMPUTE_FLOAT_PLUS_OVERFLOW
    Overflow in addition (type F)
    ,,COMPUTE_FLOAT_TIMES_OVERFLOW
    Overflow in multiplication (type F)
    ,,COMPUTE_FLOAT_ZERODIVIDE
    Division by 0 (type F)
    ,,COMPUTE_INT_ABS_OVERFLOW
    Integer overflow when calculating the absolute value
    ,,COMPUTE_INT_DIV_OVERFLOW
    Integer overflow in division
    ,,COMPUTE_INT_MINUS_OVERFLOW
    Integer overflow in subtraction
    ,,COMPUTE_INT_PLUS_OVERFLOW
    Integer overflow in addition
    ,,COMPUTE_INT_TIMES_OVERFLOW
    Integer overflow in multiplication
    ,,COMPUTE_INT_ZERODIVIDE
    Division by 0 (type I)
    ,,COMPUTE_LOG10_ERROR
    Invalid call of the mathematical function LOG10
    ,,COMPUTE_LOG_ERROR
    Invalid call of the mathematical function LOG
    ,,COMPUTE_MATH_DOMAIN
    Invalid call of a mathematical function
    ,,COMPUTE_MATH_ERROR
    Error executing a mathematical function
    ,,COMPUTE_MATH_LOSS
    Result of a mathematical function is inexact
    ,,COMPUTE_MATH_OVERFLOW
    Overflow of a mathematical function
    ,,COMPUTE_MATH_UNDERFLOW
    Underflow in a mathematical function
    ,,COMPUTE_POW_DOMAIN
    Invalid argument when raising powers
    ,,COMPUTE_POW_RANGE
    Over- or underflow when raising powers
    ,,COMPUTE_SINH_DOMAIN
    Invalid call of the mathematical function SINH
    ,,COMPUTE_SINH_OVERFLOW
    Overflow in the mathematical function SINH
    ,,COMPUTE_SIN_DOMAIN
    Invalid call of the mathematical function SIN
    ,,COMPUTE_SIN_LOSS
    Result of the function SIN is inexact
    ,,COMPUTE_SQRT_DOMAIN
    Invalid call of the mathematical function SQRT
    ,,COMPUTE_TANH_DOMAIN
    Invalid call of the mathematical function TANH
    ,,COMPUTE_TAN_DOMAIN
    Invalid call of the mathematical function TAN
    ,,COMPUTE_TAN_LOSS
    Result of the function TAN is inexact
    ,,CONNE_IMPORT_WRONG_COMP_LENG
    Import error: A component in a structured type in the dataset has an incorrect length
    ,,CONNE_IMPORT_WRONG_COMP_TYPE
    Import error: A component of a structured type in the dataset has an incorrect length
    ,,CONNE_IMPORT_WRONG_FIELD_LENG
    Import error: A field in the dataset has an incorrect length
    ,,CONNE_IMPORT_WRONG_FIELD_TYPE
    Import error: A field in a dataset has the wrong type
    ,,CONNE_IMPORT_OBJECT_TYPE
    Import error: Type conflict between simple and structured data types
    ,,CONNE_IMPORT_WRONG_STRUCTURE
    Import error: Type conflict between structured objects
    ,,CONVT_HEX_CONFLICT
    Conversion conflict (Type X)
    ,,CONVT_NO_NUMBER
    Value for conversion cannot be interpreted as a number
    ,,CONVT_OVERFLOW
    Overflow in conversion (all types except type P)
    ,,CREATE_DATA_NOT_ALLOWED_TYPE
    The statement CREATE DATA cannot be executed with a generic type.
    ,,CREATE_DATA_UNKNOWN_TYPE
    The statement CREATE DATA cannot be executed with an unknown type.
    ,,CREATE_OBJECT_CLASS_ABSTRACT
    Attempt to instantiate an abstract class.
    ,,CREATE_OBJECT_CLASS_NOT_FOUND
    The class specified with a dynamic CREATE OBJECT was not found.
    ,,CREATE_OBJECT_CREATE_PRIVATE
    Attempt to create an object of a class defined as 'CREATE PRIVATE'.
    ,,CREATE_OBJECT_CREATE_PROTECTED
    Attempt to create an object of a class defined as 'CREATE PROTECTED'.
    ,,DATA_LENGTH_NEGATIVE
    Invalid subfield access: Negative length
    ,,DATA_LENGTH_0
    Invalid subfield access: Length 0
    ,,DATA_LENGTH_TOO_LARGE
    Invalid subfield access: Length too large
    ,,DATA_OFFSET_NEGATIVE
    Invalid subfield access: Negative offset
    ,,DATA_OFFSET_TOO_LARGE
    Invalid subfield access: Offset too large
    ,,DATA_OFFSET_LENGTH_TOO_LARGE
    Invalid subfield access: Offset + length too large
    ,,DATA_OFFSET_LENGTH_NOT_ALLOWED
    Invalid subfield access: Type not appropriate
    ,,DATASET_CANT_CLOSE
    Unable to close file. There may be no space left in the file system
    ,,DATASET_CANT_OPEN
    Unable to open file
    ,,DATASET_NO_PIPE
    The FILTER addition to the OPEN DATASET statement is not supported on the current operating system
    ,,DATASET_READ_ERROR
    Error reading a file
    ,,DATASET_TOO_MANY_FILES
    Maximum number of open files exceeded
    ,,DATASET_WRITE_ERROR
    Error writing to a file
    ,,DYN_CALL_METH_CLASSCONSTRUCTOR
    Attempt to call the class constructor
    ,,DYN_CALL_METH_CLASS_ABSTRACT
    Attempt to call an abstract method
    ,,DYN_CALL_METH_CLASS_NOT_FOUND
    Attempt to call a method of a non-existent class
    ,,DYN_CALL_METH_CONSTRUCTOR
    Attempt to call the instance constructor
    ,,DYN_CALL_METH_EXCP_NOT_FOUND
    Attempt to catch an unknown exception
    ,,DYN_CALL_METH_NOT_FOUND
    Attempt to call an unknown method
    ,,DYN_CALL_METH_NOT_IMPLEMENTED
    Attempt to call a method that has not been implemented yet
    ,,DYN_CALL_METH_NO_CLASS_METHOD
    Attempt to call an instance method via a class
    Attempt to pass a parameter with an incorrect parameter type
    ,,DYN_CALL_METH_PARAM_LITL_MOVE
    Attempt to pass a constant actual parameter to a formal EXPORTING, CHANGING or RETURNING parameter
    ,,DYN_CALL_METH_PARAM_MISSING
    An obligatory parameter was not supplied.
    ,,DYN_CALL_METH_PARAM_NOT_FOUND
    Attempt to pass an unknown parameter
    ,,DYN_CALL_METH_PARAM_TAB_TYPE
    Attempt to pass a parameter with an incorrect table type
    ,,DYN_CALL_METH_PARAM_TYPE
    Attempt to pass a parameter with an incorrect type
    ,,DYN_CALL_METH_PARREF_INITIAL
    An initial data reference was passed for an mandatory parameter.
    ,,DYN_CALL_METH_PRIVATE
    Attempt to call a private method from outside
    ,,DYN_CALL_METH_PROTECTED
    Attempt to call a protected method from outside
    ,,DYN_CALL_METH_REF_IS_INITIAL
    Attempt to call a method with an initial reference
    ,,EXPORT_BUFFER_NO_MEMORY
    The EXPORT data cluster is too large for the application buffer
    ,,EXPORT_DATASET_CANNOT_OPEN
    The IMPORT/EXPORT statement could not open the file
    ,,EXPORT_DATASET_WRITE_ERROR
    The EXPORT statement could not write to the file
    ,,GENERATE_SUBPOOL_DIR_FULL
    The system cannot generate any more temporary subroutine pools
    ,,IMPORT_ALIGNMENT_MISMATCH
    Import error: Same sequence of components, but with type conflict or different alignment in structured data types
    ,,IMPORT_TYPE_MISMATCH
    Import error: Only with IMPORT...FROM MEMORY | FROM SHARED BUFFER...
    ,,MOVE_CAST_ERROR
    Type conflict when assigning between object and interface references (only MOVE...?TO... or operator ?=)
    ,,OPEN_DATASET_NO_AUTHORITY
    No authorizatino to access the file
    ,,OPEN_PIPE_NO_AUTHORITY
    No authorization to access the file (OPEN DATASET...FILTER...).
    ,,PERFORM_PROGRAM_NAME_TOO_LONG
    Invalid program name with PERFORM statement
    ,,RMC_COMMUNICATION_FAILURE
    Communication error with Remote Method Call
    ,,RMC_INVALID_STATUS
    Status error with Remote Method Call
    ,,RMC_SYSTEM_FAILURE
    System error with Remote Method Call
    ,,STRING_LENGTH_NEGATIVE
    Invalid access with negative length to a string
    ,,STRING_LENGTH_TOO_LARGE
    Invalid access to a string (length too large)
    ,,STRING_OFFSET_NEGATIVE
    Invalid access with negative offset to a string
    ,,STRING_OFFSET_TOO_LARGE
    Invalid access to a string (offset too large)
    ,,STRING_OFFSET_LENGTH_TOO_LARGE
    Invalid access to a string (offset + length too large)
    ,,TEXTENV_CODEPAGE_NOT_ALLOWED
    Character set is not released in the system (SET LOCALE...)
    ,,TEXTENV_INVALID
    Error setting the text environment (SET LOCALE...)
    ,,TEXTENV_KEY_INVALID
    With SET LOCALE...: Value of LANGUAGE, COUNTRY or MODIFIER that is not allowed in the system.
    ,,TEXTENV_LANGUAGE_NOT_ALLOWED
    With SET LOCALE...: Invalid value of the LANGUAGE addition.
    What version of SAP are you on?   If on a newer version you may be able to create your own exception class.
    Regards,
    Rich Heilman

  • Problem with the Code in exercise 1.2

    In this exercise:
    http://www.adobe.com/devnet/flex/pdfs/exercise1.2.pdf
    the first part is easy. Then you are instructed to go to the
    Debug
    Perspective and set a breakpoint that is below the function
    you defined, but
    ahead of the variable array.
    You are shown that the variables window is populated in debug
    view ..but
    this is just not true. I did this myself .. and then I did it
    again by
    copying and pasting the code directly from the PDF into the
    application and
    I got the same result. The application is halted with an
    empty variables
    window. The example says it should be populated.
    I suspect the problem is that the breakpoint was set too
    early .. but it is
    where it is supposed to be. Is my problem the example (my
    code is identical
    .. has to be since the second try is copied) or is my problem
    the debug
    player? I have always had problems with debugging in Flex.
    Thanks!
    Nancy

    Hi,
    Flex Builder 3 and Firefox 3 indeed do work together.
    But there are some issues when certain extensions are used:
    See
    http://bugs.adobe.com/jira/browse/FB-13064
    which led to a bug being filed against Firefox:
    https://bugzilla.mozilla.org/show_bug.cgi?id=441424

  • Problem with the Code in exercise 1.3

    Can you provide the final code for the exercises so we can
    see where we went wrong. I keep getting an undefined error.

    That exercise worked for me. Here is my final code.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    backgroundColor="#FFFFFF" creationComplete="init()">
    <mx:Script>
    <![CDATA[
    import mx.events.ListEvent;
    import mx.collections.ArrayCollection;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.controls.Alert;
    [Bindable]
    private var roomList:ArrayCollection;
    private function changeHandler(event:ListEvent):void{
    private function init():void{
    rooms.send();
    private function httpFaultHandler(event:FaultEvent):void{
    Alert.show("There was a problem","Error");
    private function httpResultHandler(event:ResultEvent):void{
    roomList = event.result.rooms.room;
    ]]>
    </mx:Script>
    <mx:HTTPService id="rooms" url="assets/roomList.xml"
    fault="httpFaultHandler(event)"
    result="httpResultHandler(event)"/>
    <mx:Label x="10" y="10" text="XYZ Convention Center"
    fontSize="21"
    fontWeight="bold"/>
    <mx:Text x="10" y="41" text="111 49th Ave, Denver, CO
    80634"/>
    <mx:Text x="208" y="41" text="Phone: 303-555-1212"/>
    <mx:Text x="345" y="41" text="Fax: 303-555-1234"/>
    <mx:Label x="10" y="72" text="Room Reservation System"
    fontSize="14"
    fontWeight="bold"/>
    <mx:Label x="10" y="108" text="Rooms Available:"/>
    <mx:Label x="121" y="108" id="mySelection"/>
    <mx:List id="dg" x="10" y="134" width="250"
    dataProvider="{roomList}"
    itemClick="changeHandler(event)"
    labelField="name" />
    </mx:Application>
    The only difference is that the example put mx:List with a
    closing /mx:List
    tag and I used one tag with the / at the end of it. I have
    always been
    taught that one shouldn't have empty tags (nothing in
    between) so I only use
    their way when there is something in the middle. I got their
    results so I
    don't think it matters.
    Nancy

  • Does anyone have a problem with the code window not showing code?

    I am having a problem with this update where the code window is blank and where I cannot add anything/ The text does appears in the design or live window.
    I just use DW to format text that will go into Edge Animate.

    Hi,
    Are you getting this issue on all the files?
    Please share any screenshot.
    Regards,
    Devendra

  • FMS3 - Problem with the code

    Hi,
    I want to know about this code.. why onStatus not display the events several times.. only one time.?¿
    what can i do?¿
    var nc:NetConnection = new NetConnection();
    var ns:NetStream;
    var video:Video = new Video();
    nc.connect("rtmp://");
    nc.addEventListener(NetStatusEvent.NET_STATUS, onStatus);
    function onStatus(event:Object) {
        if (event.info.code == "NetConnection.Connect.Success") {
            ns = new NetStream(nc);
            ns.client = this;
            ns.play("demo");
            video.attachNetStream(ns);
            addChild(video);
    pause_btn.addEventListener("click", onClick);
    function onClick(e) {
        ns.pause();

    Thank you for the answer, but even if I follow these steps precisely, it still doesn't work. I press Alt + Enter, and if the class isn't already imported, it adds the import statement at the top, but the list of constructors still isn't being displayed. I also noticed another problem, which may be related to this one: When I'm doing step by step debugging of my application, when a new object is being created, I cannot trace the code to the inside of a constructor (even though the class I'm creating an instance of, is my own class inside the same project, not a part of Java framework). If I try to trace the code to the inside of a constructor, JDeveloper shows me the window saying it cannot find the source file, and gives me the option to generate a stub file, or search for the file myself. Even if a select the option to search for the file, and manually point it to that file, it still says that the file couldn't be found. I can trace the code to the inside of the methods of these classes properly, so these two problems are probably closely related.
    All the code however, compiles and runs properly. My copy of JDeveloper 10.1.3.2 was freshly installed on my H: drive, but I have jdev9i installed on my G: drive, I didn't select the option to import the settings from an older installation to the new installation when I was prompted to, however. CLASSPATH on my PC is set to:
    G:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
    Where my Java runtime is installed. I don't know if this could be the problem.

  • Problem with the code bar

    On the code bar at the top of Dreamweaver were all the file for the page go, for some reason I now have a double for each one, the problem is the first ones don't work and I have to keep scowling across to get to the ones that do work, it's more of a Paine in the than any thing else, I don't know if it's connected to the same issue but when I am on the CSS file and I make a change, the click refresh, when it loads it as started jumping to the source code, so I the have to reopen the CSS file. I know this is possibly two questions but I think it night be linked. Please help Jeff

    look people, i may have a solution for this. This happened to me a few times before and resolved alone, but last time it happened was when i turned off my router and back on while my comp was running and appeared when i tried opening firefox after that. so wat i did was i shutdown the computer and the router and tried turning both on again, and it resolved.
    Therefore, Summary: Shutdown computer then turnoff router then turn both back on
    Hope this helps anyone.

  • Having a few problems with the codes for this program.

    i type in the code. in notepad, then compile it to java, but i always seem to get 3 errors. if anyone can help, id really appreciate it.
    using java:
    Calculate the salary at the end of two weeks. You know that:
    ? For the first 40 hours worked in a week the pay rate is $10/hour and after that
    initial 40 hours the pay rate is $15/hour.
    ? If the total salary (week1+week2) is less than $500, the employee will receive 10%
    bonus. If the salary is between $500 and $1000, the employee will receive 5%
    bonus. If the salary is between $1000 and $2000, the employee will receive 1%
    bonus.

    Well, maybe if you showed your code and the complete and exact "messages", we could help you.

  • Problem with the code pls go through

    hi,
    through the following code i'm trying to store the values of a multiple selected list box in an array but it is not working please help me
    <html>
    <body>
    <form name="test">
    <select name=opt multiple >
    <option value=1>hi1</option>
    <option value=2>hi2</option>
    <option value=3>hi3</option>
    </select>
    <% String[] userArray;
    int j=0;
    %>
    <script>
    for(var i=0; i < document.test.opt.length; i++) {
    if(document.test.opt.selected) {
    alert(document.test.opt[i].value);
    <%userArray[j++]%>=document.test.opt[i].value;
    </script>
    </body>
    </html>

    When you submit the form, the parameters will come through to the jsp/servlet in the form of
    saveMyForm.jsp?opt=1&opt=3
    You can access them by calling
    String[] optValues = request.getParameterValues("opt");This will give you an array of all the values that were selected on the list before the form was submitted.
    Hope this helps,
    evnafets

  • Problems with the Proxy Programme--Please help

    Hi All,
    I have written a simple proxy server in the form of a servlet. I changed the proxy config of my browser to connect to this servlet hosted on the default context(http://localhost:8080) of the Tomcat 5.0.25 . Well , this servlet internally connects to the proxy of the corporate LAN . The logic that I have applied is as follows. The servlet gets the request from the client (ie the browser in this case) , extracts the headers and contents from the request, sets them to a new request that it forms and finally send this new request to the proxy. When the proxy responds, the servlet collects the response headers and contents adn writes them in its response. To sum up , this servlet transparently carries the requests and responses between the client(browser) and the corporate LAN proxy. Now the problem is this. Let's say , now I am accessing http://www.google.com.The browser sends a request to my servlet with the following headers as they are extracted by my servlet.
    ProxyServer:::>posting request
    ProxyServer:::>headerValue::> headerName = accept : headerValue=*/*
    ProxyServer:::>headerValue::> headerName = referer : headerValue=http://www.google.com/
    ProxyServer:::>headerValue::> headerName = accept-language : headerValue=en-us
    ProxyServer:::>headerValue::> headerName = proxy-connection : headerValue=Keep-Alive
    ProxyServer:::>headerValue::> headerName = user-agent : headerValue=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UB1.4_IE6.0_SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
    ProxyServer:::>headerValue::> headerName = host : headerValue=www.google.com
    ProxyServer:::>headerValue::> headerName = cookie : headerValue=PREF=ID=1be27c0a74f198ca:TM=1082058853:LM=1082058853:S=bu6ORrygzm8AUkm8
    ProxyServer:::>postRequest
    I set these headers into a new connection opened to the proxy and post a fresh request to the proxy,which, in turn responds with the following headers.
    ProxyServer:::>posted request successfully
    ProxyServer:::>writing response
    ProxyServer:::>writeResponse-->headerName = Proxy-Connection : headerValue = [close]
    ProxyServer:::>writeResponse-->headerName = Content-Length : headerValue = [257]
    ProxyServer:::>writeResponse-->headerName = Date : headerValue = [Tue, 13 Jul 2004 14:01:40 GMT]
    ProxyServer:::>writeResponse-->headerName = Content-Type : headerValue = [text/html]
    ProxyServer:::>writeResponse-->headerName = Server : headerValue = [NetCache appliance (NetApp/5.5R2)]
    ProxyServer:::>writeResponse-->headerName = Proxy-Authenticate : headerValue = [Basic realm="Charlotte - napxyclt2"]
    ProxyServer:::>writeResponse-->headerName = null : headerValue = [HTTP/1.1 407 Proxy Authentication Required]
    ProxyServer:::>writeResponse exiting
    ProxyServer:::>wrote response successfully
    I write these headers back to the client. According to what I was thinking, the client ie the browser would open a new dialog box asking for username/password owing to the presence of the "Proxy-Authenticate " header. But it does not happen that way. Rather the browser stops responsding and displays a blank page. Does anyone know why it happens this way? I am pasting the server prog below for everybody's reference.
    package server.proxy;
    //import all servlet related classes
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    import server.resources.*;
    //My Proxy server --->Currently it is very simplea and relies on
    //other proxy servers of an already connected network.
    public class ProxyServer extends HttpServlet
    //stores the resource bundle
    private ServerResBundle resBundle = null;
    //checks for the mode of operation
    private boolean proxySet = false;
    private String proxy = null;
    //storing the original System out/err etc
    private PrintStream sysOutOrig = null;
    private PrintStream sysErrOrig = null;
    private InputStream sysInOrig = null;
    //initialise certain features that are required later
    public void init() throws ServletException
    try
    //initialise the resource bundle
    this.initResBundle();
    System.out.println("ProxyServer:::>res bundle init");
    //set the mode of operation
    this.setMode();
    System.out.println("ProxyServer:::>mode set");
    //set the system out and err --System.setOut etc
    this.setSystemOutErr();
    System.out.println("ProxyServer:::>in/out/err set");
    }//End try
    catch(Exception e)
    System.out.println("Exception in init..."+(e.getMessage()));
    throw new ServletException(e);
    }//Edn
    catch(Throwable e)
    System.out.println("Irrecoverable Error...");
    throw new ServletException(e);
    }//End
    }//End init
    //method to init the resource bundle;
    private void initResBundle()
    this.resBundle = ServerResBundle.getBundle();
    }//End
    //method to set the mode of the server--proxy or direct
    private void setMode()
    //read the target proxy property from the bundle and
    //if it is set,take that URL
    String temp = (String)(this.resBundle.getResource(ResKeys.PROXY_SERVER));
    if ( (temp != null) && (temp.length() > 0) )
    this.proxySet = true;
    this.proxy = temp;
    temp = null;
    }//End
    }//End
    //method to set the system out and err etc
    private void setSystemOutErr() throws Exception
    //keep a copy of the original system out and error
    this.sysOutOrig = System.out;
    this.sysErrOrig = System.err;
    try
    //read the options adn if they are set, take the values directly
    String newOutStr = (String)(this.resBundle.getResource(ResKeys.SYSTEM_OUT));
    String newErrStr = (String)(this.resBundle.getResource(ResKeys.SYSTEM_ERR));
    if ((newOutStr != null) && (newOutStr.length() > 0))
    System.setOut(new PrintStream(new FileOutputStream(new File(newOutStr),true),true));
    }//End if
    if ((newErrStr != null) && (newErrStr.length() > 0))
    System.setErr(new PrintStream(new FileOutputStream(new File(newErrStr),true),true));
    }//End if
    }//End
    catch(Exception e)
    //restore the stuff
    System.setOut(this.sysOutOrig);
    System.setErr(this.sysErrOrig);
    }//End
    }//End
    //this is where the proxy functionalities will be embedded
    public void service(HttpServletRequest req,HttpServletResponse resp)
    throws ServletException,java.io.IOException
    //conenction URL
    URL target = null;
    //conenction to the remote object
    URLConnection targetConn = null;
    //stores the OOS and the OIS
    ObjectOutputStream oos = null;
    ObjectInputStream ois = null;
    try
    //check for the mode of operation
    if (proxySet)
    URLConnection objects go through two phases: first they are created, then they are connected.
    After being created, and before being connected, various options can be specified
    (e.g., doInput and UseCaches). After connecting, it is an error to try to set them.
    Operations that depend on being connected, like getContentLength, will implicitly perform the connection,
    if necessary.
    //for the URL to the proxy
    target=new URL(this.proxy);
    //conenct to the proxy
    targetConn = target.openConnection();
    //set the details of the connectuon
    targetConn.setDoInput(true);
    targetConn.setDoOutput(true);
    targetConn.setUseCaches(false);
    // If true, this URL is being examined in a context in which it makes sense to allow user interactions such as popping up an authentication dialog. If false, then no user interaction is allowed
    targetConn.setAllowUserInteraction(true);
    //connect to the remote object
    // targetConn.connect();//call this only when all the request properties are set
    System.out.println("ProxyServer:::>posting request");
    //post the received request to the URL
    this.postRequest(targetConn,req);
    System.out.println("ProxyServer:::>posted request successfully");
    System.out.println("ProxyServer:::>writing response");
    //receive the response
    //write the received response to the client
    this.writeResponse(targetConn,resp);
    System.out.println("ProxyServer:::>wrote response successfully");
    }//End if
    else
    //currently this functionality is not supported
    throw new ServletException(
    (String)(this.resBundle.getResource(ResKeys.ERR_FUNC_NOTSUPPORTED)));
    }//End
    }//End try
    catch(Exception e)
    if(e instanceof ServletException)
    throw (ServletException)e;
    }//End
    if (e instanceof IOException)
    throw (IOException)e;
    }//End
    //wrap it up in ServletException
    throw new ServletException(e);
    }//End
    }//End
    //method to write the response back to the client
    private void writeResponse(URLConnection targetConn,HttpServletResponse resp)
    throws ServletException
    //get all the header fields from the response connection and set them to the
    //response of the servlet
    Map headerFields = null;
    Iterator headerFieldEntries = null;
    Map.Entry header = null;
    //stores the input stream to the conn
    BufferedReader brConn = null;
    //stores the writer to the response
    PrintWriter prResp = null;
    //checks if the proxy authentication needed or not
    boolean proxyAuthReqd = false;
    try
    //juste ensuring that the proxy authentication is reset
    proxyAuthReqd = false;
    if( (targetConn != null) && (resp != null) )
    //Returns an unmodifiable Map of the header fields.
    //The Map keys are Strings that represent the response-header field names.
    //Each Map value is an unmodifiable List of Strings that represents the corresponding
    //field values
    headerFields = targetConn.getHeaderFields();
    //Returns a set view of the mappings contained in this map
    Set temp = headerFields.entrySet();
    //Returns an iterator over the elements in this set
    headerFieldEntries = temp.iterator();
    if (headerFieldEntries != null)
    while (headerFieldEntries.hasNext())
    Object tempHeader = headerFieldEntries.next();
    if (tempHeader instanceof Map.Entry)
    header = (Map.Entry)tempHeader;
    Object headerName = header.getKey();
    Object headerValue=header.getValue();
    System.out.println("ProxyServer:::>writeResponse-->headerName = "+headerName+" : headerValue = "+headerValue);
    //do not select the key-value pair if both the key adn the value are null
    if ( ( headerName == null) && (headerValue == null) )
    continue;
    }//Enmd
    if (headerValue != null)
    List headerValList = null;
    if (headerValue instanceof List)
    headerValList = (List)headerValue;
    }//End
    if(headerValList != null)
    for (int i=0;i<headerValList.size();i++)
    Object headerValueStr = headerValList.get(i);
    if (headerValueStr instanceof String)
    //note that the header-key can not be null for addHeader
    //I have made this temporary provision to make the programme work.
    resp.addHeader(( (headerName==null)? ("null_header"+i) :(String)headerName),
    (String)headerValueStr);
    //check if the proxy authentication required or not
    if (((String)headerValueStr).
    indexOf(resp.SC_PROXY_AUTHENTICATION_REQUIRED+"") != -1)
    System.out.println("ProxyServer:::>writeResponse-->proxy auth needed");
    //proxy authentication is needed
    proxyAuthReqd = true;
    }//End
    }//Ednd of
    else if (headerValueStr == null)
    resp.addHeader(( (headerName==null)? null :(String)headerName),
    null);
    }//End
    }//End for
    }//End if
    }//End if
    }//End
    }//End while
    }//End if
    //get the writer to the client
    prResp = resp.getWriter();
    System.out.println("ProxyServer:::>writeResponse-->proxyAuthReqd="+proxyAuthReqd);
    //juste test a simple header
    System.out.println("Proxy-Authenticate = "+(resp.containsHeader("Proxy-Authenticate")));
    //if the proxy asks you for authentication,pass on the same to the client
    //from whom you have received the request.When this flag is true,the connection
    //is closed by the remotehost adn hence any attempt to open in input steram
    //results in an error ie IOException
    if (!proxyAuthReqd)
    //now get the content adn write it to the response too
    brConn = new BufferedReader(new InputStreamReader(
    targetConn.getInputStream()));
    String tempStr = null;
    while ((tempStr = brConn.readLine())!=null)
    prResp.println(tempStr);
    }//End while
    //close the connections
    brConn.close();
    }//End if
    else
    prResp.println("Proxy Authentication needed...");
    }//End
    //close the streams
    prResp.flush();
    prResp.close();
    }//End if
    System.out.println("ProxyServer:::>writeResponse exiting\n");
    }//End try
    catch(Exception e)
    throw new ServletException(e);
    }//End
    }//End
    //method to post request to the internet
    private void postRequest(URLConnection targetConn,HttpServletRequest req)
    throws ServletException
    //extract the header parameters and the body content from the incoming request
    //and set them to the new connection
    Enumeration reqHeaders = null;
    //reads the incoming request's content
    BufferedReader brReqRd = null;
    PrintWriter prResWt = null;
    //stores temp header names and values
    String headerName = null;
    String headerValue = null;
    try
    if( (targetConn != null) && (req != null) )
    reqHeaders = req.getHeaderNames();
    //extract a header adn set it to the new connection
    while (reqHeaders.hasMoreElements())
    headerName = (String)(reqHeaders.nextElement());
    headerValue = req.getHeader(headerName);
    targetConn.setRequestProperty(headerName,headerValue);
    System.out.println("ProxyServer:::>headerValue::> headerName = "+headerName+" : headerValue="+headerValue);
    }//End
    System.out.println("ProxyServer:::>postRequest\n");
    //establis the actual connection
    //calling this method bfore the above loop results in IllegalStateException
    targetConn.connect();
    //NOTE : try reading from and writing into OIS and OOS respectively
    //now read the contents and write them to the connection
    // brReqRd = req.getReader(); //this hangs for some reason
    brReqRd = new BufferedReader(new InputStreamReader(req.getInputStream()));
    System.out.println("Got the reader..brReqRd = "+brReqRd);
    if (brReqRd != null)
    String temp = null;
    //establish the printwriter
    // prResWt = new PrintWriter(targetConn.getOutputStream(),true);
    prResWt = new PrintWriter(targetConn.getOutputStream());
    System.out.println("trying to read in a loop from brReqRd.. ready="+(brReqRd.ready()));
    while( (brReqRd.ready()) && ((temp=brReqRd.readLine()) != null) )
    System.out.println("In while::>temp = "+temp);
    prResWt.println(temp);
    }//Emd while
    //close the streams adn go back
    brReqRd.close();
    prResWt.flush();
    prResWt.close();
    }//End
    }//End outer if
    System.out.println("ProxyServer:::>postRequest exiting\n");
    }//End try
    catch(Exception e)
    throw new ServletException(e);
    }//End
    }//End
    }//End

    Hi serlank ,
    Thanks for your reply. Well , I initially I thought of not pasting the code,as it was too long. But I could not help it,as I thought I must show in code what I exactly meant. That's why I followed a description of my problem with the code. You could probably have copied the code and pasted it in one of your favourite editors to take a look at it. Did you,by any chance, try to read it on the browser? And as regards reposting the same message, I can say that I did it as I felt the subject was not quite appropriate in the first posting and I was not sure as to how I could delete/alter the posting. I am not asking for a code-fix,but some suggestions from some one who might ever have come across such a thing.Anyway, lemme know if you have any idea on it. Thanks...

  • Problem with 'sort and filter' feature of embed codes in Excel Online Web App

    So my question has to do with the Excel Online feature where you can share a spreadsheet and embed it in a website with the option of allowing users to sort and filter the data. (The option is under the "Interaction" heading.)
    One of the options if you look closely is "Let people sort and filter" which is not checked off. In the embed code you can see "AllowInteractivity=False". The problem is that when I check "Let people sort and filter"
    the embed code changes completely - going from:
    <iframe width="700" height="900" frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?cid=dontworryaboutitEDFD383&resid=6BAA9620AEDFD383%21107&authkey=AFj3X8xq2U3IfDE&em=2&wdAllowInteractivity=False&Item='Sheet1'!A1%3AI32"></iframe>
    to:
    <iframe width="700" height="900" frameborder="0" scrolling="no" src="https://onedrive.live.com/embed?cid=dontworryaboutitEDFD383&resid=6BAA9620AEDFD383%21107&authkey=AFj3X8xq2U3IfDE&em=2&Item='Sheet1'!A1%3AI32"></iframe>
    If I manually change 'false' to 'true' that doesn't do the trick so I'm not sure what to try next.
    Any thoughts?

    Hi,
    We support Office for Windows in the current forum, since this question is about Office Online, I suggest you post the question in Office Online forum:
    http://community.office365.com/en-us/f/default.aspx
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • T.code FBL5N: a problem with the print of the output list

    Hi All,
    with reference to the t.code FBL5N, I have  a problem with the print of the output list of the report.
    When I execute the print, I obtain one customer for each page printed.
    I wonder if is possible to obtain more customers for each page printed.
    Could anyone help me?
    Thanks
    Gandalf
    Edited by: Umberto Gandalf on Dec 21, 2008 10:36 PM

    Hi,
    Though personally i havent tried this option, check the same
    Go to Menu: Settings >> Switch List
    This will make the value displayed in ALV format and then try taking print outs.
    Regards,
    Sridevi

  • There is a problem with the security certificate of the proxy server. Error code 18 and 38.

    Hi All,
    After several hours and a short night of sleep I'm out of ideas and hopefully someone here can help me trying to solve this one. First of all the situation:
    Exchange 2013 on a remote location with a CA-certificate.
    Outlook 2010 and 2013 on different locations, locally installed and on RDS.
    When I open Outlook on my laptop all is fine, no errors, good sync, no problem. But when I open Outlook on our Remote Desktop Servers with Outlook 2013 I'm getting errors like "There is a problem with the security certificate of the proxy server. The
    name on the security certificate is invalid or does not match the name of the site. Outlook is unable to connect to this server. (Error code 18)". Opening Outlook 2010 the message is the same, but the error code now is 38.
    After this Outlook opens and is working, there's one more error though. After a while an security warning pops up with the message: "Information you exchange with this site cannot be viewed or changed by others. However, there is a problem with the
    site's security certificate. * The security certificate was issued by a company you have not chosen to trust. View the certificate to determine whether you want to trust the certifying authority. * The security certificate is valid. * The name on the security
    certificate is invalid or does not match the name of the site."
    Strangest thing is, it is the certificate of my RDS! It isn't my valid en officially bought certificate from my mailserver. What's going on? I'm out of options, what I've tried so far (in random order):
    - restarting mailserver and AD;
    - restarting switches;
    - restarting routers;
    - restarting RDS, AD and all other servers;
    - bypassed proxyserver for RDS;
    - created a new profile;
    - checked recently installed updates;
    - checked certificate on mailserver;
    - checked RDS on a different location, working fine.
    Nothing helped, what can I do next? Please advice.
    Regards.

    Found a thread that solves half my problem (https://social.technet.microsoft.com/Forums/office/en-US/70d18244-889a-4d95-ac3f-e234672a82b2/there-is-a-problem-with-the-proxy-servers-security-certificate-error-when-starting-outlook?forum=exchangesvrclients).
    The first message can be suppressed by adding this to the Exchange config:
    set-outlookprovider -Identity EXCH -CertprincipalName msstd:webmail.domain.tld
    set-outlookprovider -Identity EXPR -CertprincipalName msstd:webmail.domain.tld
    Giving the command get-outlookprovider, gives me empty information regarding the certprinipalname. Filled
    this and after recreating the profile or deleting the ost-file I still have the second alert with the local certificate of my RDS.
    Not completely where I want to be, any help regarding the second alert is greatly appreciated!

Maybe you are looking for

  • FLV Master Detail Gallery

    I'd like to use a master/detail region scenario with FLV's. Right now I've been using iframes and its sketchy at best. I want the user to click thumbnails which load an FLV video and text from an XML file. Here's what I've come up with this far: http

  • Print Check-Copy (Non-Negotiable) after every check print

    We are implementing Std. R12.0.6 AP Check Printing. I've designed standard BI Publisher RTF to print the Check and Check-Copy without any issue. My RTF Template has Check design on first page and Check-Copy (Non-Negotiable) on second page of RTF. Std

  • Service_name and servers pool with priority

    Hi, Is there a way to define a service name SVC1 on 8 nodes (n1,n2 ...n8) with priority on somes nodes and a second service name SVC2 on 4 nodes (n1,n2,n3,n4) ? In RAC, a server can not be declare in more than one server pool, but in Exadata is-it th

  • View Cluster: Maintain Master Data without a prompt for transport

    Hello, I have two tables which have been defined as Application Tables with Display/Maintenance Allowed. These two tables have been defined in a View Cluster. But, the View cluster prompts to create a Transport Request when ever data is being maintai

  • My phone has started playing music when it connects to Bluetooth in my car. How do I stop it?

    With this last update, my iphone5 starts playing music every time it connects via Bluetooth in my car. I close the app but when I hang up from a call, the music starts again.  How do I turn this feature off?