Finger Print Scanner (secureye) Integration To Struts 1.2 Application
Aug 7, 2014
I am trying to integrate the finger-print scanner to struts application. I only have it's executable jar file through which the device will operate and the required signature can be taken . I am not getting how to integrate this in my application or in the required jsp page.
1) Use socket programming (i was able to connect to that ip and port but of no use? how to get data ??)
2) A lot of forums suggest the JNI or JNA way.. which i tried out and accomplished a connection to the port.
But the problem was the appoarch i used in JNA which only supports the loading of C/C++ dll files... not C# dll.... the BioMetric Finger Print device is coded in C#...
I'm currently meddling with javaScript in order to implement a fingerPrinting system in my web application. I've developed the following example in which I can get all the necessarily data:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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" xmlns:ui="http://java.sun.com/jsf/facelets">
The function faz() is called and only the first "alert" popup is called, the second one which should show what is returned by dadosDaTela() isn't generated, why is that?
I am runing ejb3 in weblogic 10.3 and struts in tomcat server. both communication is not happening .
root dir onlyenb6 account class package ejb3.onlyejb; import java.io.Serializable; import javax.persistence.Entity; import javax.persistence.Id;
[Code] ....
Get error
accno=44 na=hjhjhj bal=777.0 enter in to if loop jndi properties nuderprocess jndi properties nuderprocess22 loading p file={java.naming.provider.url=t3://localhost:7001,
I have a button in jsp, when the onclick event is fired, it will send the request to someaction.do to generate a report and display that report in a new window.
After clicking the button to generate the report, in the business class a sql query is getting executed.
If the query result has less data, then I don't have any problem, I could view my report page.
If the query result has more data, then the query takes at least 5-6mins to complete. However, before the query completes its execution, the same request is automatically invoked again. Due to this the report is not getting generated because [...of the multiple requests?], the browser shows an Internet Explorer error and ends up at a blank page.
No exception is thrown and the only place I could find the place of query execution it stops and starts as a new request from web.xml with Servlet Filters, Action.
Note: For a single .do request, the request is getting repeated for 3 times. Overlapping of request also takes place.
In my integration test, I tried to use resttemplate to send a Get request to a dummy server created by MockMvcBuilders. However I got an error:I/O error on GET request for `"http://localhost:8080/test"`:Connection refused:(In the function testAccess(), url is `"http://localhost:8080/test"`). My code is as below:
@RunWith(SpringJUnit4ClassRunner.class) @WebAppConfiguration @IntegrationTest("server.port=8080") public class MyTest { private MockMvc mockMvc = null;
I am familiar with Servlet/jsp's and developed a web application using them. Now I am looking in Websocket of Java 7. Documentation is not clear how to integrate the two.
1. Let us say in my listener, I have already determined database connections, log file for log4j etc.. Can I use it in Websocket Java classes based on annotation API of web socket. What is not clear to me how I will access Context parameters for webapp saved in Listener.
2. I like jsp so I can dynamically modify the html to be shown. If I am using api, how will I do that, I know I can return data from websocket, but all the java logic which jsp provides, how can that be implemented using web socket api.
I am trying to complete an assignment and I am stuck on a key point. I must print the total inventory value across each of these arrays, as it prints for each "list". To do this, I understand that I need some form of correlation between my variables "total" and "Price" between each array. My quandary lies in the way that I have designed this code to begin with. I am not sure where to add the math section of code that is needed, nor am I fluent enough with Java to know how to call all of the arrays as it prints. Listed below is my code, when you compile it the total inventory value is 0 for each "list".
package inventory; public class Inventory { public static void main (String[] args) { List[]list = new List[5];
I'm trying to implement a two finger gesture to move a control for a touch screen. However simply touching the screen with two fingers will generate several events that jump all over the place. This here is the code:
Two finger move pressed First layout: 100.0, 100.0 Move by 94.0, 209.0 event set=4 Move by 1.0, 0.0 event set=5 Move by 95.0, 208.0 event set=6 Move by 1.0, 1.0 event set=8 Move by 96.0, 208.0 event set=11 Move by 219.0, 147.0 event set=11 Move by -121.0, 61.0 event set=13
I know that there is the possibility that I get multiple events with the same event set id. However this is not always the case. I would have expected to get one for each of the finger in the gesture. Why is that? As I understand the difference between changing the layout coordinates and the transformation is, that with the transformation coordinates, the bounds in parent changes, but not the bounds itself.
I'm not entirely clear on what effect this has, especially as I will also have the zoom and rotate gesture on the component. Which one is the better choice to change?To my understanding the coordinates of the touchpoint are relative to the parent component. In this case the layout coordinates of the rectangle. This would mean that I have to calculate the delta of the touch point in the onTouchMoved to the touch point of onTouchPressed.
This would get me the vector the rectangle moved.In the above example I use the main touch point of the two touchpoints of the event. As I understand it this should always be the same one. The correct way would be to calculate the geometric mean of the two points and use that, but that has the same effect. Simplifying the above example to one touch point only shows the same jumping behavior.
Basically the class is supposed to have a static variable that keeps track of the number of companies (numberOfCompanies) that have been created and a static method that returns the value of this variable. I need to have a constructor and a method to addEmployee, a method to printCompany, and a toString method. The addEmployee method will check that there is only 1 salesperson, 2 designers, and 4 manufacturing persons at a time and will check that there are no more than 7 employees of the company.
The addEmployee method will return a String indicating what the error is (i.e. "There is already a sales person in this company") or a null if the employee was added. If attempting to name a third company, an error message will be shown. what i have so far but my print company mmethod returns null company class :in which i am obliged to use inputdialog because it says that it cannot return void when i use the showmeassage diaolog.
company class:
import java.util.ArrayList; import javax.swing.JOptionPane; public class Company { private ArrayList<Employees> list ; private static int numberOfCompanies;
[Code] ....
error message when print button is clicked:
Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: JOptionPane: parentComponent does not have a valid parent at javax.swing.JOptionPane.createInternalFrame(Unknown Source) at javax.swing.JOptionPane.showInternalOptionDialog(Unknown Source) at javax.swing.JOptionPane.showInternalMessageDialog(Unknown Source)
convert or move standalone java thread application into Tomcat server container for accessing its JNDI services? Also is it possible to schedule this thread application in Tomcat server? is it possible to keep this app in tomcat as web application and schedule in window's scheduler.
I am new to work on JNLP program. I have created a SWING program, JNLP file when i deploy the ear file i am getting 404 error. Please find the steps in details.
1.Created a dynamic web project JWStartProject in eclipse
2.Create a HelloWorld.java class under default package.
import javax.swing.*; public class HelloWorld extends JFrame { private static final long serialVersionUID = 4968624166243565348L; private JLabel label = new JLabel("Hello Java Web START!"); public HelloWorld() { super("Jave Web Start Example"); this.setSize(350, 200); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE ); this.setLayout(null);
[Code] ....
Now I exported this project as JWStartProject.war contains following code.
Created Server in Websphere Admin console
Deployed this war file under the server and started.
I have added MIME types also.
I am unable to launch the application. I am getting 404 errors. May I know where I went wrong?
why does sevenPointsOrLess only work if I declare it as a String and use next() instead of nextInt()? Also why does it take part of the next line with it?
Here is the text I am trying to scan:
England,3,0,1,2,0 Samoa,1,0,3,0,1
Code:
lineScanner.useDelimiter(","); country = lineScanner.next(); Won = lineScanner.nextInt(); Drawn = lineScanner.nextInt(); Lost = lineScanner.nextInt(); fourOrMoreTries = lineScanner.nextInt(); sevenPointsOrLess = lineScanner.next();
Results:
country = "England" Won = "3" Drawn = "0" Lost = "2" fourOrMoreTries = "2" sevenPointsOrLess = "0 Samoa"
I'm trying to write a basic java program so that when I run it, I can store the names and codes of some of my school textbooks...I try the scanner statement to input the name of the book but an exception is thrown when I type the name of the book..I have attached the code for my program.
import java.util.Scanner; public class Books{ public static void main(String[] args) { Scanner s=new Scanner(System.in); System.out.print("Enter amount of products : "); int products= s.nextInt(); long [] code= new long[products]; String[] names = new String[products]; for (int x=1;x<(products+1);x++){ System.out.println("Enter IMEI number "+x); code[x] = s.nextLong(); System.out.println("Enter name "+x);
I had to use scanner to receive input from the user for a formula and everything compiled and worked correctly except when I entered a double into the Scanner, it only accepts ints and gives me this error every time I enter a double:
java.util.InputMismatchException at java.util.Scanner.throwFor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextDouble(Unknown Source) at TestA1Q2.main(TestA1Q2.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at edu.rice.cs.drjava.model.compiler.JavacCompiler.runCommand(JavacCompiler.java:272)
I know that you usually get that error when the Scanner expects something else that is different from what you type and I have looked over my code time and time again and cannot find anything. I created a test program to see if it was just that problem and not something else in the code and I still got the same error but when I tried compiling and running it here browxy.com everything worked and I got the right answer for the formula. Here's the test I used:
import java.util.Scanner; public class TestA1Q2 { public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.println("Enter a double"); double velocity = keyboard.nextDouble(); } }
At this point I'm thinking it might be a problem with my install of DrJava and I've tried re-installing but nothing changed.
I created a variable for the scanner called serena. Serena variable is equal to what the user inputs. My if statement says that if the answer the user enters is not equal to the actual answer then it is to display "wrong". It is a basic math game I am working on. NetBeans is telling me that I cannot use the scanner in an if statement?
package pkgnew; import java.util.Scanner; public class New{ public static void main(String args[]){ Scanner serena = new Scanner(System.in); double fnum, snum, answer;
[Code] ....
Do I have to define Serena as whatever number the user inputs? If so, how?
Scanner sc = new Scanner(System.in); Question question = new Question(); Quiz quiz = new Quiz(); System.out.print("Enter the prompt: "); question.prompt = sc.nextLine();
[Code] .....
Here is the example run that I am trying to achieve:
* 1. Enter the prompt: What is the capital of the USA? * 2. Enter a possible answer: New York City, NY * 2. Is New York City, NY the correct answer (y/n)? n * 3. Enter a possible answer: Pittsburgh, PA * 3. Is Pittsburgh, PA the correct answer (y/n)? n * 4. Enter a possible answer: Washington, DC * 4. Is Washington, DC the correct answer (y/n)? y * 5. Enter a possible answer: Chicago, IL * 5. Is Chicago, IL the correct answer (y/n)? n
The problem is that my for loop runs through correctly the first time, but doesn't seem to react to me initializing my choices array after that. It ends up looking like this:
Enter the prompt: What is the capitol of the USA? Enter a possible answer: New York City, NY Is New York City, NY the correct answer (y/n)?n Enter a possible answer: Is the correct answer (y/n)?
I have a small bug in my program. The user is asked what person(s) information they want to access but lets say they want captain they must enter "captain" twice. I think it will make more sense to you with the code. I have searched all over to see what is causing the bug but still have found no resolution. I even tried making two different scanners but that didn't work either.
I know the while loop (line 16) I am using is causing the bug because it works fine without that but then I cannot validate the input.
package myproject; import java.util.Scanner; public class Enterprise { public static void main (String[]args){ String userInput;
My program is supposed to let me enter the following info for 3 employees: name, number of hours worked this week, and hourly pay rate. It lets me enter the name for the first employee, but for the second and third, it skips over the name and forces me to enter the number of hours worked and pay rate without a name. I have the code and the output posted below. First the program code:
Java Code:
import java.util.Scanner; public class SalaryCalc { public static void main(String[] args) { Scanner input = new Scanner(System.in); String name; double hours; double rate; double grossPay = 0; double overtime;
[code]...
Enter hours worked this week: mh_sh_highlight_all('java'); Notice I can only enter the name for the first employee (Bigfoot). If I wanted to enter "Nessie" for my second employee's name, it skips over the name prompt and prompts me for the hours worked instead.