JSP page Path problem

Source: Internet
Author: User

A: Preface

This path problem has always been a problem, I have more than one time to study a thing, but every time about the path of the problem, is a question, now in the sub-situation to say

II: Content

(1): Picture path problem in CSS

CSS inside the picture path, is the CSS is located in the directory as the starting point to see the following eag:

  

(2): JSP page inside the introduction of JS is a URL as the starting point, where the URL is the URL on the site

@RequestMapping (value= "/user/add", method=requestmethod.get) public String Toadd () {return "/user/adduser";}

Jump to the page in this way, then the relative path is relative Http://localhost:8080/test/user/add (address bar) to jump, look at the Google path

Look at the path here to know how to introduce CSS files and JS files, in fact, the path introduced here is relative to the address bar to jump

Three: summary

In fact, this is my second record about the path of the blog, but each time is not very deep to understand, this is OK, relative path or need experience OH. Quick holiday, after the year is my SpongeBob, try to refuel, GO!!!

JSP page Path problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.