Skip to content
This repository has been archived by the owner on Aug 2, 2019. It is now read-only.

Typical security & bootstrap: old views are declared instead of the new bootstrap views #26

Open
Forgev41 opened this issue Jan 2, 2016 · 0 comments

Comments

@Forgev41
Copy link

Forgev41 commented Jan 2, 2016

When typical security is used, like in the script below, the wrong view aredeclared in views.xml.
Although the correct folder ...\src\main\webapp\WEB-INF\views\signup\bootstrap is created, the views in the signup folder are declared and not those in signup\bootstrap.

Testing script (using Spring 2.0.0.M1)

// Create a new project
project setup --topLevelPackage com.springsource.pizzashop --projectName pizzashop

jpa setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY

entity jpa --class ~.domain.Pizza
field string --fieldName name --notNull --sizeMin 10
field number --fieldName price --notNull --type java.math.BigDecimal

// Adding web layers
web mvc setup
web mvc all --package ~.web

// Adding Spring security
typicalsecurity setup

// Adding JQuery, Datatables and Bootstrap
web mvc jquery setup
web mvc jquery all
web mvc datatables setup
web mvc bootstrap setup

web mvc bootstrap update

Original views.xml had

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
    <definition extends="default" name="signup/index">
        <put-attribute name="menu" value="" />
        <put-attribute name="body" value="/WEB-INF/views/signup/index.jspx" />
    </definition>
    <definition extends="default" name="signup/thanks">
        <put-attribute name="menu" value="" />
        <put-attribute name="body" value="/WEB-INF/views/signup/thanks.jspx" />
    </definition>

    <definition extends="default" name="signup/error">
        <put-attribute name="menu" value="" />
        <put-attribute name="body" value="/WEB-INF/views/signup/error.jspx" />
    </definition>

</tiles-definitions>

This should be:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
<tiles-definitions>
    <definition extends="default" name="signup/index">
        <put-attribute name="menu" value="" />
        <put-attribute name="body" value="/WEB-INF/views/signup/bootstrap/index.jspx" />
    </definition>
    <definition extends="default" name="signup/thanks">
        <put-attribute name="menu" value="" />
        <put-attribute name="body" value="/WEB-INF/views/signup/bootstrap/thanks.jspx" />
    </definition>

    <definition extends="default" name="signup/error">
        <put-attribute name="menu" value="" />
        <put-attribute name="body" value="/WEB-INF/views/signup/bootstrap/error.jspx" />
    </definition>

</tiles-definitions>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant