Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem to include java script file in servlet

843842Oct 14 2009 — edited Oct 14 2009
I couldn’t use any functions included in java servlet file using servlet. I made a test in jsp and it work fine but in servlet not.

Here my code

out.println("<jsp:include page=\"C:/path/file.js\" flush=\"true\" />");

or
out.println("<script language=\"javascript\" src=\"c:/path/file.js\">");



Although was no error but using both didn’t let me use any function inside the java script file. As I said using the same command in JSP works fine.

How I can include the file.js correctly ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 11 2009
Added on Oct 14 2009
32 comments
638 views