tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: tc & xmlhttprequest
Date Tue, 11 Sep 2007 09:28:22 GMT
Keep in mind an XMLHttpRequest is very much the same as any other client 
side request as far as tomcat is concerned and follows the same rules.  
As a test, try a direct access via the browser.  If it doesn't work, it 
won't work in javascript either.

--David

Chris Pat wrote:
> Hi David
> That is just macro syntax.  The real issue is why/how to avoid the security violation
on using xmlhttprequest when launching the webapp from localhost or externally.  I dont understand
what to put where and how to access it so to allow xmlhttprequest to execute.  
>
> David Smith <dns4@cornell.edu> wrote: No comment on the whole bean construct other
than to say that's too 
> complicated for my tastes.
>
> My personal preference on the whole resources inside of WEB-INF front is 
> to just place the resources outside of WEB-INF.  Then configure a 
> security constraint or write a filter on the request to handle access 
> control.  Just seems easier to me.
>
> --David
>
> Chris Pat wrote:
>   
>> Hi David
>> I did it partially this way, and it works. My objects in the js file are executing.
 
>>
>> http://:/
>>
>>     
> decarta javascript api example>   
>   
>>   /extPages/myScripts.js">
>>
>> However I still get the "Permission denied to call XMLHttpRequest.open...  I thought
by putting a jsp:forward outside my WEB-INF and calling it internally from localhost I would
avoid that and worry about how to access it from Internet; now I first have to get around
this security issue on localhost so I can test and ass-ume it will also allow access from
browsers externally.
>>
>>
>> David Smith  wrote: >
>>   
>>     
>>> As for that last bit, I have found
>>> that you can specify the path as /FolderInWebApp/Script/myScript.js
>>>     
>>>       
>> You still need either the context path or make it relative to the page's 
>> URL or the client won't be able to resolve it.  This doesn't work like 
>> the jsp internals that are aware of the context path.
>>
>> --David
>>
>> Nathan Bahr wrote:
>>   
>>     
>>> hmm what exactly do you need ajax for? From my recollection, ajax is
>>> simply a method of making mini-requests to the server so the interaction
>>> with your webapp is a bit more fluid. As for that last bit, I have found
>>> that you can specify the path as /FolderInWebApp/Script/myScript.js
>>> instead of using the fully qualified name. When you start the path with
>>> '/' it looks in the base webapp directory. Lemme know if this helps any.
>>>
>>>   
>>>     
>>>       
>>>>>> cpanon@yahoo.com 09/10/07 3:23 PM >>>
>>>>>>         
>>>>>>           
>>>>>>             
>>> Hello
>>> Any tips on serving a ajax page with tomcat?  I am now calling the page
>>> with a jsp:forward outside of the web-inf.  Do I also have to fully unc
>>> path to the *.js files, like
>>> src=localhost:8080/context/intPages/myScripts.js ?
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>   
>>>     
>>>       
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>>   
>>     
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message