Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
Thanks a lot, I will try it. 2010/10/15 Robert Taylor : > Hi Li, > > JSTL and EL give you access to the implicit pageContext object. > From there you can access attributes from request and session. > > > For example: > > > And then use contextPath variable however you wish. > > I'm not sure how

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Robert Taylor
rs on this list do :) /robert - Original Message - From: "Li Ying" To: "Struts Users Mailing List" Sent: Friday, October 15, 2010 4:12 AM Subject: Re: referencing javascript files from (action) jsp file Hi Robert and Dave: I tried in my application, and it

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Dale Newfield
On 10/15/10 4:12 AM, Li Ying wrote: I tried "%{#request.getContextPath()}", but it don't work for some reason i don't know. #request is not the request object, it's a map containing the items in request scope. -Dale - To un

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
You can read this document: http://struts.apache.org/2.2.1/docs/static-content.html and check if your configuration is right. 2010/10/15 Guy Thomas : > Thank you, this works. I would like to draw your attention to possible > problems with the struts head tag. See below. > > > Domain Security

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
[utils.js] is used for client side validation. it should be found in [struts2-core-2.2.1.jar/org/apache/struts2/static/utils.js] [styles.css] is used for Struts themes. it should be found in [struts2-core-2.2.1.jar/template/theme_name/styles.css] 2010/10/15 Guy Thomas : > Thank you, this work

Re: referencing javascript files from (action) jsp file

2010-10-15 Thread Li Ying
Hi Robert and Dave: I tried in my application, and it works for almost all the case. But there is one exception: In my application, i customized the CSS files shiped with Struts JQuery plugin and put them under path [{contextPath}/res/struts/]. In JSP, i need add code likes: to tell Struts

RE: referencing javascript files from (action) jsp file

2010-10-14 Thread Guy Thomas
e utils.js error message is generated. -Oorspronkelijk bericht- Van: Robert Taylor [mailto:rtay...@dtgresults.com] Verzonden: donderdag 14 oktober 2010 16:54 Aan: Struts Users Mailing List Onderwerp: Re: referencing javascript files from (action) jsp file Or you could simply use JSTL.

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Li Ying
Hi guys: looks like a better choice. I will try it in my project. Thanks~~~ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Dave Newton
hu, Oct 14, 2010 at 10:54 AM, Robert Taylor wrote: > Or you could simply use JSTL. > The following works for me: > "> > > > > /robert > > - Original Message - From: "Li Ying" > To: "Struts Users Mailing List" > Sent: Thursday, Oct

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Robert Taylor
Or you could simply use JSTL. The following works for me: "> /robert - Original Message - From: "Li Ying" To: "Struts Users Mailing List" Sent: Thursday, October 14, 2010 10:33 AM Subject: Re: referencing javascript files from (action) jsp file I s

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Li Ying
I suggest you to reference your resource file(js, image, css and so on) in this way: /path/filename.js"> The [] part will render the contextPath where the web application is deployed. The [contextPath] is a property defined in Action: public String getContextPath() { ret

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Dave Newton
vascript"> > > > > Still does not work. > > -Oorspronkelijk bericht- > Van: Dave Newton [mailto:davelnew...@gmail.com] > Verzonden: donderdag 14 oktober 2010 15:42 > Aan: Struts Users Mailing List > Onderwerp: Re: referencing javascript

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Alex Rodriguez Lopez
new...@gmail.com] Verzonden: donderdag 14 oktober 2010 15:42 Aan: Struts Users Mailing List Onderwerp: Re: referencing javascript files from (action) jsp file On Thu, Oct 14, 2010 at 9:36 AM, Guy Thomas wrote: What am I doing wrong? Using relative paths. Dave - Aan dit be

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Maurizio Cucchiara
What happens if you go at http://yourservername//js/util.js (and /js/domainsecurityadmin.js) Can you see those files? If yes, check their syntax. -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.o

RE: referencing javascript files from (action) jsp file

2010-10-14 Thread Guy Thomas
javascript files from (action) jsp file On Thu, Oct 14, 2010 at 9:36 AM, Guy Thomas wrote: > What am I doing wrong? > Using relative paths. Dave - Aan dit bericht kunnen geen rechten worden ontleend. Alle berichten naar dit professioneel e-mailadres kunnen door de wer

Re: referencing javascript files from (action) jsp file

2010-10-14 Thread Dave Newton
On Thu, Oct 14, 2010 at 9:36 AM, Guy Thomas wrote: > What am I doing wrong? > Using relative paths. Dave