You should only need to add "faq" to the whitelist in order to use the session servlet. The servlet context name needs to be added to the RemoteObject's whitelist in order for the session servlet to be used. This is a bit strange, I'll admit, and we do have a bug open to try to make this easier. In any case you will always need to add something to the whitelist to use new data service items. This is a piece of Flex security to make sure that these parts of the system aren't left open.
You can also just use "*" as you are, but make sure to not use "*" in the source when moving to production. -Brian > -----Original Message----- > From: Jonathan Baney [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 06, 2004 2:25 PM > To: [email protected] > Subject: Re: [flexcoders] session servlet problem > > > I made the recommended changes...and it didn't fix anything. > I got the > same error. I then edited the whitelist for remote objects > and added > the <source>*</source> and it worked. Is there a better way > to do this? > > Susan Chang wrote: > > > Hi Jonathan! > > > > In your flex-config.xml file, uncomment out > "<url>http://*</url>" and > > "<url>https://*</url>" under the <whitelist> section of > > <web-service-proxy> > > and <http-service-proxy>. > > > > Example under <web-service-proxy>: > > > > <whitelist> > > <!-- config for unnamed web services --> > > <unnamed> > > <url>http://{localserver}/* > > <http://%7Blocalserver%7D/*></url> > > <url>https://{localserver}/* > > <https://%7Blocalserver%7D/*></url> > > <!-- > > For security, the whitelist is locked down > by default. > > Uncomment the first two urls below to > enable access to all > > URLs, > > or add above the individual URLs you wish to access. > > --> > > <url>http://*</url> > > <url>https://*</url> > > </unnamed> > > ... > > </whitelist> > > > > Hope this helps! > > Susan > > Flex QA > > > > -----Original Message----- > > From: Jonathan Baney [mailto:[EMAIL PROTECTED] > > Sent: Thursday, May 06, 2004 10:50 AM > > To: [email protected] > > Subject: [flexcoders] session servlet problem > > > > Hi All, > > > > I am having difficulties with using the session servlet. > My web.xml is > > unmodified and I make no reference to the session servlet in the > > flex_config.xml. I am using flex 1.0 on Jrun 4. Here is > the error I get: > > > > "Service threw an exception during method invocation: You are not > > allowed to access the service /faq. The service is not in the > > configured whitelist." > > > > All the docs say to do is add something like this in the > mxml file (this > > is what I have) > > <mx:RemoteObject source="servlet" id="sessionObj" encoding="AMF" > > showBusyCursor="true" > result="retrieveSessionParams(event)"/> > > > > I am using the following to access the session in the mxml file: > > > > //called when app is initialized > > function initApp():Void { > > sessionObj.session("get","currentView"); > > } > > function retrieveSessionParams(event):Void { > > var currentView:String = event.result.currentView; > > } > > function setSessionParams(param:String):Void { > > sessionObj.session("set","currentView",param); > > } > > > > Am I missing something? > > > > Thanks, > > Jonathan > > > > -- > > Jonathan Baney > > Enterprise Data Modeler > > Thunderbird Consulting Application Engineering: A division of ITS > > Mesa Community College > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > Yahoo! Groups Sponsor > > ADVERTISEMENT > > click here > > > <http://rd.yahoo.com/SIG=129s7ng18/M=295196.4901138.6071305.30 01176/D=groups/S=1705007207:HM/EXP=1083953154/A=2128215/R=0/SIG=10se96mf6/*h ttp://companion.yahoo.com> > > > > ------------------------------------------------------------------------ > Yahoo! Groups Links > > * To visit your group on the web, go to: > http://groups.yahoo.com/group/flexcoders/ > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/>. > > -- Jonathan Baney Enterprise Data Modeler Thunderbird Consulting Application Engineering: A division of ITS Mesa Community College (480) 461-7283

