[java ee programming] Lab-4016 BookDAO source file is different than in lecture file

2009-01-26 Thread dzgaga

I'm trying to get a little head start on the upcoming class and I
noticed that in Lab-4016 you show:'

public BookDBAO() throws Exception {
try {
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/
env);
DataSource ds = (DataSource) envCtx.lookup(jdbc/BookDB);
con = ds.getConnection();

... but the actual file has most of that code commented out and
replaced with ...

public BookDBAO() throws Exception {
try {

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(java:comp/
env);
/*System.out.println(initCtx is  + (initCtx==null ?
null. : created.));
System.out.println(envCtx is  + (envCtx==null ?
null. : created));
DataSource ds = (DataSource) envCtx.lookup(jdbc/BookDB);
System.out.println(ds is  + (ds==null ? null. :
created.));
con = ds.getConnection();
System.out.println(con is  + con ==null ? null. :
created.);
*/
Class.forName(dbdriver);
con = DriverManager.getConnection(url, username,
password);

When I remove the comments and instead comment out the last 2 lines, I
get the message:

messageServlet BookStoreServlet is not available

Not sure what's going on here. Any clues?

Thx, Dennis

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Important and Urgent!!!

2009-01-26 Thread rajesh sawant
Hello Sang Shin,
 
Please update J2EE course web site with some comments/images so that all 
memebers will get intimation about exercise and homework. Many members 
including me, who was enrolled from last season are seeking for updated stuff 
so they will get help while completing course ASAP
 
Suggestion:You can add New blinking image next to updated item so any one can 
figure out what new/updated  from old course stuff 
Please advice!!!
 
Thanks,
Rajesh Suhas Sawant  


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re: J2EE - legacy system

2009-01-26 Thread Artashes Hovasapyan
Hi,

Try using Mule ESB or Java CAPS.

-- 
Regards,
Artashes Hovasapyan


On Fri, Jan 23, 2009 at 7:58 PM, Mike Jamer
mike.ja...@marinerpartners.comwrote:

  Hey Guys,

 I guess this is a question mostly out of general interest.



 I have a desire to attempt to interact with a legacy system (TN5250, VT100)
 using J2EE/glassfish.



 What are my options?  In the .NET world, I might use a product like Zephyr
 Passport HIO, or TTWin.



 Ideally, working with something offered free would be preferred.



 Any opinions?



 Thanks,



 Mike

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re: Important and Urgent!!!

2009-01-26 Thread Sang Shin

rajesh sawant wrote:
 Hello Sang Shin,
  
 Please update J2EE course web site with some comments/images so that all 
 memebers will get intimation about exercise and homework. Many members 
 including me, who was enrolled from last season are seeking for updated 
 stuff so they will get help while completing course ASAP
  
 Suggestion:You can add New blinking image next to updated item so any 
 one can figure out what new/updated  from old course stuff 
 Please advice!!!
  

Thanks for the suggestion.  I will try.

-Sang

 Thanks,
 Rajesh Suhas Sawant  
 
 
 Add more friends to your messenger and enjoy! Invite them now. 
 http://in.rd.yahoo.com/tagline_messenger_6/*http://messenger.yahoo.com/invite/


-- 
---
    JavaFX course starts from Jan. 30th, 2009 ***
http://www.javapassion.com/javafx

Sang Shin, sang.s...@sun.com
 http://www.javapassion.com/SangShinSchedule.html
  (Life is worth living... with Passion!)
---

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re: Important and Urgent!!!

2009-01-26 Thread Evans Anyokwu

Rajesh,

Please remember that this is a voluntary class, as such, refrain from flagging 
any message as Urgent. 
If you think its too urgent for you and can't wait till Sang updates anything 
in his own time, I would suggest you 'Urgently' enrol in a local college. That 
way, you won't have to wait for anything to be updated here.

-Evans
http://www.javawug.org

Date: Sat, 24 Jan 2009 03:12:13 +0530
From: raj31_saw...@yahoo.com
Subject: [java ee programming] Important and Urgent!!!
To: java-ee-j2ee-programming-with-passion@googlegroups.com
CC: sang.s...@sun.com



Hello Sang Shin,
 
Please update J2EE course web site with some comments/images so that all 
memebers will get intimation about exercise and homework. Many members 
including me, who was enrolled from last season are seeking for updated stuff 
so they will get help while completing course ASAP
 
Suggestion:You can add New blinking image next to updated item so any one can 
figure out what new/updated  from old course stuff 
Please advice!!!
 
Thanks,
Rajesh Suhas Sawant  

   Add more friends to your messenger and enjoy!  Invite them now.




_
Love Hotmail?  Check out the new services from Windows Live! 
http://clk.atdmt.com/UKM/go/132630768/direct/01/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming]

2009-01-26 Thread Naga Puttagunta


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re: [java ee programming]How to fix imports in NetBeans

2009-01-26 Thread Evans '

Hi Jenny,

See if this helps.
http://www.netbeans.org/kb/articles/netbeans-hacks-1.html#Fix-Import

-Evans
http://www.javawug.org

Date: Mon, 26 Jan 2009 07:37:15 -0800
Subject: [java ee programming] [java ee programming]How to fix imports in 
NetBeans
From: jinghui...@gmail.com
To: java-ee-j2ee-programming-with-passion@googlegroups.com

Hi,
 
I'm new to NetBeans.  Can anyone shed some lights on how to automatically fix 
the imports in NetBeans?  For example, in my java program, I'm using Map.  I'd 
like to know what's the shortcut key or menu option in NetBeans to 
automatically import java.util.Map in the java program?

 
Thanks,
Jenny




_

Hotmail, Messenger, Photos  and more - all with the new Windows Live. Get 
started! 
http://www.download.live.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re: Hi

2009-01-26 Thread Artashes Hovasapyan
Please see course FAQ - http://www.javapassion.com/coursefaq.html

-- 
Regards,
Artashes Hovasapyan


On Thu, Jan 22, 2009 at 2:13 AM, zaghman zagh...@gmail.com wrote:


 Hi All,
   Anybody know where i get register for this course?

 



-- 
Regards,
Artashes Hovasapyan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] RE:

2009-01-26 Thread Ricardo Antunes

You must wrap the InputStream with a try catch statement. 

E.g.

try {
   InputStream ...
}catch(IOException e) {}

Date: Sat, 24 Jan 2009 08:33:58 -0800
From: pranavfam...@yahoo.com
To: java-ee-j2ee-programming-with-passion@googlegroups.com
Subject: 

Hi, 
I am very new to java programming.
I am writing a simple java program ing NetBeans IDE 6.5.  I am trying to create 
an object of FileInputStream class but keep getting FileNotFound Exception. I 
have attached the screen shot below. Any help is appreciated.
 
Thanks in advance for your help/table




_
Show them the way! Add maps and directions to your party invites. 
http://www.microsoft.com/windows/windowslive/events.aspx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re: Need help on J2EE Application

2009-01-26 Thread Nachiket Patel
Hello Guys,
What ever ankit telling is correct,
But i want to know,
(To Ankit) why you are suggesting comma separated values in field??
Isn't it appropriate to use another table which has Page Name (or Page Id)
and corrspondign user id?
So it will be very simple to handle and most importantly easy to modify

To Dipesh,
If your pages are dynamic, i mean you are changing contents of it using some
forms (like Forum and forum notification) then it is easy to do. But if you
are replacing static pages (or dynamic pages) and still you want to notify
user, then i think you should replace your page using specialized (self
developed) servlet form (you have to make one form for uploading your static
file or dynamic files). Or you can make a service which checks you page's
last modified date on regular intervals and based on that you send emails to
all the users.
Please don't hesitate to ask if you have some confusion

Regards,
Nachiket

On Thu, Jan 22, 2009 at 4:00 PM, Ankit Garg ankit.niit...@gmail.com wrote:


 Well I don't think this should be a big problem. You just need to keep
 track of all the people who have subscribed for a page. And you have
 to do the opposite too i.e. the user must be able to track all the
 pages he has subscribed for. I think you will implement a database for
 keeping the information of a page. In that you just need to add a
 column containing comma separated list of IDs of users who have
 subscribed for the page. Then when any updates are made to the page,
 then you just need to split the comma separated list and find the
 email ids of the corresponding users. I don't what kind of content you
 are going to have on the pages so can't tell what kind of notification
 will be sent to the user. To do the opposite i.e. to find all the
 pages that a user has subscribed for, you need to run a query on the
 comma separated column of the article table where you would match the
 value of the column like this - columnName like %userId% . This will
 find all the pages for which the user has subscribed.

 Just tell me if you need further help :) ...

 On Jan 21, 12:39 am, Dips dipesh.agra...@gmail.com wrote:
  Hi,
  I am looking for a web page monitoring web application.An application
  where a user is able to register himself with his name, email id and
  stuff. Once he has registered and logged on to the application he
  should be able to specify the web pages which he want's to monitor.
 
  Once he has specified the web pages, he should receive emails
  automatically whenever there is any update to the web page on the
  email id he has specified while registration, with the details of
  what
  has changed in the site that he has registered.
 
  While I am pretty sure of the register and login functionality. I
  have
  absolutely no clue as to implement the things that I have mentioned
  in
  second paragraph, though I am thinking it to implement in J2EE.
 
  If anybody could provide with any clue, hint, logic, source code as
  to
  how should I proceed with it, it would be nice.
 
  Thanks for your help.
 
  Regards,
  Dipesh

 



-- 
Regards,
Nachiket Patel

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re:

2009-01-26 Thread Vasile Braileanu
Hi,
Every time when you see must be caught or declared to be thrown you have
two choices:
Catch the exception on throw it back to the calling function.

Look here
http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileInputStream.html#FileInputStream(java.lang.String)

The text:

throws FileNotFoundException
http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileNotFoundException.html
in FileInputStream constructor is also from the constructor
signature and specifies that this constructor will not be finished
(ant not returning a object)
if the file cannot be found.

First method : CATCHING THE EXCEPTION

try{
 FileInputStream f1 = new FileInputStream(myProp2.txt);
..
}catch(FileNotFoundException ex){
System.out.println(File not founded);
System.exit(1);
}

The second method. THROWING THE EXCEPTION
Example: we don't want to catch inside the function testMe, so the
exception will be thrown from
testMe to the calling function, here the main function

public static void main(String[] args)  {
try{
testMe(myProp2.txt);
}catch(FileNotFoundException ex){
 System.out.println(File not found);
 System.exit(1);
}
}

   /**
* not catching the exception, so it throws it back to the calling function
*/
private static void testMe(String str) throws FileNotFoundException{
FileInputStream f1 = new FileInputStream(str);
}

There is a yellow bulb with an exclamation point just in the line you have
the FileInputStream constructor. If you go there with the mouse you will see
the error before you compile.
Because this is a simple project, you will catch the exception inside the
main function.

And, as a rule, anytime you use a method or constructor, see if throws
exceptions. Anyway the
IDE will warn you before you compile the file.

Note also that this is a very simple error and you maybe want to enroll to
Java with Passion first!

Happy coding!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re:

2009-01-26 Thread Manjula Srinivas

Check if the file exists.
hope this helps.

On Sat, Jan 24, 2009 at 8:33 AM, Tamilselvi Abbuekambaram
pranavfam...@yahoo.com wrote:
 Hi,
 I am very new to java programming.
 I am writing a simple java program ing NetBeans IDE 6.5.  I am trying to
 create an object of FileInputStream class but keep getting FileNotFound
 Exception. I have attached the screen shot below. Any help is appreciated.

 Thanks in advance for your help
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re:

2009-01-26 Thread adrianteh

also check if myProp2.txt created in workspace folder?

hope this helps

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---



[java ee programming] Re:

2009-01-26 Thread adrianteh

also check if myProp2.txt is created or exists in workspace folder

hope this helps

On Jan 25, 3:33 am, Tamilselvi Abbuekambaram pranavfam...@yahoo.com
wrote:
 Hi,
 I am very new to java programming.
 I am writing a simple java program ing NetBeans IDE 6.5.  I am trying to 
 create an object of FileInputStream class but keep getting FileNotFound 
 Exception. I have attached the screen shot below. Any help is appreciated.
  
 Thanks in advance for your help

  fileNotFound.gif
 115KViewDownload

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Java 
EE (J2EE) Programming with Passion! group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~--~~~~--~~--~--~---