initial commit

This commit is contained in:
fscotto
2018-01-09 21:44:07 +01:00
parent e91295752d
commit a03e220838
195 changed files with 2814 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
main=it.jee_book.jakiwiki.actions.VediPaginaAction
edit=it.jee_book.jakiwiki.actions.ModificaPaginaAction
pulsantiera=it.jee_book.jakiwiki.actions.PulsantieraAction
salva-pagina=it.jee_book.jakiwiki.actions.SalvaPaginaAction
invia-mail=it.jee_book.jakiwiki.actions.InviaMailAction

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="defaultPersistenceUnit" transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/sample</jta-data-source>
<class>it.jee_book.jakiwiki.model.Pagina</class>
<properties>
<property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
<property name="hibernate.connection.password" value="root"/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/jaki_wiki"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
</properties>
</persistence-unit>
</persistence>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app error-url="">
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</glassfish-web-app>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>2.0</jsp-version>
<short-name>JakiWiki taglibs</short-name>
<tag>
<name>lista_pagine</name>
<tag-class>it.jee_book.jakiwiki.tag.ListaPagine</tag-class>
<attribute>
<name>pagine</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="8.0" xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/schema/jbossas/jboss-web_8_0.xsd">
<context-root>/JakiWiki</context-root>
</jboss-web>

View File

@@ -0,0 +1,8 @@
# To change this license header, choose License Headers in Project Properties.
# To change this template file, choose Tools | Templates
# and open the template in the editor.
main=WEB-INF/views/main.jsp
edit=WEB-INF/views/edit.jsp
list=WEB-INF/views/list.jsp
email=WEB-INF/views/email.jsp

View File

@@ -0,0 +1,43 @@
<%--
Document : edit
Created on : 25-mag-2016, 21.15.50
Author : morgoth
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JakiWiki: Modifica di ${titolo}</title>
</head>
<body style="font-family: Verdana; font-size: 16px;">
<div id="title" style="font-family: Verdana; font-size: 32px; font-variant: small-caps;" >
JakiWiki: modifica '${titolo}'
</div>
<table style="width: 80%; height: 600px;">
<form action="salva-pagina.action" method="post">
<tr>
<td>
<textarea name="contenuto" cols="110" rows="15">
<c:out value="${contenuto}" />
</textarea>
</td>
</tr>
<tr>
<td style="height: 60px">
<input type="hidden" name="titolo" value="${titolo}" />
<input type="submit" style="font-family: Verdana; font-size: 16px" value="Salva" />
</td>
</tr>
<tr>
<td>
<hr>
<c:import url="fragments/pulsantiera.jsp" />
</td>
</tr>
</form>
</table>
</body>
</html>

View File

@@ -0,0 +1,29 @@
<%--
Document : pulsantiera
Created on : 22-mag-2016, 15.54.39
Author : morgoth
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<form method="post" action="pulsantiera.action" name="pulsantieraForm">
<input type="hidden" name="titolo" value="${titolo}" />
<input type="submit" name="principale" style="font-family: Verdana; font-size: 16px;" value="PRINCIPALE" />
<input type="submit" name="tutte" style="font-family: Verdana; font-size: 16px;" value="TUTTE" />
<input type="submit" name="recenti" style="font-family: Verdana; font-size: 16px;" value="RECENTI" />
<input type="submit" id="email" name="email" style="font-family: Verdana; font-size: 16px;" value="EMAIL" disabled="true" />
</form>
<br />
<div id="title" style="font-family: Verdana; font-size: 16px;" >
JakiWiki - a cool Java Wiki
</div>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<%--
Document : list
Created on : 25-mag-2016, 21.57.11
Author : morgoth
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="/WEB-INF/jakiwiki.tld" prefix="jakiwiki" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JakiWiki: ${intestazione}</title>
</head>
<body style="font-family: Verdana; font-size: 16px;">
<div id="title" style="font-family: Verdana; font-size: 16px; font-variant: small-caps;">
JakiWiki: ${intestazione}
</div>
<table style="width: 80%; height: 600px;">
<tr>
<td>
<jakiwiki:lista_pagine pagine="${lista}"/>
</td>
</tr>
<tr>
<td>
<hr>
<c:import url="fragments/pulsantiera.jsp" />
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,45 @@
<%--
Document : main
Created on : 22-mag-2016, 15.37.31
Author : morgoth
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JakiWiki: ${titolo}</title>
</head>
<body onload="document.getElementById('email').disabled = false;"
style="font-family: Verdana; font-size: 16px;">
<div id="title" style="font-family: Verdana; font-size: 32px; font-variant: small-caps;" >
JakiWiki: ${titolo}
</div>
<table style="width: 80%; height: 600px;">
<tr>
<td>
<form name="modificaForm" action="edit.action" method="post">
<input type="hidden" name="titolo" value="${titolo}" />
<input type="submit" style="font-family: Verdana; font-size: 11px" value="Modifica" />
</form>
</td>
</tr>
<tr>
<td>
<c:out value="${contenuto}" default="" escapeXml="false" />
</td>
</tr>
<tr>
<td>
<hr>
<c:import url="fragments/pulsantiera.jsp" />
</td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>JakiWiki</display-name>
<description>JakiWiki, un wiki in Java</description>
<servlet>
<servlet-name>MainController</servlet-name>
<servlet-class>it.jee_book.jakiwiki.servlet.MainController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>MainController</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
<ejb-local-ref>
<ejb-ref-name>ejb/PaginaManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>it.jee_book.jakiwiki.business.pagine.PaginaManager</local>
</ejb-local-ref>
<ejb-local-ref>
<ejb-ref-name>ejb/EmailManager</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>it.jee_book.jakiwiki.business.email.EmailManager</local>
</ejb-local-ref>
</web-app>