OID populate other http request attributes

I am trying to figure out how to customize my OID SSO so that it adds attributes to the HTTP Request. I have used the name mapping java module to customize my certificate the OID user mapping. I imagine there has to be a similar interface for addition attributes to the request so that my partner applications can have user informationwithout reaching into the OID .
Your assistance is greatly appreciated,
Rachel

Bernhard:
Actually the headers are not set to null. I have an intermediate index.jsp page which is the first page that is redirected to by the AM - it is this page which calls my LoginServlet.
The value appears consistently on this index.jsp page but after it is forwarded to the LoginServlet it starts behaving inconsistently. I check the system.out log in my websphere /logs folder and that tells me that LoginServlet does not consistenly get these values from the header.
The wierd part is that if I use cookies or attributes, it works perfectly - each time every time. However, only in the case of headers (which is the method i am required to do) it behaves inconsistently.
ANY feedback/help on this would be really appreciated bern.. thanks..
~saahil

Similar Messages

  • When my swf in a html page connected with a socket server other http requests were blocked, how to resolve?

    I have used php to write a socket server(text chat server),
    then I use xmlsocket to write a client, I put this swf file in my html page, erverything of this client swf were ok: ervery clients could send or receive messages, but the other http request in this html page was unable to send(or receive) data from webserver,
    webserver and chat server were on the same server,
    and I have tried to use socket to instead if xmlsocket in my flash, but the new swf can only work in flash cs3, but it couldn't work in html page as the chat server can't send the security xml file to this swf, and I have also use Security.loadPolicyFile("http://192.168.139.128/crossdomain.xml"); to load security file, but it took none effect.
    Is there anyone can suggest me ?
    That's very kind of you!

    Hi Franco,
    Yes, I solved that by reinstalling Java 6 Update 21.
    There are three versions for Solaris namely, SPARC, x64 and x86. Our platform is SPARC and I think System admin has installed the wrong version instead of installing SPARC version of Java.
    After installing SPARC version of Java this got resolved. And I confirmed everything is fine by running a small program as below. You can run this program from command line using the -d64 flag. If the installation is wrong you will get the same exception as I mentioned.
    public class Analyzer {
          public static void main(String args[]) throws Exception{
               InputStream fin = new FileInputStream(args[0]);
               int iSize = fin.available();
               byte mvIn[] = new byte[iSize];
               fin.read(mvIn,0,iSize);
               fin.close();
               String strText = new String(mvIn);
               PrintStream fout = new PrintStream(new FileOutputStream(args[0]+".csv"));
               fout.println("Before,After,Seconds");
               Pattern p = Pattern.compile("\\[(?:Full |)GC (\\d*)K->(\\d*)K\\(\\d*K\\), ([\\d.]*) secs\\]");
               Matcher m = p.matcher(strText);
               while(m.find()){
                    fout.println(m.group(1)+ "," + m.group(2) + "," + m.group(3));
               fout.close();
    }Hope this helps.
    Regards,
    Prabhu

  • Use request attributes in JSF

    Is there a way we can pass data from one form bean to the other using request attributes insted of session attributes?
    I am able to work with session attributes using
    HttpSession mySession = (HttpSession) FacesContext.getCurrentInstance().getExternalContext().getSession(true); and setting attributes to it, but getting null pointers(occassionally) when I retrieve the atribute and work with it.
    getSession(false) isnt helping either.
    Looks like facesServlet is creating a new request when it forwards to next page. Any idea on how to get the Faces Servlet do something like request despatcher forward, for navigation so I can work with request attributes?
    Appreciate your input.

    Can I have just one backing bean and use it for all jsps in the app? App has 4 flows from home page and mutiple jsps in each flow. Each jsp has multiple form fields. Is that OK?
    Any way to passing data/objects between different backing beans - other than using session attributes? I had similar problems working on Struts app as well.

  • Business Service with multiple HTTP Request Methods

    hi all -
    I'm new to OSB and trying to prototype a solution. I have a service provider that exposes a number of HTTP operations (GET/PUT/POST/DELETE). It's a JAX-RS implementation.
    I was looking to create 1 proxy service and 1 business service for that service provider. But, within my business service, I must chose a 'HTTP Request Method' and it allows only 1 type (either GET, PUT, POST, DELETE). So, I have something working, but only for a single type (POST in my prototype). I figure I could create more proxy and business services for the other HTTP Request Methods, but I'm not sure if this is the correct approach (design/architecture).
    My other thought was to create a proxy service to front the service provider, but looking at the documentation, it looks like there should be a business service for each proxy service. If it's possible to use a proxy service without a business service to mediate the service provider, where would I add my URLs for the service provider in the proxy service.
    My apologies on the 2 part architecture/design question. I thought the group would help with getting me started.
    thanks jim

    Hi,
    Frankly I dont know too much on this topic but following links may help you:
    http://help.sap.com/saphelp_nw04/helpdata/en/25/dda73e5b7a424de10000000a114084/frameset.htm
    Troubleshooting ICF: http://help.sap.com/saphelp_nw04/helpdata/en/80/b2dd3a6dac703be10000000a11405a/content.htm
    Possibly experts in this forum will be able to help you:  Application Server->Internet Transaction Server (ITS)
    Regards,
    Gourav

  • Filter to convert HTTP request to JNLP arguments fails every other time

    I want to pass HTTP request parameters to a Java Web Start program as arguments. I have implemented a filter which adds the arguments from the request parameters using XML DOM, and I also set the Last-Modified date to the current date/time. [ I am sort of thinking I should put the date as the file date -- not sure ]
    The filter works successfully ever other time I invoke a given URL. If I switch parameters, it looks like the filter works every time.
    When the filter works, there are HTTP GET and HEAD requests. When the filter fails, there are three HEAD requests and one GET request. Using the apache soap TCP Tunnel/Monitor, it looks like the HTTP request parameters aren't being passed for the second GET.

    Varad and Sc0tt,
    Thank you both for your responses.
    Varad – Yes, I can/will reduce the amount of data so it does not cause the tabular form to go over the 2000 field limit. If that is not possible, I will at least make the users aware of this issue. Since the same data is used for the other pages in the application, the users might want to keep all the data.
    Sc0tt – thanks for providing the information for your environment and settings. To plan for the future, we will have to set the value to something high also, around 8-10K range, and adjust later if we have to.
    Thank you both, I will mark both of your answers as helpful and the question as being answered.
    DP
    (Have either of you used the jquery datepicker solution? If yes, can you please take a look at my thread: Thread: Jquery Datepicker calendar problem with page scrolling
    Jquery Datepicker calendar problem with page scrolling

  • Can a servlet handle other than HTTP request..?

    I was asked this question in a interview. Can anyone clear me this.
    Can a servlet handle other than HTTP request..?
    If yes, please give me a working example.

    Can anyone guide me to achieve this.?
    Note: If anyone worked with servlet responding ftp request, please send me the code.
    Yes, a servlet can handle requests in other protocols
    like FTP.
    To achieve this, your Servlet ought to inherit from
    javax.servlet.GenericServlet or implement the
    javax.servlet.Servlet interface. To code the Servlet,
    you should have a working knowledge of ftp protocol.
    When your servlet extends
    javax.servlet.http.HttpServlet, it can process http
    requests only.
    Cheers,
    ram.

  • I can't found my request attributes in FlexContext.getHttpRequest()

    I´m including an swf (the compiled version of my mxml
    page) in a jsp which is part of my Struts application, like this:
    <embed pluginspage='
    http://www.macromedia.com/go/getflashplayer'
    width='750'
    height='200'
    src='
    http://pc8251e:7001/samples/pruebasAle/chooser.swf'/>
    This is the chooser.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    creationComplete="{myClientillo.getList()}">
    <mx:RemoteObject id="myClientillo"
    destination="chooserProvider"
    showBusyCursor="true" />
    <mx:DataGrid height="200" width="750"
    dataProvider="{myClientillo.getList.lastResult}" >
    <mx:columns>
    <mx:Array>
    <mx:DataGridColumn dataField="id" headerText="Id"/>
    <mx:DataGridColumn dataField="campo1"
    headerText="Nombre"/>
    <mx:DataGridColumn dataField="campo2"
    headerText="Apellido"/>
    </mx:Array>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    I' ve configured in the remoting-config.xml the Remote Object
    chooserProvider like this:
    <destination id="chooserProvider" >
    <properties>
    <source>samples.providers.ChooserProvider</source>
    <scope>application</scope>
    </properties>
    </destination>
    In the samples.providers.ChooserProvider.java, I want to
    acces the attributes that are setted in the HTTP request. I tried
    using the FlexContext.getHttpRequest() and the
    FlexContext.getFlexSession(), but the attributes doesn´t
    exist. Here is the code of the ChooserProvider.java
    public Object[] getList()
    System.out.println("OTRA VEZ EN ChooserProvider.getList()");
    HttpServletRequest req = FlexContext.getHttpRequest();
    FlexSession flxSession = FlexContext.getFlexSession();
    System.out.println("FlexContext.getHttpRequest(): "+req);
    System.out.println("FlexContext.getFlexSession() :
    "+flxSession);
    Enumeration enum = req.getAttributeNames();
    while (enum.hasMoreElements()) {
    String element = (String) enum.nextElement();
    System.out.println(element+" <>
    "+req.getAttribute(element));
    Enumeration en = flxSession.getAttributeNames();
    while (en.hasMoreElements()) {
    String element = (String) en.nextElement();
    System.out.println(element+" -->
    "+flxSession.getAttribute(element));
    ArrayList list=new ArrayList();
    return list.toArray();
    but this is the output in the console
    OTRA VEZ EN ChooserProvider.getList()
    FlexContext.getHttpRequest(): Http Request:
    /samples/messagebroker/amf
    FlexContext.getFlexSession() :
    flex.messaging.HttpFlexSession@1a0d111
    weblogic.servlet.network_channel.port <> 7001
    __flexSession --> flex.messaging.HttpFlexSession@1a0d111
    Where are the attributes that i have setted in the request in
    the previous page? How can I access them ?
    I'm using weblogic 8.1 and Flex 2 with Flex Data
    Services

    Have you signed up for a personal hotspot with your cell provider?

  • Setting the header in http request object

    I am facing a problem while trying to test a particular flow of my application.The details are given below:
    The controller servlet of my main application reads the header "Referer" from the request object and then based on this it forwards the request to appropriate servlets.For testing my application I am writing a test servlet which receives a request object from a test jsp and sets all the necessary attributes in the request object and passes this request object to the doGet () method of the main application's controller servlet. But while trying with this I find that the main controller fails to forward to the correct servlet because it receives incorrect referer information. So my question is how can I set my customised "Referer" in the header of the http request so that the application's controller servlet forwards to the correct servlet?Is there any means to set the request header in servlet or jsp?

    As far as I know you can't change the request in a servlet or .jsp, but you can in a Filter. Wrap the original request object in a wrapper class before passing it to chain.doFilter().

  • HTTP request/response object not thread safe.

    According to the serlvet spec. Http Request/Response
    are not thread safe. Quoting from the Spec:
    " Implementations of the request and response objects are not guaranteed to be thread safe. This means that they should only be used within the scope of the request handling thread. References to the request and response objects must not be given to objects executing in other threads as the resulting behavior may be nondeterministic."
    This has prompt me to ask the following question.
    For Example I have a servlet which does the following
    request.setAttribute("myVar","Hello");
    The request and response is dispatched(using RequestDispatch.include(request,response)) to another
    servlet which retrieve this attribute i.e request.getAttribute("myVar");
    Is this safe?
    The Spec only said "The Container Provider must ensure that the dispatch of the request to a target
    servlet occurs in the same thread of the same VM as the original request." I take this meaning that the targeting servlet does not have to run in the same thread(only dispatch), otherwise it would be safe.

    To put it another way, you can only have onle thing working on a request at a time. For instance, the ServletContext is available to all servlets running on a server. If you tried to save a particular request to the ServletContext, it would potentially be available to many concurrently running servlets. They could all change whatever in it at the same time. Each servlet is in its own running thread. Hope that helps some.

  • Session replication at every http request

    Hi everybody
    I'm trying to use ZKoss Framework (www.zkoss.org) to develop a
    web application and deploy it in a Clustered WebLogic Server.
    The main issue I'm facing is that the "state" of the visual interface
    is stored inside the http session, and so, when node that handle
    the http request changes, the state is resetted and then the page changes,
    even if there was no user intervention.
    So I need to replicate the whole session at every http request,
    to prevent strange behaviours when the request handler node's changes.
    Do you know some settings that will force WebLogic Server to replicate the whole
    session at every http request?
    Thanks in advance.
    bye.

    Hi Marco,
    Yes, You are right But You NEED NOT to put setAttribute("key","value")...code in all your JSPs. because if the Attribute data of Session is changed then Automatically it will be replicated (only the Changed Data and not the Data which is unchanged). Even we need not to worry about replicating the Unchanged Data Again...And WebLogic will take care of ChangedData by itself. There is no other alternate solution available in weblogic to do this...Even no such similar Element available in Deployment descriptors as well.
    Actual Link is Broken http://download-llnw.oracle.com/docs/cd/E13222_01/wls/docs90/cluster/failover.html
    Any way i am copy-pasting few Lines from E-Docs (the actual link i am not able to find ..but may be u can open the cached page:
    http://74.125.153.132/search?q=cache:bxTbqJEsQTsJ:download-llnw.oracle.com/docs/cd/E13222_01/wls/docs90/cluster/failover.html+setAttribute+Session+replication+weblogic&cd=6&hl=en&ct=clnk&gl=in
    ---------------------------If you are not able to open the link then please refer to the E-Docs copy-paste content below --------------------------
    Programming Considerations for Clustered Servlets and JSPs
    This section highlights key programming constraints and recommendations for servlets and JSPs that you will deploy in a clustered environment.
    Session Data Must Be Serializable
    To support in-memory replication of HTTP session states, all servlet and JSP session data must be serializable.
    Note:     Serialization is the process of converting a complex data structure, such as a parallel arrangement of data (in which a number of bits are transmitted at a time along parallel channels) into a serial form (in which one bit at a time is transmitted); a serial interface provides this conversion to enable data transmission.
    Every field in an object must be serializable or transient in order for the object to be considered serializable. If the servlet or JSP uses a combination of serializable and non-serializable objects, WebLogic Server does not replicate the session state of the non-serializable objects.
    Use setAttribute to Change Session State
    In an HTTP servlet that implements javax.servlet.http.HttpSession, use HttpSession.setAttribute (which replaces the deprecated putValue) to change attributes in a session object. If you set attributes in a session object with setAttribute, the object and its attributes are replicated in a cluster using in-memory replication. If you use other set methods to change objects within a session, WebLogic Server does not replicate those changes. Every time a change is made to an object that is in the session, setAttribute() should be called to update that object across the cluster.
    Likewise, use removeAttribute (which, in turn, replaces the deprecated removeValue) to remove an attribute from a session object.
    Note:     Use of the deprecated putValue and removeValue methods will also cause session attributes to be replicated.     
    Thanks
    Jay SenSharma
    Edited by: Jay SenSharma on Feb 11, 2010 10:24 PM
    Edited by: Jay SenSharma on Feb 11, 2010 10:26 PM

  • Request attribute vs parameter

    Hi all,
    I am getting confused of request attribute and request parameter. What i understand is that a parameter is a piece of info that send with the request. Such that infomation (parameter) come from a form component (text field, radiobuttion,selection...). By using servlet.getParameter("my text filed") i can retrieve what user enter into the form.
    In the similar maner, if from one servlet, i use request.setAttribute("a message","content of a message") i can also retrive the content of the message from another servlet using getAttribute.
    In short, parameter is for form-servlet communication and attribute is for servlet-servlet communication, am i correct? Can I change the parameter of the request from a servlet?
    Is there any other different between these 2?
    Thai
    Message was edited by:
    lnthai2002

    I still dont get it. You said
    HttpServletRequest doesnt have get/setAttribute(arg0, arg1) method.
    But it does. http://java.sun.com/javaee/5/docs/api/
    Again, my concern is whether i can exchange value of parameter and attribute. Assuming the following scenario:
    a user want to access a protected servlet /financial. This servlet notice that the user has not been login yet. Thus, it record the url of the request as a attribute:
    //inside /financial servlet
    if((req.getSession(false).getAttribute("curUser")) == null)
          dest="/WEB-INF/docs/authentication/login.jsp";
          req.setAttribute("oriUrl",req.getRequestURL());
          } then it forward the request to login.jsp. After user input his infomation, the login.jsp send a NEW request with the user's credential to the /authentication servlet. Now, as you can see, when the authentication servlet receive the request, it doesnt know that the user was trying to access the /financial servlet before because the oriUrl attribute is lost. What i getting at here is how I can retain the oriUrl attribute over requests? I need to capure that attribute and associate it with a new request as a parameter. But HOW?
    Hope you can help
    Message was edited by:
    lnthai2002

  • Adding HTTP Header Attribute

    Hi all,
    in order to get our Load Balancer to work correctly, we need to add an attribute to every HTTP Request that comes from the portal. In 4.5 we have added it in the common/include.asp file.
    Call Response.AddHeader ("MyAttribute", "MyAttributeValue")
    Do you know where is the right place to put the code in 5.0.2. Have you any examples of Java code to do this?
    Thank you very much.
    Alberto

    I'm going to take a wild guess at this -- on line 463 of com.plumtree.portaluiinfrastructure.activityspace.Interpreter, you might try adding the header you need to the response (IXPResponse) object somewhere inside of HandleGatewayRequest.
    A word of caution: I think Plumtree would frown upon this customization, and here's why.
    My guess was based on 5.0.1 as I haven't seen the source code provided to customers for 5.0.2 yet, but I suspect that they've refactored Interpreter into uiinfrastructure so that it's compiled instead of distributed to customers (based on this comment in the source):
    /* Note: There should be no portaluiinfrastructure code in this file. This * will no longer be an issue when this file, along with AppWarmUp, are * moved to the uiinfrastructure jar. */
    So if this is even possible in 5.0.2 (and I suspect it's not), it probably won't be possible to maintain this customization in future releases of Plumtree.
    I'm interested to hear the official response from Plumtree because one of our customers is considering making a change to Interpreter and I've been cautioning them against it because it might not be supported in future releases.
    Hope this helps,
    Chris Bucchere | bdg | [email protected]| www.bucchere.com

  • Get an instance of com.bea.p13n.http.Request in Rolemapper

    In my portal project I wrote a Rolemapper, and because
    of dynamic nature of role computation for portal
    resources, I need to access portal resources and classes
    in RoleMapper, P13nResource is available as type of
    "Resource", also I am able to get an instance of
    "EntitlementRequest" from "P13nContextHandler" which is
    of type "ContextHandler", but the attributes of
    EntitlementRequest are where I am having problem.
    Here's the code snippet from my rolemapper ...
    public Map getRoles (Subject subject,Resource resource,
    ContextHandler handler)
    if(resource instanceof P13nResource)
    EntitlementRequest ereq=
    com.bea.p13n.entitlements.common.EntitlementRequest)
    handler.getValue(
    EntitlementConstants.PREDICATE_ENT_REQUEST);
    for(int i=0;i<ereq.getAttributes();i++)
    Object obj=ereq.getAttributes(); //runs fine
    //following code crashes the application without
    //the stack trace
    if(obj instanceof com.bea.p13n.http.Request)
    //some work here
    else if(obj instanceof com.bea.p13n.http.Session)
    //some work here
    I have seen interesting scenarios from intellij
    debugger window connected remotely to weblogic server,
    showing me the instance of "obj" mentioned in code
    exactly of the type I am checking as instanceof, it
    beats me now, any help would be appreciated.
    Thanks.>

    Good news folks, I have finally managed to solve the problem using reflection. I can now rest in peace.

  • Return-to="currentPage" - Not able to get request attribute in page

    My JPF portlet has request "Request Attribute Persistence" as session.
    The Page Flow Refresh Action attribute is "refreshAction".
    My refreshAction annotation looks like this
    * This is called when the page is refreshed.
    * @jpf:action
    * @jpf:forward name="success" path="begin.do"
    * @jpf:forward name="goBackToCurrentPage" return-to="currentPage"
    * @jpf:forward name="goBackToPreviousPage" return-to="previousPage"
    * @jpf:forward name="goBackToPreviousAction" return-to="previousAction"
    When I try to forward to "goBackToCurrentPage", the request attribute that I had stored are not accessible in the JSP page.
    The only way for me to get that working is to change the forward to "goBackToPreviousAction".
    In this way, the action class will be called, which will inturn set the attribute in the request scope. However, this is a very expensive way.
    Is there something that I am missing here?

    Hi again!
    I must admit that I, after some tesing, had to leave the "goBackToPreviousAction" solution since it gave me some unwanted side effects.
    Instead I found a solution that actually works as one would expect.
    Thanks Graham Patterson!
    (http://forums.bea.com/bea/thread.jspa?messageID=200571206)
    My pfRefreshAction() now instead looks like this.
    * @jpf:action
    * @jpf:forward name="goBackToIndexPage" path="index.jsp"
    protected Forward pfRefreshAction()
    Forward forward = null;
    if ("forward to index page condition")
    forward = new Forward("goBackToIndexPage");
    return forward;
    Regards/ Thomas Lindbom :-)

  • Javax.servlet.forward.request_uri request attribute

    Hi,
    I have declared a security-constraint on my web application, which redirects to a page with a form.
    I want to know the initial request. It usually can be retrieved in the javax.servlet.forward.request_uri request attribute, so by doing
    request.getAttribute("javax.servlet.forward.request_uri")
    But this always returns me null.
    If I test the same thing on Tomcat, it works fine.
    This attribute come with Servlet 2.4, and Weblogic 11g is JEE 5 compliant (so Servlet 2.5). So it should work.
    Is there a particularity for Weblogic ?
    Regards

    >
    This attribute come with Servlet 2.4, and Weblogic 11g is JEE 5 compliant (so Servlet 2.5). So it should work.
    Is there a particularity for Weblogic ?This attribute does exist and has to be filled when a forward is done. However there's no strict requirement that the j_security_check is handled internally by a forward. If it's not, then that request attribute wouldn't come into play.
    I've never used it, so caveat emptor, but there is a public class we have which does appear to have some methods that may be helpful to you.
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13941/weblogic/servlet/security/ServletAuthentication.html
    ServletAuthentication allows both form-based authentication and programmatic authentication in servlets. It performs the authentication call through the Realm and sets the user information into the session.And the static getTargetURLFromFormAuthentication method:
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e13941/weblogic/servlet/security/ServletAuthentication.html#getTargetURLForFormAuthentication(HttpSession)
    -steve-

Maybe you are looking for