• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

including .js file in JSP

 
pritam sabnis
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am developing one application using JSP and Servlet.
To include menu in my application i am using .js(javascript) files.
When I am forwarding request from servlet to JSP using forward method of request dispatcher i am unable to display the menu,but when i am using sendRedirect() method it is working fine.
Can anyone help in this issue?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most likely you are using page-relative addressing for your JavaScript file, and that's not going to work in general.

See the ResourceUrlProblems entry of the JSP FAQ. Always be sure to check the FAQs first to see if your question has already been addressed.
[ August 02, 2008: Message edited by: Bear Bibeault ]
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi pritam sabnis welcome to Javaranch ,
looks like Bear has provided your required answer.
Please take some time to read the ask good questions link below.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic