<%@ page import="java.io.PrintWriter" %>
<%@ page import="org.rowi.model.*" %>
не работает page import в prelude.jspf
Код:
В коде в prelude.jspf есть строчка:
Код:
CharResponseWrapper wrapper = new CharResponseWrapper(response);
Где CharResponseWrapper - класс реализованный в org.rowi.model. Так вот при компиляции tomcat выводит ошибку
Цитата:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 22 in the jsp file: /test/prelude.jsp
CharResponseWrapper cannot be resolved to a type
19: <div id="menu">
20: <div id="login_form">
21: <%
22: CharResponseWrapper wrapper = new CharResponseWrapper(response);
23: getServletContext().getRequestDispatcher("/scripts/loginform.jsp").include(request,wrapper);
24: PrintWriter writer = response.getWriter();
25: %>
web.xml выглядит так:
Код:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>auction</display-name>
<servlet>
<display-name>AuctionServlet</display-name>
<servlet-name>AuctionServlet</servlet-name>
<servlet-class>org.rowi.model.AuctionServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AuctionServlet</servlet-name>
<url-pattern>/test/index.php</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AuctionServlet</servlet-name>
<url-pattern>/test/registration.php</url-pattern>
</servlet-mapping>
<jsp-config>
<jsp-property-group>
<display-name>auction</display-name>
<url-pattern>*.jsp</url-pattern>
<include-prelude>/test/prelude.jsp</include-prelude>
<include-coda>/test/coda.jspf</include-coda>
</jsp-property-group>
</jsp-config>
<error-page>
<exception-type>org.rowi.model.LoginAlreadyExistsException</exception-type>
<location>/LoginAlreadyExists.jsp</location>
</error-page>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>jdbc/auctionDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>auction</display-name>
<servlet>
<display-name>AuctionServlet</display-name>
<servlet-name>AuctionServlet</servlet-name>
<servlet-class>org.rowi.model.AuctionServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>AuctionServlet</servlet-name>
<url-pattern>/test/index.php</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AuctionServlet</servlet-name>
<url-pattern>/test/registration.php</url-pattern>
</servlet-mapping>
<jsp-config>
<jsp-property-group>
<display-name>auction</display-name>
<url-pattern>*.jsp</url-pattern>
<include-prelude>/test/prelude.jsp</include-prelude>
<include-coda>/test/coda.jspf</include-coda>
</jsp-property-group>
</jsp-config>
<error-page>
<exception-type>org.rowi.model.LoginAlreadyExistsException</exception-type>
<location>/LoginAlreadyExists.jsp</location>
</error-page>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<resource-ref>
<res-ref-name>jdbc/auctionDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</web-app>
Если класс указать вместе с package то ошибка исчезает. Может кто сталкивался с таким? Заранее благодарен!