Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
71 changes: 71 additions & 0 deletions Online Survey System Java Project/survey/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="survey" default="default" basedir=".">
<description>Builds, tests, and runs the project survey.</description>
<import file="nbproject/build-impl.xml"/>
<!--

There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:

-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying

Example of pluging an obfuscator after the compilation could look like

<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>

For list of available properties check the imported
nbproject/build-impl.xml file.


Other way how to customize the build is by overriding existing main targets.
The target of interest are:

init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation

Example of overriding the target for project execution could look like

<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>

Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.

-->
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Servlet 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">
<sun-web-app error-url="">
<context-root>/survey</context-root>
<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>
</sun-web-app>
24 changes: 24 additions & 0 deletions Online Survey System Java Project/survey/build/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" 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_3_0.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
</web-app>
18 changes: 18 additions & 0 deletions Online Survey System Java Project/survey/build/web/error.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Error Page</title>
<link rel="stylesheet" href="styles.css"/>
</h:head>
<h:body>
<div class="content">
<div class="header">Survey</div>
<h2>Sorry! There was an error due to which your survey results cannot be processed. </h2>
<p/>
Click <a href="index.xhtml">here</a> to select your topic of survey and try again!
</div>
</h:body>
</html>

19 changes: 19 additions & 0 deletions Online Survey System Java Project/survey/build/web/finish.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" >
<h:head>
<title>Thank You</title>
<link rel="stylesheet" href="styles.css"/>
</h:head>
<h:body>
<div class="content">
<div class="header">Survey</div>
<h2>Thank You for participating in the survey. </h2>
<p/>
Click <a href="index.xhtml">here</a> to select your topic of survey.
</div>
</h:body>
</html>

33 changes: 33 additions & 0 deletions Online Survey System Java Project/survey/build/web/index.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core" >
<h:head>
<title>Select Topic</title>
<link rel="stylesheet" href="styles.css"/>
</h:head>
<h:body>
<div class="content">
<h:form id="selectTopicForm">
<div class="header">Survey</div>
<h2>Select Topic</h2>
Available Topics :
<h:selectOneMenu id="topic" value="#{topic.id}">
<f:selectItems value="#{topic.topics}" />
</h:selectOneMenu>

<p/>
<h:commandButton action="#{topic.process}" value="Submit">
</h:commandButton>
<p/>
<h3>Click on <b>Submit</b> button to start participating in the survey.</h3>
<p/>
<center>
<img src="topic.jpg" />
</center>
</h:form>
</div>
</h:body>
</html>

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@

#top {
position: relative;
background-color: #036fab;
color: white;
padding: 5px;
margin: 0px 0px 10px 0px;
}

#bottom {
position: relative;
background-color: #c2dfef;
padding: 5px;
margin: 10px 0px 0px 0px;
}

#left {
float: left;
background-color: #ece3a5;
padding: 5px;
width: 150px;
}

#right {
float: right;
background-color: #ece3a5;
padding: 5px;
width: 150px;
}

.center_content {
position: relative;
background-color: #dddddd;
padding: 5px;
}

.left_content {
background-color: #dddddd;
padding: 5px;
margin-left: 170px;
}

.right_content {
background-color: #dddddd;
padding: 5px;
margin: 0px 170px 0px 170px;
}

#top a:link, #top a:visited {
color: white;
font-weight : bold;
text-decoration: none;
}

#top a:link:hover, #top a:visited:hover {
color: black;
font-weight : bold;
text-decoration : underline;
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
body {
background-color: #ffffff;
font-size: 12px;
font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
color: #000000;
margin: 10px;
}

h1 {
font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif;
border-bottom: 1px solid #AFAFAF;
font-size: 16px;
font-weight: bold;
margin: 0px;
padding: 0px;
color: #D20005;
}

a:link, a:visited {
color: #045491;
font-weight : bold;
text-decoration: none;
}

a:link:hover, a:visited:hover {
color: #045491;
font-weight : bold;
text-decoration : underline;
}
58 changes: 58 additions & 0 deletions Online Survey System Java Project/survey/build/web/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
body {
font-family:verdana;
font-size:12pt;
background-color: black;
}
.header {
background-color: #ff0000;
font-weight: bold;
color: #ffffff;
font-size: 30px;
letter-spacing: 5pt;
font-family: Arial;
}

.qno {
font-weight: bold;
font-size: 12px;
font-family: Verdana;
}
.question {
background-color: #cccccc;
font-weight: bold;
font-size: 14px;
font-family: Verdana;
margin-top: 5pt;
margin-bottom: 5pt;
text-align:left;
}

.options {
text-align:left;
font-weight: bold;
font-size: 12px;
font-family: Verdana;
}

h3 {
font-family: Arial;
font-size: 14px;
font-weight: 700;
}

h2 {
font-family: Arial;
font-size: 22px;
color:blue;
font-weight: 700;

}

.content {
background-color: white;
width: 600px;
height:800px;
overflow: visible;
margin-left: auto ;
margin-right: auto ;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading