HTTPURLConnection response with multiple Set-Cookie Header key
I set up a connection to a server and it gives me a response. This response has two header keys but when I loop through like so many reference and how-to sites tell me I only get one and its the last value.
This is some code that I'm using:
for (int i=1; (headerName = conn.getHeaderFieldKey(i))!=null; i++) {
System.out.println(headerName);
if (headerName.equals("Set-Cookie")) {
cookie += conn.getHeaderField(i); }
}Has anyone attempted this successfully? This code was copy and pasted from an example claimed to work but I used it myself and it doesn't work.
This is the response message:
HTTP/1.1 302 Moved Temporarily
Date: Mon, 16 Feb 2009 03:47:47 GMT
Server: Apache
Set-Cookie: JSESSIONID=E7C54E0ECE8CCFD89EF91FF8A47E34BC; Path=/
Location: http://<SITEURL>/redirecting.jsp
Content-Length: 0
P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE PSA"
Keep-Alive: timeout=15, max=15
Connection: Keep-Alive
Content-Type: text/html;charset=ISO-8859-1
Set-Cookie: BIGipServerI2O_pool_A=1815557130.20480.0000; path=/
I just read in the Bug database that this is a JDK 1.4 bug, with no workaround proposed. I am using JDK 1.3.
Does anyone out there know about a workaround or what other scheme I could use to do the same thing? (For me it's necessary to set at least the User-Agent and the Cookie headers).
Similar Messages
-
Multiple set-cookies directives
Hi All- I'm testing against an http server that sends multiple set-cookies directives (there are 4 cookies total). As far as I can tell, it is legit HTTP to either send a single set-cookie directive with multiple cookies in it, or multiple set-cookies directives. I am getting erratic behavior. Using the wtk emulator, i am able to receive and process multiple set-cookies directives. Using some phones it works, on others it doesn't. I am trying to create a unit test for my code, and I am unable to figure out how to set up the classpath the same way the emulator does to work with multiple set-cookies directives.
I searched the jars in the wtk22 directory, and it appears that wtklib/emptyapi.zip, wtklib/gcf-op.jar, lib/midpapi10.jar and lib/midpapi20.jar all contain the HttpConnection class. I am guessing that the emulator is picking up a different implementation than my unit test or the phones that don't work? Has anyone encountered and solved this problem before? Is there a way at runtime to determine from which jar a class was loaded?
thanks,
BleuI have a very similar authentication flow in my app. Using native calls (HttpClient) I am able to retrieve the authentication token, and can easily set a cookie with that token, and use the cookie with subsequent
native calls via HttpClient.
I believe that what you are asking for is the ability to add that cookie (with the token you got natively) into the webbrowser control's cookie store
BEFORE trying to load your dashboard page. You want your webbrowser control's request for the dashboard page to provide the cookie so that the user doesn't have to log
in again, and only one webbrowser request is made. Is this correct?
Sadly, I do not think this is possible. The other answers describe how to add a cookie to a webbrowser control's page after that page has been loaded. This is adding the cookie to the "document" within the browser control, not
into the webbrowser control's store. These approaches will not allow you to add the cookie into the webbrowser control's store, ahead of time, so that it will be sent when you first request the page.
If I am correct about what you are asking for (I want this too!) it is not supported on Windows Phone as you cannot write directly to the webbrowser control's cookie store. You can read it, but not write to it. It's sad as this particular
authentication flow is very common, and easy to achieve on both iOS and Android... just not on Windows Phone.
To get around this in my app, I perform my native authentication (HttpClient) and then authenticate
again within the webbrowser control itself. Basically, load the login page into the browser, then submit the login form via eval of JavaScript, and when that finishes loading (valid
response), load the actual target page. This is a fragile and inefficient hack, but it seems to work.
Hope this helps... -
How to deal with the "Set-Cookie" field in HTTP header??
I follow the RFC-2616 specification to write a socket program to fetch web pages.
I have to deal with all the fields included in the HTTP header.
But the RFC-2616 doesn't talk anything about the "Set-Cookie" field.
Does anyone know how to handle this field or provide me any useful documentation.
Any help is appreciated.A cookie is set with the "Set-Cookie: "-field in the http header, like this:
Set-Cookie: mycookie=someValue
This cookie should only be returned to the same host as it came from, like this in the http header of a request:
Cookie: mycookie=someValue
If the parameter looks like this:
Set-Cookie: mycookie=someValue; path=/cgi-bin
, the cookie should only be returned to the host if the request path starts with /cgi-bin
If the parameter looks liek this:
Set-Cookie: mycookie=someValue; domain=.mydomain.com
, the cooke should be returned to all hosts in the .mydomain.com-domain
There is also a "expires="-field, which works as expected and a "secure"-field, which I'm not sure how to handle. Maybe the cookie should only be sent to an SSL-enabled host?
Hope this helps you. Bye,
Dag W. -
Whats happening to my set-cookie header?
I'm writing a desktop client for a Django app running on an https domain.
I'm attempting to retrieve cookies set by the django site when I call the site using URLRequest as follows:
var urlVariables = new air.URLVariables();
urlVariables.foo = "bar"
var request = new air.URLRequest("https://www.example.com/api/foo/");
request.data = urlVariables;
request.method = air.URLRequestMethod.POST;
var loader = new air.URLLoader();
loader.addEventListener(air.HTTPStatusEvent.HTTP_RESPONSE_STATUS, httpStatusHandler);
loader.addEventListener(air.Event.COMPLETE, completeHandler);
loader.addEventListener(air.IOErrorEvent.IO_ERROR, ioErrorHandler);
loader.load(request);
However if I loop over the headers returned by the site like so...
function httpStatusHandler(event){
for(var i=0; i<event.responseHeaders.length; i++){
air.trace(event.responseHeaders[i].name);
...I discover that that the Set-Cookies header is conspicuously absent.
Is this a deliberate security restriction for calls to HTTPS sites? I'm completely baffled.
Any help appreciated.Go into the System Preferences and click on Users & Groups. Try creating a new user account and then log into it to see if you have the same issues. Since your hard drive appears to be fine with plenty of space on it, and you have no major permission's issues, creating a new user for test purposes will help confirm whether you are dealing with some sort of software issue. Did you recently install some new software?
If a new user account resolves the issue then open the Activity Monitor application located in the Applications/Utiliteis folders and click on the CPU button. In the lower left corner you should see a summary listing the % User, % System, % Idle. What are these percentages? If the CPU idle percentage is near zero then you have a process running that is consuming your SPU time. To try and find it pull down the menu to select 'All Processes', then click on the %CPU column to sort by the percent that each process is consuming your CPU. The numbers constantly change, but do your best to see if there are one or two processes consuming the majority of the CPU time and post the names. Then do the same test in the new user account. I suspect you may have some process from a previously installed utility, virus checker, etc. that is keeping your system busy. I've included a screenshot from my system below. It doesn't have much going on, and as you can see in the lower left corner the CPU is basically idle most of the time. If I were to launch a CPU intensive app the numbers would change dramatically. -
Download to excel with multiple lines in header
Hi experts,
Is there any Funtion module available to download an internal table contents into Local directory of PC with multiple lines in header.
i.e. let us say i hv internal table of 5 entries with 3 columns...
i need to download this 5 entries into an excel file with some texts above the table contents...
For eg : in the below format...
Sample line 1
sample line 2
sample line 3
colheader1 colheader2 colheader3
item1
item2
item3
item4
item5
Please help.
Edited by: Lakshmiraj on Jul 15, 2010 3:26 AMThere is another option of using OLE automation Please check the link below
http://wiki.sdn.sap.com/wiki/display/Snippets/ABAP-OLEAutomationusing+MS-Excel
OR
chek for the example program in Tcode DWDM ( OLE example )
OR
Use FM KCD_EXCEL_OLE_TO_INT_CONVERT ( Fm Uses the same OLE automation)
Hope it helps
Anup -
ProtocolException: Bad Set-Cookie header
I am getting the below error after sending the request xml in weblogic portal 10.3,
Request XML is inside <soapenv> tags and I am not pasting the request xml, but directly the error I am getting after that....
headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
12/06 19:26:18 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
12/06 19:26:20 ERROR n.common.gateway.HttpSubmitter - Exception caught #1: exception:
java.net.ProtocolException: Bad Set-Cookie header: NSC_ttqvbutbd_tqmbu_mcw=ffffffff728afa3445525d5f4f58455e445a4a42156b;path=/;httponly
No '=' found for token starting at position 76
at HTTPClient.Cookie.parse(Cookie.java:243)
at HTTPClient.CookieModule.handleCookie(CookieModule.java:454)
at HTTPClient.CookieModule.responsePhase1Handler(CookieModule.java:403)
at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:724)
at HTTPClient.HTTPResponse.getReasonLine(HTTPResponse.java:202)
at net.verizon.common.gateway.HttpSubmitter.sendRequest(HttpSubmitter.java:281)
at net.verizon.common.gateway.HttpSubmitter.send(HttpSubmitter.java:89)
at net.verizon.common.gateway.ssp.request.SearchByMonRequest.send(SearchByMonRequest.java:30)
at net.verizon.portal.helper.OrderStatusHelper.getAccountDetailsFromSSPForMON(OrderStatusHelper.java:976)
at net.verizon.portlet.bean.OrderStatusLoginBean.submit(OrderStatusLoginBean.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:95)
at javax.faces.component.UICommand.broadcast(UICommand.java:383)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at com.bea.portlet.adapter.faces.FacesContentStubImpl.processAction(FacesContentStubImpl.java:246)
at com.bea.netuix.servlets.controls.content.FacesContent.raiseFacesAction(FacesContent.java:257)
at com.bea.netuix.servlets.controls.content.FacesContent.handlePostbackData(FacesContent.java:195)
at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:686)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogicx.servlet.gzip.filter.GZIPFilter.doFilter(GZIPFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at net.verizon.webapp.RequestFilter.doFilter(RequestFilter.java:172)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
And then Request #2
12/06 19:26:20 INFO n.common.gateway.HttpSubmitter - Sending Request #2: (POST):
Again same request XML sent... And then the error coming now is...
headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
12/06 19:26:20 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
12/06 19:26:38 ERROR n.common.gateway.HttpSubmitter - Exception caught #2: exception
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
.....etc.....
Please help !I am getting the below error after sending the request xml in weblogic portal 10.3,
Request XML is inside <soapenv> tags and I am not pasting the request xml, but directly the error I am getting after that....
headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
12/06 19:26:18 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
12/06 19:26:20 ERROR n.common.gateway.HttpSubmitter - Exception caught #1: exception:
java.net.ProtocolException: Bad Set-Cookie header: NSC_ttqvbutbd_tqmbu_mcw=ffffffff728afa3445525d5f4f58455e445a4a42156b;path=/;httponly
No '=' found for token starting at position 76
at HTTPClient.Cookie.parse(Cookie.java:243)
at HTTPClient.CookieModule.handleCookie(CookieModule.java:454)
at HTTPClient.CookieModule.responsePhase1Handler(CookieModule.java:403)
at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:724)
at HTTPClient.HTTPResponse.getReasonLine(HTTPResponse.java:202)
at net.verizon.common.gateway.HttpSubmitter.sendRequest(HttpSubmitter.java:281)
at net.verizon.common.gateway.HttpSubmitter.send(HttpSubmitter.java:89)
at net.verizon.common.gateway.ssp.request.SearchByMonRequest.send(SearchByMonRequest.java:30)
at net.verizon.portal.helper.OrderStatusHelper.getAccountDetailsFromSSPForMON(OrderStatusHelper.java:976)
at net.verizon.portlet.bean.OrderStatusLoginBean.submit(OrderStatusLoginBean.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:95)
at javax.faces.component.UICommand.broadcast(UICommand.java:383)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at com.bea.portlet.adapter.faces.FacesContentStubImpl.processAction(FacesContentStubImpl.java:246)
at com.bea.netuix.servlets.controls.content.FacesContent.raiseFacesAction(FacesContent.java:257)
at com.bea.netuix.servlets.controls.content.FacesContent.handlePostbackData(FacesContent.java:195)
at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:686)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogicx.servlet.gzip.filter.GZIPFilter.doFilter(GZIPFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at net.verizon.webapp.RequestFilter.doFilter(RequestFilter.java:172)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
And then Request #2
12/06 19:26:20 INFO n.common.gateway.HttpSubmitter - Sending Request #2: (POST):
Again same request XML sent... And then the error coming now is...
headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
12/06 19:26:20 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
12/06 19:26:38 ERROR n.common.gateway.HttpSubmitter - Exception caught #2: exception
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
.....etc.....
Please help ! -
Read XML response with multiple root elements
Hi ,
I am trying to achieve the below scenario but unable to do so.Please help urgently.
I am getting a response from a service which has multiple root elements.these root elements can change at runtime..I need to read the different root elements and extract data from its sub elements.
Regards...
Hoping for an anwser..i assume on runtime the service just returns 1 rootnode, but this rootnode can change
you could use a switch after the invoke
if $response/myroot1
assign $response/myroot to myroot1_var
if $response/myroot2
assign $response/myroot to myroot2_var
etc
so you check what's in the root node before you assign to you temp variable
or if you have logic which is specific based on this root nod you can just implement all these branches in the switch and execute logic in there based on the selected rootnode
several implementations are possible -
GridView Sorting with multiple word in header
Dear All
we have dynamic GridView. we want to sort the gridview. we have multiple words in the header column like (Chicken Burger, Small Pizza , Chicken Roll etc). i m using below code but its giving me error on clicking header (Chicken Burger) like
Cannot find column Chicken Inserts.
protected void gv_SearchResults_Sorting(object sender, GridViewSortEventArgs e)
string Search= "SearchAllFOs";
DataTable dtbl = ShowAllItemsData(SearchAllFOs);
gv_SearchResults.DataSource = dtbl;
gv_SearchResults.DataBind();
if (ViewState["Sort Order"] == null)
dtbl.DefaultView.Sort = e.SortExpression + " DESC";
gv_SearchResults.DataSource = dtbl;
gv_SearchResults.DataBind();
ViewState["Sort Order"] = "DESC";
else
dtbl.DefaultView.Sort = e.SortExpression + "" + " ASC";
gv_SearchResults.DataSource = dtbl;
gv_SearchResults.DataBind();
ViewState["Sort Order"] = null;
Thanks and Best Regards UmairHello Muhammad Umair 2756,
Since we saw this GridViewSortEventArgs https://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridviewsorteventargs(v=vs.110).aspx
Your project is actually a web project and please follow CoolDadTx's suggestion to post on ASP.NET forum.
Best regards,
Barry
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. -
Response with multiple namespaces...
Hi there!
We have several webservices working as "document", they receive a XML document and send a XML document as response.
The problem is that the returned document has a namespace prefix for each XML tag. All of then with the same name space:
[n1:enviar_ofersecResponse xmlns:n1="a name space"]
[n2:IdentificacionMensaje xmlns:n2="a name space" v="respuesta_ofersecen01_20040921.1"/]
[n3:FechaHoraMensaje xmlns:n3="a name space" v="2004-09-21T12:07:30+02:00"/]
[n4:IdentificacionRemitente xmlns:n4="a name space" v="HC_G"/]
[n5:FuncionRemitente xmlns:n5="a name space" v="A08"/]
... and so on...
How avoid this different prefix with the same name space for each tag?. Our xml documents are big... about 5 M... so it's a waste of space and time process all those prefix and namespaces...
Thanks in advance!.Hello,
We are experiencing this as well as we are upgrading from WLS 7.0 to 8.1. WLS 7.0 worked as expected. We made no changes to the webservices.xml between 7.0 and 8.1. This response element snippet is an example of 7.0 compared to 8.1:
***BEFORE - wls 7***
<ns1:memberFound>Y</ns1:memberFound>
***AFTER - wls 8.1***
<ns1:memberFound xmlns:ns1="http://www.definityhealth.com/webservice/member/memberlookup">Y</ns1:memberFound>
I'm pursuing this with support and will report back findings here.
thanks,
chad. -
View responses with multiple users
When i publishes a document, others can't see the responses.
We use the same acrobat.com account. In their tracker they can't
see the responses of my published file, although they use the same
Acrobat.com account. We use Acrobat Pro 9 and Tracker to manage our
PDF files.We set up a response document as a team. This document is
distributed to acrobat.com and is an open access document which is
linked to on a website. Customers fill in the document en responses
should be visible to the team. Only the team member whom ditributed
the document is seeing the responses.
Other team members cannot see the responses in their Acrobat
tracker software (al on different Pc's), although we use the same
Acrobat.com account settings. Is it possible to see the responses
for all the team members on different computers? -
Sending "Cookie" header with JRE 1.5.0_07 doesn't work with JWS
Hi
I have a JWS application that runs from JRE 1.4.0_XX to JRE 1.5.0_06
The app sends a "Cookie" header to our webserver
HttpURLConnection tc = (HttpURLConnection)repository.openConnection();
tc.setRequestProperty("Cookie", "GLINK=TOKENID");
Now this has worked thru 20 different runtime versions since 1.4.0_xx until JRE 1.5.0_07 was released. My code has remained unchanged for 3 years. And with JRE 1.5.0_07 the "Cookie" header is simply gone in the webserver or never sent at all. The changelog for 1.5.0_07 only has a rough description of what has changed. I can see that SUN has made som changes to class HttpUrlConnection in 1.5.0_07 by comparing class files against 1.5.0_06 and apparently disturbed som funtionality that worked before. Other headers are received but not the "Cookie" header. If the application is executed without JWS, for example with Eclipse or Jbuilder, the "Cookie" header is received by the web server and all other headers as well.
Any ideas what SUN has done in 1.5.0_07 and JWS ?? and more specifically in class URLConnection or HttpURLConnection.
Here is some code example to test the issue:
Run this code with and without Java Web Start
With JWS, the "Cookie" header is never received by the server.
without JWS, the header value is reveived.
import java.net.*;
import java.io.*;
public class HTTPTest
public static byte[] crLfArr = {13,10};
public static String contenttype_ = "text/plain";
public static BufferedReader retval = null;
public static void main(String[] args) throws IOException
int tecken = (int)'X';
String boundary = "12345xyzzy";
URL repository = new URL("http://myserver");
URLConnection tc = (URLConnection)repository.openConnection();
tc.setDoOutput(true);
tc.setDoInput(true);
tc.setAllowUserInteraction(false);
tc.setRequestProperty("Content-Type"," multipart/form-data; boundary=" + boundary);
tc.setRequestProperty("Cookie", "GLINK=TOKENID");
OutputStream out = tc.getOutputStream();
printPartHeader(out, boundary, "filtag" , "filnamn");
out.write(tecken);
printEndBoundary(out,boundary);
out.close();
retval = new BufferedReader(new InputStreamReader(tc.getInputStream()));
public static void printEndBoundary(OutputStream out, String boundary) throws IOException
String str;
str = "--" + boundary + "--";
out.write(str.getBytes());
out.write(crLfArr);
out.write(crLfArr);
public static void printPartHeader(OutputStream out,
String boundary,
String field,
String filename) throws IOException
String str;
printBoundary(out,boundary);
str = "Content-Disposition: form-data; name=\"" + field + "\"";
out.write(str.getBytes());
if (filename.length() > 0) {
str = "; filename=\"" + filename + "\"";
out.write(str.getBytes());
out.write(crLfArr);
str = "Content-Type: " + contenttype_;
out.write(str.getBytes());
out.write(crLfArr);
out.write(crLfArr);
public static void printBoundary(OutputStream out, String boundary) throws IOException
String str;
str = "--" + boundary;
out.write(str.getBytes());
out.write(crLfArr);
Regards
JojjeHi,
I decompiled the HttpURLConnection implementation in question from the rt.jar file. I do not think that you can find the source code for these SUN-specific implementations anywhere (except maybe through the new Java 6.0 collaboration process).
JAD did the trick.
For the standard classes (packages java.*, javax.*), I think that the most current source code is included in the corresponding JDK download.
As to the JWS vs. standalone effect, I do not know what happens there.
Maybe Java uses a different HttpURLConnection implementation when running as a standalone application?
For our applet, the problem is definitely there. The cookie header was set but already removed when the CookieHandler method was called.
The trouble is, that our applet can operate multiple independent sessions (with different session-ids), so a global CookieHandler is not an option. The only reason why I previously had to implement my own CookieHandler implementation in 1.5 was in order to remove unwanted Cookies which were otherwise inherited from the browser session by the CookieHandler�s applet default implementation.
I also entered a bug report (on Wednesday already)...
regards,
Gunnar -
Hi all
The "IWS 4.1 SP5" http header response is:
HTTP/1.1 200 OK
Server: Netscape/Enterprise/4.1
Date:
Set-cookie:
In our system, the "Set-cookie" header needs to be "Set-Cookie", with "C" instead of "c"
Is there any configuration file or similar where we can change this header?
Thank you very much
R&FNo, there is no configuration option to change the case of the HTTP header fields generated by the server. Note that the HTTP specification requires that clients treat "Set-cookie" and "Set-Cookie" as equivalent.
-
Hi All,
If we develop the set-cookie using NSAPI on Proxy Server 4.0.2, the proxy server cache the following information.
Request Headers
content-length = 165
content-type = text/html
status = 200 OK
Set-cookie = CTSESSION=AAewewedwewewew; domain=.cc.company.net; path=/
server = Sun-ONE-Web-Server/6.1
date = Tue, 24 Jan 2006 11:45:57 GMT
last-modified = Wed, 18 Jan 2006 04:27:28 GMT
etag = "a5-43cdc3b0"
accept-ranges = bytes
via = 1.1 proxy-proxy402
proxy-agent = Sun-Java-System-Web-Proxy-Server/4.0.2
How to avoid this "Set-cookie" on cache of Proxy Server?
regards;
TashCannot reproduce this issue. Tried the following with 4.0.2 proxy server:
1. Origin server sends the following response with "Set-cookie" header,
HTTP/1.1 200 OK
Content-length: 34
Content-type: text/html
Server: Sun-ONE-Web-Server/6.1
Date: Fri, 27 Jan 2006 06:34:49 GMT
Set-cookie: "CTSESSION=AAewewedwewewew; domain=.cc.company.net; path=/"
Last-modified: Fri, 27 Jan 2006 06:33:33 GMT
Etag: "22-43d9bebd"
Accept-ranges: bytes
Via: 1.1 S1PS
Via: 1.1 proxy-server1
Proxy-agent: Sun-Java-System-Web-Proxy-Server/4.0.3
iPlanet File.
iPlanet web server.
2. Proxy server caches the document but without the "set-cookie" header. Following is the contents of the cached file:
11556FFE46101FC41D 1 1138323813 0 1138323889 34
text/html http://dummy.com:8080/myfile8.html0014content-length0002340012content-type0009text/html0006status0006200 OK0006server0022Sun-ONE-Web-Server/6.10004date0029Fri, 27 Jan 2006 06:34:49 GMT0013last-modified0029Fri, 27 Jan 2006 06:33:33 GMT0004etag0013"22-43d9bebd"0013accept-ranges0005bytes0003via00081.1 S1PS0003via00171.1 proxy-server10011proxy-agent0038Sun-Java-System-Web-Proxy-Server/4.0.3^M
iPlanet File.
iPlanet web server. -
Installation with multiple as and one DB (no cluster)
Hi, I'm trying to setup a production environment with three Jboss AS non-clustered and one MSSQL database. I've made the installation on each AS and for each AS I've executed all the steps of the Configuration Manager.
Now I have some problems about the three AS line up; when I modify an user password on one AS the other don't see this modification. Moreover, some common features works such as the policy definition; for example, when I create a policy on the first AS the others can see this policy.
Can you help me?
Thanks
FabioMultiple, non-clustered LiveCycle instances against a single database is neither tested, nor supported. For each instance, you'd need a separate database (with multiple sets of tables, views and sequences). All changes have to be repeated for every instance you have.
This technical whitepaper from Adobe will provide more details:
http://www.adobe.com/devnet/livecycle/pdfs/lc_platchoice_wp_ue.pdf
What you are attempting is a deployment architecture the author of this whitepaper calls "Server Load Balancing" (see page 11).
You might be better off clustering the three instances. -
How to set HTTP header field "cookie" with http receiver adapter?
Hi,
I am using http receiver adapter (not axis) in a scenario. I could not set a parameter with key cookie in http header. Is there some kind of restriction to set it? I am able to set others like connection and create custom fields using ASMA and dynamic key configuration via UDF on mapping.
Could you please comment on, is cookie http parameter special or noneditable by PI's http adapter? I am looking for a solution without editing any abap code...
Regards,I believe it is possible since axis adapter provides very same functionality. Let me summarize my scenario may be it helps:
I am trying to call series of webservice lets say in a BPM. First service (login service) will provide me with a session id (in http header with key Set-Cookie) then I will call another service which has that session id in its http header with key cookie then I am going to logout. So I am testing the second part now, but it doest let me send cookie http header parameter.
I hope I clarified a bit more my problem.
Regards,
Maybe you are looking for
-
Is there a way to create/edit registry keys with Java?
I'm writing a console app and I'd like to have it so the users can change values in the registry. I'm not just talking about app keys I want any key. Is there a way to do this with Java?
-
How do we set the permissions for....
Using Acrobat 9, Setting permissions is very confusing! How do we set the permissions for document so that: -- the end user needs no password -- Printing: Allowed -- Changing the Document: Not Allowed -- Doument Assembly: Not Allowed -- Content Copyi
-
ICloud rejects CORRECT password when logging in
Every time I log in to my computer (or restart), I get a window that asks me for my iCloud password. Even though I enter it correctly, the window "wiggles" and clears out the password. Multiple attempts to re-enter the password results in the same
-
Windows 7 system, updated to Firefox 6 and lost all bookmarks. Followed the Help instructions for retrieving them but can't open the JSON ile they came in, nor can Windows help me do it.
-
Was just on my phone using snapchat, took a photo and then it turned off for a minute, then came back on showing coding at the top with the apple logo in the middle?