Problem with access to SipFactory from jsp-pages in JBoss environment

Hello!
I have an installation of the OCMS 10.1.3.3. deployed into a JBoss (jboss-4.0.5.GA) environment. Unfortunately I have a problem with accessing the SipFactory from a jps-page. Encouraged by the "messagesender" example I tried to get an instance of SipFactory from my jsp-page simply by calling:
SipFactory sipFactory = (SipFactory) application.getAttribute(SipServlet.SIP_FACTORY);
But unfortunately there seems to be no attribute "SipServlet.SIP_FACTORY" and I only get a null pointer. I have also tried running that code in the orignal messagesender example but it didn't work either. So I wonder if this should definetely work in a JBoss environment or if this might be a known problem. Is there anything that I could check/do regarding this problem? I suppose there must be an oracle module which should take care of making the SipFactory availabe after it is deployed. Perhaps something went wrong during the deployment?!
Best regards,
Tim

Hi
On JBoss, OCMS does not support converge applications.
I.e the SipFactory can be retrieved from the servlet context when running on OC4J.
Instead the SipFactory can be found in JNDI as described in the Developer's Guide:
"External Access to SIP Servlets
To enable convergent applications between SIP and HTTP, the OCMS Container allows you to get access to the javax.servlet.sip.SipFactory by looking it up through JNDI. The SIP Factory will be registered under the same name as the display name of your SIP servlet as illustrated in Example 2–12. The <display-name> in the sip.xml in this case must be "My sip app".
Example 2–12 Accessing the Data for a SIP Session through JNDI
InitialContext ic = new InitialContext();
SipFactory sipFactory = (SipFactory)ic.lookup("sip/My sip app");"
Cheers
Lucas Persson

Similar Messages

  • Problem with accessing init parameters from JSP file

    Hi,
    I have my init parameters and Jsp configured in web.xml
    <servlet>
              <servlet-name>TestJsp</servlet-name>
              <jsp-file>/Test.jsp</jsp-file>
              <init-param>
                   <param-name>username</param-name>
                   <param-value>Balboa</param-value>
              </init-param>
    </servlet> How do I access 'username' field from JSP file.
    Kindly help.
    Thanks.

    you can do this in the jsp
    <%=config.getInitParameter("username")%>or do it in the jspInit method in the jsp:
    <%!  String userName = null; 
      public void jspInit() {   
        ServletConfig config = getServletConfig();   
        userName   = config.getInitParameter("userName ");  
    %>
    Hello <%=userName%>

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • Problem with accessing Signed Applet from javascript method

    Hi,
    I am facing the following problem while accessing Signed Applet from javascript method.
    java.security.AccessControlException: access denied (java.io.FilePermission c:/temp.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at FileTest.testPerm(FileTest.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    I am using jdk1.5 for my development...
    Can anyone help to resolve this security issue. Urgent...
    Thanks in advance.

    Hey thanks. I wasn't able to get it to work with that sample but I did find this very similar code that does allow javascript to call JFileChooser in an applets public method.
    java.security.AccessController.doPrivileged(
    new java.security.PrivilegedAction()
    public Object run(){                           
    //do your special code here
    return null; //return whatever you want
    It seems a bit tempermental in that if you don't select a file quickly, it will hang the browser....no perfect solution but I'm going in the right direction.
    Thanks,
    Scott

  • Problem with RTF Report Generation From OAF Page

    Hi,
    I have a requirement where from OAF page, on a button click, a RTF report should be generated. Template has been already defined for the same. If I want to generate report in .xls or pdf, it is working fine but in case of RTF it is showing that "Word cannot start the converter mswrd632" and then onclick of ok, it is displaying some junk data in word doc.
    Below is the code written in PFR-
    else if((outputType != null) && (outputType.equalsIgnoreCase("RTF")))
           outputType = "application/vnd.msword";//"application/vnd.ms-word.document";//"application/vnd.ms-word";
           ext = ".doc";
    if ((outputType != null) && (outputType.equalsIgnoreCase("RTF")))
          TemplateHelper.processTemplate(txn.getAppsContext(), "XXCUST", templateName, txn.getUserLocale().getLanguage(), txn.getUserLocale().getCountry(), in, TemplateHelper.OUTPUT_TYPE_RTF, null, pdfout);
    else
          TemplateHelper.processTemplate(txn.getAppsContext(), "XXCUST", templateName, txn.getUserLocale().getLanguage(), txn.getUserLocale().getCountry(), in, (byte)btype, null, pdfout);
    Please help urgently by sharing your ideas about solving this problem.
    Thanks,
    Annie

    hi Annie,
    Please check the links may be it will help you:
    https://forums.oracle.com/thread/2185528
    https://forums.oracle.com/thread/2545516
    https://forums.oracle.com/thread/2543842
    https://forums.oracle.com/thread/2342141
    if you get the right solution please mention here, it will help others.
    Regards
    Mahesh

  • Problem with printing debug statements in JSP page

    Hi all,
    I am debugging an application with System.out.println() statements - my debug statements in the *.java class printed just fine, but when I do the same thing in my JSP page, nothing gets printed out.
    I am already wrapping my System.out.println() statements inside the <% %> tag.
    Does anyone know what may be causing this? Any help will be greatly appreciated!
    - JL

    Where do you expect to see the output?
    System.out.println will write to the console/logs
    They WON'T write to the JSP page.
    If you check your error/output logs you will probably find the statements there.
    If you want to print things into the JSP page, just use out.println.
    "out" is an implicit reference to the current JSPWriter.
    Cheers,
    evnafets

  • Problem with opening PDF files from JSF page using SDO

    Hi all,
    I'm new with JSF and was attempting to read a PDF file from a Database using SDO and JSF. The code below throws an exception when casting from DataObject to Blob. The getLcDoc() method was created by WSAD when I dragged an SDO relational record onto the JSF page. This method returns an DataObject type which I tried casting to a Blob type before using it further. However, an exception is thrown.
    Any feedback is appreciated.
    Arv
    try {
                   FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   Blob file= (Blob)getLcDoc().get("ATTACH");
                   int iLength = (int)(file.length());
                   response.setHeader("Content-type", "application/pdf");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   response.setContentLength(iLength);
                   ServletOutputStream os = response.getOutputStream();
                   InputStream in = null;
                   in = file.getBinaryStream();
                   byte buff[] = new byte[1024];
                   while (true) {
                   int i = in.read(buff);
                   if (i<0) break;
                   os.write(buff,0,i);
                   os.flush();
                   os.close();
         } catch(Exception ex){
              System.out.println("Error while reading file : " + ex.getMessage());
         }

    Hi...I found out that there is actually no need to use a Blob object at all. You can simply call the OutputStreams write() method and pass the DataObject.getBytes() method that returns a byte[] array. The revised code is shown at the end of this posting.
    However, a few other teething problems exist:
    1. This works well only if I specify the content type in response.setHeader() method. What if my users upload different types of files, is there a way that the browser opens according to the file type without setting the content type?
    2. I still have a problem opening PDF files, even if I specify - response.setHeader("Content-type", "application/pdf");
    I get the message - The file is damaged and could not be repaired
    3. I would also like this to open the attachment in a new window and using target="_blank" doesn't seem to work as seen below:
    <h:commandLink
                                                 styleClass="commandLink" id="link1" action="#{pc_DocumentDetailsRead.doLink1Action}" target="_blank">
                                                 <h:outputText id="text5" styleClass="outputText"
                                                      value="Click Here"></h:outputText>
                                            </h:commandLink>
    ------------------------Revised code-----------------------------------------
    FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   response.setHeader("Content-type", "application/msword");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   ServletOutputStream os = response.getOutputStream();
                   os.write(getLcDoc().getBytes("ATTACH"));
                   os.flush();
                   os.close();

  • Problems with accessing Essbase cube from Interactive studio

    Hi All,
    I have a report in IR for which essbase is the source. When i try to process the report i am getting an error as below.
    Request [Report] from user[username] was terminated since it exceeded the time limit
    Any idea on how this could be resolved ?

    Probably query governors on the Essbase server, contact the Essbase DBA.
    Hope this helps.
    Andy King
    http://www.analitica.co.uk

  • Putting pictures from jsp pages

    hi, i have been assigned a job to do in jsp....this is the first time i am dealing with jsp....
    my problem is to display images from jsp pages, images will come from the url
    http://media.XXXXXXXX.com/books/ISBN#.jpg, where # is the isbn no.
    here is the code which i am using...
    <c:if test="${result.isbn != null}">
                        <div class="search-result-attributes">Image:$(http://media.XXXXXXXXXXX.com/books/ISBN#.jpg) </div>
                   </c:if>any idea....how can i make a variable of #, to display books with different ISBNs.
    Also, the # can be calculated by "result.isbn"
    any help guys....???
    Edited by: ping.sumit on Jun 24, 2008 8:03 PM

    any idea....how can i make a variable of #, to display books with different ISBNs.
    Also, the # can be calculated by "result.isbn"I don't understand what you're talking about.
    At least I can tell you that HTML offers you the <img> tag for displaying images. E.g.
    <img src="${result.isbn}.jpg" />

  • Access to a method located in view object from JSP page?

    Hi,
    How can i access a public method which is loacted in view
    object "viewobjectImpl.java" from JSP page.

    Juan,
    Either via Data tags or/and Java embedded code.(<%...%>).
    This method, suppose to execute a stored procedure.
    Thanks

  • Can Play iTunes Library from PC on MacBook Air but cannot import, problem with access rights?

    I can play Itunes library from Windows Vista PC on my MacBook Air using homeshare but cannot import the library . Error message is problem with access rights. Latest OS and Itunes installed. Both computers registered with Apple on same Apple ID. Wifi Router turned on and off. Still does not allow importing. Any suggestions please?

    Might be an alternative for you here > iTunes: How to move your music to a new computer

  • Just wondering if anyone has a problem with accessing iTunes store. have iTunes installed but can't bring up the store home page?

    Just wondering if anyone has a problem with accessing iTunes store. have iTunes installed but can't bring up the store home page?

    i have the same problem! Safari won't work either. Can anyone help please? I have completely restored my computer trying to fix this and it still won't work! I have a 2 month old alienware laptop running windows 7

  • How to print report from JSP Page

    Hi Everybody,
    I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
    1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
    2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
    Could anyone help me to solve this problem.

    Hi Everybody,
    I am developing a simple project in JSP with MS Access. I hav some tables and reports for them. I hav a JSP page which gets inputs from user and save it in the table. Its working fine. But my problems are,
    1) I hav a button called "SAVE & PRINT" in that bottom of the page, if i click that button, the currently entered data has to save in the table and the same data has to print from the MS Access report. I dont know how to print this report from JSP page.
    2) Another button called "REPRINT". If i click that button, it has to ask a number to print the report page, that number is nothing but a field in that report.
    Could anyone help me to solve this problem.

  • Urgent-how to access custom tag from jsp tag

    I have a problem accessing a custom tag from a jsp expression.
    Details: I have a custom tag that returns a string variable. I need to access that variable from jsp expression <%%>.
    Can any body help me?

    Tags don't "return" values as in the normal sense.
    They can only support TEI (Tag Extra Information) that just stuffs a declared variable into the page's state.
    For example, if the tag class had a public method called getValue(), you could do the following:
    <xmp:mytag id="foo"/>
    <%
    out.println("value is " + foo.getValue());
    %>

  • How to get the URL parameter value when navigating from JSP Page to portal

    Hi All,
    I have web Dynpro application with one button, while clicking that button It will navigate to JSP page as external window. In the JSP page I have a input field and Button.
    In the JSP page input field I will enter some values and press submit button, it will navigate to Portal page by passing some URL parameter with values.
    Once user entering to portal by default WD page displayed, the same WD page I try to get the URL Parameter which I have passed from JSP page, but I am not able to get the URL parameter value.
    If same application running in without portal, I can able to get the URL parameter values. I am getting the URL parameter by interface view default inbound plug parameter.
    How do we resolve this problem?
    Regards,
    Boopathi M

    Hi
    Please try  these link might helpful for you
    1.[How to call WebDynPro application from JSP |/thread/452762 [original link is broken];
    2.[How to get the previous page url from abstract portal component? |/thread/1289256 [original link is broken];
    3.[how to launch and pass a parameter |/thread/5537 [original link is broken];
    Best Regards
    Satish Kumar

Maybe you are looking for

  • How do you hook up a TV monitor to a second GFX card?

    hi - after i learned that the Nv7800GT GFX card I ordered with my G5 dual core doesn't output to S-Video, i ordered and installed a 6600 card (which allegedly does). However now that it is installed, i can't seem to get it to recognize the TV monitor

  • A sample code to check records of a system table?

    hi ABAP4 experts, We are pretty new at ABAP4.  We would be appreciated if you can provide a sample code to check how many records and calculate a total amount for a specific field, e.g., DMBTR in a system table, e.g., BSEG.  Note: there is no any sel

  • Erratic behaviour

    I am experiencing difficulties with MS Project 2010.  These refer to the following: 1.  I highligh with colors some task lines.  After saving the file, I try to highlight other tasks as and when there are changes.  In doing so, all colors disappear,

  • Missing Tool Palette & Audio Meters!!!

    Hi all. My first post. A question: Is there a way to reset or lock the windows beyond simply Window > Arrange > Standard ? The above function restores the browser, timeline and clip viewers, but the tool palette and audio meters have moved off-screen

  • Creating stickers using Avery labels

    I recently switched from a PC to a fabulous G5 iMac. I used to create cute stickers for my students' papers with my PC using Print Artist and Avery address labels (#8160), but cannot figure out a way to do this with my Mac. I am looking for a way to