Click here to Skip to main content
15,558,332 members
Home / Discussions / Java
   

Java

 
GeneralRe: Implementing the Artificial Neural Network - Java Pin
harold aptroot5-Jun-17 2:35
harold aptroot5-Jun-17 2:35 
GeneralRe: Implementing the Artificial Neural Network - Java Pin
Member 132411095-Jun-17 8:44
Member 132411095-Jun-17 8:44 
QuestionGeneric List and request.getParameterValues Pin
karengsh3-Jun-17 23:20
karengsh3-Jun-17 23:20 
AnswerRe: Generic List and request.getParameterValues Pin
Afzaal Ahmad Zeeshan5-Jun-17 9:28
mveAfzaal Ahmad Zeeshan5-Jun-17 9:28 
AnswerRe: Generic List and request.getParameterValues Pin
Richard Deeming5-Jun-17 9:29
mveRichard Deeming5-Jun-17 9:29 
GeneralRe: Generic List and request.getParameterValues Pin
karengsh6-Jun-17 18:56
karengsh6-Jun-17 18:56 
GeneralRe: Generic List and request.getParameterValues Pin
Richard MacCutchan7-Jun-17 0:00
mveRichard MacCutchan7-Jun-17 0:00 
GeneralRe: Generic List and request.getParameterValues Pin
karengsh8-Jun-17 6:56
karengsh8-Jun-17 6:56 
Hello Richard,

I read it in stackoverflow. Unfortunately, I did not have the link now.

It says something erasure ....

Anyway, I have reworked my code as follows but I do not know why my insert for this arrayList is still not working Frown | :(

SubjectDAOImpl :
Java
public class subjectDAOImpl implements subjectDAO {
	
	private final String INSERT_QRY1 = "INSERT INTO project.subject subject VALUES (?)";

<pre>public void insertSubject(subject s) throws MyDataException { 
		try {	
			s = new subject();
			ArrayList<String>subj;
			openConnection();			
			String qry = INSERT_QRY1;				
	        ps = connection.prepareStatement(qry);	        
	        int i =0;
	        subj = new ArrayList<String>();
		        	while(i< subj.size()){
	        		ps.setString(1,subj.get(i));
	        		ps.addBatch();
	        		i++;
 ps.executeBatch();
	       	        if (ps !=null )
		        closeConnection();
				}
		}
				catch (SQLException e) {
					e.printStackTrace();

Java
Controller :
<pre>

try{				
subject m = new subject();			
ArrayList<String>subj = new ArrayList<String>();
String[] sub =  request.getParameterValues("subject");				
for (String s : sub)
subj.add(s);
m.setSubj(subj);		
mgr.insertSubject(m);				  	


I used Eclipse to debug, the controller part seems correct. Unfortunately, I do not why Eclipse is not debugging on my sujectDAOImpl...Have been trying for hours....

There were alot of strange errors like :

RequestFacade.getParameterValue Source not found

WebappClassLoader(WebappClassLoaderBase).loadClass(String)

NonRegisteringDriver.class

but I am not able to get the debugger to debug on the serveral breakpoints I placed on the DAOImpl class.

Hope you can tell me what's wrong with my code.

Tks.
GeneralRe: Generic List and request.getParameterValues Pin
Richard MacCutchan8-Jun-17 22:52
mveRichard MacCutchan8-Jun-17 22:52 
QuestionHelp with calling .length on an array Pin
m009le2-Jun-17 11:50
m009le2-Jun-17 11:50 
AnswerRe: Help with calling .length on an array Pin
Member 121394422-Jun-17 12:20
Member 121394422-Jun-17 12:20 
AnswerRe: Help with calling .length on an array Pin
Richard MacCutchan2-Jun-17 23:17
mveRichard MacCutchan2-Jun-17 23:17 
AnswerRe: Help with calling .length on an array Pin
jdferrell17-Jul-17 16:09
professionaljdferrell17-Jul-17 16:09 
Questionunable to pass array index value in the form of a variable in jsp and javascript Pin
a a nizami31-May-17 22:12
a a nizami31-May-17 22:12 
AnswerRe: unable to pass array index value in the form of a variable in jsp and javascript Pin
Richard MacCutchan31-May-17 23:30
mveRichard MacCutchan31-May-17 23:30 
QuestionCopying the array Pin
Member 1322889629-May-17 4:53
Member 1322889629-May-17 4:53 
QuestionAccess to Active Directory (Java) Pin
Member 1213944227-May-17 10:34
Member 1213944227-May-17 10:34 
AnswerRe: Access to Active Directory (Java) Pin
Richard MacCutchan27-May-17 21:58
mveRichard MacCutchan27-May-17 21:58 
QuestionAnt colony system for solving a shortest path in a multimodal transport Pin
Member 1322085424-May-17 11:07
Member 1322085424-May-17 11:07 
AnswerRe: Ant colony system for solving a shortest path in a multimodal transport Pin
Richard MacCutchan24-May-17 22:15
mveRichard MacCutchan24-May-17 22:15 
GeneralRe: Ant colony system for solving a shortest path in a multimodal transport Pin
Member 1322085424-May-17 22:38
Member 1322085424-May-17 22:38 
GeneralRe: Ant colony system for solving a shortest path in a multimodal transport Pin
Richard MacCutchan24-May-17 22:50
mveRichard MacCutchan24-May-17 22:50 
GeneralRe: Ant colony system for solving a shortest path in a multimodal transport Pin
Member 1322085425-May-17 1:38
Member 1322085425-May-17 1:38 
GeneralRe: Ant colony system for solving a shortest path in a multimodal transport Pin
Richard MacCutchan25-May-17 1:39
mveRichard MacCutchan25-May-17 1:39 
GeneralRe: Ant colony system for solving a shortest path in a multimodal transport Pin
Member 1322085425-May-17 1:41
Member 1322085425-May-17 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.