Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

equivalent of html:rewrite in struts2

 
yash wardhan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone tell me what is the equivalent of html:rewrite of struts 1.x in strits 2.

I have used html:rewrite in src of script tag.
Now I want to know how do I achive the same functionality in struts 2.
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it <s:url ...> what you are looking for?
( http://struts.apache.org/2.0.11.2/docs/url.html )
 
yash wardhan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply Joachim,
I tried <s:url ...> also it is working fine when used with
<a href="<s:url...>">
But if I try to use it in script tag as follows,
<script src="<s:url ...>"></script>
In the above tag it is not working.
Where as <html:rewrite ...> works fine in both the above tags.

Any idea about how can we achive above functionality in struts 2.

Thanks
 
yash wardhan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did not find anything to achive the above functionality so used
<script src="<c:url value='...'/>">


Regards.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic