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
28 changes: 28 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea/
.idea/
/target/
/bin/
37 changes: 37 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>OAPS-Jifry</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
13 changes: 13 additions & 0 deletions .settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/webapp"/>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="target/m2e-wtp/web-resources"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="output" path=""/>
</classpath>
3 changes: 3 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding/<project>=UTF-8
11 changes: 11 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.7
9 changes: 9 additions & 0 deletions .settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="WZF_OAPS">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<property name="context-root" value="WZF_OAPS"/>
<property name="java-output-path" value="/OAPS-Jifry/target/classes"/>
</wb-module>
</project-modules>
7 changes: 7 additions & 0 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<fixed facet="wst.jsdt.web"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="2.3"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>
1 change: 1 addition & 0 deletions .settings/org.eclipse.wst.jsdt.ui.superType.container
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
1 change: 1 addition & 0 deletions .settings/org.eclipse.wst.jsdt.ui.superType.name
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Window
2 changes: 2 additions & 0 deletions .settings/org.eclipse.wst.validation.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
disabled=06target
eclipse.preferences.version=1
49 changes: 48 additions & 1 deletion target/WZF_OAPS/Search.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,34 @@ footer
select * from article a , subject s where a.sid=s.sid and hide="No" and (title like '%<%=request.getAttribute("search2") %>%' or abstracts like '%<%=request.getAttribute("search2") %>%' or highlight like '%<%=request.getAttribute("search2") %>%') order by time desc
</sql:query>

<!-- -->

<!-- method highlighter reads picks user input keyword and database search results
as arguments. It confirms if the input keyword is in the result set retrieved from
database. if this is true, then the entire search results is highlighted. Else the result
isn't highlighted -->
<%!
public String highlighter(String s,String searchResults){
String finalOutput = null;

if(searchResults != null){

if(s.contains(searchResults))
{
finalOutput = "<span style='background-color:yellow'> " + s+ " </span>";
}
else
{
finalOutput = s;
}

}

return finalOutput;
}

%>

<div>
<table class="table2">
<tr>
Expand All @@ -160,8 +188,27 @@ select * from article a , subject s where a.sid=s.sid and hide="No" and (title
<th>Time</th>
<th>Popularity</th>
</tr>

<c:forEach items="${result.rows}" var="row">
<c:set value="${search2}" var="search2"></c:set>

<!-- setting results from database into c: tag variable-->
<c:set value="${search2}" var="search2"></c:set>
<c:set var="subj_name" value="${row.subject}"/>
<c:set var="subj_title" value="${row.title}"></c:set>

<!-- this scriplet accesses user input search string from servlet as well as from
database inorder to be used as arguments for the highlighter function -->

<%
String searchResults = (String)request.getAttribute("search2");
String subj_name = (String)pageContext.getAttribute("subj_name");
String subj_title = (String)pageContext.getAttribute("subj_title");

//printing output in console for the purpose of debugging
System.out.println(searchResults);
System.out.println(subj_name );
System.out.println(subj_title );
%>
<tr>
<td><c:out value="${row.subject}"></c:out></td>
<td><a href="Controller?page=view-article&title=${row.title}"> <c:out value="${row.title}"></c:out> </a></td>
Expand Down
Binary file modified target/classes/com/database/DB.class
Binary file not shown.
Binary file modified target/classes/com/filter/Filter_AdminLogin.class
Binary file not shown.
Binary file modified target/classes/com/javaBean/Administrator.class
Binary file not shown.
Binary file modified target/classes/com/javaBean/Article.class
Binary file not shown.
Binary file modified target/classes/com/javaBean/Author.class
Binary file not shown.
Binary file modified target/classes/com/javaBean/Subject.class
Binary file not shown.
Binary file modified target/classes/com/javaBeans/AdministorController.class
Binary file not shown.
Binary file modified target/classes/com/javaBeans/AuthorController.class
Binary file not shown.
Binary file modified target/classes/com/javaBeans/Controller.class
Binary file not shown.
Binary file modified target/classes/com/javaBeans/DownloadServlet.class
Binary file not shown.
Binary file modified target/classes/com/javaBeans/UploadServlet.class
Binary file not shown.