Serving static pages from a web application

          My weblogic environment is a a front end proxy server (httpclusterservlet or apache) for
          session failover and static page serving, and a weblogic server. I have built my application as a
          web application creating a .WAR file which is deployed on the weblogic server (and defined in the
          weblogic.properties file). The problem is static pages in the web app cannot be found (because
          they are jar'ed up in the .WAR file). Am I missing something here? Has anyone encounter a similar
          problem?
          Mike
          

          I have done that! The problem is FileServlet cannot read a WAR file.
          "Cameron Purdy" <[email protected]> wrote:
          >Place them in the root of the WAR.
          >
          >Peac
          >
          >--
          >Cameron Purdy
          >Tangosol, Inc.
          >http://www.tangosol.com
          >+1.617.623.5782
          >WebLogic Consulting Available
          >
          >
          >"mwofford" <[email protected]> wrote in message
          >news:3a26ded6$[email protected]..
          >>
          >> My weblogic environment is a a front end proxy server (httpclusterservlet
          >or apache) for
          >> session failover and static page serving, and a weblogic server. I have
          >built my application as a
          >> web application creating a .WAR file which is deployed on the weblogic
          >server (and defined in the
          >> weblogic.properties file). The problem is static pages in the web app
          >cannot be found (because
          >> they are jar'ed up in the .WAR file). Am I missing something here? Has
          >anyone encounter a similar
          >> problem?
          >>
          >> Mike
          >
          >
          

Similar Messages

  • Copy a publishing page from one Web Application to another

    can we copy a publishing page from one web application to another. 
    If we download a copy from pages library of one web application and upload it to another library of other Web application.
    Once uploaded it came up with an error "This page is not using a valid page layout.  To correct the problem, edit page settings and select a valid page layout.".

    It seems like the page layout is missing in target location. Check similar thread below to solve the issue
    http://social.msdn.microsoft.com/Forums/en-US/99c24657-0297-4a5c-8600-467bb6ea57d6/this-page-is-not-using-a-valid-page-layout-to-correct-the-problem-edit?forum=sharepointdevelopmentprevious
    shipoint.com/2014/03/28/fixing-this-page-is-not-using-a-valid-page-layout-to-correct-the-problem-edit-page-settings-and-select-a-valid-page-layout-error-in-sharepoint-2010/
    My Blog- http://www.sharepoint-journey.com|
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

  • Is it possible to access Pages from an web application running in Safari in i-Pad?

    Is it possible to access Pages application from an web application running on safari browser in iPad ?

    Since you control the application AND the plugin - you can define ANY method of communication you want.  Shared files, shared memory, IPC, named pipes, etc.

  • Calling a separate BSP Page from a Web Application Builder BPS page.

    I have been creating a basic BPS application for manually entering data into BW.
    We are allowing users 2 options: 
    1. Manual Data entry via a web Page created in the Web Interface Builder.
    2. Via a Flat File using the process described in the "How To" Guide on how to load a flat file into BPS Web Page.  This was done in the Mime repository via a BSP application (transaction se80).
    I want to incorporate both method on a single web page (or group of linked pages) so that the user can choose which method that they want to use.
    My question is: How can I call the flat file loading screen (created in se80) from the Manual data entry screen that was created in Web Interface Builder?
    Thanks,
    Adam

    Adam,
    You dont have to create a new tab also. You can incorporate the newly created BSP page
    below the Manual Entry layout. Do the following step
    1. Create a text element below the layout in web application builder. Choose Edit long text
    2.insert this code
    <iframe id="Text86" border="true" name="upload4" src="/sap/bw/mime/bex/icons/pixel.gif" width="580" height="65"></iframe>
    <script language="JavaScript" type="text/javascript">
      var frame  = document.getElementById( 'Text86' );
      var url    = '/sap/bc/bsp/sap/z100bps001/upload_hours.htm';
    // set source attribute of iframe to new URL
      frame.src = url;
    </script>
    Now you should be able to the see the newly created BSP page below your layout.
    Coming to your other question on "hard coding" the answer is you shouldnt specify the absolute url, just specify the relative URL and system will take care of the rest.
    Eg. - '/sap/bc/bsp/sap/z100bps001/upload_hours.htm'
    Let me know if you need any help.
    Thanks,
    Praveen
    PS.Dont forget to reward points

  • How do i Hyperlink to a web page from a java application?

    How do i Hyperlink to a web page from a java application using internet explorer as my default web browser?

    It's very simple.You can start any Application with the class Runtime. The command is an array consisting of the path of .exe and the file to be open.
    String [] cmd={path of IE+Filename.exe,"URL of your website"}
    try
    Runtime.getRuntime().exec(cmd);
    catch (Exception e)
    System.err.println(e.toString());
    }

  • How can WLS use JSP pages in a Web Application witth just a JRE [Web Application, WAR, JSP, weblogic.jsp.pageCheckSeconds and JRE]

              How can WLS use JSP pages in a Web Application (either a .war file or a war directory structure) without a java compiler?
              I suspect either the JSP specification is flawed (i.e. it doesn't take account of servers using just a JRE), or BEA's implementation is broken.
              Production servers do not have a JDK installed. They only have a JRE. Therfore a java compiler is not present on the machine that the Web Application is deployed onto.
              On the development machine, when the server is requested to load the JSP it creates a tmpwar directory within the Web Application directory structure. This is then included in the resultant .war file thus:
              D:\war>jar -tf gmi.war
              META-INF/
              META-INF/MANIFEST.MF
              gmiService.jsp
              WEB-INF/
              WEB-INF/classes/
              WEB-INF/classes/com/
              WEB-INF/classes/com/bt/
              WEB-INF/classes/com/bt/gmi/
              WEB-INF/classes/com/bt/gmi/gmiService.class
              WEB-INF/getList.xsl
              WEB-INF/getListByConnection.xsl
              WEB-INF/getListByDistrict.xsl
              WEB-INF/getListByDistrictConnection.xsl
              WEB-INF/lib/
              WEB-INF/source/
              WEB-INF/source/build.bat
              WEB-INF/source/gmiService.java
              WEB-INF/web.xml
              WEB-INF/weblogic.xml
              tmpwar/
              tmpwar/jsp_servlet/
              tmpwar/jsp_servlet/_gmiservice.class
              tmpwar/jsp_servlet/_gmiservice.java
              When deployed on the production server with the web.xml file set to use the following values (note XML stripped):
              weblogic.jsp.pageCheckSeconds
              -1
              weblogic.jsp.precompile
              false
              weblogic.jsp.compileCommand
              javac
              weblogic.jsp.verbose
              true
              weblogic.jsp.packagePrefix
              jsp_servlet
              weblogic.jsp.keepgenerated
              false
              And in the weblogic.properties file:
              weblogic.httpd.webApp.gmi=war/gmi
              I've also tried with the .war file, but that insists on creating another tmpwar directory outside of the .war file.
              Then, although I have set pageCheckSeconds to -1 (don't check and don't recompile) ter production server still attempts to recompile the JSP's:
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param verbose initialized to: true
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param packagePrefix initialized to: jsp_servlet
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param compileCommand initialized to: javac
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param srcCompiler initialized to weblogic.jspc
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param superclass initialized to null
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param workingDir initialized to: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param pageCheckSeconds initialized to: -1
              Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: initialization complete
              Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java file: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java
              Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java failed: Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
              java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[javac, -classpath, /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4boot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudscape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/weblogic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/wls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, -d, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java])
              at java.lang.Throwable.fillInStackTrace(Native Method)
              at java.lang.Throwable.fillInStackTrace(Compiled Code)
              at java.lang.Throwable.<init>(Compiled Code)
              at java.lang.Exception.<init>(Compiled Code)
              at java.io.IOException.<init>(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:187)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:142)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              at weblogic.kernel.ExecuteThread.run(Compiled Code)
              

    The default Java compiler from sun lives in the tools.jar that comes with
              the JDK. Just add that to your set of JARs which are deployed in production
              and you should be fine. No need to install the full JDK - just make the
              tools.jar available to WebLogic.
              Regards
              James
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              "Martin Webb" <[email protected]> wrote in message
              news:[email protected]...
              >
              > How can WLS use JSP pages in a Web Application (either a .war file or a
              war directory structure) without a java compiler?
              >
              > I suspect either the JSP specification is flawed (i.e. it doesn't take
              account of servers using just a JRE), or BEA's implementation is broken.
              >
              > Production servers do not have a JDK installed. They only have a JRE.
              Therfore a java compiler is not present on the machine that the Web
              Application is deployed onto.
              >
              > On the development machine, when the server is requested to load the JSP
              it creates a tmpwar directory within the Web Application directory
              structure. This is then included in the resultant .war file thus:
              >
              > D:\war>jar -tf gmi.war
              > META-INF/
              > META-INF/MANIFEST.MF
              > gmiService.jsp
              > WEB-INF/
              > WEB-INF/classes/
              > WEB-INF/classes/com/
              > WEB-INF/classes/com/bt/
              > WEB-INF/classes/com/bt/gmi/
              > WEB-INF/classes/com/bt/gmi/gmiService.class
              > WEB-INF/getList.xsl
              > WEB-INF/getListByConnection.xsl
              > WEB-INF/getListByDistrict.xsl
              > WEB-INF/getListByDistrictConnection.xsl
              > WEB-INF/lib/
              > WEB-INF/source/
              > WEB-INF/source/build.bat
              > WEB-INF/source/gmiService.java
              > WEB-INF/web.xml
              > WEB-INF/weblogic.xml
              > tmpwar/
              > tmpwar/jsp_servlet/
              > tmpwar/jsp_servlet/_gmiservice.class
              > tmpwar/jsp_servlet/_gmiservice.java
              >
              > When deployed on the production server with the web.xml file set to use
              the following values (note XML stripped):
              >
              > weblogic.jsp.pageCheckSeconds
              > -1
              >
              > weblogic.jsp.precompile
              > false
              >
              > weblogic.jsp.compileCommand
              > javac
              >
              > weblogic.jsp.verbose
              > true
              >
              > weblogic.jsp.packagePrefix
              > jsp_servlet
              >
              > weblogic.jsp.keepgenerated
              > false
              >
              >
              > And in the weblogic.properties file:
              >
              > weblogic.httpd.webApp.gmi=war/gmi
              >
              > I've also tried with the .war file, but that insists on creating another
              tmpwar directory outside of the .war file.
              >
              >
              > Then, although I have set pageCheckSeconds to -1 (don't check and don't
              recompile) ter production server still attempts to recompile the JSP's:
              >
              >
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              verbose initialized to: true
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              packagePrefix initialized to: jsp_servlet
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              compileCommand initialized to: javac
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              srcCompiler initialized to weblogic.jspc
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              superclass initialized to null
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              workingDir initialized to:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
              pageCheckSeconds initialized to: -1
              > Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp:
              initialization complete
              > Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java
              file:
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java
              > Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java failed: Exception in thread "main" java.lang.NoClassDefFoundError:
              sun/tools/javac/Main
              >
              > java.io.IOException: Compiler failed
              executable.exec([Ljava.lang.String;[javac, -classpath,
              /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:
              /opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4bo
              ot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudsc
              ape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/web
              logic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/
              5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib
              /weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses
              :/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer
              /weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/w
              ls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiSe
              rver/weblogic/war/gmi/_tmp_war, -d,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war,
              /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
              java])
              > at java.lang.Throwable.fillInStackTrace(Native Method)
              > at java.lang.Throwable.fillInStackTrace(Compiled Code)
              > at java.lang.Throwable.<init>(Compiled Code)
              > at java.lang.Exception.<init>(Compiled Code)
              > at java.io.IOException.<init>(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
              > at
              weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
              > at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
              > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
              > at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
              7)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :118)
              > at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :142)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:744)
              > at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
              l.java:692)
              > at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
              Manager.java:251)
              > at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
              > at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
              > at weblogic.kernel.ExecuteThread.run(Compiled Code)
              >
              >
              >
              

  • Speed of weblogic serving static pages

    Has anyone seen fairly slow page serving (measured from the end-user's
    point of view) for weblogic 4.5? Even when the system isn't hardly
    loaded at all, we have users complain about slow response times. The
    consensus is the stuff running on WebLogic is slower to appear than the
    rest of the web. We're using servlets, and jsp's. Of course this is
    hard to quantify and isolate, but we'd like to hear if others have moved
    to something like Netscape on the front end because it serves images
    faster?
    david
    David Michaels <[email protected]>
    Director of Technology
    ShockMarket Corporation (650) 330-4665
    [david.vcf]

    We had similar problems when running ejbs and jsps from the same weblogic
    server. Images load very slow. I recommend seperating your jsp server from
    your ejb server. Run two instances of weblogic, one for jsps and one for
    ejbs. In addition, you can use hardware routers that can filter by requests
    such as an alteon or f5 to route requests for images to an image server
    (apache), and all jsp requests to weblogic.We use this configuration and
    have great load times.
    "bpp" <[email protected]> wrote in message
    news:[email protected]..
    David,
    We have found the performance to be better when you serve static pages and
    images from another webserver (Netscape iPlanet). The weblogic webserver
    appears to have a diffucult time delivering images in a timely fashion. It
    also takes away from Weblogic responding to EJB requests.
    Brian Pause
    Tallan
    David Michaels wrote:
    Has anyone seen fairly slow page serving (measured from the end-user's
    point of view) for weblogic 4.5? Even when the system isn't hardly
    loaded at all, we have users complain about slow response times. The
    consensus is the stuff running on WebLogic is slower to appear than the
    rest of the web. We're using servlets, and jsp's. Of course this is
    hard to quantify and isolate, but we'd like to hear if others have moved
    to something like Netscape on the front end because it serves images
    faster?
    david
    David Michaels <[email protected]>
    Director of Technology
    ShockMarket Corporation (650) 330-4665

  • IMAP/SSL: problem connecting from a web application

    Hi,
    I try to connect to a IMAP/SSL server (with a self-signed certificate) from a web application. I followed http://www.javaworld.com/javatips/jw-javatip115.html.
    When I try to connect from a java application it works fine. But when I try it from a servlet, it fails:
    javax.mail.MessagingException: gaeron.gcrm.test.mail.DummySSLSocketFactory;
      nested exception is:
         java.net.SocketException: gaeron.gcrm.test.mail.DummySSLSocketFactory
         at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:461)
         at javax.mail.Service.connect(Service.java:236)I use Tomcat 5.5, jdk1.5.0_06 and javamail-1_3_3_01. Here is my code:
              Security.setProperty( "ssl.SocketFactory.provider", "gaeron.gcrm.test.mail.DummySSLSocketFactory");
    Properties props = new Properties();
    Session session = Session.getDefaultInstance(props);
    Store store = session.getStore("imaps");
    store.connect(server, 993, username, password);
    store.close();Can anybody help me?
    Thanks,
    El&#337;d.

    I am not sure there is a class called MBoxSSLFactory. Is that a typo? We are in the same boat. We have a web application running on Tomcat that needs to connect to the IMAP store on the MS Exchange 2003 Server. It was working fine until we enabled Basic Authentication - SSL/TLS required setting on it.
    In order to eliminate any complications due to Tomcat and all we are trying to get a simple standalone program that talks to IMAP server (using the DummySSLSocketFactory, DummyTrustManager etc) working.
    I am stuck on the same error: (shown below is the stack trace and the code we are running). I have tried all the suggestions that have been posted on this "Unconnected Sockets not implemented" issue. I have tried it with both Jdk 1.4.2_08 and JDK 1.5.0.
    The JavaMail version is 1.4. If I use JavaMail version 1.3.1 it complains that there is no store type "imaps". If I use "imap" and not "imaps" as the store type I end up getting "Authentication Failed" exception.
    Instead of a DummyTrustManager I even tried importing a certificate. We have deployed a Verisign trial certificate on the EXchange server side. So when we run the InstallCert program (http://blogs.sun.com/andreas/entry/no_more_unable_to_find) it allows us to add the valid certificates to our keystore. Once that is done we have tried to create TrustManager based on that keystore. But NOPE..No success. same problem.
    We have been stuck on this one for the last 4 days and we have a very critical client deployment that is hampered by this one. I know it is turkey time now..but would really appreciate it if some one can help us out.
    javax.mail.MessagingException: Unconnected sockets not implemented;
      nested exception is:
         java.net.SocketException: Unconnected sockets not implemented
         at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)
         at javax.mail.Service.connect(Service.java:297)
         at javax.mail.Service.connect(Service.java:156)
         at javax.mail.Service.connect(Service.java:105)
         at GetSSLMail.getmail.main(getmail.java:37)
    Caused by: java.net.SocketException: Unconnected sockets not implemented
         at javax.net.SocketFactory.createSocket(SocketFactory.java:97)
         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:224)
         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
         at com.sun.mail.iap.Protocol.<init>(Protocol.java:84)
         at com.sun.mail.imap.protocol.IMAPProtocol.<init>(IMAPProtocol.java:87)
         at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:446)
         ... 4 more
    package GetSSLMail;
    /* getmail.java */
    import java.util.Properties;
    import javax.mail.*;
    //import javax.mail.internet.*;
    import java.io.*;
    public class getmail {
         //myauth auth;
         public static void main(String args[]) throws Exception {
              String host, name, passwd;
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              System.out.println("Enter IMAP Host Name: ");
              host = br.readLine();
              System.out.println("Enter User name: ");
              name = br.readLine();
              System.out.println("Enter Password: ");
              passwd = br.readLine();
              java.security.Security.setProperty("ssl.SocketFactory.provider","DummySSLSocketFactory");
              // Get a Properties object
              Properties props = System.getProperties();
              props.put("mail.imaps.host", host);
              props.put("mail.imaps.port", "993");
              Authenticator auth = new myauth(name, passwd);
              Session session = Session.getDefaultInstance(props, auth);
              Store store = session.getStore("imaps");
              try {
                   store.connect(); // exception here
                   System.out.println("store connected");
              } catch (Exception e) {
                   //System.out.println("Error :" + e.toString());
                   e.printStackTrace();
              Folder folder = null;
              try {
                   folder = store.getFolder("INBOX"); // because of earlier exception,
                                                                // also
                   // exception here
              } catch (Exception e) {
                   System.out.println("Error :" + e.toString());
              folder.open(Folder.READ_ONLY);
              BufferedReader reader = new BufferedReader(new InputStreamReader(
                        System.in));
              Message message[] = folder.getMessages();
              for (int i = 0, n = message.length; i < n; i++) {
                   System.out.println(i + ": " + message.getFrom() + "\t"
                             + message[i].getSubject());
                   System.out
                             .println("Do you want to read message? [yes to read/quit to end]");
                   String line = reader.readLine();
                   if ("yes".equals(line)) {
                        System.out.println(message[i].getContent());
                   } else if ("QUIT".equals(line)) {
                        break;
         class myauth extends Authenticator {
              String username, password;
              public myauth(String name, String passwd) {
                   username = name;
                   password = passwd;
              public PasswordAuthentication getPasswordAuthentication() {
                   return new PasswordAuthentication(username, password);
    package GetSSLMail;
    import java.io.BufferedInputStream;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.security.KeyStore;
    import javax.net.SocketFactory;
    import javax.net.ssl.*;
    * DummySSLSocketFactory
    public class DummySSLSocketFactory extends SSLSocketFactory {
    private SSLSocketFactory factory;
    SSLContext sslcontext;
         TrustManagerFactory tmf;
         KeyStore ks;
    public DummySSLSocketFactory() {
         try {
    // try
              ks = KeyStore.getInstance("jks");          
              InputStream in = new FileInputStream("C:\\Documents and Settings\\kk12\\jssecacerts");
              in = new BufferedInputStream(in);
              ks.load(in,null);
              tmf = TrustManagerFactory.getInstance("PKIX");
              tmf.init(ks);
              sslcontext = SSLContext.getInstance("SSL");
              sslcontext.init(null, tmf.getTrustManagers(), null);
              HttpsURLConnection.setDefaultSSLSocketFactory(sslcontext.getSocketFactory());
         //SSLContext sslcontext = SSLContext.getInstance("TLS");
         //sslcontext.init(null,new TrustManager[] { new DummyTrustManager()},null);
         factory = (SSLSocketFactory)sslcontext.getSocketFactory();
         } catch(Exception ex) {
         // ignore
    public static SocketFactory getDefault() {
         return new DummySSLSocketFactory();
    public Socket createSocket(Socket socket, String s, int i, boolean flag)
                        throws IOException {
         return factory.createSocket(socket, s, i, flag);
    public Socket createSocket() throws IOException {
              System.out.println( "createSocket 0");
              return factory.createSocket();
    public Socket createSocket(InetAddress inaddr, int i,
                        InetAddress inaddr1, int j) throws IOException {
         return factory.createSocket(inaddr, i, inaddr1, j);
    public Socket createSocket(InetAddress inaddr, int i)
                        throws IOException {
         return factory.createSocket(inaddr, i);
    public Socket createSocket(String s, int i, InetAddress inaddr, int j)
                        throws IOException {
         return factory.createSocket(s, i, inaddr, j);
    public Socket createSocket(String s, int i) throws IOException {
         return factory.createSocket(s, i);
    public String[] getDefaultCipherSuites() {
         return factory.getDefaultCipherSuites();
    public String[] getSupportedCipherSuites() {
         return factory.getSupportedCipherSuites();
    package GetSSLMail;
    //import com.sun.net.ssl.X509TrustManager;
    import java.security.cert.X509Certificate;
    import javax.net.ssl.TrustManager;
    public class DummyTrustManager implements TrustManager {
         public boolean isClientTrusted( X509Certificate[] cert) {
         return true;
         public boolean isServerTrusted( X509Certificate[] cert) {
         return true;
         public X509Certificate[] getAcceptedIssuers() {
         return new X509Certificate[ 0];

  • Capture an image using the web camera from a web application

    Hi All,
    Could anyone please share the steps what have to be followed for capture an image using the web camera from a web application.
    I have a similar requirement like this,
    1) Detect the Webcam on the users machine from the web application.(To be more clear when the user clicks on 'Add Photo' tool from the web application)
    2) When the user confirms to save, save the Image in users machine at some temporary location with some unique file name.
    3) Upload the Image to the server from the temporary location.
    Please share the details like, what can be used and how it can be used etc...
    Thanks,
    Suman

    1) Detect the Webcam on the users machine from the web application.(To be more clear when the user clicks on 'Add Photo' tool from the web application)There's not really any good way to do this with JMF. You'd have to somehow create a JMF web-start application that will install the native JMF binaries, and then kick off the capture device scanning code from the application, and then scan through the list of devices found to get the MediaLocator of the web cam.
    2) When the user confirms to save, save the Image in users machine at some temporary location with some unique file name.You'd probably be displaying a "preview" window and then you'd just want to capture the image. There are a handful of ways you could capture the image, but it really depends on your situation.
    3) Upload the Image to the server from the temporary location.You can find out how to do this on google.
    All things told, this application is probably more suited to be a FMJ (Freedom for Media in Java) application than a JMF application. JMF relies on native code to capture from the web cams, whereas FMJ does not.
    Alternately, you might want to look into Adobe Flex for this particular application.

  • How to call a report from a web application

    Hi,
    I have a web server in wich is installed Reports 6i. My question is how can I call reports 6i to generate a pdf using a .rep file from my web application (built with java)?

    Hi,
    The below link will be very useful for one who need idea on calling Oracle Report from Java Application,
    http://www.oracle.com/technology/products/reports/htdocs/getstart/examples/reportswebservice/index.html
    Thanks & Rgds,
    M T

  • Webservice call to XI Interface through SOAP Adapter from a Web application

    I  am getting  the following error, when I try to call the XI Interface using soap adapter from a web application.
    ERROR  :
    SystemError:
              <context>XIAdapter</context>
              <code>ADAPTER.JAVA_EXCEPTION</code>
              <text><![CDATA[
    com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException
    at some time i am getting the following error.
    faultCode: HTTP
    faultSubcode:
    faultString: (500)Internal Server Error
    faultActor:
    faultNode:
    faultDetail:
         {}:return code:  500
    &lt;SAP:Error&gt;&lt;SAP:Category&gt;XIServer&lt;/SAP:Category&gt;&lt;SAP:Code&gt;RCVR_DETERMINATION.NO_RECEIVER_CASE_BE&lt;/SAP:Code&gt;&lt;SAP:Stack&gt;No receiver could be determined&lt;/SAP:Stack&gt;&lt;/SAP:Error&gt;
         HttpErrorCode:500
    (500)Internal Server Error
    can any of  one help to resolve this.
    Thanks  in advance

    Ganie
    You are getting the exception at very first point of Pipeline Service i.e Receiver Determination, do compare the namespace, Sender Interface Name & Sender Service name with the payload you are sending from web-application, they must be exactly same.
    The best way to get the test payload is suggested in above reply.

  • Issue with member move, change or delete from Planning web application

    Hi
    We need to make some basic editing (move, change or delete) of level 0 members of the cost center dimension from Planning web application instead of from essbase database outline. But everytime, we tried from the web Admininstration/Dimension drill down and did a Cut or Delete of a base member, the screen either becomes blank or hangs. And we would have to stop and restart the Planning web application server to bring it back.
    Is this a bug or is there something we missed? We are using Planning 4.0.1 and essbase 7.1.1. Any advice on workaround is greatly appreciated. Thanks.

    Hi,
    Have you tried running the planning server in the foreground from the start menu and check the output to see if there are any issues.
    Also it might be worth trying to increase the java heap size, maybe you have a complex hierarchy and this is causing the heap size to max out.
    Have you tried using another method to make changes to the hierarchy such as HAL ?
    Cheers
    John

  • Creating a HTML page from the J2ME application

    Hi,
    I am developingan application in J2ME. Can anyone of you out there, help me whether there is any way I can generate a HTML page from the application.
    I have the data but I don't know ho to create a HTML page from a J2ME application.
    Any document or any code will prove handy.
    Thanking in anticipation.
    Ashish

    When you say that "you have the data" you mean that you have HTML code data(<html><body>Hello World</body></html>)? If yes you should create an algorithm that "read" html tag and display text in the appropriate layout/font/size/color...
    A solution could be simplify your HTML code (server side), so you can easly "decode" and display text.
    Giovanni
    Italy

  • In a jsp page how can i include another page from differenct web context

    Hi,
    i want to include a page from another web content to my page. How is it possible. For example in a jsp page i want to include "http://www.google.com". How is it possible. can i use <jsp:include tage for this purpose? any idea?
    Edited by: JavaHeroPrince on Apr 2, 2009 12:05 AM

    I'm afraid you cannot do that using <jsp:include/> tag.
    However, you can achive this using <c:import/> tag which comes with JSTL core tags.
    Please find the below example of how to go about.
    <%@ taglib uri = "http://java.sun.com/jstl/core" prefix = "c"%>
    <c:import url = "http://www.google.com/search">
      <c:param name="q" value="c%3Aimport+jstl"/>
      <c:param name="rls" value="com.microsoft:en-us"/>
      <c:param name="ie" value="UTF-8"/>
      <c:param name="oe" value="UTF-8"/>
      <c:param name="startIndex" value=""/>
      <c:param name="startPage" value="1"/>
    </c:import>
    -------------------------------------------------------------------------for more info
    [http://java.sun.com/developer/technicalArticles/javaserverpages/faster/]
    Hope that helps :)
    REGARDS,
    RaHuL

  • Opening a PPT file from a Web Application

    Hi,
    I want to open a PPT file from my web application.
    I have provided an hyperlink of the complete path of the file. Once the user clicks on this hyperlink the PPT shall open.
    Kindly help me out with this.
    Thanks.

    Sounds like you're done. What happens when the user clicks the link?

Maybe you are looking for