peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Off topic - I agree with jwenting roseindia is worst place to try and learn something.
1) There is not structural organization of topics
2) Many of examples are out of date, plenty of them are done with poor organization of even basic MVC in mind
3) there are plenty of tutorials stolen from books, online tutorials without acknowledging rightful author

So please in the future do not suggest this website as it shunned upon as example of what everything can be done wrongly.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Have you found the answer yet??

Thanx

It is not possible!

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There are solutions called servlet and sessions.

What is actually your aim? What you trying to achieve by this page to page data handling?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please search the forum, this question been asked too many times to care to answer...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

#define & tetro congratz ladies/gents!

You just made new forum record of re-opening oldest thread which now stands for 7 years.

Thread closed.

jonsca commented: Nice! +2
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you post whole code?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

How much is "more" memory? At my current project we use Maven to start jetty, load the application etc. Because my system is 64bit instead of 512MB other members on my team uses I have to do it with 1500MB

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
  1. First move that code in servlet, this shouldn't e in page view
  2. Make sure that that second parameter is string and not some other type
  3. Check your logs if there are no exceptions
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That piece of code will attempt to launch an application associated with the document formant under operating system with use of command line/prompt. In doing so you will move control from your java application to operating system. It is waste of time as this sort of things can be done through shell commands. If you wish to open/read/edit document through Java use an library like Apache POI or similar

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Why on earth you want to use cmd.exe to open simple txt or doc files if you can use Apache POI?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Chapter 10 - Connecting to the world from Beginning J2ME: From Novice to Professional, 3rd edition

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

So why don't you put it into code post here and we can discuss it?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

iText library download and examples here

Apache POI - HWPF

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I expect that each of your items has unique value that should be assigned as value to each check box when you populate table. Then on submit you will get set of check box values that represent unique item IDs and these will enable you to recover relevant data from DB

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Subversion is answer to your trouble...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Little search of forum and you would find this post http://www.daniweb.com/forums/post978284.html#post978284

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Use jQuery for such thing. Further recommendation do not mix-up PHP with Java. Java servlet provides you with file upload/download too

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

How is this relevant to JSP?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

OK, I will need to see whole servlet if you can post it

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

@mbalaji_mano did you read linked thread from my other post?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Can you provide exact error you getting? I do not see anything wrong with above code...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Are you sure that ArrayList empList =EmployeeDao.getEmpDetail();//this is defined already doesn't return null value?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You just replied to 5 years old thread. Was it worth it?

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Yeah i used HeadFirst for Java SE and it was good, but some people love it and some hate it.

I think this book is the easiest option to start Java web development. After this, one can move on other technologies (JSF, Hibernate, Struts, Spring, Tapestry, Seam etc.) Besides, it is recommended book if you wish to take Sun Certified Web Component Developer (SCWCD)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Nope, wasn't him and nobody hijacked his account. You know there is more then one moderator/administrator around ;)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Get your self Head First Servlet and JSP (limited preview available from google books), which will help you with basics. Then you can extend it with some frameworks Hibernate, Spring, Tapestry etc.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Reputation point for that J :clapp hands:
Spams are choking!

For the record, it wasn't jbennet

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You misunderstand concept in the tutorial that I linked. This should be out too

public myguidemo(){ //constructor
                	
			try{	
                		//driver and connection
                		Class.forName("oracle.jdbc.driver.OracleDriver");
                		connection = DriverManager.getConnection("jdbc:oracle:thin:@x.x.x.x", "USER", "PASS");
                	}
                	catch(ClassNotFoundException cnfex){System.out.print("Failed to load JDBC driver");}
                	catch(SQLException sqlex){System.out.print("Unable to connect to server");}
                	catch(Exception e){e.printStackTrace();}
                	
                		
                	try{
                                
                		//query the oracle database, program defaults to show the DOCTOR table
                                stmt = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                                results = stmt.executeQuery(query);

What you should only do is call an method from your Java-to-DB class. That class would acquire connection from connection manager, execute query in called class and return result back to GUI in appropriate format ready to by displayed.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

You should put it in separated class. Have look for example at this JSP tutorial which shows databases connectivity from web application. However the idea is same

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

This works for me

public class Question5{ 

	public static void main (String args[]) 
	{ 
		double n = 20; 
		int counter= 0; 
		
		for (int t =0; t<=25; t++) 
		{ 
			n= (220/(1+10*Math.pow(0.83,t))); 
			System.out.println("At t = " + t + " the value of N = " + n); 
			
			if (n<80)counter++;  
		
		} 
		System.out.println("supervision years = " + counter); 
	} 
}

output is

At t = 0 the value of N = 20.0
At t = 1 the value of N = 23.655913978494628
At t = 2 the value of N = 27.886931169983523
At t = 3 the value of N = 32.74847533518809
At t = 4 the value of N = 38.288623156948844
At t = 5 the value of N = 44.54306329950969
At t = 6 the value of N = 51.52944385745791
At t = 7 the value of N = 59.24162481935718
At t = 8 the value of N = 67.64459780888309
At t = 9 the value of N = 76.67101285418252
At t = 10 the value of N = 86.22027154835898
At t = 11 the value of N = 96.16093135943517
At t = 12 the value of N = 106.33669668469402
At t = 13 the value of N = 116.57561890382067
At t = 14 the value of N = 126.70145196317215
At t = 15 the value of N = 136.5456170934149
At t = 16 the value of N = 145.95808590331916
At t = 17 the value of N = 154.81574593720234
At t = 18 the value of N = 163.02737805136428
At t = 19 the value of N = 170.5350646915546
At t = 20 the value of N = 177.3124620033929
At t = 21 the value of N = 183.36076818064623
At t = 22 the value of N = 188.70336302007027
At t = 23 the value of N = 193.3800199668549
At t = 24 the value of N = 197.44138623540724
At t = 25 the value of N = 200.94417600497957
supervision years = 10
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Extra character ">" somehow slipped in the wrong place. The line should be

n= (220/(1+10*Math.pow(0.83,t)));
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

What is necessary is for you to provide exact errors you getting from SQLException so you better catch that exception and print stack. Also your current program arrangement is very bad. You should move that database connectivity to its own class, and don't forget to close the connection when you do not need it (which you didn't do and that is more likely your SQLException about)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please post relevant post forwarding data in servlet and also ho do you retrieve them in the JSP.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

I don't know how to Create class Product that is able to store data :s

please help me , or give me website for that

Similar example here, you need to just adapt to your needs

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

For the Product class you need some constructor method and some getter and setter methods.
As for the logic of finding most expensive item use what ever you most comfortable...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Hint
Create class Product that is able to store following data
Enter product id
Enter product name
Enter product price

Make the Product class available to your application.
Use a Collection like ArrayList, List, or Vector to store data of every product.
Provide logic that will do discovery of most expensive product and calculate average.

So please start working on this and when you get problems post

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

There must be reason why that error is thrown.

Please post relevant code and do not forget include stack trace of error

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

iPhone is not Java enbaled device so you cannot use JSE or JME.
You can do development with objective-C however SDK require Mac OS (therefore you need Apple Mac) and the cracked version used by so many on PC will not work with it (at least it did not few months back).

You will better do learning Android...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Please use poll option only when appropriate and do not ask silly question if somebody will help you. (Ofcourse somebody will help if there is somebody who knows what you talking about...)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

JFileChooser beside having showOpenDialog(Component parent) for selecting files to open/be processed has also showSaveDialog(Component parent) for saving files

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Just download the wirelesss development kit for java and, after you install it ouy'll find a folder with a lot of examples there. As for my problem, I abandoned L2CAP connection and used StreamConnection. Good Luck. In fact, this is an old unsolved thread.

So on the end you went with my original suggestion :D

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Hello,
I'm a novice in J2ME but i started developing a bluetooth chat aplication. I managed to find some samples of btooth chat aplications but i'm not satisfied with it. Can you provide some help(i mean source code )? if i can help you with your problem i'll send you a solution.
Thank you

You better post your issue in new thread instead of trying to bargaining in style "give me what you have, maybe I will give you what I have.."

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Just do not tell my you are westminster university student or I will start rolling on the floor laughing.

Anyway back to topic. I bet my salary that as server your teacher/tutor meant some J2EE server or web container such as Tomcat, JBoss etc that is able to run servlet which is supposed to received data from your mobile application, process it and return something back to your mobile apps. For this reason, the application must be server based where your server application as provided above is actually stand-alone desktop application with zero outside world communication.
You correctly understood that midlet is supposed to output data as stream and server need to read the stream and process it. On top of that similar process will happen from server side, server will produce stream with reply, midlet will receive it handle it appropriately. You can see example of midlet sending data here. You may also find more detailed explanation in books like J2ME in a Nutshell and Learning Wireless Java Help for New J2ME Developers (which are little out of date, not many developers use socket on jme these days)

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

Obvious, you never pass any values to SimpleBean for processing.

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

thanks to all, I resolved my problem

If you resolve it it would be nice to mark thread as solved and also explain how you resolve it...

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

EDIT: Little late for reply but anyway...

You tried to apply your logic to the problem but chosen wrong approach. Operation inside the brackets it is a statement of a condition. If the condition is fulfilled then what ever is inside brackets is executed. By providing mathematical operation as you did, which seems to be logical to you, you cannot solve this. What you are looking for is and condition when numbers' division by five will return number without decimal part. For this you need to use reminder operation represented by %. So if you do 7&5 return is 2, if you do 15%5 return is 0 (zero). You need to covert mathematical operation to condition so you need to use "==" ">" "<" ">=" "<=" in this case

if(number % 5 == 0)
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

It's hard to see how that code works or if it works but although I check some more documentation, is it possible to loop through the contents of two arrays to populate a third array with the combined content?

Yes

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

That is funny because in my book on pg.81 is something like this ;)
And yes PATH declaration is correct, but it is also good idea to set another environment variable JAVA_HOME with the location to Java installation but without \bin

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
  1. You should have developing environment set specifically for this, as loose files that can be tolerated for small desktop development are bad idea in web development
  2. When you compile you need to include direction for servlet-api.jar that can be found in Tomcat_dir/lib. Execution command should look something like javac -classpath c:\Tomcat6.0.20\lib\servlet-api.jar test.java

It would be good idea if you checked your library for copy of the book Head First Servlets & JSP 2nd edition

peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster

LOL, I guess I should not be replying to threads when I get out of the bed...