Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 19th, 2006, 12:45 PM
Registered User
Join Date: Jun 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default javascript and sysdeo


I have this line in a servlet file

out.println("<SCRIPT language=\"JavaScript\" type=\"text/javascript\" SRC=\"/util/js/menu.js\"> </SCRIPT>");

I am executing it via eclipse-sysdeo. However, the javascript source file (menu.js) is not found. I put it into the WEB_INF/src; it didn’t work. I tried also outside WEB_INF/src; it didn’t work.

Any clue?
  #2 (permalink)  
Old July 22nd, 2006, 06:26 AM
Registered User
Join Date: Jul 2006
Location: , , Spain.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Try to put outside in WEB_INF/classes
  #3 (permalink)  
Old July 22nd, 2006, 09:29 PM
Friend of Wrox
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts


Files you put into /WEB-INF/ are NEVER accessible directly via HTTP. In order for your menu.js to be hosted at /util/js, create a /util/js folder in the root of your web application (e.g. inside YourApp.war) and put menu.js there.

By the way, you probably shouldn't have a WEB-INF/src folder in your deployment WAR. Your Java source files should be compiled before deployment and put into WEB-INF/classes. Generally, only *.properties and *.class files should be in WEB-INF/classes.

Jon Emerson

Similar Threads
Thread Thread Starter Forum Replies Last Post
stop current javascript function using javascript sakthi Javascript 3 June 2nd, 2008 03:30 PM
javascript rakri2007 C# 2005 1 June 25th, 2007 08:46 PM
Problems with BoxOffice / Eclipse / Tomcat-Sysdeo oops BOOK: Professional Java Development with the Spring Framework 0 October 26th, 2005 11:10 AM
"text/javascript" and "javascript" rupen Javascript 1 June 24th, 2005 07:20 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.