Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #39854
| Path | csiph.com!aioe.org!LeVffQP25j5GAigzc2gaQA.user.46.165.242.75.POSTED!not-for-mail |
|---|---|
| From | Arne Vajhøj <arne@vajhoej.dk> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: struts2 syntax |
| Date | Mon, 21 Nov 2022 14:00:15 -0500 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <tlghrt$10s9$1@gioia.aioe.org> (permalink) |
| References | <4b8ec277-7e99-45ce-84a5-f7664811d6b8n@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Info | gioia.aioe.org; logging-data="33673"; posting-host="LeVffQP25j5GAigzc2gaQA.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org"; |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 |
| X-Notice | Filtered by postfilter v. 0.9.2 |
| Content-Language | en-US |
| Xref | csiph.com comp.lang.java.programmer:39854 |
Show key headers only | View raw
On 11/21/2022 12:50 PM, e.d.pro...@gmail.com wrote:
> Anyone know this framework? I can't find any documentation or examples.
> We were including javascript in JSP like this, which was generating a CSP security error:
> <script src="<s:url value="/js/myScript.js"/>"></script>
>
> I tried just changing it to the struts tag and it just crashed:
> <s:script src="<s:url value="/js/myScript.js"/>"></s:script>
>
> So I'm trying to figure out if this can be done as a one line command, as it does work as a two line command:
> <s:url var="myScriptjs" value='/js/myScript.js' encode='false' includeParams='none'/>
> <s:script src="%{myScriptjs}"/>
I don't know Struts 2 (I did a bit of Struts 1 a very long time ago,
but Struts 2 is not based on Struts 1 but on WebWorks).
Anyway, what is the problem you need to solve. Aka why not just:
<script src="/js/myScript.js"></script>
?
Do you need it to insert the web app name so it becomes:
<script src="/foobar/js/myScript.js"></script>
automatically if it is deployed in foobar.war?
Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
struts2 syntax "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2022-11-21 09:50 -0800
Re: struts2 syntax Arne Vajhøj <arne@vajhoej.dk> - 2022-11-21 14:00 -0500
Re: struts2 syntax "e.d.pro...@gmail.com" <e.d.programmer@gmail.com> - 2022-11-21 11:10 -0800
csiph-web