A debugging method and problem of JSP page in Web project--SPRINGMVC architecture test

Source: Internet
Author: User

In the front-end development, especially the MVC architecture of multi-person development, responsible for the front-end child shoes always need to do static pages, and back to the background before the use of variables such as El expression and other testing functions, so I introduced a template JSP data testing dedicated files, specifically configure all the variables, Then, in the JSP page to be tested into, you can test, and background integration only need to delete the include tag. (Because I am a beginner, if there is any more clever and quick test method,, Hope not spray < ( ̄︶ ̄) [go!] )

Here is the project structure (slightly complex, SPRINGMVC architecture, to take the required), redirected to the/jsp/pages/exercise.jsp file (equivalent to the home page) via redirect.jsp, which references a common file jsp/template/View-test-config. JSP, used to initialize all test data.

All static files are placed under the Web page directory.

Two file contents:

/jsp/pages/exercise.jsp

<Head><Metahttp-equiv= "Content-type"  Content=" text/html; charset=utf-8 "> <title> Practice </title> 
        < %@ include file= ". /template/view-test-config.jsp "%> </head>

jsp/template/view-test-config. jsp

<HTML>    <Head>        <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8">    </Head>    <%        StringQusid= "1"; //Problem numberStringquscontent= "the suffix of the C language executable file is:"; //topic contentStringqustipcontent= "Single Choice"; %></HTML>

The web says that all resource requests are blocked by default in the SPRINGMVC architecture, so if you don't want to do work mapping and configure these files, change the MVC mapping rule from "/" to a specific URL (the NetBeans default project mapping rule is "*.htm")

Beginners, please advise ^_^ if there is any mistake.

A debugging method and problem of JSP page in Web project--SPRINGMVC architecture test

Related Article

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.