Redirecting url through method call

I am using Jdev Build JDEVADF_11.1.1.6.0_GENERIC_111205.1733.6192.1 for my development.
I have to redirect to different url based upon some conditions in my logic.
but when I am redirecting I am getting Response already commited error..
I am using below code to redirect..
public void redirectToLandingPage() {
FacesContext fctx = FacesContext.getCurrentInstance();
// ExternalContext ectx = fctx.getExternalContext();
String currentViewId =
FacesContext.getCurrentInstance().getViewRoot().getViewId();
String viewId = "/oracle/webcenter/portalapp/pages/LandingPage.jspx";
ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
HttpServletResponse response = (HttpServletResponse)ectx.getResponse();
String url = ectx.getRequestContextPath()+"/"+viewId;
try {
response.sendRedirect(url);
fctx.responseComplete();
} catch (Exception ex) {
ex.printStackTrace();
I also tried
public void redirectToLandingPage() {
FacesContext fctx = FacesContext.getCurrentInstance();
ExternalContext ectx = fctx.getExternalContext();
String currentViewId =
FacesContext.getCurrentInstance().getViewRoot().getViewId();
String viewId = "/oracle/webcenter/portalapp/pages/LandingPage.jspx";
ControllerContext controllerCtx = null;
controllerCtx = ControllerContext.getInstance();
String activityURL = controllerCtx.getGlobalViewActivityURL(viewId);
try {
ectx.redirect(activityURL);
} catch (IOException e) {
e.printStackTrace();
but getting same error.
any help would be appricated.
Regards,
Kiran.

This is what I use after logout, in order to sent user to login page :
    FacesContext context = FacesContext.getCurrentInstance();
    HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest();
    HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();  
    String url = request.getRequestURL().toString();
    StringBuffer sb = new StringBuffer(url);
    int indexOfRequestURI = url.indexOf(request.getRequestURI());
    sb = sb.replace(indexOfRequestURI, url.length(), request.getContextPath() + request.getServletPath() + "/login.jspx");
    String redirectUrl = response.encodeRedirectURL(sb.toString());
    response.sendRedirect(redirectUrl);
    context.responseComplete();

Similar Messages

  • Action method called in standalone OC4j but not OAS

    I am setting up a test environment on Solaris x86 machine and have run into an odd issue concerning an action method being called which seems to be an issue for Oracle Application Server (OAS) but not an issue for stand alone OC4J.
    The application is using Java 5, Spring 2.5, Java Servlet 2.3, Struts 2, iBatis 2.2, Sitemesh, and Display Tag to name some of the parts that are in play.
    The platform is a Sun Fire X2100 server running Solaris 10 OS (64-bit). The application server version is 10.1.3 (Solaris x86, 64-bit) connecting to Oracle database server 10.2.0.2.0 (Solaris x86, 32-bit). The stand alone OC4J that I used for comparison was 10.1.3.4.0 (also run under the same Solaris machine but not while the application server was running).
    Going from one JSP that contains a list of items ("authority ids" in this case) to another JSP which displays detailed information about one item (chosen by clicking on a hyperlink in the list), it appears that the setter action method (which sets the 'sid' property) does not get called under OAS so the page displays empty fields. Same code running under the stand alone OC4J, the setter method does get called and the fields are populated on the details page. In both cases, both deployments are hitting the same database and the data is successfully retrieved from the database (into the action class). In both cases, the parameter that is set by this action method is present in the URL for the detail page.
    Snippet of code from the JSP that loads the authority ID list (and passes the sid in the URL):
    <display:table name="authorityIdList" cellspacing="0" cellpadding="0" requestURI=""
        defaultsort="1" id="authorityIdTypes" pagesize="25" class="table" export="true">
        <s:url id="editurl" action="editAuthorityId" includeContext="false">
          <s:param name="redirectUrl" value="%{returnUrl}"/>
        </s:url>
        <display:column property="fieldName" escapeXml="true" sortable="true" titleKey="authorityIdType.fieldName"; style="width: 34%" url="${editurl}"
          media="html csv xml excel pdf" paramId="sid" paramProperty="sid"/>Snippet from the authority ID detail form where the sid should be populated:
    <tr style="display: none"><td>
          <s:hidden key="sid"/>
            <s:hidden name="redirectUrl"/>
        </td></tr>Snippet from the action class that contains the setter for the sid property:
      public Integer getSid() {
            return sid;
      public void setSid(Integer sid) {
            this.sid = sid;
      }Snippet from the resulting html page for the list includes the sid for each item in the list.
    <td style="width: 34%">DODAAC</td>
    <td style="width: 25%">DODAAC</td></tr>
    <tr class="even">
    <td style="width: 34%">DODAAN</td>
    <td style="width: 25%">DODAAN</td></tr></tbody></table>Under the stand alone OC4J, the setter method is called, so the sid is populated (and the item detail data from the action is retrieved and displayed).
    Snippet from the resulting detail html page from the stand alone OC4J:
        <tr style="display: none"><td>
             <input type="hidden" name="sid" value="1" id="saveAuthorityId_sid"/>
            <input type="hidden" name="redirectUrl" value="http://system01:8888/MyApp/admin/authorityIdTypes.html"; id="saveAuthorityId_redirectUrl"/>
        </td>Notice that the sid value as well as the redirectUrl value are populated under standalone OC4J.
    Under OAS, the setter method is not called, so the sid is not set (and none of the other item detail fields are populated).
    Snippet from the resulting detail html page from OAS:
       <tr style="display: none"><td>
             <input type="hidden" name="sid" value="" id="saveAuthorityId_ sid"/>
            <input type="hidden" name="redirectUrl" value="" id="saveAuthorityId_redirectUrl"/>
        </td>Notice that the sid value as well as the redirectUrl value are empty under OAS.
    Any ideas on what I need to change in OAS configuration to make this work under OAS (if this is a configuration issue)?

    I found another case that may be clearer.
    A confirmation page on the application server shows that the redirect url is not being populated:
    <form id="confirmation" name="confirmation" onsubmit="return true;" action="/MyApp/admin/confirmation.html" method="post"><table class="wwFormTable">
         <input type="hidden" name="redirectUrl" value="" id="confirmation_redirectUrl"/>
       <tr>
        <td colspan="2"><div align="right"><input type="submit" id="confirmation_continue" name="method:proceed" value="Continue"/>
    </div></td>
    </tr>
    </table></form>Same code running on the standalone OC4j does populate the redirect URL:
    <form id="confirmation" name="confirmation" onsubmit="return true;" action="/MyApp/admin/confirmation.html" method="post"><table class="wwFormTable">
         <input type="hidden" name="redirectUrl" value="http://system01:8888/MyApp/admin/users.html" id="confirmation_redirectUrl"/>
       <tr>
        <td colspan="2"><div align="right"><input type="submit" id="confirmation_continue" name="method:proceed" value="Continue"/>
    </div></td>
    </tr>
    </table></form>So it appears that the application server is having problems passing parameters to pages.
    I have been digging through Oracle documentation, but I haven't found any clues on how to fix the issue.
    Any help would be appreciated.
    Thanks,
    - David

  • Getting Warning about Redirection url

    Hi,
    we have the the portal application running on the weblogic 11g and upon login, home page of our app is loaded, but I do see the following warning message on the portal server logs. Any idea how we can supress this warning?
    <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is https://<servername>.arccorp.com:443/PortalApp/ARCGateway.portal?_nfpb=true&amp;_st=&amp;_pageLabel=ARC_Home&amp;_nfls=false
    Thanks
    sravi

    Hi Sravi,
    I am not sure if this is your situation or not, but hopefully it could be helpful for you.
    It is not supported for a remote pageflow portlet (WSRP producer) to redirect from its pageflow begin or refresh action. Because of this limitation, WebLogic Portal logs a warning when any portlet's pageflow attempts to redirect from either of these two actions.
    It is legal to redirect from these actions if the portlet is not a WSRP producer. If this is the case, Oracle has added a utility method that can be called prior to the redirect which can suppress these warning messages:
    - Class: com.bea.netuix.servlets.controls.content.PageflowLoggingHelper
    - Method: public static void dontLogRedirectWarning(HttpServletRequest req)
    Calling this method from the pageflow's begin or refresh action prior to the redirect will suppress the Netuix redirect warnings.
    Thanks,
    Cris

  • Method call before visual web jsf page loads

    Hi All.....
    I have written a method in a java class that accesses the mysql backend db to check if a process is still running. If the process is still running, a JOptionPane is produced informing the user of this and offers an <ok> option(to check the process status again) and a <cancel> option(to redirect the user to the homepage). If the process is completed, I want the page to just load as normal. I want this method to be called before the visual web jsf page loads. I have the method call in the super_init() method of the page and everything seemed to be working fine, the problem I have run into is that if I set the value in the db to show the process is running, the JOptionPane is produced(like it should be), and then if I set the value to show the process has completed and choose <ok> from the pane, the page loads.....this is what I want. Now, after the page loads, if I set the value in the db to show the process is running again, the JOptionPane is produced again right after I apply the changes to the db edit!!!!. I don't know why this is happening. Should I be calling the method from somewhere other the super_init()????? I have tried the method call in the prerender(), preprocess(), and destroy() methods all with the same results.
    Anyone have any ideas on what the problem could be??
    Thanks in advance.
    Silgd

    The Java part of a JSP/Servlet based webapplication runs physically at the server machine.
    Only the HTML/CSS/JS part which is generated by the webapplication and sent to the client physically runs at the client machine.
    JOptionPane is a Java Swing component which thus runs at the server machine. So you as client would only see it when both the server and the client runs at physically the same machine. Which is often only the case in development environment and doesn´t occur in real life! There is normally means of two physically different machines connected through the network/internet.
    To solve your actual problem, look for Ajax poll techniques. To display an alert or confirm dialogue in the client side, you use Javascript for this.

  • Does send redirect work through emulator.

    hi
    i am trying to open a url through sendRedirect(url) method.when i am trying to open the jsp page through browser which uses this sendRedirect(url) and redirects it the url specified it works fine, but when i open the same jsp through emulator it throws illeagal argument exception on sendRedirect(url).
    so sendRedirect() doesnt work in emulator?
    is there any other way to open a url through jsp/servelt using emulator.

    HI Gert,
    The answer to your question is yes. I have verified this in a lab previously. As long as all the conditions for ICMP redirect have been met (source address on same net, best gateway on same net) then ICMP redirects are sent regardless of whether PBR or normal routing is being used.
    Hope that helps - pls rate the post if it does.
    Paresh

  • Router based activity  and method call issue

    Hi All
    Iam presently working of Router based task flow(Bounded task flow) and page fragments
    here in above router based task flow i have used the method call.
    In above method call i return status ,and on basis of that status i redirect it to success page or error page(the success and error page are page fragments i.e. .jsff page).
    i have done the drag and drop of the above mentioned router based task flow in my jspx page in a facet as a region.
    below is the code for the my jspx page
    <af:region value="#{bindings.testtaskflowvalidations.regionModel}"
                           id="r1"/>but my problem is that the method call which i included in above router based ,that method is not called(method call is not being happened).
    So what changes i need to make so that the method is being is called.
    currently iam using jdevloper 11.1.1.4.0
    Thanks and Regards
    Bipin Patil.
    Edited by: Bipin Patil on Jun 29, 2011 1:59 AM

    Hi
    iam not getting any kinds of server errors.
    below is my router code
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="ValidationTaskFlow">
        <default-activity id="__1">ValidationTask</default-activity>
        <managed-bean id="__25">
          <managed-bean-name id="__24">validationBean</managed-bean-name>
          <managed-bean-class id="__27">com.test.Validate</managed-bean-class>
          <managed-bean-scope id="__26">pageFlow</managed-bean-scope>
        </managed-bean>
        <router id="ValidationTask">
          <case>
            <expression>#{pageFlowScope.Validationstatus == 'true'}</expression>
            <outcome id="__2">success</outcome>
          </case>
          <case>
            <expression>#{pageFlowScope.Validationstatus == 'false'}</expression>
            <outcome id="__3">fail</outcome>
          </case>
          <default-outcome>fail</default-outcome>
        </router>
        <view id="validationsuccess">
          <page>/pages/main.jsff</page>
        </view>
        <view id="validationerror">
          <page>/pages/hashkeyvalidationerror.jsff</page>
        </view>
        <method-call id="ValidationStatusSupplier">
          <method>#{pageFlowScope.validationBean.onBeforePhase}</method>
          <outcome id="__9">
            <fixed-outcome>ValidateFlow</fixed-outcome>
          </outcome>
        </method-call>
        <control-flow-rule id="__10">
          <from-activity-id id="__11">ValidationTask</from-activity-id>
          <control-flow-case id="__12">
            <from-outcome id="__14">success</from-outcome>
            <to-activity-id id="__13">validationsuccess</to-activity-id>
          </control-flow-case>
          <control-flow-case id="__16">
            <from-outcome id="__15">fail</from-outcome>
            <to-activity-id id="__17">validationerror</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <control-flow-rule id="__19">
          <from-activity-id id="__20">ValidationStatusSupplier</from-activity-id>
          <control-flow-case id="__23">
            <from-outcome id="__21">ValidateFlow</from-outcome>
            <to-activity-id id="__22">ValidationTask</to-activity-id>
          </control-flow-case>
        </control-flow-rule>
        <use-page-fragments/>
        <visibility id="__18">
          <url-invoke-allowed/>
        </visibility>
      </task-flow-definition>
    </adfc-config>

  • Send xml file from sap to third party url through https

    Hi,
    I have a requirement to send the xml file from ecc to a 3rd party url through HTTPS. How can we achieve this using ABAP.
    Client doesn't have XI enviroment. The client has provided the 3rd party url where the file needs to be uploaded.
    Please help ! <removed by moderator>
    Thanks in advance.
    Regards,
    Chitra.K
    Edited by: Thomas Zloch on Sep 12, 2011 12:58 PM

    Hi Chitra,
    I had similar requirement and here is what I did: -
    REPORT  Z_HTTP_POST_TEST_AMEY.
    DATA: L_URL               TYPE                   STRING          ,
          L_PARAMS_STRING     TYPE                   STRING          ,
          L_HTTP_CLIENT       TYPE REF TO            IF_HTTP_CLIENT  ,
          L_RESULT            TYPE                   STRING          ,
          L_STATUS_TEXT       TYPE                   STRING          ,
          L_HTTP_STATUS_CODE  TYPE                   I               ,
          L_HTTP_LENGTH       TYPE                   I               ,
          L_PARAMS_XSTRING    TYPE                   XSTRING         ,
          L_XSTRING           TYPE                   XSTRING         ,
          L_IS_XML_TABLE      TYPE STANDARD TABLE OF SMUM_XMLTB      ,
          L_IS_RETURN         TYPE STANDARD TABLE OF BAPIRET2        ,
          L_OUT_TAB           TYPE STANDARD TABLE OF TBL1024
    MOVE 'https://<hostname>/xxx/yyy/zzz' TO L_URL.
    MOVE '<XML as string>' TO L_PARAMS_STRING.
    *STEP-1 : CREATE HTTP CLIENT
    CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_URL
        EXPORTING
          URL                = L_URL
        IMPORTING
          CLIENT             = L_HTTP_CLIENT
        EXCEPTIONS
          ARGUMENT_NOT_FOUND = 1
          PLUGIN_NOT_ACTIVE  = 2
          INTERNAL_ERROR     = 3
          OTHERS             = 4 .
    "STEP-2 :  AUTHENTICATE HTTP CLIENT
    CALL METHOD L_HTTP_CLIENT->AUTHENTICATE
      EXPORTING
        USERNAME             = 'testUser'
        PASSWORD             = 'testPassword'.
    "STEP-3 :  SET HTTP HEADERS
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
          EXPORTING NAME  = 'Accept'
                    VALUE = 'text/xml'.
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_HEADER_FIELD
        EXPORTING NAME  = '~request_method'
                   VALUE = 'POST' .
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_CONTENT_TYPE
        EXPORTING CONTENT_TYPE  = 'text/xml' .
    "SETTING REQUEST DATA FOR 'POST' METHOD
    IF L_PARAMS_STRING IS NOT INITIAL.
       CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
         EXPORTING
             TEXT   = L_PARAMS_STRING
         IMPORTING
               BUFFER = L_PARAMS_XSTRING
         EXCEPTIONS
            FAILED = 1
            OTHERS = 2.
    CALL METHOD L_HTTP_CLIENT->REQUEST->SET_DATA
        EXPORTING DATA  = L_PARAMS_XSTRING  .
    ENDIF.
    "STEP-4 :  SEND HTTP REQUEST
      CALL METHOD L_HTTP_CLIENT->SEND
        EXCEPTIONS
          HTTP_COMMUNICATION_FAILURE = 1
          HTTP_INVALID_STATE         = 2.
    "STEP-5 :  GET HTTP RESPONSE
        CALL METHOD L_HTTP_CLIENT->RECEIVE
          EXCEPTIONS
            HTTP_COMMUNICATION_FAILURE = 1
            HTTP_INVALID_STATE         = 2
            HTTP_PROCESSING_FAILED     = 3.
    "STEP-6 : Read HTTP RETURN CODE
    CALL METHOD L_HTTP_CLIENT->RESPONSE->GET_STATUS
        IMPORTING
          CODE = L_HTTP_STATUS_CODE
          REASON = L_STATUS_TEXT  .
    WRITE: / 'HTTP_STATUS_CODE = ',
              L_HTTP_STATUS_CODE,
             / 'STATUS_TEXT = ',
             L_STATUS_TEXT .
    "STEP-7 :  READ RESPONSE DATA
    CALL METHOD L_HTTP_CLIENT->RESPONSE->GET_CDATA
            RECEIVING DATA = L_RESULT .
    "STEP-8 : CLOSE CONNECTION
    CALL METHOD L_HTTP_CLIENT->CLOSE
      EXCEPTIONS
        HTTP_INVALID_STATE = 1
        OTHERS             = 2   .
    "STEP-9 : PRINT OUTPUT TO FILE
    CLEAR : L_XSTRING, L_OUT_TAB[].
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          TEXT   = L_RESULT
        IMPORTING
          BUFFER = L_XSTRING
        EXCEPTIONS
          FAILED = 1
          OTHERS = 2.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        BUFFER                = L_XSTRING
      TABLES
        BINARY_TAB            = L_OUT_TAB .
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
       FILENAME                        = 'C:AMEYHTTP_POST_OUTPUT.xml'
      TABLES
        DATA_TAB                        = L_OUT_TAB .
    Also, following is the detailed link for use of HTTP_CLIENT class: -
    http://help.sap.com/saphelp_nw70ehp1/helpdata/EN/1f/93163f9959a808e10000000a114084/content.htm
    Also, in below link, you can ignore XI specific part and observe how its sending XML to external URL:-
    (I know it describes call to SAP XI server's URL, but it can be used to call any URL)
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/ae388f45-0901-0010-0f99-a76d785e3ccc
    In addition to all above, following configs to be present at ABAP application server: -
    1. The hostname used to URL should be present in SAP ABAP application server's 'hosts' file.
    2. Security certificate (if available) for URL to be called must be installed in SAP ABAP application server.
    Let me know if you achieve any progress with it...

  • Error on /SafeMode: error while trying to run project uncaught exception thrown by method called

    i try run VS 2012 with /SafeMode. I create new empty Winform. When I start debug, I got:
    "error while trying to run project uncaught exception thrown by method called through reflection"

    Hi Matanya Zac,
    Did you restart your machine? How about installing the VS2012 update 4?
    >>error while trying to run project uncaught exception thrown by method
    Did you install the VS update in your VS IDE? I met this issue before which was related to the VS update:
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/5ead8ee9-ea09-4060-88b0-ee2e2044ff82/error-while-trying-to-run-a-project-uncaught-exception-thrown-by-method-called-through-reflection?forum=vsdebug
    If still no help, I suggest you repair your VS, and then restart your machine, test the result.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Horizontal scroll bar disappears in URL isolation method iview

    Hello Experts,
    I am facing a strange problem. In MSS --> Reporting, when the report is generated, it is shown in a new window. That iview is basically having URL isolation method which has been disabled i.e. it cannot be changed(It is an iview created by SAP). The problem is the scroll bars. The report is basically a R3 report which has scroll bars but when it is displayed in the iview, the horizontal scroll bar disappears.
    The requirement is to have both the scroll bars.
    The horizontal scroll bar appears for a while when we manually resize the window.
    I have checked the windows parameters also in which the scroll bars are set to 1 through code in WD java(not in the iview properties).
    Please help !!
    Thanks & Regards
    Vikash
    Edited by: modish on Jan 25, 2012 8:00 AM

    Vikash,
    Header and footer can be handled from the property 'tray' of the page and iview. But this is not a matter of concern. Try the following to see if the report is getting generated-
    1) Try toying with the properties of page- 'authentication scheme', 'initial state-open', 'isolation method-embedded','metadata for navigation hierarchy-cacheable'.
    If the above do not help-
    1) Preview your iView from the admin console.
    2) Right click on the opened up window (where the report is getting displayed) and select properties.
    3) Copy the address URL from that.
    4) Create a URL iView for the above copied URL
    5) Use this new iView to see if it resolves your problem. OR assign this to a page and then see it that helps.
    Its really strange to believe the above, but it actually helped me in one scenario. Let's give it a try and then I can explain further its reasoning.
    Regards,
    Atul

  • During asynchronous method call, Firefox doesn't allow to navigate elsewhere

    Hi,
    I am using Jdeveloper 11.1.1.5.0 and my application is based on ADF and Webcenter Portal.
    Here is the scenario: My application has a home page which contains different regions. The page loads all the regions instead of one which is running with separate thread and taking long time. Now during the execution of long running task, if user wants to navigate to another page by clicking on a command link or goLink then it works on google chrome and IE but doesn't work with Firefox. In case of firefox once it seems to redirecting to desired url for a while but then it redirects back to same page. Surprisingly, It works perfectly once the execution of long running task is finished. So it seems problem with firefox's handling of asynchronous requests. I tried FacesContext.getCurrentInstance().getExternalContext().redirect(url) and setting the URL as destination for goLink to navigate. Below is the code for goLink and commandLink:
    <af:goLink id="pt_g22" text="#{node.title}" destination="#{contextroot}/faces/test.jsp" styleClass="#{node.selected ? 'ln_active' : ''}"/>
    <af:commandLink id="pt_c21" text="#{node.title}" action="pprnav" clientComponent="#{node.attributes['Target'] == '_popup' ? true : false}" styleClass="#{node.selected ? 'ln_active' : ''}" actionListener="#{MyBean.navigateToHere}" partialSubmit="true">
    in commandLink's actionListener method i am just having : FacesContext.getCurrentInstance().getExternalContext().redirect(url)
    Also, if i use navigationContext.processAction and action="pprnav" with commandLink then it works in FF as well but i want full page redirection instead of PPR
    Any help or suggestion is appreciated.
    Many Thanks,
    Jeetu

    Jose, your fix to problem 1 allows all access from the outside, assuming you applied the extended list to the outside interface.  Try to be more restrictive than an '...ip any any' rule for outside_in connections.  For instance, this is what I have for incoming VOIP (access list and nat rules):
    access list rule:
    access-list outside_access_in extended permit udp any object server range 9000 9049 log errors
    nat rule:
    nat (inside,outside) source static server interface service voip-range voip-range
    - 'server' is a network object *
    - 'voip-range' is a service group range
    I'd assume you can do something similar here in combination with my earlier comment:
    access-list incoming extended permit tcp any any eq 5900
    Can you explain your forwarding methodology a little more?  I'm by no means an expert on forwarding, but the way I read what you're trying to do is that you have an inbound VNC request coming in on 5900 and you want the firewall to figure out which host the request should go to.  Or is it vice-versa, the inbound VNC request can be on port 6001-6004 ?

  • Webservice initialized on every method-call.

    Hello!
    I have written two webservices. One containing a EJB and a SOAP-Webservice and one with just a SOAP-Webservice.
    If I call the EJB-Version the webservice gets inizialized by glassfish on the first call and then stays running (Constructor is not called any more) but if I call the SOAP-only service constructor is called on every method-call.
    Therefore I have a deployment-problem with the EJB-Version: I use SQL-Server-JDBC-Libs in my Netbeans-Project. The get deployed to the server but are not used by the application. Instead I have to copy them to the servers lib-directory. If I deploy them with my Soap-only-service they work...

    For the Webservice-only I create a web-application in Netbeans (File - New Project - Java Web - Web Application) and run this code:
    package com.service;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    @WebService(serviceName = "Service")
    public class Service {
        public Service() {
            System.out.println("Constructor called!");
        @WebMethod(operationName = "hello")
        public String hello(@WebParam(name = "name") String txt) {
            return "Hello " + txt + " !";
    }Everytime i call the hello-method through the Tester (http://ip:port/URI?Tester) the webservice get initialized ("Constructor called").
    On the other hand I create a Java EE - EJB-Module in Netbeans and add the webservice.
    I remove the EJB-Annotations from the module and use it as a POJO for the code.
    EJB:
    package com.slan.ejb;
    import javax.ejb.Stateless;
    @Stateless
    public class EJBSlan {
        public EJBSlan(){
            System.out.println("Constructor of EJB called!");
        public String getHello(String name) {
            return "Hello " + name;
    }Service:
    package com.slan.service;
    import com.slan.ejb.EJBSlan;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.ejb.Stateless;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    @WebService(serviceName = "EJBService")
    @Stateless()
    public class EJBService {
        private EJBSlan ejbRef;
        public EJBService(){
            ejbRef = new EJBSlan();
            System.out.println("Constructor of Service called!");
        @WebMethod(operationName = "getHello")
        public String getHello(@WebParam(name = "name") String name) {
            return ejbRef.getHello(name);
        @WebMethod(operationName = "getMachines")
        public String getMachines() {
            String machines = "";
            try {
                DriverManager.registerDriver(new com.mysql.jdbc.Driver());
                Connection c = DriverManager.getConnection("jdbc:mysql://ip/cm","user","password");
                Statement s = c.createStatement();
                ResultSet r = s.executeQuery("select  from machines");
                while(r.next()){
                    machines += r.getString("comment");
                s.close();
                c.close();
            } catch (SQLException e) {
                System.out.println(e.toString());
            return machines;
    }As you can see I already tried to add the sql-code to query the database. I added the mysql.jar to the project and deployed it. Using the tester the Service- and POJO-Object gets initialized only once but I cant use the mysql-driver cause it is not used on the server. But it gets deployed to the server... I think it's just not included in the class-path...

  • How detect method calls that are not already in 1.4

    My program is compiled with JDK 1.5 or 1.6 and retroweaved to 1.4.
    If I do not take care I may type
    int i=65;
    Character.isDigit(i);
    instead of
    Character.isDigit(char)i);
    Without casting to char it uses a method that exists only since 1.5 but not
    yet in 1.4.
    There are a few other methods that had been added since 1.5
    Their use leads to NoSuchMethodError on 1.4 clients.
    Their usage must be avoided.
    How can I recognize them at compile time?
    Or has anybody written a tool to check all method calls
    whether they already exist in 1.4 ?
    If not I would write it myself and probably will use the javap output.
    After reading through the docs of java.lang.reflect.Method I guess that
    there is no flag telling when a method had been introduced.

    there was some discussion on that here:
    http://forum.java.sun.com/thread.jspa?threadID=586602
    If you use ant, you could also try and configure the src and target properties of javac task:
    http://ant.apache.org/manual/CoreTasks/javac.html
    Alper

  • 11gR2 error: call a bounded task flow with method call as default activity

    hi all,
    We migrated several applications to the JDev 11g R2.
    There are 2 applications that contain a bounded task flow where we define Method Call as default activity.
    We need invoke specific actions before opening the page.
    They run well with 11gR1.
    But with *11G R2*, I can’t call directly this task flow with the following URL:
    http://127.0.0.1:7101/MyAPP/faces/adf.task-flow?adf.tfId=my-flow-def&adf.tfDoc=/WEB-INF/flows/my-flow-def.xml
    Message:
    *<SecurityUtils><invokeURLAllowed> ADFc : impossible to call directly the task flow '/WEB-INF/flows/ my-flow-def.xml #my-flow-def' with the help of URL*
    (original message: <SecurityUtils><invokeURLAllowed> ADFc : impossible d'appeler directement le flux de tâches '/WEB-INF/flows/ my-flow-def.xml #my-flow-def' à l'aide de l'URL.)
    Any idea?
    Thanks for you help

    Hi,
    Have a look at the task flow properties, in PatchSet1, a new feature "invokeURLAllowed" is added that prevents bounded task flows from being URL accessible for security reasons. You can swithc this feature on and off
    Frank
    Ps.: I though that bounded task flows that you call from a URL generally needed to have a viewActivity as the default activity

  • ADF Mobile: WebService data control method call with array

    JDev 11.1.2.3
    ADF Mobile deployed to Android emulator
    Hello All,
    I am trying to invoke a method in my Web Service data control and get the following exception
    Caused by: ERROR [oracle.adfmf.framework.exception.AdfInvocationRuntimeException] - Cannot serialize: [I@1dbae822
            at oracle.adfmf.dc.ws.soap.SoapTransportLayer.invokeSoapRequest(Lorg/ksoap2/SoapEnvelope;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.soap.SoapWebServiceOperation.invoke(Ljava/lang/String;Loracle/adfmf/dc/ws/soap/SoapGenericType;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.soap.SoapWebServiceOperation.invoke(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.JavaBeanOperation.execute(Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;(Unknown Source)
            at oracle.adfmf.dc.ws.WebServiceDataControlAdapter.invokeOperation(Ljava/util/Map;Loracle/adfmf/bindings/OperationBinding;)Z(Unknown Source)
            at oracle.adfmf.bindings.dbf.AmxMethodActionBinding.execute()Ljava/lang/Object;(Unknown Source) This method is an AppModule method exposed as a service interface and the parameter for this method is a List<oracle.jbo.domain.Number>. The schema definition for the input is as follows:
    <element name="acceptTask">
       <complexType>
         <sequence>
                <element maxOccurs="unbounded" minOccurs="0" name="taskID" type="decimal"/>
         </sequence>
       </complexType>
    </element>For the input to my binding, I have tried int[], Integer[] and List<Integer>. All of these result in similar errors.
    I have also tried invoking this through a regular ADF application and that works fine with an int[]. It looks like something specific to the ADF Mobile SOAP layer.
    Is this a bug or a restriction in the framework? Any workarounds that has worked for anyone?

    No luck. A WS DC method call with a simple parameter (java.lang.String or java.lang.Integer) works fine but I can't get it to work when there is an array input.
    I have tried WS methods with int arrays and simple string arrays without any luck. All of them result in a cannot serialize error.
    I can't figure out what I am doing wrong. Are there any working WS Datacontrol samples with array inputs?

  • ISE CWA Redirect URL customization

    Hi,
    Just wanted to know if we can change the redirect url. By default it starts with the hostname of ISE. I will have four PSN nodes and want that url is actually the Load Balancer Url rather than ISE node. Since ISE isintegrated with AD  domain.local so public certificate would not be possible. We are planning to install publecrt cert with differnt domain name likke domain.com. If some one has done it before please let me know
    Thanks
    Aijaz

    Hello,
    I went through your query and have found a link which I think would surely help you to solve your query:-
    http://www.cisco.com/en/US/products/ps11640/products_configuration_example09186a0080bead09.shtml

Maybe you are looking for

  • Unable to replicate oracle data into timesten

    I have created CACHE GROUP COMPANY_MASTER Cache group :- Cache Group TSLALGO.COMPANY_MASTER_TT:   Cache Group Type: Read Only   Autorefresh: Yes   Autorefresh Mode: Incremental   Autorefresh State: On   Autorefresh Interval: 1 Minute   Autorefresh St

  • Trying to open old logic files.

    I have Logic Pro 9.1.6. It works fine. I am trying to open old files and understand I need to save them in Logic 7 first. I have L7 installed on a separate disk with OS10.4.11. When I startup with that disk I can't launch Logic 7 because it  does not

  • InDesign CS3 program will not open - Win XP - after trying to open corrupt file.

    Help! the program Adobe InDesign will not open up anymore. Here is the story and what I have tried. One week on the 16th my server crashed two of the three hard drives failed (RAID) I had the two replaced. Since then all seamed to be ok but few of fi

  • Calendar links in texts, emails

    Whenever I receive a text message or an email that contains a reference to a day or time, the phone creates a link to my calendar for that day/time. Is there a way to turn off this feature? It's very easy to accidently tap on the link while scrolling

  • Why has bbc iplayer stopped working on OS 10.5.8

    My mac mini has stopped downloads of the latest iplayer and firefox versions sayng that it it not compatible with the software.  The os check says that there is no softwaqre update available.  Ideas please.