N
N
Nikolay Baranenko2016-12-13 12:32:22
JavaScript
Nikolay Baranenko, 2016-12-13 12:32:22

How to set the path correctly?

Hello.

It so happened that in the project I had to create subfolders with such nesting

корень проекта
                  -->tools
                          -->test
                                -->check_db
                                               -->check_cache.jsp


in the code there is a link to JS, pictures, styles, etc.

<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<LINK REL="SHORTCUT ICON" HREF="../pictures/domis.ico">
<script src="../libs/jquery-2.1.3.js" type="text/javascript"></script>

<link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/bootstrap-cosmo.min.css">
<script src="../libs/bootstrap.js"></script>
<link href="../css/font-awesome.min.css" rel="stylesheet">


they all stopped working, although if I'm not mistaken .. / says that search from the root ...

+

alias to everything

<sql:query var="SCRIPT_Total" dataSource="jdbc/OracleDB">
            ${SCRIPT_Total_Number}
        </sql:query>


from context.xml

<Resource name="jdbc/Oracle" auth="Container"
              type="javax.sql.DataSource" driverClassName="oracle.jdbc.driver.OracleDriver"
        url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1522)))(CONNECT_DATA=(SERVICE_NAME=dboracle)))"
              username="user" password="password" maxActive="150" maxIdle="120"
              maxWait="-1"/>


became a link to connect to the database began to return an error that he could not find the driver

javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/OracleDB"
  org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
  org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
  org.apache.jsp.monitoring_005ftools.test.check_005fdb.check_005fcache_jsp._jspService(check_005fcache_jsp.java:1019)
  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)


Before that, the file was in a subfolder

<code>корень проекта
                  -->tools</code>

и все было нормально.

Прошу подсказать в чем проблема и как ее решить.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
axeax, 2016-12-13
@drno-reg

../path/to/file - one level up
/path/to/file - from the root

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question