P
P
parkito2016-08-23 21:28:14
JavaScript
parkito, 2016-08-23 21:28:14

Why is the script not running?

Hello. Please help me to solve the problem. I am building a simple java web application.
index.jsp

<%@page contentType="text/html" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Справочник</title>
    <link rel="stylesheet" type="text/css" href="resources/css/ext-all.css"/>
    <script type="text/javascript" src="resources/ext-all.js"></script>
    <script type="text/javascript" src="app.js"></script>
</head>
<body>
</body>
</html>

App,js lies next to it
Ext.application({
    name: 'webapp2',
    appFolder: 'app',
    launch: function () {
        Ext.create('Ext.container.Viewport', {
            layout: 'fit',
            items: {
                xtype: 'panel',
                html: '<h2>Телефонный справочник</h2>'
            }
        });
    }
});

But when the application is deployed to Tomcat, the page title changes <title>Справочник</title>
, but what the script should display <title>Справочник</title>does not. What's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Vitrenko, 2016-08-23
@Vestail

You need to specify the full path to js.
Same with css.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question