You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Venkat Babu <bs...@gmail.com> on 2009/02/14 12:25:49 UTC

Error when including Javascript file in JSP which has struts tags in it.

Hi All,
I am including my JS file in JSP in the following way:
<script type="text/javascript" src="includes/js
/Search.js"> </script>

I have struts tag in the js file like
var key = <bean:write name='KEY' />;

When I run my jsp it is giving syntax error. But when I have
the js code in my JSP itself it is working fine.
Please help me in this issue. Am I doing something wrong in
the code?
Any help would be grateful.

Thanks, 
Venkat
-- 
View this message in context: http://www.nabble.com/Error-when-including-Javascript-file-in-JSP-which-has-struts-tags-in-it.-tp22011702p22011702.html
Sent from the Struts - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Error when including Javascript file in JSP which has struts tags in it.

Posted by Dave Newton <ne...@yahoo.com>.
Please ask this question on the struts-user mailing list. The struts-dev 
list is for the development of Struts itself.

http://struts.apache.org/mail.html

Before asking there it might make sense to check up on how JSP pages 
work; it may be enough to answer your question.

Thanks,
Dave

Venkat Babu wrote:
> I am including my JS file in JSP in the following way:
> <script type="text/javascript" src="includes/js
> /Search.js"> </script>
> 
> I have struts tag in the js file like
> var key = <bean:write name='KEY' />;
> 
> When I run my jsp it is giving syntax error. But when I have
> the js code in my JSP itself it is working fine.
> Please help me in this issue. Am I doing something wrong in
> the code?
> Any help would be grateful.
> 
> Thanks, 
> Venkat


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org