cancel
Showing results for 
Search instead for 
Did you mean: 

Canu00B4t resolve <jsp:include...> inside Java Script

JürgenK
Explorer
0 Kudos

@ all

the following jsp:include is not resolved and I get a syntax error when browsing:

<SCRIPT LANGUAGE="JavaScript"> <!-- function buildFrame() { <jsp:include page="/servlet/com.iflx.web6020.servlets.iflxPutSession" flush="true"><jsp:param name="LoginIsActive" value="J"></jsp:param></jsp:include>; mainSeite = '<jsp:include page="/servlet/com.iflx.web6020.servlets.iflxGetSession" flush="true"><jsp:param name="Field" value="SuccessMain"></jsp:param></jsp:include>';

...

Can anybody help me with that issue?

Jürgen

Accepted Solutions (0)

Answers (2)

Answers (2)

guru_subramanianb
Active Contributor
0 Kudos

Hi Jurgen,

The reason for this error is you are mixing Javascript with JSP.I suggest you to handle the server side JSP code seperately by providing some exact parameter.More over please remove the comment below javascript tag.The code will be intepreted at runtime as html plus java code where jsp code available.

Regards,

Guru

Former Member
0 Kudos

Hi,

i have never tried to use JSP-tags within a JavaScript-function.

I would rather guess that the tags won't be interpreted in JavaScript but only in the plain html-part of your web code.

Best Regards, Astrid

JürgenK
Explorer
0 Kudos

Astrid,

yes you are right, but it works fine with Tomcat.

Jürgen

Former Member
0 Kudos

Hi Jürgen,

i had the same problem.

My solution was to remove the comment tags (<!-- and -->).

Alex