Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
e167f16
Initial commit
fitrakun Nov 13, 2015
275bdce
Rename Identity_Service
fitrakun Nov 13, 2015
017044a
Add dump database
fitrakun Nov 13, 2015
fb2ec3d
Add jsp for Login and Register
vennylaras Nov 17, 2015
ab9acbd
Connect to database and add UserWS
vennylaras Nov 17, 2015
55d57b8
Initial index and style in StackExchange_WS
fitrakun Nov 17, 2015
628b57b
start edit_question.jsp
fitrakun Nov 17, 2015
966a8f3
delete edit_question.jsp
fitrakun Nov 17, 2015
48f333e
add service.java in WS
fitrakun Nov 17, 2015
b40edeb
Move jsp to client and update UserWS
vennylaras Nov 17, 2015
d5a4ea6
Add AnswerWS
vennylaras Nov 18, 2015
96fa6cf
Add QuestionWS & edit DB.java
asanilta Nov 18, 2015
d0e2c99
Edit index.jsp (add question list) & style.css
asanilta Nov 18, 2015
bac3d0a
Update AnswerWS
vennylaras Nov 18, 2015
080d2dc
Merge branch 'master' of https://github.com/Istridaman/IF3110-2015-T2
vennylaras Nov 18, 2015
b1c95c1
change style.css, add create_question.jsp
fitrakun Nov 18, 2015
cf24852
Edit QuestionWS & Question
asanilta Nov 18, 2015
ef2354e
Edit UserWS, User, AnswerWS, and Answer
vennylaras Nov 18, 2015
a5da3cf
Add QuestionListServlet & connect with index.jsp
asanilta Nov 18, 2015
d7e33ce
Edit addUser and addAnswer in WS
vennylaras Nov 18, 2015
e589723
remake IS, add json lib
fitrakun Nov 18, 2015
4463a5f
Remake StackExchange Client
asanilta Nov 18, 2015
543398d
Delete Old StackExchange Client
asanilta Nov 18, 2015
3558dd3
change DB, edit login.java
fitrakun Nov 18, 2015
c7c8320
Add jsp and servlet for viewing question (unfinished)
vennylaras Nov 22, 2015
17963f8
Edit jsp and servlet for viewing question
vennylaras Nov 22, 2015
d944a24
Change StackExchange WS (add setter & fix errors)
asanilta Nov 22, 2015
6b950a8
Edit AnswerWS & UserWS
asanilta Nov 22, 2015
1c69ed4
Add AddAnswerServlet, fix ViewQuestionServlet, edit QuestionListServlet
asanilta Nov 22, 2015
c120aa1
Add VoteWS & change Statement to PreparedStatement for SQL
asanilta Nov 22, 2015
9b1216f
Add VoteServlet (voting works!), edit index.jsp (truncate), edit styl…
asanilta Nov 22, 2015
15dc62f
update properties
fitrakun Nov 23, 2015
c99fdd8
Merge branch 'master' of https://github.com/Istridaman/IF3110-2015-T2
fitrakun Nov 23, 2015
414f364
add something properties
fitrakun Nov 23, 2015
76e3bf3
update IS without JSON format
fitrakun Nov 23, 2015
d2e5a76
List of answers are now shown
vennylaras Nov 23, 2015
56b9964
update
fitrakun Nov 23, 2015
3dd6dfb
update
fitrakun Nov 23, 2015
20ab49d
Edit list of answers
vennylaras Nov 23, 2015
3204b3f
Add servlet for register
vennylaras Nov 23, 2015
ba845fb
update
fitrakun Nov 23, 2015
473fbe4
Fix addUser problem (changed executeUpdate(sql) to executeUpdate())
asanilta Nov 23, 2015
2e17766
Add vote for answer
asanilta Nov 23, 2015
19d174f
edit merge
fitrakun Nov 23, 2015
88067a4
Merge branch 'master' of https://github.com/Istridaman/IF3110-2015-T2
fitrakun Nov 23, 2015
a2cf942
Fix bug in view.jsp
asanilta Nov 24, 2015
c00f43b
Add AddQuestionServlet
asanilta Nov 24, 2015
7aca546
Copy StackExchange_Client
asanilta Nov 24, 2015
783816c
Delete StackExchange_Client
asanilta Nov 24, 2015
eb31110
-
asanilta Nov 24, 2015
4a3626c
Remake StackExchange_Client
asanilta Nov 24, 2015
4190f98
Change form in ask.jsp & fix answercount bug in index.jsp
asanilta Nov 25, 2015
8d2a0c4
Add search for questions (working)
asanilta Nov 25, 2015
9d01324
Add WS operation and servlet for login
vennylaras Nov 25, 2015
3268728
Edit register servlet
vennylaras Nov 26, 2015
4613736
fix token, change db
fitrakun Nov 26, 2015
c13d510
fix login.java, change database
fitrakun Nov 26, 2015
9806948
fixed login.java, change database
fitrakun Nov 26, 2015
79d36bd
add LoginIS.java in client for token
fitrakun Nov 26, 2015
2220fb6
Add getUserByToken operation
vennylaras Nov 26, 2015
50db433
update auth.java
fitrakun Nov 26, 2015
52c1e2c
Change WS operation parameters to include token
vennylaras Nov 26, 2015
21a9347
add ConnectionIS, change LoginIs.java
fitrakun Nov 26, 2015
6c2354d
add connectionIS
fitrakun Nov 26, 2015
eb5be08
update connectionIS, add JSON simple library
fitrakun Nov 26, 2015
5efe47a
update loginIS
fitrakun Nov 26, 2015
811fe05
edit LoginIS, ConnectionIS
fitrakun Nov 26, 2015
ab1993a
Change root page, web.xml, and edit loginIS
fitrakun Nov 26, 2015
e11eb1d
Add DeleteQuestionServlet and refresh WS references
vennylaras Nov 26, 2015
ecc0cef
Read token from cookie, add message + redirect to login if expired, a…
asanilta Nov 27, 2015
92ded38
Update delete question
vennylaras Nov 27, 2015
ba0036d
update auth IS, add connection in WS
fitrakun Nov 27, 2015
4cb5f39
change WS, update web.xml IS
fitrakun Nov 27, 2015
5320acc
change web.xml, fix client server error
fitrakun Nov 27, 2015
079a78e
Edit urlpatterns in Client
fitrakun Nov 27, 2015
38c3ed5
fix all error (maybe)
fitrakun Nov 27, 2015
6e98e43
Add header.jsp, add success/error message, restrict edit/delete, chan…
asanilta Nov 27, 2015
4b66052
Edit README.md
vennylaras Nov 27, 2015
90fd478
Add logout servlet
vennylaras Nov 27, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/WebApplication1/nbproject/private/
/StackExchange Client/nbproject/private/
/StackExchange WS/nbproject/private/
/StackExchange WS/build/
/StackExchange Client/build/
/StackExchange WS/dist/
/StackExchange Client/dist/
/Identity_Service/dist/
71 changes: 71 additions & 0 deletions Identity_Service/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="Identity_Service" default="default" basedir=".">
<description>Builds, tests, and runs the project Identity_Service.</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>
2 changes: 2 additions & 0 deletions Identity_Service/build/web/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Manifest-Version: 1.0

Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 10 additions & 0 deletions Identity_Service/build/web/WEB-INF/glassfish-web.xml
Original file line number Diff line number Diff line change
@@ -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>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions Identity_Service/build/web/WEB-INF/sun-jaxws.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<endpoints version="2.0" xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
<endpoint implementation="service.service" name="service" url-pattern="/service"/>
</endpoints>
11 changes: 11 additions & 0 deletions Identity_Service/build/web/WEB-INF/sun-web.xml
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="">
<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>

28 changes: 28 additions & 0 deletions Identity_Service/build/web/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1">
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>service.login</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/login</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>auth</servlet-name>
<servlet-class>service.auth</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>auth</servlet-name>
<url-pattern>/auth</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
10 changes: 10 additions & 0 deletions Identity_Service/build/web/gfv3ee6.dpf
Original file line number Diff line number Diff line change
@@ -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>
16 changes: 16 additions & 0 deletions Identity_Service/build/web/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<!--
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.
-->
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div>TODO write content</div>
</body>
</html>
111 changes: 111 additions & 0 deletions Identity_Service/nbproject/ant-deploy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="-deploy-ant" basedir=".">
<target name="-init-cl-deployment-env" if="deploy.ant.enabled">
<property file="${deploy.ant.properties.file}" />
<available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
<available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
<available file="${deploy.ant.resource.dir}" property="has.setup"/>
<tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
</target>

<target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
<tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
<copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
<!-- The doctype triggers resolution which can fail -->
<replace file="${temp.sun.web}">
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
</replace>
<replace file="${temp.sun.web}">
<replacetoken><![CDATA[<sun-web-app]]></replacetoken>
<replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
</replace>
<xmlproperty file="${temp.sun.web}" validate="false">
</xmlproperty>
<delete file="${temp.sun.web}"/>
<condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
<isset property="sun-web-app.context-root"/>
</condition>
<condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
<isset property="sun-web-app.context-root"/>
</condition>
</target>
<target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
<tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
<copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
<!-- The doctype triggers resolution which can fail -->
<replace file="${temp.gf.web}">
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
</replace>
<replace file="${temp.gf.web}">
<replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
<replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
</replace>
<xmlproperty file="${temp.gf.web}" validate="false">
</xmlproperty>
<delete file="${temp.gf.web}"/>
<condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
<isset property="glassfish-web-app.context-root"/>
</condition>
<condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
<isset property="glassfish-web-app.context-root"/>
</condition>
</target>
<target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
<property name="deploy.context.root.argument" value=""/>
</target>
<target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
<tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
<mkdir dir="${gfv3.resources.dir}"/>
<mkdir dir="${gfv3.resources.dir}/META-INF"/>
<copy todir="${gfv3.resources.dir}/META-INF">
<fileset dir="${deploy.ant.resource.dir}"/>
</copy>
<jar destfile="${deploy.ant.archive}" update="true">
<fileset dir="${gfv3.resources.dir}"/>
</jar>
<delete dir="${gfv3.resources.dir}"/>
</target>
<target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
<antcall target="-deploy-without-pw"/>
<antcall target="-deploy-with-pw"/>
</target>

<target name="-deploy-without-pw" unless="gfv3.password">
<echo message="Deploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
<get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
<target name="-deploy-with-pw" if="gfv3.password">
<echo message="Deploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
<target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
<antcall target="-undeploy-without-pw"/>
<antcall target="-undeploy-with-pw"/>
</target>

<target name="-undeploy-without-pw" unless="gfv3.password">
<echo message="Undeploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
<target name="-undeploy-with-pw" if="gfv3.password">
<echo message="Undeploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
</project>
Loading