How do I get to the request object in a webflow.

How do I get to the request object in a webflow.
I created a input process and one function it needs to do is create a cookie.
Problem is I don't have a response object.
How do I create/get the response object so I can create a cookie.
Thanks
Michael C Ford
------------------ Code Line ------------------------------------
public Object process(HttpServletRequest req, Object requestContext)
throws ProcessingException
// get the pipeline and namespace info for the process
PipelineSession pSession = null;
String namespace = null;
String username = req.getRemoteUser();
pSession = getPipelineSession(req);
namespace = getCurrentNamespace(pSession);
/* ***** DO THE INITIAL CREATE OF THE BEAN *** */
     try {
          Properties props = new Properties();
          props.put(
               Context.INITIAL_CONTEXT_FACTORY,
               "weblogic.jndi.WLInitialContextFactory");
          Context ctx = new InitialContext(props);
          Object homeObject = ctx.lookup("com.??.??PortalMgr");
          SeechangePortalMgrHome seechangePortalMgrHome =
          (SeechangePortalMgrHome) javax.rmi.PortableRemoteObject.narrow(
                                                  homeObject,
                                                  SeechangePortalMgrHome.class);
          SeechangePortalMgr portalMgr = seechangePortalMgrHome.create();
/* Set the initail user */
portalMgr.setUser(username);          
          UserRuntime userRuntime = (UserRuntime)portalMgr.getRuntimeObject();
          System.out.print("Run Time User is " + userRuntime.getUserName());
          System.out.print("Run Time User is " + userRuntime.getOrgSeq());
// ** cookies for Actuate XXX=(customer sequence ID), YYY=ZZZ is a dummy per
their requirement
          Cookie cCustSeqNumber = new Cookie("XXX",userRuntime.getOrgSeq());
          Cookie cPassword = new Cookie("YYY","ZZZ");
          cCustSeqNumber.setPath("/");
          cPassword.setPath("/");
          ??response.addCookie(cCustSeqNumber);
          ??response.addCookie(cPassword);          
     } catch (Exception ee) {
          System.out.print("Unable to create Portal Manager" + ee);
// at this point we add the logic to produce the bean
return "success";

Thanks
Just what I needed, except I needed to caste response.
Michael C
"Daniel Selman" <[email protected]> wrote:
Michael,
// get the HttpServletResponse from the HttpServletRequest
HttpServletResponse response =
equest.getAttribute( WebflowConstants.HTTP_SERVLET_RESPONSE );
Cookie cPassword = new Cookie("YYY","ZZZ");
cCustSeqNumber.setPath("/");
cPassword.setPath("/");
response.addCookie(cCustSeqNumber);
response.addCookie(cPassword);
You HAVE the HttpServletRequest...
public Object process(HttpServletRequest req, ObjectrequestContext)
throws ProcessingExceptionMake sense?
Dan
"michael C Ford" <[email protected]> wrote in message
news:[email protected]...
How can I get to the response this way ?
this just stored the response as an attribute did it now ?
If I don't have it, how can I use it in a setAttribute ?
Sorry just a little slow
I can't do this can I ?
request.setAttribute(WebflowConstants.HTTP_SERVLET_RESPONSE,response);
Cookie cPassword = new Cookie("YYY","ZZZ");
cCustSeqNumber.setPath("/");
cPassword.setPath("/");
response.addCookie(cCustSeqNumber);
response.addCookie(cPassword);
"Daniel Selman" <[email protected]> wrote:
Michael,
I found this handy snippet in our code:
// Put the httpServletResponse into the request, this is done
in
case IPs want to
// use the response to deposit cookies. The IPs maynot howeverwrite
// anything to the response as this will cause an
IllegalStateException
request.setAttribute(WebflowConstants.HTTP_SERVLET_RESPONSE,
response);
So, the HttpServletResponse is bound into the HttpServletRequest usingthe
key, WebflowConstants.HTTP_SERVLET_RESPONSE.
Magic!
Sincerely,
Daniel Selman
"michael C Ford" <[email protected]> wrote in message
news:[email protected]...
How do I get to the request object in a webflow.
I created a input process and one function it needs to do is create
a
cookie.
Problem is I don't have a response object.
How do I create/get the response object so I can create a cookie.
Thanks
Michael C Ford
------------------ Code Line ------------------------------------
public Object process(HttpServletRequest req, Object
requestContext)
throws ProcessingException
// get the pipeline and namespace info for the process
PipelineSession pSession = null;
String namespace = null;
String username = req.getRemoteUser();
pSession = getPipelineSession(req);
namespace = getCurrentNamespace(pSession);
/* ***** DO THE INITIAL CREATE OF THE BEAN *** */
try {
Properties props = new Properties();
props.put(
Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
Context ctx = new InitialContext(props);
Object homeObject = ctx.lookup("com.??.??PortalMgr");
SeechangePortalMgrHome seechangePortalMgrHome =
(SeechangePortalMgrHome) javax.rmi.PortableRemoteObject.narrow(
homeObject,
SeechangePortalMgrHome.class);
SeechangePortalMgr portalMgr = seechangePortalMgrHome.create();
/* Set the initail user */
portalMgr.setUser(username);
UserRuntime userRuntime = (UserRuntime)portalMgr.getRuntimeObject();
System.out.print("Run Time User is " + userRuntime.getUserName());
System.out.print("Run Time User is " + userRuntime.getOrgSeq());
// ** cookies for Actuate XXX=(customer sequence ID), YYY=ZZZ isa
dummy per
their requirement
Cookie cCustSeqNumber = new
Cookie("XXX",userRuntime.getOrgSeq());
Cookie cPassword = new Cookie("YYY","ZZZ");
cCustSeqNumber.setPath("/");
cPassword.setPath("/");
??response.addCookie(cCustSeqNumber);
??response.addCookie(cPassword);
} catch (Exception ee) {
System.out.print("Unable to create Portal Manager" + ee);
// at this point we add the logic to produce the bean
return "success";

Similar Messages

  • HT1212 I don't think there is a pass code on my 4S, so how do I get past the request in order to install 7.1.1?

    I want to install ios 7.1.1 on my 4S but it asks me for a pass code. I don't think there is a pass code on this phone. So how do I bypass this request in order to make the installation? thanks.

    Locked Out, Forgot Lock or Restrictions Passcode, or Need to Restore Your Device: Several Alternative Solutions
    A
    1. iOS- Forgotten passcode or device disabled after entering wrong passcode
    2. iPhone, iPad, iPod touch: Wrong passcode results in red disabled screen
    3. Restoring iPod touch after forgotten passcode
    4. What to Do If You've Forgotten Your iPhone's Passcode
    5. iOS- Understanding passcodes
    6. iTunes 10 for Mac- Update and restore software on iPod, iPhone, or iPad
    7. iOS - Unable to update or restore
    Forgotten Restrictions Passcode Help
                iPad,iPod,iPod Touch Recovery Mode
    You will need to restore your device as New to remove a Restrictions passcode. Go through the normal process to restore your device, but when you see the options to restore as New or from a backup, be sure to choose New.
    You can restore from a backup if you have one from BEFORE you set the restrictions passcode.
    Also, see iTunes- Restoring iOS software.

  • How do I get past the request to turn off Itunes.

    Hi people,
    Sorry if this question has already been answered. I tried to find some help on the forum but the question may have been asked a different way and I couldn't find it.
    So my problem, I have downloaded xcode_3.2.6_and_ios_sdk_4.3.dmg and it is sitting in my downloads folder.
    I have a Mac Mini with Mac OS X Version 10.6.8
    According to all messages, everything should be fine for me to install.
    So I click on the .dmg file and it churns away for a while showing various progress messages. All goes well until it has about 2 minutes to go. Then a popup appears that says I must shut down ITunes before the install can finish. Well, I don't have ITunes running.
    I have checked everything I can to make sure there is nothing connected that may somehow be accessing ITunes. I have even re-booted the computer and done nothing but run the install. It still stops at 2 minutes and says I have to shut down ITunes.
    The only way I have been able to get out of the popup is to force a shutdown using the Apple icon on the top left of my computer screen.
    Can anyone tell me what I need to do to get xcode to install?
    Thanks
    EastWind

    You must close:
    - iTunes
    - Simulator
    - Xcode
    - Application Loader
    ...and...run Activity Monitor, locate and kill 'iTunes Helper', then try installing again.

  • Getting the Request Object in the EJB published as a Web Service

    Hi experts,
    I have a Portal Service that call a BAPI in a back-end system with the Connector Framework. I have a Portal Component that calls the Portal Service, passing the Locale (request.getLocale()) and the User (request.getUser()) object. It's work fine!
    I need to call the Portal Service by an EJB that is published as a Web Service. The connection between the EJB and Portal Service is ok, but I don't know how to get the Locale and the User object in the EJB to pass to the Portal Service.
    Is possible to get the request object from the HTTP SOAP Request?
    Thanks,
    Gustavo

    Hey Alice!
    The Feature Hashing module is actually a wrapper around
    Vowpal Wabbit's implementation of the murmurhash. Thus, it takes text in, and produces 2^N new features based on the text, where N is the bitsize specified in the module. These features (and not the original text!) should be used during model training.
    The Learner will then keep track of these features behind the scenes.
    When you publish your web service and these features are recomputed for new input text (same N), they are used as the features for scoring.
    Does that make sense?
    Regards,
    AK

  • How can I get a count of objects in the near cache? (Extend client)

    Hi,
    I'm trying to figure out how to get the count of objects in my near cache (from c++ client). Knowing the size of the near cache is a key factor when optimizing configurations for performance.
    However if I call size() on the cache handle I get the count of objects in the cache (ie the cluster). How can I get a count of objects in the near cache?
    Thanks
    Rich Carless

    H Rich,
    It may not be ideal, but I think you may be able to infer the size by using the HeapAnalyzer (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_heap_analyzer.html) facility, specifically the "class" based HeapAnalyzer. Its Snapshot representation http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_snapshot.html provides a mapping between class name and ClassStats (http://download.oracle.com/docs/cd/E15357_01/coh.360/e15728/classcoherence_1_1lang_1_1_class_based_heap_analyzer_1_1_class_stats.html) which provides information on how many instances of a given class type are in memory. Note the reported counts are process wide but if your key or value type are distinct you may be able to infer your answer. I realize this is rather complex, my only other suggestion would be to just make some guesses on size and see how they effect performance.
    Mark
    Oracle Coherence

  • How do I get to the Object Definition Editor?

    I know this has got to be a beyond basic questions and I feel kind of stupid for asking, but how do I utilize the SDK? I am new to working in a Java environment and it's a bit confusing to me at times.
    So, I downloaded the SDK. I know how to add new QPACS in Workflow designer, but, for example, how do I get to the Object Definition Editor?
    Thank you,
    Jennifer

    Hi
    The 7.0.0 version of the ODE was missing a couple of jar files, and this caused some of the functionality to not work properly, specifically "synchronize". (This may have been fixed in later versions, I haven't checked.)
    In order to fix this, copy all .jar files from the WF designer's lib directory to the ODE's lib directory (no overwrite if the file already exists).
    Howard
    http://www.avoka.com

  • Where do I get the Request-Object

    Dear Friends,
    I want to upload a file via HTTP multipart-formdata request (POST).
    For that reason I use the FileUpload-API:
    http://jakarta.apache.org/commons/fileupload/using.html
    Everything is described perfectly and I am very happy that there is such a project!
    But they didn't write how I could create a new Request-Object.
    How do I do that?
    Are there are different types of Request-Objects?
    Here is my test-code so far:
    public class FileUploader12 {
        List items = new ArrayList();
        /** Creates a new instance of FileUploader12 */
        public FileUploader12() {
    // Create a factory for disk-based file items
    FileItemFactory factory = new DiskFileItemFactory();
    // Create a new file upload handler
    ServletFileUpload upload = new ServletFileUpload(factory);
    // Parse the request
    Request request = new Request();
    /*FileItem */ items = upload.parseRequest(request);
    //Create a progress listener
    ProgressListener progressListener = new ProgressListener(){
       private long megaBytes = -1;
       public void update(long pBytesRead, long pContentLength, int pItems) {
           long mBytes = pBytesRead / 1000000;
           if (megaBytes == mBytes) {
               return;
           megaBytes = mBytes;
           System.out.println("We are currently reading item " + pItems);
           if (pContentLength == -1) {
               System.out.println("So far, " + pBytesRead + " bytes have been read.");
           } else {
               System.out.println("So far, " + pBytesRead + " of " + pContentLength
                                  + " bytes have been read.");
    }Thank you very much!
    With best Regards
    MfG
    Inno

    Yes, please understand that commons-fileupload is intended to receive uploaded files on the server, NOT to upload the files to a server.
    If you want to perform a form post from Java code, you should use the commons-httpclient package: http://jakarta.apache.org/commons/httpclient/

  • Remove-DfsnRootTarget - The requested object could not be found

    Hi,
    I just discovered that both target paths in a DFS root target is referenced by NetBIOS name, not FQDN (the names is generalized):
    Get-DfsnRootTarget -Path \\Contoso.local\AccountingSoftware| Format-List
    Path                  :
    \\Contoso.local\AccountingSoftware
    TargetPath            :
    \\Contoso-FS1\AccountingSoftware
    State                 : Online
    ReferralPriorityClass : sitecost-normal
    ReferralPriorityRank  : 0
    Path                  :
    \\Contoso.local\AccountingSoftware
    TargetPath            :
    \\Contoso-FS2\AccountingSoftware
    State                 : Online
    ReferralPriorityClass : sitecost-normal
    ReferralPriorityRank  : 0
    The goal is to remove and re-add the target paths one by one in order to use FQDN.
    When trying to remove one of the targets, I receive the following error:
    Remove-DfsnRootTarget -TargetPath "\\Contoso-FS2\AccountingSoftware" -Path "\\Contoso.local\AccountingSoftware"
    Remove-DfsnRootTarget : The requested object could not be found.
    What could be the reason for this? I get a similar error message both when using the DFS MMC tool and dfsutil.

    Hi,
    Based on your description, we can follow the article below to configure DFS to use fully qualified domain names in referrals.
    How to configure DFS to use fully qualified domain names in referrals
    http://support.microsoft.com/kb/244380/en-us
    Best regards,
    Frank Shen

  • Can you bind to the request object?

    Hi all,
    Here is basically what I am trying to do.
    <h:outputText value='#{request.parameterMap["parameterName"]}' />Sadly, I am not sure how to reference the request object. I trying using this.parameterMap, but that didn't work either.
    By the way, I can not use setAttribute, because some dumb ajax on the page blanks the request. I have a hidden input, so hopefully, I can get around the problem of losing my data this way.
    Thanks,
    Grae

    The request parameter map is exposed through the 'param' variable. So you can do:
    ${param.parameterName}

  • [Solved] The requested object does not exist. (Exception from HRESULT: 0x80010114)

    I have a 8 node cluster with Hyper-V, which will be 10 nodes when it's finally done.
    Recently I've been try to add nodes and though that went fine, after about a week I could not open the Failover Cluster Manager anymore.
    After some checking I found out that the latest added node was giving problems.
    VM's on the node still run and function properly, but most Powershell commands result in a "The requested object does not exist. (Exception from HRESULT: 0x80010114)".
    I can suspend the node with Suspend-ClusterNode, but draining roles was unsuccesful in one case.
    In the other there were no VM's on the node so suspending went fine.
    What I did find out was that when I tried to ping the node from another, proper functioning node, it took a while before the pinging started. It felt like the interface had to come back online on the problem node.
    After that, I could add the cluster to the Failover Cluster Manager. However, Powershell commands still give a 0x80010114 error or a CIM error for when I use Get-NetAdapter.
    A reboot resolves the problem, but only for about a week.
    I know there is a topic with the same title already, but the wbemtest en rollup update "answer" is totally unclear to me why I should change something with wbemtest, or why to install updates that to me have nothing to do with this problem.
    Before I did the ping test from a functioning node I pinged my DC and another node from the problem node just fine.
    No waiting at all.
    The cluster has three networks. Management (host only), Live Migration and iSCSI (also a VMSwitch for certain VM's).
    I have no idea where to look. Evenviewer doesn't give me anything I can work with that I can find...

    Hi,
    Are you using the HP servers? It seems is the HP Nic team service was causing the issue, please try to
     disabled the HP NIC team service from services and restarted the WMI service.
    The related third party information:
    Advisory: (Revision) HP ProLiant Servers - Systems Running Microsoft Windows Server 2012 or 2012 R2 May Experience a Memory Leak Up To 5 Mb/ Hour for Some NIC Teaming Configurations
    http://h20566.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken&javax.portlet.prp_ba847bafb2a2d782fcbb0710b053ce01=wsrp-navigationalState%3DdocId%253Demr_na-c04209163-2%257CdocLocale%253D%257CcalledBy%253D&javax.portlet.tpst=ba847bafb2a2d782fcbb0710b053ce01&ac.admitted=1401176219136.876444892.199480143
    Hope this helps.
    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.

  • How can I get back the quality of ios 5.1.1 back to my iphones 4 and my ipad 2?

    How can I get back the quality of ios 5.1.1 back to my two iphones4 and my ipad2?
    Since more than 6 monthes I can't use
    * video for more than 5 minutes,
    * tv-streams for more than 5 minutes,
    * apple store updates in case of more than one update,
    * itunes download in case of more than one download object,
    * remote control
    * air play with appletv3
    without errors.
    On ios 6.x (incl. 6.1.2) all important apple media integration are just useless.

    I'm sorry, but Apple does not provide a downgrade path for iOS. Because downgrading is unsupported by Apple we cannot discuss it on these forums, but you can use Google to find information on how to install an older version of iOS on any iDevice.

  • How do I get a variable, or object from ABAP STACK.

    Hey Gurus,
    How do I get a variable, or object from ABAP STACK.
    Example: I start my FM. I can see in the ABAP STACK the variable I need. I can see the object; I could use to get my variable. I need to use it in my FM; however I need to reference it in the run time. How do I do that?
    Is there a method I can use for reading ABAP STACK?
    Do I just use command: get reference of u2026?
    Does anyone have an example code?
    Basis version 7
    Thanks in advance
    Martin

    Ah, you mean you want to access a variable from another program in the call stack, yes?  You can do this using field symbols, but please don't try to change a value while doing this, it could really screw things up. 
    this example, is using two programs, where the second is accessing variables of the first program.  Basically just notice that we are using the program name and the variable name when assigning the field symbol.
    report zrich_0006 .
    tables: mara.
    parameters: p_matnr type mara-matnr..
    data: matnr type mara-matnr.
    data: imarc type table of marc with header line.
    matnr = p_matnr.
    select * from marc into table imarc up to 10 rows
                   where matnr = p_matnr.
    perform in in program zrich_0007.
    report zrich_0007 .
    *       FORM in                                                       *
    form in.
      data: field(50).
      data: xmarc type marc.
      field-symbols: <matnr>.
      field-symbols: <imarc> type marc_upl_tt.
    * Assign an individual variable
      field = '(ZRICH_0006)matnr'.
      assign (field) to <matnr>.
    * Assign an internal table
      field = '(ZRICH_0006)IMARC[]'.
      assign (field) to <imarc>.
    * Write out your data
      write <matnr>.
      loop at <imarc> into xmarc.
        write: / xmarc-werks.
      endloop.
    endform.
    Regards,
    Rich Heilman

  • The requested object is locked by another transaction

    Hi All,
    I got a problem while loading data from an ODS to another ODS, it shows 450 records but request is red, it says
    'The requested object is locked by another transaction'
    Message no. MC602
    Diagnosis
    A lock requested by calling an ENQUEUE function module cannot be provided because the object in question has already been locked by its own transaction.
    Technical Information: The C_ENQUEUE routine returns the following values:
    COLLISION_OBJECT = ERSMONFACT
    COLLISION_UNAME = SINGH
    System response
    The ENQUEUE function module triggers an appropriate exception. If this exception was not intercepted by the application program, it leads automatically to the active SAP transaction being cancelled.
    Procedure
    Once the ENQUEUE function module is called, the application program should intercept this exception and react to it appropriately.
    I tried SM12 but there is no lock entry, can u suggest some thing?
    Regards,

    Hello,
    here your dso seems to be lock as some read and write opertaion is happening at the time u r running the dtp.
    Here two things to look :
    1.Check the error that ur getting while running a dtp the process monitor etc try to find the request id which has locked the dso . Copy that request id go to t-code RSRQ see whats this request who is user,target etc..contact user for cancelling the job if it has been stuck for long long time. Copy the JOB ID from  RSRQ for that rquest go to SM37 give the date as there in RSRQ and kill the job
    2.GO to SM12 try to search the object there and remove the lock.
    Thanks,
    Deepak

  • I have paid for ipages 09 on 15/05 but never succed to enter the serial code. After 45 days, altough I was charged by 20 chf, I cannot completely use all ipages tools(impossible to save ). How can I get again the serial code I paid for?

    i have paid for ipages 09 on 15/05 but never succed to enter the serial code. After 45 days, altough I was charged by 20 chf, I cannot completely use all ipages tools(impossible to save ). How can I get again the serial code I paid for?

    Getting the request for a serial number means that at some time you had the iWork ’09 trial installed. You need to delete the trial & then reinstall from the boxed DVD or the Mac App Store. The files to delete are the iWork ’09 folder from the main HD > Applications; the iWork ’09 folder in HD > Library > Application Support & the individual iWork application plist files found in HD > Users > (your account) > Library > Preferences for each user. The easiest way to fix the problem is to use Yvan Koenig's AppleScript that removes the files. You can find it on his box.com account in for_iWork'09 > other_iWork'09 items > uninstall iWork '09.zip. Download uninstall iWork '09.zip, decompress it, open it in AppleScript Editor and click the Run button.
    Apple's support article on the subject says it's due to having a copy of the trial that is a higher version that the one you've purchased, but I'm not sure that is very common. This problem started with Snow Leopard & it seems to be some code in the iWork installers that doesn't do what it should.

  • How can we find out the info object in a query ....?

    How can we find out the info object in a query is belongs to that particular info cube? If the query is built on a Multiprovider having 4 different info cubes.

    Hi,
    If you have restrictions at the infoprovider level in the RKF then it is coming from that particular infocube.
    Or go to the selection option in the multiprovider...her you can get the mappings of which key figure is populted from which infocube.
    For characteristics you will have to look for identification tab in the characteristics option.
    Thanks

Maybe you are looking for

  • Video Card for Premiere and Photoshop?

    Hi.   I thought I was reasonably well set up when I got an nVidia GeForce GTX 470 for video editing.   Unfortunately life throws us curve balls... I'm upgrading one of my current monitors to a much better quality IPS-panel monitor.   At the top of my

  • Oracle 10g (10.1.3.1.0) ant-oracle-classes.jar

    Hi, I dint find Ant Task for stopping/starting/restarting the Oracle Application Server, but the http://download-uk.oracle.com/docs/cd/B31017_01/web.1013/b28951/anttasks.htm#BEIHFIIC specifies that you can do so with the Ant Tasks. I went through "an

  • Type RAW not accepted in function module for workflow

    Hi, this is a crazy thing for me: I like to start a workflow from a report. Usually will use the function module SWU_START_WORKFLOW". Usually this is no problem. Here is my current problem: One of the elements I have to transfer to workflow is define

  • Color correcting advice

    Hi everyone, I have absolutely zero experience with color correcting, but a project that I am working on seems to be in desperate need of it. I am wondering if anyone here can walk me through some steps to get this looking better? One camera was shot

  • My device won't register in app developer

    I have inadvertly tried to download ios 5 upgrade from app developer portal without registering my ipad I have a developer license