Download presentation
Presentation is loading. Please wait.
Published byByron Franklin Modified over 9 years ago
1
Creating Adjudicators in a WAR Computer Science Innovations, LLC
2
Setup Make sure /cloud project is downloaded Start up eclipse and open it in cloud directory (something like /home/scott/cloud) ssh -X ubuntu@123.45.111 to be able to open X sessions if doing this on cloudubuntu@123.45.111 [Screenshot]
4
Setup (Eclipse) Close front window and right click on left to open a New Project [Screenshot]
6
Setup (Eclipse) Title the project cloud and hit Finish [Screenshot]
8
Setup (Eclipse) Screen should look like below [Screenshot]
10
Setup (Eclipse) Click Yes to include java perspective [Screenshot]
13
Setup (Eclipse) Go to util/src/cloud/LoadRestfulWebService.java [Screenshot]
15
LoadRestfulWebService Explained Typical protocols – Http, https, REST, JSON, 1-way SSL (https), 2-way SSL (https with identity assertion) LoadRestfulWebService – Uses RESTful service to load users, groups, and roles – Calls cloud application and loads data into SOLR
16
LoadRestfulWebService Explained Main() adds roles, groups, and users AddUser(), AddRoles(), AddGroups() – Gets properties from properties file – Gets URI information to fill in user data Category is 'table name' – Sends data to servlet that writes to SOLR GetProperties() – Gets data from load.properties – Files are either on the web or off the classpath, load.properties is off classpath
17
JSONUpdateServlet Go to cloud- war/src/java/cloud/servlets/JSONUpdateServlet.java [Screenshot]
19
JSONUpdateServlet Takes data from URI that is sent RESTfully and writes it to SOLR WriteToSOLR() already exists and should be used to write to SOLR
20
Where to Start? Cloud-functional-tests/src/TestAdd.java [Screenshot]
22
TestAdd.java Test program that goes to SOLR, makes a request – JUNIT test uses asserts to see if the test passes or fails. If assert line is true, test works, if not, then test does not work.
23
Seeing if cloud works Go to cloud/cloud/solr.solr.home/collection1/data and do an rm -rf * Go to terminal, start tomcat with 'st' In other window, cd to /cloud/cloud and type: ant deploy [Screenshot]
26
Seeing if cloud works In cloud/cloud do: ant run-clear-index ant run-load-web-service In browser go to: localhost:8080/cloud/select?q=*:*&rows=100 [Screenshot]
28
Cloud Project Continued You have to add a login module to cloud – Already added in for you Files to take from adjudicator_software folder in content.scottstreit.com/compsec – Jaas.config goes in tomcat config directory – RolePrincipal.java – SolrLoginModule.java It gets called in web.xml – There are security constraints and login- configs in web.xml
29
SolrLoginModule SolrLoginModule.java It gets called in web.xml – There are security constraints and login- configs in web.xml – BASIC for login-config
30
Cloud Project Continued You have to add a login module to cloud – Already added in for you Files to take from adjudicator_software folder in content.scottstreit.com/compsec – Jaas.config goes in tomcat config directory – RolePrincipal.java – SolrLoginModule.java It gets called in web.xml – There are security constraints and login- configs in web.xml
31
JUNIT Test Attempt In cloud/cloud run the following: ant run-tests [Screenshot]
33
JUNIT Test Attempt Go to /cloud/cloud/cloud-functional- tests/classes and open the TestAdd.xml file inside the folder [Screenshot]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.