Results 1 to 2 of 2
  1. #1
    meisam is offline Member
    Join Date
    Mar 2009
    Rep Power

    Default CSS and JS pathes are lost after dispatching

    Hello to all!
    I’ve implemented a j2ee project in netbeans…
    I created an *.html page powered by Ajax, it’s perfect when I run this page standalone but when my controller servlet forward to this page with dispatcher all js and css files will be lost!!
    My Servlet mapping is:
    My *.html mapping is:
    My Resources path:
    and I use this in my html:

    Perfect mode:
    localhost:15086/Pedrama/worktable(without controller)
    Incorrect mode:
    localhost:15086/Pedrama/pedrama/worktable (whit controller by dispatcher)

    Please help me!
    Can I use a method for specify paths in my web.xml?!

  2. #2
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    Create in WEB-INF js and css folders and put their your css and js files, then in source of jsp files you configure pathes like styke="/style/<your css file>"(the same with js)

Similar Threads

  1. I'm lost :(
    By leonardjr in forum New To Java
    Replies: 8
    Last Post: 03-03-2009, 05:18 AM
  2. So Lost
    By kandt in forum New To Java
    Replies: 5
    Last Post: 12-13-2008, 10:55 PM
  3. Dispatching requests to other Servlet
    By gapper in forum Java Servlet
    Replies: 1
    Last Post: 02-06-2008, 07:57 AM
  4. Dispatching request to another Servlet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-27-2008, 09:20 PM
  5. Replies: 2
    Last Post: 07-04-2007, 06:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts