JSP set cookies not read by Safari and IE
I'm not sure if I'm in the right list but i've searched all over for an answer and this has been bugging me for 2 days now.
I have two simple JSPs . one that sets a cookie and one that reads it.
//setting the cookie
String msisdn = "numberko";
Cookie theMsisdn = new Cookie("msisdn", msisdn);
theMsisdn.setMaxAge(60);
theMsisdn.setPath("/");
response.addCookie(theMsisdn);
//getting the cookie
Cookie theCookie = null;
Cookie[] cookieList = request.getCookies();
if(cookieList != null) {
for(int i = 0; i < cookieList.length; i++) {
theCookie = cookieList;
if(theCookie.getName().equals("msisdn")) {
System.out.println("msisdn: "+theCookie.getValue());
}else{
System.out.println("null cookilist");
Tried this code on Firefox and it works fine but doesn't work on Safari or IE (Cookies are enabled on these browsers)
I don't understand why these two browsers don't save the cookie
Hope someone can help or at least point me to the right forum
Thanks a lot
Donini
I'm not sure if I'm in the right list but i've searched all over for an answer and this has been bugging me for 2 days now.
I have two simple JSPs . one that sets a cookie and one that reads it.
//setting the cookie
String msisdn = "numberko";
Cookie theMsisdn = new Cookie("msisdn", msisdn);
theMsisdn.setMaxAge(60);
theMsisdn.setPath("/");
response.addCookie(theMsisdn);
//getting the cookie
Cookie theCookie = null;
Cookie[] cookieList = request.getCookies();
if(cookieList != null) {
for(int i = 0; i < cookieList.length; i++) {
theCookie = cookieList;
if(theCookie.getName().equals("msisdn")) {
System.out.println("msisdn: "+theCookie.getValue());
}else{
System.out.println("null cookilist");
Tried this code on Firefox and it works fine but doesn't work on Safari or IE (Cookies are enabled on these browsers)
I don't understand why these two browsers don't save the cookie
Hope someone can help or at least point me to the right forum
Thanks a lot
Donini
Similar Messages
-
How to set cookie value in one page and retrieve in another page using setA
How to set cookie value in one page and retrieve in another page using setActionListener?
I have tried with following code srcpage.jspx->destpage.jspx
srcpage.jspx
<af:table value="#{bindings.DepartmentsView1.collectionModel}"
var="emp" rows="#{bindings.EMPView1.rangeSize}"
first="#{bindings.EMPView1.rangeStart}"
emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
<af:column sortProperty="EmployeeName" sortable="false"
headerText="Cookie Testing">
<af:commandLink text="#{emp.EmployeeName}" action="success">
<af:setActionListener from="#{emp.EmployeeName}"
to="#{cookie}"/>
</af:commandLink>
</af:column>
</af:table>
espage.jspx
<af:outputText value="Test Cookie Value: #{cookie}"/>
,Here Test Cookie Value prints the following instead of its original String value
{JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
Thanks in advance
KaleeHi,
"cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
#{cookie.cookieName}
Note that #{cookie} writes to and returns a map
check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
Frank -
Page not displaying in Safari and Internet explorer but showing up in Mozila
Hi,
I bought this pre-made template which I would like to use for my website. When I upload it to my website and try to open the pages like "Contact us", "News", "Team members" and so on, they are not displaying in Safari and Interner Explorer, but they DO show up in Mozilla. Also, the pages I created myself do show up in all browsers. I really need to fix this problem as I already put a lot of effort to create my web site and now it is not working online. I would really appreciate some help. Here is the link to the original template:
www.opremadoma.si
Thanks,
AnneThe tag should read "myself" (no quotes) not "_self".
http://www.apple.com/quicktime/tutorials/embed2.html
For cross OS browser compatibility (and no "embed" tag code) you should consider using javascript:
http://developer.apple.com/internet/ieembedprep.html
With all of my skills I could not get your "hotspot" to open a new html page:
http://www.30fps.com/mov/aboveCristallina02VREn.mov -
When I turn on firefox the sound of an alarm begins and keeps going. I did not download or add or open anything. A sound like the old pacman game initiates the never ending alarm. It does not occur with safari and ends if I close firefox.
== This happened ==
Not sure how often
== I opened firefoxdont have google open in a tab!!!!!!!!
(if you are one who opens FF and it opens google then immediately open another tab to go to a site then just visit the site from the page that opened without opening a new tab)
OR
if you have cool preview then disable that
(the sound is for the celebration of 30 years of pacman and you can play the game on google's homepage) -
I can not open my Safari and my desktop is reshaped!
It is so strange. After updating my software I could not open my safari and the design of my icons has been changed. I do not know what to do. please help.
pariyafromcoventry wrote:
"It is so strange. After updating my software I could not open my safari and the design of my icons has been changed. I do not know what to do. please help."
Did you upgrade OS X to OS X 10.10. Yosemite?
This is the new default flat look. That is normal.
Safari:
If you have another browser:
Use free AdwareMedic by clicking “Download ” from here
http://www.adwaremedic.com/index.php
Install , open, and run it by clicking “Scan for Adware” button to remove adware.
Once done, quit AdwareMedic by clicking AdwareMedic in the menu bar and selecting
“Quit AdwareMedic”.
or
If you don’t have another browser:
Remove adware manually by following the “HowTo” from Apple.
“Remove Genieo, also known as InstallMac”
http://support.apple.com/en-us/HT203987
Safari > Preferences > Extensions
Turn those off and relaunch Safari again.
Turn those on one by one and test. -
I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them. Has anyone had a similar problem….thanks
If you are having the same problem, i.e. a disk permission problem, open your favorite search engine and search on, "change disk permissions", and I think you'll find plenty of information on how to fix the problem. This is a Lightroom forum. Your problem is with your operating system. There is no sense in rewriting instructions that are already available if you do a simple search.
-
Hi, we have a G5 Blade server running OS X 10.5.8 with adual Fibre Channel card. The OS does not read the card and cannot establishconnection to the RAID controller.
I have tried to move the card to another port with no luck.Ran all the updated software possible. Please can someone adviceHi,
Was the card previously working in that machine? If it was and you have a G5 tower you could try the card in there. Here is a list of Apple fibre cards and cables which show what's compatible with what. http://support.apple.com/kb/HT1769
The card should appear in the System Profiler under Fibre Channel and PCI Cards.
All the best
Beatle -
My computer is not reading my ipod and its not showing in itunes
my computer is not reading my ipod and it does not appear in itunes
What have you tried so far in terms of troubleshooting this issue? Are you plugging the iPod into a high powered USB 2.0 port on the back of your PC? Have you tried a different USB cable?
What shows on the iPod's display when it is connected? Does it still charge?
What happens if you try to reset the device with it still connected to the PC?
How to reset iPod
Have you carefully worked through each and every single suggestion in this Apple support document?
iPod not recognized in 'My Computer' and in iTunes for Windows
B-rock -
Pdf files display not correctly in Safari and Preview but in Adobe Reader and Chrome correctly
Chrome:
Safari:Triple-click anywhere in the line of text below on this page to select it, the copy the selected text to the Clipboard (command-C):
/Library/Internet Plug-ins
In the Finder, select
Go ▹ Go to Folder
from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens (command-V), then press return.
From the folder that opens, remove any items that have "Adobe" or “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari, and test.
The "Silverlight" web plugin distributed by Microsoft can also interfere with PDF display in Safari, so you may need to remove it as well, if it's present. The same goes for a plugin called "iGetter," and perhaps others.
If you still have the issue, repeat with this line:
~/Library/Internet Plug-ins
If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari again. -
IPad cookies not saving in Safari or Opera?
I've been trying to help a friend of mine... He has an iPad and has tried both Safari and Opera, but websites never remember him (guessing due to cookie issues?).
His browser settings are set to allow cookies, does anyone have any suggestions on another issue that may cause this?Could be a problem between 1st party cookies and 3rd party cookies, if the sign in process is somehow dropping a 3rd party cookie Safari may well be refusing this.
-
Shortcuts not working on Safari and Firefox
I just upgraded to Yosemite and have the following problem: no shortcuts for menu commands work anymore on Safari or Firefox. Simple test: start Safari and click cmd-Q to quit. Normally it should just quit. on my Macbook it doesn't. On Firefox, the menu bar flashes once, but that's about it.
A few facts:
Macbook Pro (Retina, 15-inch, Early 2013)
Mac OS 10.10 installed and running
Both, Safari and Firefox, are upgraded to the latest versions.
No keyboard additions installed
Swiss keyboard installed
Nothing changed regarding keyboard preferences
Anybody else experiencing the same or has any idea, how to fix it?
TIAProblem solved. It all had to do with the primary language (NOT the keyboard) set to Swiss German, instead of just German. Seems a bug to me, but at least I have a workaround.
-
Help please-"Application Not Responding" for Safari and Mail
I read in one discussion that if Safari is slow, you can go to Font Book and select the fonts with a bullet to get rid of duplicate fonts. I did that, and then decided to disable some japanese fonts I don't use.
Now Safari and Mail don't work. Mail won't open at all, and Safari launches but doesn't load and I get the spinning wheel.
I used Disk Utility to fix permissions, and that didn't solve the problem, and now my Disk Utility also says "Application Not Responding".
I also went back to Font Book and enabled all the fonts I disabled. Still nothing.
( I can use Netscape-so it's only Mac applications I guess)
Any help is very much appreciated.
Thanks!
powerpc g4 Mac OS X (10.3.2)I read in one discussion that if Safari is slow, you
can go to Font Book and select the fonts with a
bullet to get rid of duplicate fonts. I did that, and
then decided to disable some japanese fonts I don't
use.
Now Safari and Mail don't work. Mail won't open at
all, and Safari launches but doesn't load and I get
the spinning wheel.
I used Disk Utility to fix permissions, and that
didn't solve the problem, and now my Disk Utility
also says "Application Not Responding".
I also went back to Font Book and enabled all the
fonts I disabled. Still nothing.
( I can use Netscape-so it's only Mac applications I
guess)
Any help is very much appreciated.
Thanks!
powerpc g4 Mac
OS X (10.3.2)
Wow- i fixed it! I remembered that when I was in Font Book originally, there were some fonts disabled, and I enabled them.
I couldn't remember EXACTLY which ones, but I disabled some I thought were the ones, and VOILA!
Mail works, Safari works...what a relief!
And it only took me HOURS...oh well.
If this might help anyone, here are the fonts I disabled again-
BeteNoirA Regular
BoyzRGross
Chrome Yellow
Coventry Garden
FancyPants
HardlyWorthit
PleasinglyPlump
RaggMoppRegular
Anyone know if I should throw these fonts away? maybe a stupid question, but I'm not very good at this stuff and hesitate to change anything.
powerpc g4 Mac OS X (10.3.2) -
ITunes not running after Safari and Quick Time update
HELP NEEDED!!After updating to the latest version of Safari and Quick Time, i got this error message the next time I started my computer:
"AppSyncNotifier.exe: The program can't start because CoreCoundation.dll is missing from your computer. Try reinstalling the program to fix this problem."
I tried to open iTunes but I can't. I tried to uninstall so I can reinstall but it I got another error message that said I do not have the rights to uninstall, etc. I am the only user of this computer and I have admin rights. This PC used to run on vista but I recently upgraded to Windows 7(x64) and I encoutered the same problem - i could not uninstall/reinstall iTunes because "I do not have permission"
After upgrading to Windows 7 iTunes was running okay until the Safari and Quick Time update.
I need to sync my iPhone and iPod but without iTunes I can't!!!
PLEASE HELP!!! PLEASE, PLEASE, OH PLEASE!!!!b noir wrote:
What a strange collation of errors. Taken at face value, each of the three suggests a different problem. Working on an Occam's razor sort of principle, that one underlying problem is going to be more likely than a perfect storm of three different problems at once, I think we'd better try checking on troubles with administrative privileges first.
Let's try doing a "run as administrator" on an iTunes uninstall first.
Download and save a fresh copy of the itunes installer to your desktop.
http://www.apple.com/itunes/download/
Now right-click on the iTunes64Setup.exe file you downloaded and select "Run as administrator".
Since you've already got that version of iTunes installed, you should eventually get to a dialog asking you to repair or remove iTunes. Select Remove.
Does that go through without the "Windows Installer" message?
If so, reboot the PC and then try another "Run as administrator" of your iTunes64Setup.exe. Does Apple Application Support get installed for you properly this time?
Thanks again b noir. Unfortunately, this suggestion did not work. When I did what you said, there was no option to "remove". I see the iTunes thing on my control panel-programs window, but it's no longer in the program (x86) folder on the c:/drive. iTunes on my computer is like gum stuck to my shoe. same goes for bonjour. Please be patient some more. Do you have any more suggestions?? I'm planning to get me an iPad but if I can't get iTunes to run properly on my computer I'm having second thoughts about it now.
Thanks! -
Downloads do not finish in Safari and Firefox
Hey guys,
new to this forum, so be easy on me...
I just bought a Macboko Unibody a few weeks ago, and for some reason, when I try and download certain files, they don't completely download, however Safari and Firefox believe they're complete (i.e. an incomplete mp3 file will launch in itunes).
Any help on this is greatly appreciated. Thanks!
JaredJPops10 wrote:
with all due respect, I'm pretty sure I did answer your question.
No, you didn't. To answer my question you'd have to explain how you determined that a downloaded file in fact stopped downloading early as opposed to downloading to completion but becoming corrupted during the download process. I didn't see such an explanation in your posts. I'd argue that if the size of a downloaded file is near the expected value, it's impossible to tell the difference between a corrupt download and an incomplete download. Actually, which of the two cases is true is much less interesting than the fact that the downloaded file isn't usable. But by claiming that "downloads do not finish" you're assuming a cause that may not be true.
Here's an example of the type of thing you may be facing: I've seen a post on this message board by someone who kept trying to download a large Apple software update but the resulting file was unusable due to a checksum error. He was finally able to download the file successfully by removing his router and connecting his computer directly to his broadband modem. Evidently his router introduced enough instability into his download process to cause corruption.
I've downloaded the exact same files (from the same link) from another computer, with complete success.
That only proves that those files can be downloaded given a correctly-functioning data connection.
I've also attempted (as described above) to download some of the files one at a time, and that seems to work properly.
Downloading multiple files at the same time could put extra stress on a marginal connection. -
LR not reading Canon CR2 and JPEG files
I have been a long time user of Lightroom, now have LR 3.4 installed. No serious problems so far and I love using it. For a computer set up, I use a one year old Apple desktop with Lion installed. My problem is that this past week, my LR 3.4 will not read my Canon files, either CR2 or JPEG format. I have tried two different cameras ( 5d Mark ii and 7D ) two different card readers and several different memory cards. LR sees the files, starts to upload them and then on concluding its routine says it cannot read the file format. I am patching together a solution by importing the files through iphoto, exporting them to a file in my LR hierarchy file and then importing them into LR.
Clearly, this is not good. Has anyone had a similar problem? Can anyone offer a solution?
ThanksGiven I was home today with free time, I called Adobe support. They took charge of my screen and helped me through the issue. It turns out that when downloading, I was not clicking on the specific file location for my photos. All that I had to do to make the download work was to click on the intended file location. Although it was highlighted before I clicked on it, the clicking on it made the downloading work. I don't ever remember clicking on the specific file location in the past but that small step is now going to be in my file importing methodology from here on out.
I would like to send flowers to the woman who helped me through the issue. She was very good.
Maybe you are looking for
-
2LIS_03_BX & 2LIS_03_BF Data Not loaded
Hi guys i have follow the steps for use the stock infocube 0IC_C03 i initialize the actual stock and initialize the material movements y made a data load of initial stock...next i made a load of historic movements....but in the monitor i foun that th
-
Dynamic Assign Statement is not working in 4.6C
Hi Team, I have done the following coding to get teh dynamic value sof a field but the assign statement is failing... Its returing the sy-subrc as 4. LOOP AT <t_tab> INTO <s_tab>. LOOP AT t_flds. CONCATENATE '<s_tab>-' t_flds-fieldname INTO
-
:-( Something went wrong A problem occurred while you were trying to use your mailbox
All, I finally installed Exchange 2013 on Datacenter 2012 R2. My first try to access the setup I encountered the following messages X-OWA-Error: Microsoft.Exchange.Data.Storage.ObjectNotFoundException X-OWA-Version: 15.0.847.32 X-FEServer: EXCHANGE00
-
I would like to know where I can download the captioned required free trial for WinXP from your website which can help me to convert the word file to pdf file.
-
Content Services EventHandlers
Can you only create EventHandlers for Content DB and not Content Services?