Java URL bug

I guess this is a bug in java.
I tried opening a page : http://nds1.nds.nokia.com/uaprof/N3250r100.xml. The page has UAProf info of Nokia 3250. It works and opens fine.
However the page http://nds1.nds.nokia.com/ does not. If you tried opening it from browser (Mozilla) it returns page not found and specifically says "The requested object does not exist on this server. The link you followed is either outdated, inaccurate, or the server has been instructed not to let you have it."
While trying to open the page with the following snippet
profile="http://nds1.nds.nokia.com/uaprof/N3250r100.xml";
URL url = new URL(profile);
SAXReader reader = new SAXReader();
Document doc = reader.read(url);
It throws an UnknownHostException.
How can I fetch this page without havign this error, there shld be a way to bye pass this.

I am behind a proxy but i think java uses my default browser setting to connect to the internet.
If it does not, that's still a bug in java, it shld b able to detect default browser settings. However, atleast if it can't it should allow setting the proxy server and port.
Any idea as to how to make this config?
Note: The unknown host exception is complainin about the host http://nds1.nds.nokia.com which I cannot access too from the browser.
Thnx.
Message was edited by:
lekkie.aydot

Similar Messages

  • Java Embedding bug in SOA Suite 11g BPEL??

    I am beginning to wonder if there is a 'bug' in the SOA Suite 11g, BPEL, Java Embedding activity? Need some help as soon as possible – does the Java Embedding activity work in SOA Suite 11g?
    Have tried the following on Jdev 11.1.1.1 and Jdev 11.1.1.3 – get the same error message (see below for error message).
    Thanks for any help - Casey
    I created a simple composite app by:
    1.     Created a Composite with BPEL Process
    2.     Created a BPEL variable by the name of Variable and a Simple Type of string      ({http://www.w3.org/2001/XMLSchema}string)
    3.     Added an Assign activity (Assign_1) and assigned the value of “Test Var” to the variable Variable using a Copy operation.
    4.     Then, after the assign activity, added a Java Embedding activity (Java_Embedding_1) with Java Version set to 1.5 and the following code:
    +try{+*
    String var;*
    var=(String)getVariableData(Variable);*
    System.out.println(var);*
    +}  // end try+
    +catch(Exception ex){+*
    System.out.println(ex.getMessage());*
    +}// end catch+
    Compiled and got the following error message:
    Error(23,34): Failed to compile bpel generated classes.*
    failure to compile the generated BPEL classes for BPEL process "BPELProcess1" of composite "default/Project1!1.0"*
    The class path setting is incorrect.*
    Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.*
    Code for the BPEL component is:
    +<?xml version = "1.0" encoding = "UTF-8" ?>+
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    Oracle JDeveloper BPEL Designer
    Created: Tue Nov 09 13:01:49 CST 2010
    Author:
    Purpose: Asynchronous BPEL Process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<process name="BPELProcess1"+
    targetNamespace="http://xmlns.oracle.com/TestgetVariable_jws/Project1/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/TestgetVariable_jws/Project1/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/TestgetVariable/Project1/FileW"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    PARTNERLINKS
    List of services participating in this BPEL process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<partnerLinks>+
    +<!--+
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    +<partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>+
    +</partnerLinks>+
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    VARIABLES
    List of messages and XML documents used within this BPEL process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<variables>+
    +<!-- Reference to the message passed as input during initiation -->+
    +<variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>+
    +<!-- Reference to the message that will be sent back to the requester during callback -->+
    +<variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>+
    +<variable name="Variable" type="xsd:string"/>+
    +</variables>+
    +<!--+
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+
    -->
    +<sequence name="main">+
    +<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1.wsdl) -->+
    +<receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>+
    +<!--+
    Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
    -->
    +<assign name="Assign_1">+
    +<copy>+
    +<from expression='"test var"'/>+
    +<to variable="Variable"/>+
    +</copy>+
    +</assign>+
    +<bpelx:exec name="Java_Embedding_1" version="1.5" language="java">+
    +<![CDATA[/*Write your java code below e.g.+
    +     System.out.println("Hello, World");+
    +*/+
    +try{+
      +String var;+
      +var=(String)getVariableData(Variable);+
      +System.out.println(var);+
    +} // end try+
    +catch(Exception ex){+
    System.out.println(ex.getMessage());
    +}// end catch]]>+
    +</bpelx:exec>+
    +<invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>+
    +</sequence>+
    +</process>+

    Java Embedding bug in SOA Suite 11g BPEL??

  • Accessing seured website using java URL/Socket programming

    Hi,
    I am working on an intranet search engine using java URL and Authenticator class. This is a secured web-site using SSL in http server. I am not able to access the password protected pages. Following is the code:
    URL url = new URL("https://*************");
    URLConnection connection = url.openConnection();
    PasswordAuthentication pa = Authenticator.requestPasswordAuthentication( InetAddress.getByName(connection.getURL().getHost()),
    connection.getURL().getPort(), connection.getURL().getProtocol(), null, "Basic");
    StringBuffer buf = new StringBuffer("*****************");
    buf.append(":");
    buf.append("************");
    String encoded = new sun.misc.BASE64Encoder().encode(buf.toString().getBytes());
    connection.setRequestProperty ("Authorization", "Basic" + encoded);
    InputStream content = (InputStream)connection.getInputStream();
    BufferedReader in = new BufferedReader (new InputStreamReader (content));
    String line;
    while ((line = in.readLine()) != null) {
    System.out.println(line);
    Let me know if there is any other alternative
    tnx,
    Biswajit Biswal

    Below is my first test program. I first take the home page of a website (this can be automated later) and save it to "myTest.html". Then I try to see if this page contains the keywords that a company website often has.
    Could you give your opinion on this approach?
    If this approach is fine, then any idea about the keywords to select a company website from other sites is welcome.
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    public class MyTest {
          * @param args
          * @throws IOException
         public static void main(String[] args) throws IOException {
              InputStream in = MyTest.class.getResourceAsStream("/myTest.html");
              Reader reader = new InputStreamReader(in, "UTF-8");
              BufferedReader bufferedReader = new BufferedReader(reader);
              String line;
              while ((line = bufferedReader.readLine()) != null) {
                   line=line.toLowerCase();
                   if (line.contains("contact us")) {
                        System.out.println("contact us: line = "+line);
                   if (line.contains("career")) {
                        System.out.println("career: line = "+line);
                   if (line.contains("company")) {
                        System.out.println("company: line = "+line);
                   if (line.contains("about us")) {
                        System.out.println("about us: line = "+line);
                   if (line.contains("product")) {
                        System.out.println("product: line = "+line);
              bufferedReader.close();
              reader.close();
    }

  • Java Servlet BUG (Possibly)-Servlet classname replaces retrieved doc name

    I created a test servlet (TestServlet.java) which reads data from a file which could be pdf/doc/xls/zip etc and presents the file to the user for download. When the user clicks on the save option to save the file the default name before the file extension of the file in the save dialog box is always TestServlet. i.e. If the file being downloaded is BEA.doc the default name in the save dialog box is TestServlet.doc
    The contents of the file(data in the file) are correct but the default name should be BEA.doc and not TestServlet.doc. I get the same result if the file is a pdf/xls or any other file type which is being downloaded.
    We tested this in BEA Weblogic 8.1 and Tomcat and get the same results both places so this issue is not application server specific and seems like a bug to us.
    The TestServlet.java file is below
    package com.test;
    import java.io.*;
    import java.util.*;
    import javax.servlet.http.*;
    public class TestServlet  extends HttpServlet
        private String fileName = "c:/BEA.doc";
        private FileInputStream  rd;
        private ByteArrayOutputStream wr;
        byte[] buf = new byte[8192];    //buffer size
        byte[] fileData;
        public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
            doPost(request,response);     
        public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
            int count = 0;
            try
                File theFile = new File(fileName);
                if (theFile.exists())
                    try
                        rd = new FileInputStream(fileName);
                        wr = new ByteArrayOutputStream();
                        while ((count = rd.read(buf)) > -1)
                            wr.write(buf, 0, count);
                        rd.close();                   
                        fileData = wr.toByteArray();
                        response.setContentType("application/msword");
                        OutputStream sos = response.getOutputStream();
                        sos.write(fileData);
                        sos.flush();
                        sos.close();                  
                    catch(Exception ex)
                        System.out.println(ex.getMessage());
                else
                    response.setContentType("text");
                    response.getWriter().write("no data");
            catch (Exception e)
                e.printStackTrace();       
    } I get the same results. i.e. The name of the document downloaded by the servlet is TestServlet.doc instead of BEA.doc which is what I have in c:\BEA.doc.

    The web browser downloading this knows nothing about the file you are loading from disk and sending via the servlet. All it knows is that it requested via Http on the url TestServlet, and is getting something in return.
    A quick google pulled up this link: http://builder.com.com/5100-6370-1027645.html
    You might try this:
    response.setHeader("Content-Disposition","inline;filename=\"BEA.doc\"");
    good luck,
    evnafets

  • Java PDK Bugs and Issues

    Here are some bugs and issues I've run across using the JPDK that I thought other
    developers should be aware of. The following information comes from using JPDK
    1.1 with Oracle Portal Version 3.0.6.3.3 Early Adopter on Windows 2000.
    1) Do not use a colon character (':') in the String value returned by the method getTitle( Locale l ) in the class Portlet. Registering the provider will appear to succeed, but when you view the Portlet Repository you will get the following error message:
    An Unhandled Exception has occurred. ORA-06502: PL/SQL: numeric or value error:
    character to number conversion error
    Your provider and its portlets will not appear in the Portlet Repository when this error occurs.
    Perhaps other characters will cause this error as well.
    2) The Provider class method initSession() is supposed to propagate the array of returned Cookies back to the browser. The Cookies are never propagated to the browser. This is a huge road-block for our application and we need to have this problem fixed as there is no workaround.
    3) There is a limit to the number of portlets you can have per provider. I initially wrote a provider class that managed 19 portlet classes. However, after registering the provider only 17 portlet classes were loaded by the provider and/or displayed by the Portlet Repository. I had to create a second provider to manage additional portlets. The second provider worked out fine for me because I have 5 portlets that are for "administrator" users only. Moving these portlets left 14 portlets for the first provider to manage.
    Note: I don't know if this error occurs using the provider.xml method of implementing a provider and its portlets. My provider and portlets are implemented directly using the Java class API's.
    4) Sometimes I will receive the error "Meta data missing for portlet ID=<number>" when a portlet is rendered for the first time. This error does not occur often but when the error happens two conditions are met:
    a) The portlet is being rendered for the first time
    b) The HTTP and Web Assistant NT services have recently been started.
    This error is obviously caused by some timeout but increasing the timeout values
    for both the provider and the portlet has no effect. This error may be restricted to the NT platform.
    The following notes are not bugs but issues to be aware of:
    1) Make sure you have the "sessiontimeout" parameter defined when declaring the initArgs of a servlet in the zone.properties file and you intend to register your provider with a "Login Frequency" of "Once per User Session". For example:
    servlet.urlservlet.initArgs=debuglevel=1,sessiontimeout=1800000
    If you leave off the session timeout, Oracle Portal will call your provider's initSession() method for every request constantly generating new a session ID.
    2) Currently there is no means to check whether a ProviderUser has administrative
    privileges. This feature would be extremely helpful for restricting which portlets a user has access to when the provider's getPortlets() method is called.
    3) Currently there is no Java API for storing user and global preferences in the
    Oracle database. The JPDK provides a PersonalizationManager class but the method
    of storing the preferences needs to be implemented by the developer.
    The default Personalization Manager persists user preferences as a file
    to disk. However, this method opens up security holes and hinders scaleability.
    We got around the security and scalability issues by using Oracle's JDBC
    driver to persist user and global preferences to custom tables in the underlying Oracle database.
    I would appreciate hearing from anyone who has run across the cookie propagation issue and has any further insights.
    Thanks...
    Dave White
    null

    David,
    Thank you for your feedback on the JPDK. The information you provide helps us understand how customers are using 9iAS
    Portal and its development kits. I apologize for the delay in getting back with you. Since you are using the Early Adopters
    release, we wanted to test a few of the bugs and issues on the production release of 9iAS Portal.
    1) Using a colon character (:) in the String value returned by the method getTitle(Locale l) returned the ORA-06502 error is a
    known issue. This issue actually occurs within 9iAS Portal and should be resolved in the first maintenance release scheduled
    for 9iAS Portal.
    Waiting on reply from Nilay on #1
    2) The Provider class method initSession() not propagating the array of returned cookies back to the browser is an issue that we are currently working on. This bug has been fixed for most cases in the first maintenance release. A 100% fix of this issue is still being worked on.
    3) The limit to the number of portlets you can have per provider was an issue in the Early Adopter release, but is no longer an issue with 9iAS Portal production. Upgrade to the production release and you should no longer see this problem.
    4) The error "Meta data missing for portlet ID=<number>". I have not seen or heard about others receiving this same message. For this error, can you upgrade to the production version and let me know if you still receive this error message. At that time we can check for differences within the configuration.
    Not bug, but issues......
    1) You have made a good point with the sessiontimeout parameter. The JPDK uses servlet 2.0 APIs which does not provide access to the sessiontimeout. Currently, you will need to specify the sessiontimeout parameter in the zone.properties file.
    2) This is true. Currently there is no means to check whether a ProviderUser has administrative privileges. This is on our features list for future enhancements.
    3) This is also true. The DefaultPortletPersonalizationManager was created as a default runtime for developers not used to writing portlet code. It allows developers to write portlet code without concentrating on the underlying framework. Once a developer becomes more experienced with the JPDK and portlet environment, we encourage them to create their own
    customization manager. This includes changing how the portlet repository is stored or changing how the user customization is
    handled and where it is stored. You have no limitations as long as you follow the guidelines of the PortletPersonalizationManager interface.
    I hope this information helped. Again, we appreciate and welcome this type of feedback, it helps us not only locate bugs and issues, but also helps prioritize our enhancement list.
    Sue

  • BUG: Oracle Java Compiler bug with anonymous inner classes in constructor

    The following code compiles and runs just fine using 1.4.2_07, 1.5.0_07 and 1.6.0_beta2 when compiling and running from the command-line.
    It does not run when compiling from JDeveloper 10.1.3.36.73 (which uses the ojc.jar).
    When compiled from JDeveloper, the JRE (both the embedded one or the external 1.5.0_07 one) reports the following error:
    java.lang.VerifyError: (class: com/ids/arithmeticexpr/Scanner, method: <init> signature: (Ljava/io/Reader;)V) Expecting to find object/array on
    stack
    Here's the code:
    /** lexical analyzer for arithmetic expressions.
    Fixes the lookahead problem for TT_EOL.
    public class Scanner extends StreamTokenizer
    /** kludge: pushes an anonymous Reader which inserts
    a space after each newline.
    public Scanner( Reader r )
    super( new FilterReader( new BufferedReader( r ) )
    protected boolean addSpace; // kludge to add space after \n
    public int read() throws IOException
    int ch = addSpace ? ' ' : in.read();
    addSpace = ch == '\n';
    return ch;
    public static void main( String[] args )
    Scanner scanner = new Scanner( new StringReader("1+2") ); // !!!
    Removing the (implicit) reference to 'this' in the call to super() by passing an instance of a static inner class 'Kludge' instead of the anonymous subclass of FilterReader fixes the error. The code will then run even when compiled with ojc. There seems to be a bug in ojc concerning references to the partially constructed object (a bug which which is not present in the reference compilers.)
    -- Sebastian

    Thanks Sebastian, I filed a bug for OJC, and I'll look at the Javac bug. Either way, OJC should either give an error or create correct code.
    Keimpe Bronkhorst
    JDev Team

  • Dreamweaver still encodes special characters in URL - Bug?

    Dreamweaver 6 is still encoding my special characters when I enter a URL through the control panel AND hit enter. When I paste the link in code view or just paste it in the control panel Link field without hitting Enter, no formatting occurs.
    I have the setting under Code Rewriting in Preferences set to "Do not encode special characters", but regardless the reformatting occurs whenever I hit enter in the Link field in the Control Panel.
    For example:
    The link I'm pasting in is a dynamic one and is set to %%DC%%
    If I just paste the link into the control panel then click elsewhere the link is set and no formatting occurs. If I paste it in, then hit Enter the URL changes to %Ü%%
    Is this a bug or am I doing something incorrectly?

    I just tried it and it's happening in both.
    How it's occuring to me:
    - Open a new or old document.
    - Type in a random set of letters, highlight, then click inside in the Link field on the Control Panel
    - Type %%DC%%
    - Click off the random set of letters, and in code view the Link is still set to %%DC%% (so far so good)
    Now if you click back onto the random letters that are now linked, you'll see that the URL in the Link field now changes to %Ü%%, but the actual link in Code View remains %%DC%%.
    - Now click inside the link field in the control panel, but don't type or change the URL.
    - Click somewhere else to move the cursor out of the control panel
    - The link is now set to %Ü%% in both Code View and in the control panel

  • Get Url BUG

    Well this is the problem. I am making a web page using both
    Flash8 and Dreamweaver 8.
    As always I am using a frameset, so i decided to make my menu
    on Flash. I already done it and my principal code is
    getUrl("site.htm","mainFrame");
    The problem or bug comes when i test it on my computer, I
    have flash player 9, whenever i open someting on my menu it sends
    me to a new blank window, i dont know if this is normal because
    when i try it on a computer with flash palyer 6, it does go to my
    mainFrame.
    And i just upload it, and i test it again, and guess what
    hapenned, It worked, it did went to my mainFrame.
    So i just want help because some people want the webpage on
    cd, and it wont work!!!

    Hi,
    I managed to get the URL Get HTTP Document.vi from the ITK to download .tiff files (to save them to a hard-drive location) from a connected device in LV2012 32-bit.
    But now I need to transfer this code over to a computer unsing LV2012 64-bit, hence no ITK - has anyone made/got a VI that will do the job of "URL Get HTTP Document.vi", without the need for the ITK libraries, in LabVIEW 2012 64-bit? Or can show me a way of doing this, with relative ease?
    Many thanks!

  • How to work around the java runtime bug -The indentation is overridden

    Hello all,
    I generate xml from a servlet and stream to client as the following code. It works fine in my local machine (The xml is indented nicely) but when the war file deployed on a geronimo server 2.0.2. (It uses java 1.5.0_16). The xml streamed out without indentation
                   response.setContentType("application/xml");
                   response.setHeader("Content-disposition","attachment; filename="+fileName);
                   // set up a transformer
                   TransformerFactory transfac = TransformerFactory.newInstance();
                   Transformer trans = transfac.newTransformer();
                   trans.setOutputProperty(OutputKeys.METHOD, "xml");                
                   trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                   trans.setOutputProperty(OutputKeys.STANDALONE, "yes");
                   trans.setOutputProperty(OutputKeys.VERSION, "1.0");
                   trans.setOutputProperty(OutputKeys.INDENT, "yes");
                   trans.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
                   // create string from xml tree
                   DOMSource source = new DOMSource(doc);
                   ServletOutputStream os = response.getOutputStream();
                   OutputStreamWriter w = new OutputStreamWriter(os, "UTF-8");
                   StreamResult result = new StreamResult();          
                   result.setWriter(w);
                   trans.transform(source, result);This is the bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6337981 (The indentation is overridden)
    I tried the work around suggested there by using OutputStreamWriter, it doesn't help.
    (I cannot change anything on the server. I have to accept whatever in the server)
    Please help
    Thank you
    Edited by: mycoffee on Jun 10, 2011 8:16 AM

    You have to set the indent level on the factory, see bug #6296446. This only affects 1.5; 1.6 allows you to set the indent level on the transformer, as you did (and for cross-version compatibility, setting it on both doesn't hurt).
    transfac.setAttribute("indent-number", Integer.valueOf(4));

  • Reinstall JAVA Environment BUG 1955536

    We have to migrate a production database from 8.1.6 to 8.1.7.
    The new environment should include the XML Parser.
    So we found that when you go into problems with installation of
    JVM it's not possible to remove the JVM by rmjvm.sql
    BUG 1955536.
    Oracle suggestion: Rebuild your database.
    Is it realy true ?
    is anybody expierenced with removing JVM?
    Thanks.

    You need to uninstall jre too. After uninstalling it, delete the files in program files\java and again install j2sdk1.3.

  • Java url POST request

    Hello!
    I need to access some information on a website but it requires login. I made some code but it doesn't work. The website is "www.sapo.pt" but the page source doesn't show the html form, so I have to use "http://pkgadmin.sapo.pt/xmlstyler.asp?post_action=%2Fcgi%2Fpkgadmin2-pca%2Fpca%2FLogin.tea&parOrg=SAPOADSL"
    The html form is:
    <form action="content.htm" method="post">
    <table cellspacing="0" cellpadding="0" width="576" height="150" border="0" align="center">
    <tr>
    <td valign="top" width="320" class="mosaico_login">
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
    <td valign="top">
    <div style="height:10px"><img alt="" src="newlayout2/images/shim.gif" width="1" height="10" hspace="0"></div>
    <div class="mosaico_title">username</div>
    <div><input type="hidden" name="n322" value="526"><input name="IteaComponent129523" type="text" class="mosaico" style="width:150px;" size="20" maxlength="40" id="IteaComponent2"></div>
    <div style="height:4px"><img alt="" src="newlayout2/images/shim.gif" width="1" height="4" hspace="0"></div>
    <div class="mosaico_title">password</div>
    <div><input name="IteaComponent129524" type="password" class="mosaico" style="width:150px;" size="20" maxlength="40"></div>
    <div style="height:4px"><img alt="" src="newlayout2/images/shim.gif" width="1" height="4" hspace="0"></div>
    <div align="right">
    <table>
    <tr><!--Actions de um Form--><Input type="hidden" name="post_action" value="/cli/pkgadmin2-pca/public/Action.tea"><!--Hidden Parameters--><Input type="hidden" name="parIteaActionId" value="1341135264-1"><Input type="hidden" name="parITeaFormName" value="IteaForm129522"><td><input onmouseover="MM_swapImage('validate','','NewLayout2/images/bt_entrar_on.gif',1)" onmouseout="MM_swapImgRestore()" type="image" height="35" width="28" src="NewLayout2/images/bt_entrar_off.gif" align="right" border="0" id="validate" name="validate"></td>and this is the code I made:
              String inputNameUser;
              String inputNamePass;
              String inputLine = "";
              StringBuffer dummyLine = new StringBuffer(1024);
              int pos, firstpos = 0;
              try {
                   URL ispPage = new URL("http://pkgadmin.sapo.pt/xmlstyler.asp?post_action=%2Fcgi%2Fpkgadmin2-pca%2Fpca%2FLogin.tea&parOrg=SAPOADSL");
                   URLConnection ispPageConnection = ispPage.openConnection();
                   BufferedReader in = new BufferedReader(new InputStreamReader(ispPageConnection.getInputStream()));
                           //this while block is because names, for the user and password field on the input tags, changes
                   while((inputLine = in.readLine())!=null)
                        if((pos = inputLine.indexOf("IteaComponent"))>-1)
                             firstpos = pos;
                             if((pos = inputLine.indexOf("type", pos+1)) >-1)
                                  dummyLine.append(inputLine.substring(firstpos, pos-2));
                   int len = dummyLine.length();
                   inputNameUser = dummyLine.substring(0, len/2);
                   inputNamePass = dummyLine.substring(len/2, len);
                   URL ispLogin = new URL(ispPage, "/content.htm");
                   HttpURLConnection ispConnection = (HttpURLConnection)ispLogin.openConnection();
                   ispConnection.setDoOutput(true);
                   ispConnection.setDoInput(true);
                   ispConnection.setUseCaches (false);
                   ispConnection.setRequestMethod("POST");
                   ispConnection.setRequestProperty("Content-type", "application/x-www-form-urlencoded");
                   //ispConnection.setRequestProperty("Connection", "Keep-Alive");
                   //ispConnection.setRequestProperty("Keep-Alive", "header");
                   DataOutputStream outDataForm = new DataOutputStream(ispConnection.getOutputStream());
                   String user = URLEncoder.encode("something@sapo", "UTF-8");
                   String password = URLEncoder.encode("999999", "UTF-8");
                   String content = inputNameUser+"=" + user +"&"+inputNamePass+"=" + password;
                   System.out.println(content);
                   outDataForm.writeBytes(content);
                   outDataForm.flush();
                   System.out.println(ispConnection.getResponseCode());
                   outDataForm.close();
                   BufferedReader inData = new BufferedReader(new InputStreamReader(ispConnection.getInputStream()));
                   while((inputLine = inData.readLine()) != null)
                        System.out.println(inputLine);
                   inData.close();
              catch(MalformedURLException e){}
              catch(IOException ioe){System.out.println("Error");}
               the result prints 404 for the response code, and nothing is printed on the inData stream. this stream seems to cause an IOException.
    Any kind of help will be appreciated.
    Thanks in advance.
    P.S sorry for the bad english

    Crosspost!
    http://forum.java.sun.com/thread.jspa?messageID=10095495

  • Quicktime Java install bug?

    I've been trying to run this Java app that runs on pretty much every other Windows XP machine except mine; on my machine the app starts and then whines about something on the classpath: QTJava.zip. My machine happens to be the only that I've tried that has QT7 on it, in fact I've installed, uninstalled, and reinstalled QT7. I read on a mailing list that:
    "You can't just download QTJava.zip and put it into your classpath. You need to reinstall Quicktime to enable Quicktime for Java. If
    you just put QTJava.zip you will still get errors about your classpath, even though it's correct - that's because QTJava needs a dll to be installed and some stuff in the registry."
    It looks like the QT7 installer or uninstaller didn't do something correctly because my QT7 install seems to work fine although this is the first time I've ever had this bug and I've had QT on my machine for over a year. Has anybody else's classpath been infected by this bug?

    I do have the same problem did you find something about it?

  • How to change WebAs Java URL with which it is called

    hi all,
    I am trying to activate the standard web templated for integration between BI 7.0 and EP 7.0 to execute the BEx report in Web.
    I am getting the following error:
    <b>The URL for ABAP customising table RSPOR_T_PORTAL : http://eimreymdd0.eimskip.net:50000 is not compatible with the URL  with which you call the WebAS Java : http://eimreymdd0:50000</b>
    Now, I want to change the URL of WebAS Java with which it is called.I want to change http://eimreymdd0:50000  to http://eimreymdd0.eimskip.net:50000
    How can I change this ? I want to know the location through which I can change this URL.
    Thanks in advance for your suggestion.
    Best Regards,
    Yogesh

    Hi Yogesh,
    I think you need to change you DNS server mapping.
    You can also try to change to virtual hosts property in the UME
    i.e.
    http://<host name>:<portnumber>/nwa
    Under System Management --> Configuration
    you'll find the virtual hosts.
    Regards,
    Prashil

  • Java VM bug?

    Dear all,
    I have observed this instance where my JVM implementation behaves in
    a manner that appears inconsistent.
    The following lines of code all compile:
    long a = Long.parseLong("5L");
    Long a1 = new Long("5L");
    Long a2 = Long.valueOf("5L");
    float b = Float.parseFloat("5f");
    Float b1 = new Float("5f");
    Float b2 = Float.valueOf("5f");
    However, at run time a NumberFormatException is thrown at every
    one of the first three lines because the JVM does not accept the suffix
    "L" in a String number description.
    Ok, fair enough!
    But why is that rule not enforced for the Float class ( the next three
    lines of code do not throw any exceptions, which shows that in this
    case the suffix "f" is recogined in the String for what it is)?
    Is this a bug or inconsistency?
    Or is there a good reason for it?
    Thanks
    Jorge

    In the code of java.lang.FloatingDecimal you can find:
              * We parsed everything we could.
              * If there are leftovers, then this is not good input!
             if ( i < l &&
                    ((i != l - 1) ||
                    (in.charAt(i) != 'f' &&
                     in.charAt(i) != 'F' &&
                     in.charAt(i) != 'd' &&
                     in.charAt(i) != 'D'))) {
                    break parseNumber; // go throw exception
                }

  • Java in Bug Toolkit

    Has the Java functionality in Bug Toolkit affected your search capabilities when searching for bugs?

    have u copied soure files to src folder
    and defined midlet and it's class under seetings tab?

Maybe you are looking for

  • My HP Officejet Pro 8600 Plus printer will not recognize my wireless router passwrd

    My printer was working fine but when I turned it on today it wouldn't connect to my wireless router. I try inputing the correct password and the printer gives me this message......"the WPA security passphrase configured on your HP printer does not ma

  • TCP/IP settings for airport card

    ok, first off...please take it easy on me...i'm a windows guy but am close to purchasing a mac for my girlfriend and also have an iPhone so please understand that i love macs, just don't know too much about them..yet i have a need to set TCP/IP setti

  • Help!!! Content engine

    my configuration is follow the attached file. I don't know what is wrong with my content engine using as a cache server. when i connect this CE to my network, i can make my user access to the internet fast only 2 days, but after 2 days it makes my us

  • Right Click open with on Elements 13

    Not a huge biggie, but I've updated to PSE13 (Loving the improvements, especially the undo feature; and the stability of PSE13 compared to 12 [for Mac that is] ) I'm running Mavericks OS X 10.9.5. My camera a Panasonic Lumix FZ1000 (great camera by-t

  • Issues with video in Flash (pauses, interactivity, etc)

    Hi. I hope someone can help me out with this. I have a rendered video sequence that consists of an intro, a section that is intended to loop indefinitely, and a conclusion. The intention is that I bring the three clips into Flash, have the first one