Re: [java ee programming] javajdbc homework help
Hi Prasad and Cristiano, Thanks for your help. A whitespace created the problem. Thanks, Venkata On Fri, Jun 11, 2010 at 6:06 AM, prasad khatavkar prasadkhatav...@gmail.com wrote: Hi, Its related to some syntax error u might typed 1 sumwhr in the program, remove it and check. On Tue, Jun 8, 2010 at 4:47 PM, venkata sukumar kommuru venkatasukum...@gmail.com wrote: Hi, In the home work of creating tables using jdbc, I am getting the following error. Syntax error: Encountered 1 at line 1, column 27. I have created 4 separate files. one for creating cdtable, one for creating location table, one for inserting data into location and one for inserting data into cd table. The first three have been sucessfully executed. But in the last one, I am getting the above error. Please look at the following code and let me know my mistake. public static void main(String [] args) { String url =jdbc:derby://localhost:1527/sample; Connection con; Statement stmt; try { Class.forName(org.apache.derby.jdbc.ClientDriver); } catch(java.lang.ClassNotFoundException e) { System.err.print(classnotfoundexception : + e.getMessage()); } try { con = DriverManager.getConnection(url,app,app); stmt = con.createStatement(); stmt.executeUpdate( INSERT INTO CDTABLE + *values(1,'Rock and Roll Aint Noise Pollution','AC/DC',1980,1,9));* stmt.executeUpdate( INSERT INTO CDTABLE + *VALUES(2,'Shake a Leg','AC/DC',1980,1,6));* stmt.executeUpdate( INSERT INTO CDTABLE + *VALUES(3,'Have a Drink on Me','AC/DC',1980,2,5));* stmt.executeUpdate( INSERT INTO CDTABLE + * VALUES(4,'You Shook Me All Night Long','AC/DC',1980,1,8)); * stmt.executeUpdate( INSERT INTO CDTABLE + *VALUES(5,'Back in Black','AC/DC',1980,4,9));* stmt.executeUpdate( INSERT INTO CDTABLE + * VALUES(6,'Let Me Put My Love into You','AC/DC',1980,4,9)); * stmt.close(); con.close(); } catch(SQLException ex) { System.err.print(ex.getMessage()); } } Thanks, Venkata -- 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.comjava-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -- BR Pervazive Automation Solutions Pvt Ltd #3060, 1st floor, 9th Main, Banashankari 2nd Stage, Bangalore - 560070 Ph. 080-42196414 Mobile : +919036488648 +919481328069 -- 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?hl=en
[java ee programming] javajdbc homework help
Hi, In the home work of creating tables using jdbc, I am getting the following error. Syntax error: Encountered 1 at line 1, column 27. I have created 4 separate files. one for creating cdtable, one for creating location table, one for inserting data into location and one for inserting data into cd table. The first three have been sucessfully executed. But in the last one, I am getting the above error. Please look at the following code and let me know my mistake. public static void main(String [] args) { String url =jdbc:derby://localhost:1527/sample; Connection con; Statement stmt; try { Class.forName(org.apache.derby.jdbc.ClientDriver); } catch(java.lang.ClassNotFoundException e) { System.err.print(classnotfoundexception : + e.getMessage()); } try { con = DriverManager.getConnection(url,app,app); stmt = con.createStatement(); stmt.executeUpdate( INSERT INTO CDTABLE + *values(1,'Rock and Roll Aint Noise Pollution','AC/DC',1980,1,9));* stmt.executeUpdate( INSERT INTO CDTABLE + *VALUES(2,'Shake a Leg','AC/DC',1980,1,6));* stmt.executeUpdate( INSERT INTO CDTABLE + *VALUES(3,'Have a Drink on Me','AC/DC',1980,2,5));* stmt.executeUpdate( INSERT INTO CDTABLE + * VALUES(4,'You Shook Me All Night Long','AC/DC',1980,1,8));* stmt.executeUpdate( INSERT INTO CDTABLE + *VALUES(5,'Back in Black','AC/DC',1980,4,9));* stmt.executeUpdate( INSERT INTO CDTABLE + * VALUES(6,'Let Me Put My Love into You','AC/DC',1980,4,9));* stmt.close(); con.close(); } catch(SQLException ex) { System.err.print(ex.getMessage()); } } Thanks, Venkata -- 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?hl=en
Re: [java ee programming] Re: Homework 4001
I made this to work: After you make all the lab requirements, not run the project directly (with Run command). Select Services tab/Servers/Glassfish v3 Domain/Applications/MyFirstWebApp. Right-click and select Open in Browser. The result is now ok, and the browser displays the start page that you selected. Adrian Militaru 2010/3/8 Chris K ckella...@gmail.com: Hi I had the same experience, running same IDE and Windows version; I'm guessing it is a detail left out of the homework. Also, NetBeans defaulted to Java EE version 6 Web, but I used 5 per the instructions. I wonder if that had anything to do with it or the version of GlassFish. I simply changed the Properties/Run field of the project to get the desired effect but that was the only way I could get it to work. On Mar 8, 5:16 am, Adrian Militaru infosof...@gmail.com wrote: Hello everyone, I followed all the steps in lab 4001, part 2.4, but when I run MyFirstWebApp, it displays : Servlet MyOwnServlet at /MyFirstWebApp not MyOwnJSP.jsp content. My web.xml looks like: ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd; servlet servlet-nameMyOwnServlet/servlet-name servlet-classmyownpackage.MyOwnServlet/servlet-class /servlet servlet-mapping servlet-nameMyOwnServlet/servlet-name url-pattern/MyOwnServlet/url-pattern /servlet-mapping session-config session-timeout 30 /session-timeout /session-config welcome-file-list welcome-fileMyOwnJSP.jsp/welcome-file /welcome-file-list /web-app and the Properties/Run in MyFirstApp project points to relative url: /MyOwnServlet I use NetBeans IDE 6.8 on WIndows 7 Professional. Best regards, -- Adrian Militaru -- 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?hl=en -- Adrian Militaru Consultant ITC Infosoft SRL -- 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?hl=en
[java ee programming] Re: homework
On Feb 18, 10:20 am, Zofia Zagubieniak zzagubien...@wp.pl wrote: Hi, Do enyone know why homeworks emails are rejected. I'm registered on this course Replace the last part of the email address - after the @ sign - with javapassion.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?hl=en
[java ee programming] Re: Homework 1
Edward, post on the forum if you want an answer. That said. Just create a new J2EE application from the samples in NetBeans (a full one as the one in the javaee tutorial). It will activate all that is needed. Then, normally you could see the web.xml file right. If not, there is something broken in your NetBeans installation and I don't know what. If you can see it correctly, mimic the various configurations files you see in the javaee application and transpose them in the tutorial, it should work. At least, I've done the exercises from the tutorial without any problems, except those ones which are specific to javaee5. -- 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?hl=en
[java ee programming] Re: Homework 4006
Hi Emmanuel, You did not set persons in init() instead you added a person object with person attribute name in the servletContext. And usually you don't put those in init(). persons should be a List or Map of items. What you could have done is this: Person person = new Person(); ListPerson persons = new ArrayListPerson(); persons.add(person); sce.getServletContext().setAttribute(persons, persons); Hope you don't mind me sharing this back to the group cause I think it might be useful to others too. Regards, Bob On Tue, Nov 17, 2009 at 1:08 AM, emmanuel emmanuel.fan...@mindspring.comwrote: Hello Bob, Thanks for your explanation, I seem to get a hang of it now, but my problem is you said Where did you set the collection persons? Remember that when you use EL in JSP it does not print null but instead an empty String if it encounters a null value.. This is the part I do not understand. I thought I did this in init.java Person person = new Person(); person.setName(name); sce.getServletContext().setAttribute(person, person); If you can kindly explain how to do this, I will greatly appreciate it. Thanks Emmanuel -Original Message- From: Bob Santos Sent: Nov 11, 2009 10:50 AM To: emmanuel.fan...@mindspring.com Cc: J2EEQuestion Subject: [java ee programming] Re: Homework 4006 Hi Emmanuel, jsp:useBean id=person scope=session class=org.apache.taglibs.standard.examples.beans.Person / jsp:setProperty name=person property=* / What are you trying to do with these lines? Are you aware that what you're doing on the first line is creating a new Person bean that has a session scope if there's no bean with person as its id? And you are setting all of the properties of that Person bean with nothing on the second line? I assume this is not what you wanted to do instead you want to access the Person bean you set in servletContext which I think is called the application scope. If you want to access that you could have used ${applicationScope.person.name.firstName} and ${applicationScope.person.name.lastName} where applicationScope sets the server to look in application scope only instead of going thru the other scopes first. table border=1 c:forEach var=person items=${persons} tr tdc:out value=${person.name.firstName}/ /td tdc:out value=${person.name.lastName}/ /td /tr /c:forEach /table Where did you set the collection persons? Remember that when you use EL in JSP it does not print null but instead an empty String if it encounters a null value. Regards, Bob On Wed, Nov 11, 2009 at 9:21 PM, emmanuel emmanuel.fan...@mindspring.comwrote: Help Class, Can anyone help with lab 4006? I don't know why First and Last names were not displaying. I have this codes in Name Class. package org.apache.taglibs.standard.examples.beans; public class Name { private String firstName; private String lastName; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } } - I have this codes in Person Class. package org.apache.taglibs.standard.examples.beans; public class Person { private Name name; public Name getName() { return name; } public void setName(Name name) { this.name = name; } } - I placed this code at the end of Init. import org.apache.taglibs.standard.examples.beans.*; Name name = new Name(); name.setFirstName(Emmanuel); name.setLastName(Faneye); Person person = new Person(); person.setName(name); sce.getServletContext().setAttribute(person, person); - This code goes to the end of reponse. jsp:useBean id=person scope=session class=org.apache.taglibs.standard.examples.beans.Person / jsp:setProperty name=person property=* / br br table border=1 c:forEach var=person items=${persons} tr tdc:out value=${person.name.firstName}/ /td tdc:out value=${person.name.lastName}/ /td /tr /c:forEach /table Thanks for any 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
[java ee programming] Re: Homework 4006
Hi Emmanuel, jsp:useBean id=person scope=session class=org.apache.taglibs.standard.examples.beans.Person / jsp:setProperty name=person property=* / What are you trying to do with these lines? Are you aware that what you're doing on the first line is creating a new Person bean that has a session scope if there's no bean with person as its id? And you are setting all of the properties of that Person bean with nothing on the second line? I assume this is not what you wanted to do instead you want to access the Person bean you set in servletContext which I think is called the application scope. If you want to access that you could have used ${applicationScope.person.name.firstName} and ${applicationScope.person.name.lastName} where applicationScope sets the server to look in application scope only instead of going thru the other scopes first. table border=1 c:forEach var=person items=${persons} tr tdc:out value=${person.name.firstName}/ /td tdc:out value=${person.name.lastName}/ /td /tr /c:forEach /table Where did you set the collection persons? Remember that when you use EL in JSP it does not print null but instead an empty String if it encounters a null value. Regards, Bob On Wed, Nov 11, 2009 at 9:21 PM, emmanuel emmanuel.fan...@mindspring.comwrote: Help Class, Can anyone help with lab 4006? I don't know why First and Last names were not displaying. I have this codes in Name Class. package org.apache.taglibs.standard.examples.beans; public class Name { private String firstName; private String lastName; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } } - I have this codes in Person Class. package org.apache.taglibs.standard.examples.beans; public class Person { private Name name; public Name getName() { return name; } public void setName(Name name) { this.name = name; } } - I placed this code at the end of Init. import org.apache.taglibs.standard.examples.beans.*; Name name = new Name(); name.setFirstName(Emmanuel); name.setLastName(Faneye); Person person = new Person(); person.setName(name); sce.getServletContext().setAttribute(person, person); - This code goes to the end of reponse. jsp:useBean id=person scope=session class=org.apache.taglibs.standard.examples.beans.Person / jsp:setProperty name=person property=* / br br table border=1 c:forEach var=person items=${persons} tr tdc:out value=${person.name.firstName}/ /td tdc:out value=${person.name.lastName}/ /td /tr /c:forEach /table Thanks for any 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?hl=en -~--~~~~--~~--~--~---
[java ee programming] 4006- homework
I am not receiving the static first name , last name , can someone direct me in the right direction Person.java package org.me.hello; public class Person { public Name name; public Person(String firstName, String lastName) { name = new Name(); name.setFirstName(firstName); name.setLastName(lastName); } } ** Name java. package org.me.hello public class Name { public String firstName; public String lastName; public void setFirstName(String firstName) { this.firstName = firstName; } public void setLastName (String lastName) { this.lastName = lastName; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } } In the INIT.JAVA This code was placed at the bottom of the code org.me.hello.Person person = new org.me.hello.Person (Derez,Lusk); sce.getServletContext().setAttribute(person, person); Can't get any output any leads ?? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[java ee programming] jstl homework question
Good Morning, I have copied HelloWeb project and opened it. When i run application i get exception in the output. It look like the servlet Init cannot be execeuted and no data can be passed to servlet context. Additionally, similar application in JSTLExamples contain the same Init servlet and works fine. Do someone know what problem may it be? Regards Pacior --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[java ee programming] First homework question?
I am very new to Web programming and I was able to do the first homework very easily. The output from the execution of the first program automatically runs in whatever browser is the default browser on my system. What I'd like to know is this, suppose I had a Web site and I wanted this servlet to run on my Web Site and ask people what their name and hobby was? How would I do that? --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[java ee programming] Last homework (25)
Hello teachers and folks I have sent today the homework 25 at 11:45 p.m., July 14, 2009 (Mexico City time). I sent the last week, 9 homeworks 9, 16, 18 to 24). I have sent the 25 homework of Java Passion JavaEE Course. I think that I sent the homeworks on time (uff). greetings. Cruz --~--~-~--~~~---~--~~ 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?hl=en -~--~~~~--~~--~--~---
[java ee programming] EJB Homework
Hello Mr Sing, I have finished most of the homework but i am still stuck on the EJB one mainly because i having been using Netbeans 6.5 and the EJB plugin seems very different from the one in the Lab work. None of the labwork works and i am finding it difficult to figure it out why. Will it be possible for you throw me some pointers please? _ MSN straight to your mobile - news, entertainment, videos and more. http://clk.atdmt.com/UKM/go/147991039/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] Re: homework in Spring MVC
Ok change some settings, and my program run good. But it won't to displey image, even it is in the same folder and added like: img src=duke.waving.gif But displeyed first page. But when I click Submit button occured error: HTTP Status 500 - type Exception report message descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'userCommand' available as request attribute root cause javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean name 'userCommand' available as request attribute note The full stack traces of the exception and its root causes are available in the Sun GlassFish Enterprise Server v2.1 logs. Sun GlassFish Enterprise Server v2.1 So I think that we can displey same tag like in list one page, because this response.jsp isn't tied to Controller. So I add been useCommand, but this is stupid because this is not usual bean. So what to do? Regards, Biljana --- On Tue, 6/16/09, Biljana Biljana biljana_b...@yahoo.com wrote: From: Biljana Biljana biljana_b...@yahoo.com Subject: [java ee programming] Re: homework in Spring MVC To: J2EE Passion Group java-ee-j2ee-programming-with-passion@googlegroups.com Date: Tuesday, June 16, 2009, 8:46 AM But when I run springMVCSimpleFormControll project my NetBean IDE run good. --- On Tue, 6/16/09, Biljana Biljana biljana_b...@yahoo.com wrote: From: Biljana Biljana biljana_b...@yahoo.com Subject: [java ee programming] homework in Spring MVC To: J2EE Passion Group java-ee-j2ee-programming-with-passion@googlegroups.com Date: Tuesday, June 16, 2009, 8:00 AM Hello! I rewrite hello1-homework, but when I run it I got this message: HTTP Status 404 - type Status report message descriptionThe requested resource () is not available. Sun GlassFish Enterprise Server v2.1 In server Glass Fish V2 was written: While redeploying, trying to stop the application in target server completed successfully While redeploying, trying to remove reference for application in target server completed successfully deployment started : 0% deployment finished : 100% Deploying application in domain completed successfully Trying to create reference for application in target server completed successfully Trying to start application in target server completed successfully Error occurred during application loading phase. The application will not run properly. Please fix your application and redeploy. WARNING: com.sun.enterprise.deployment.backend.IASDeploymentException: ContainerBase.addChild: start: LifecycleException: org.xml.sax.SAXParseException: The processing instruction target matching [xX][mM][lL] is not allowed. Enable of hello1-homework in target server completed successfully Enable of application in all targets completed successfully All operations completed successfully run-deploy: Browsing: http://localhost:8080/hello1-homework/ run-display-browser: run: BUILD SUCCESSFUL (total time: 1 minute 17 seconds) But first I have problem with gass fish so I reinstal the NetBean IDE, while I instaled occered problem with create default domain for Glass fish V2 ...because some file can only read. But when I start Glass Fish project run succesfuly but with that error message. What to do? What to do? Regards, Biljana --~--~-~--~~~---~--~~ 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: homework in Spring MVC
But when I run springMVCSimpleFormControll project my NetBean IDE run good. --- On Tue, 6/16/09, Biljana Biljana biljana_b...@yahoo.com wrote: From: Biljana Biljana biljana_b...@yahoo.com Subject: [java ee programming] homework in Spring MVC To: J2EE Passion Group java-ee-j2ee-programming-with-passion@googlegroups.com Date: Tuesday, June 16, 2009, 8:00 AM Hello! I rewrite hello1-homework, but when I run it I got this message: HTTP Status 404 - type Status report message descriptionThe requested resource () is not available. Sun GlassFish Enterprise Server v2.1 In server Glass Fish V2 was written: While redeploying, trying to stop the application in target server completed successfully While redeploying, trying to remove reference for application in target server completed successfully deployment started : 0% deployment finished : 100% Deploying application in domain completed successfully Trying to create reference for application in target server completed successfully Trying to start application in target server completed successfully Error occurred during application loading phase. The application will not run properly. Please fix your application and redeploy. WARNING: com.sun.enterprise.deployment.backend.IASDeploymentException: ContainerBase.addChild: start: LifecycleException: org.xml.sax.SAXParseException: The processing instruction target matching [xX][mM][lL] is not allowed. Enable of hello1-homework in target server completed successfully Enable of application in all targets completed successfully All operations completed successfully run-deploy: Browsing: http://localhost:8080/hello1-homework/ run-display-browser: run: BUILD SUCCESSFUL (total time: 1 minute 17 seconds) But first I have problem with gass fish so I reinstal the NetBean IDE, while I instaled occered problem with create default domain for Glass fish V2 ...because some file can only read. But when I start Glass Fish project run succesfuly but with that error message. What to do? What to do? Regards, Biljana --~--~-~--~~~---~--~~ 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: Homework in LAB-3516
Biljana Biljana wrote: Hello! Only solution I have is to remove added libraries: Hibernet, and JavaDB , then I will said that I done those removals, in cover letter with my homework. Is it possible to do something like that? Is that homework valid? Yes. Regards, Biljana --- On *Sun, 5/24/09, Sang Shin /sang.s...@sun.com/* wrote: From: Sang Shin sang.s...@sun.com Subject: Re: [java ee programming] Homework in LAB-3516 To: biljana_b...@yahoo.com Cc: J2EE Passion Group java-ee-j2ee-programming-with-passion@googlegroups.com Date: Sunday, May 24, 2009, 8:12 AM Biljana Biljana wrote: Hello everyone! I have problem , in 20th homework it is said that we sent two zipped programs in one message, to me that is impossible, because my yahoo, allowed to me to sent message with attached files of 10MB, but one Hiberanate project is ,zipped, 8010KB, so what to do? First of all, clean up the NetBeans project to reduce the size if you can. If that does not work, send the homework in 2 different messages each of which has a single zip file. -Sang Shin Regards, Biljana -- --- Java Univ. JavaOne 2009, Ruby/JRuby/Rails San Francisco, June 1st, 2009 http://java.sun.com/javaone/2009/javauniversity.jsp#MA4 Sang Shin, sang.s...@sun.com http://us.mc906.mail.yahoo.com/mc/compose?to=sang.s...@sun.com http://www.javapassion.com/SangShinSchedule.html (Life is worth living... with Passion!) --- -- --- Java Univ. JavaOne 2009, Ruby/JRuby/Rails San Francisco, June 1st, 2009 http://java.sun.com/javaone/2009/javauniversity.jsp#MA4 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: Homework in LAB-3516
Please unsubscribe me. On Mon, May 25, 2009 at 6:31 AM, Biljana Biljana biljana_b...@yahoo.comwrote: Hello! Only solution I have is to remove added libraries: Hibernet, and JavaDB , then I will said that I done those removals, in cover letter with my homework. Is it possible to do something like that? Is that homework valid? Regards, Biljana --- On *Sun, 5/24/09, Sang Shin sang.s...@sun.com* wrote: From: Sang Shin sang.s...@sun.com Subject: Re: [java ee programming] Homework in LAB-3516 To: biljana_b...@yahoo.com Cc: J2EE Passion Group java-ee-j2ee-programming-with-passion@googlegroups.com Date: Sunday, May 24, 2009, 8:12 AM Biljana Biljana wrote: Hello everyone! I have problem , in 20th homework it is said that we sent two zipped programs in one message, to me that is impossible, because my yahoo, allowed to me to sent message with attached files of 10MB, but one Hiberanate project is ,zipped, 8010KB, so what to do? First of all, clean up the NetBeans project to reduce the size if you can. If that does not work, send the homework in 2 different messages each of which has a single zip file. -Sang Shin Regards, Biljana San Francisco, June 1st, 2009 http://java.sun.com/javaone/2009/javauniversity.jsp#MA4 Sang Shin, sang.s...@sun.comhttp://us.mc906.mail.yahoo.com/mc/compose?to=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] Regarding Homework 16
This is for HW 16 in the JPA basics section. How are we supposed to do the delete? Should we create a DeletePersonServlet, or should we do it like it was done in the previous examples? --~--~-~--~~~---~--~~ 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: Homework in lab 4203
check if the variable 'ID' used in the query Delete from Person p where ID = 39 is correct From: java-ee-j2ee-programming-with-passion@googlegroups.com [mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On Behalf Of Biljana Biljana Sent: Friday, May 15, 2009 4:45 PM To: J2EE Passion Group Subject: [java ee programming] Homework in lab 4203 This is my error message when I try to delete one user from person table: HTTP Status 500 - type Exception report message descriptionThe server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager root cause java.lang.IllegalArgumentException: An exception occured while creating a query in EntityManager root cause Exception [TOPLINK-8004] (Oracle TopLink Essentials - 2.1 (Build b60e-fcs (12/23/2008))): oracle.toplink.essentials.exceptions.EJBQLException Exception Description: Error compiling the query [Delete from Person p where ID = 39], line 1, column 29: unknown identification variable [id]. The FROM clause of the query does not declare an identification variable [id]. note The full stack traces of the exception and its root causes are available in the Sun GlassFish Enterprise Server v2.1 logs. Sun GlassFish Enterprise Server v2.1 My DeletePersonServlet which was called have this code: @PersistenceUnit //The emf corresponding to private EntityManagerFactory emf; @Resource private UserTransaction utx; protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { assert emf != null; //Make sure injection went through correctly. EntityManager em = null; try { //Get the data from user's form HttpSession session = request.getSession(); String id = (String) session.getAttribute(id); String firstName = (String) session.getAttribute(firstName); String lastName = (String) session.getAttribute(lastName); //Create a person instance out of it Person person = new Person(id, firstName, lastName); //begin a transaction utx.begin(); //create an em. //Since the em is created inside a transaction, it is associsated with //the transaction em = emf.createEntityManager(); //delete the person entity Query squery = em.createQuery(Delete from Person p where ID = + id); //squery.setParameter(1, id); squery.executeUpdate(); //commit transaction which will trigger the em to //commit newly created entity into database utx.commit(); //Forward to ListPerson servlet to list persons along with the newly //created person above request.getRequestDispatcher(ListPerson).forward(request, response); } catch (Exception ex) { throw new ServletException(ex); } finally { //close the em to release any resources held up by the persistebce provider if(em != null) { em.close(); } } } I notice that it took id from last one created person, not from one I want, I set attribute with: c:set value=id scope=session var=${person.id}/ But I just dont know how to set right id like is done for h:commandLink... f:param.../ /h:commandLink because this --~--~-~--~~~---~--~~ 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] Struts Homework
Why do we have to copy the hello1 project and modify it? Wouldn't it just be easier to make a new application from scratch? --~--~-~--~~~---~--~~ 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: Homework #4018
hmmm, well I guess that may be so. Oh well, a little more work from me, What doesn't kill you makes you stronger. But the instructions clearly said ... Passion. --- On Tue, 3/24/09, fredrik fredrik.bok...@gmail.com wrote: From: fredrik fredrik.bok...@gmail.com Subject: [java ee programming] Re: Homework #4018 To: Java EE (J2EE) Programming with Passion! java-ee-j2ee-programming-with-passion@googlegroups.com Date: Tuesday, March 24, 2009, 6:53 AM If you interpret xyz as just any username, then I guess you need a separate login page (and perhaps two different error pages?). How else should you get to the error page from the failed login? [There is probably some way, and it would be interersting to know.] However, if you follow what we learned earlier in the lab, you could interpret xyz as some unauthorized but valid user, e.g. daniel. Then you can work with basic authentication and an error page very similar to myown403error.jsp - I've tried it. /Fredrik On 21 Mar, 05:03, Karl karlk...@yahoo.com wrote: So am I to guess that the homework for Web Application security is wanting a form based implementation and not basic? I'm guessing this is true since it's asking for a custom error page if a unknown user is entered (xyz/xyz). If this is so, the hello1 application will also need a custom login page as well, correct? These homework instructions could be a might clearer. ~karl --~--~-~--~~~---~--~~ 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: Homework #4018
I agree, that the instruction for this homework assignment was not quite clear. . I also figured out the same way, that as we are providing custom error page, it needs to be form based security, and we need to provide custom login page for it to work. On Sat, Mar 21, 2009 at 12:03 AM, Karl karlk...@yahoo.com wrote: So am I to guess that the homework for Web Application security is wanting a form based implementation and not basic? I'm guessing this is true since it's asking for a custom error page if a unknown user is entered (xyz/xyz). If this is so, the hello1 application will also need a custom login page as well, correct? These homework instructions could be a might clearer. ~karl --~--~-~--~~~---~--~~ 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] Not Homework?
Hi! The following link: http://www.netbeans.org/kb/50/tutorial-taglibrary.html, for make homework from JSP 1.2 Custom Tags - We are not covering this topic in this course ¿Do not it have homework? Thanks! --~--~-~--~~~---~--~~ 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] JSTL Homework Question
I have started doing the JSTL homework assignment and I am confused by the instructions. Their are two steps to complete this task. 1) Modify index.jsp 2) Modify response.jsp. If I only modify response.jsp to just output the customerTable I get the expected results. My question is, what am I accomplishing by modifying the index.jsp code? Thanks, Don -Original Message- From: java-ee-j2ee-programming-with-passion@googlegroups.com [mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com]on Behalf Of ruchir pandit Sent: Tuesday, March 10, 2009 5:21 PM To: java-ee-j2ee-programming-with-passion@googlegroups.com Subject: [java ee programming] Calling Java Script in java file Hi, I am working on one servlet where I need to submit data to one tool. In existing application this can be done by using java script. For example : We are taking the value of id using JSTL in jsp page. Javascript var id = 'c:out value=${MDFNAME}/'; document.feedback.id.value = id; /javascript In new flow, we will bypass this function and need to do these (submit value to tool) in java file ( Servlet ). We can also this in java file (servlet) by calling a java script. Any pointers in this will be very helpful. Thanks, Ruchir --~--~-~--~~~---~--~~ 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] Lab1014 - homework
Hello, As far as I have understood homework the program must display name from StudentRecord class, id from Student Class. These data must be displayed in main.java e.g. StudentRecordExample class. In StudentRecordExample I have created Student object instance as well as method setID(). I have no problem with ID but a big one with name. SetName and getName methods body I have in StudentRecord Class and parameters e.g. John I send in StudentRecordExample invoking method object.setName(John); What I do wrong? Thanks for help! Best regards, Rafal Rodzinne kibicowanie na Cracovii. Przy zakupie karnetu mecz Ekstraklasy już od 11 zł! Dzieci bezpłatnie, Panie za 1 zł! Więcej na: http://klik.wp.pl/?adr=www.cracovia.plsid=647 --~--~-~--~~~---~--~~ 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: Homework 3 JSP basics
Hi Harmeet , Use 'action' in your form tag . form method=get action=whereYouWantToGOAfterSubmit Also you need to define servlets mappings in web.xml if you are submitting to servlets. Hope this helps :-) - Original Message - From: Harmeet To: Java EE (J2EE) Programming with Passion! Sent: Friday, February 06, 2009 3:45 AM Subject: [java ee programming] Homework 3 JSP basics I am trying to display response.jsp I am able to do forward from index.jsp to middle.jsp with jsp:forward page=middle.jsp/ But when i click on the submit button on middle.jsp , the page refresh and takes me back to index.jsp In my middle.jsp i am using include tag eg html head meta http-equiv=Content-Type content=text/html; charset=windows-1252 titlemiddle/title /head body bgcolor=red text=white h1opps!! forgot to ask one more thing /h1 form method=get input type=text name=myparameter size=26 input type=submit value=Submit /form % String myparameter = request.getParameter(myparameter); if ( myparameter != null myparameter.length() 0 ) { % %...@include file=response.jsp % % } % //body /html Any idea why this is happening why --~--~-~--~~~---~--~~ 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: (homework #19) 3514_HibernateBasics.zip Ex. 4, steps (4.1) (4.3)
Hi Sang, Where are projects 'HibernateEventOnSaveOrUpdate' and 'HibernateEventOnLifecycleOperations'?! Thnx, Ice-Man --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~--~~~~--~~--~--~---
[java ee programming] Re: Homework #22
Hi From my understanding the render bean has a property that is a MessageProvider class. The GreetingProvider is an interface however the HelloWorldMessageProvider is a MessageProvider class. Changing the bean id=provider class=GreetingProvider/ to bean id=provider class=HelloWorldMessageProvider/ worked for me Cheers Craig -Original Message- From: java-ee-j2ee-programming-with-passion@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bev Wright Sent: 29 November 2008 17:17 To: Java EE (J2EE) Programming with Passion! Subject: [java ee programming] Homework #22 I am having some issues with this homework. I think the problem is with the beans.xml file. When trying to run, I get this error: Exception in thread main org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'renderer' defined in file Here's my XML file: !DOCTYPE beans PUBLIC -//SPRING//DTD BEAN//EN http://www.springframework.org/dtd/spring-beans.dtd; beans bean id=renderer class=StandardOutMessageRenderer property name=messageProvider ref local=provider/ /property /bean bean id=provider class=GreetingProvider/ /beans I may also have issues with this step in the homework, I don't think I did it right. Modify HelloWorldMessageProvider class so that its getMessage() method gets a message from the getGreeting() method of the GreetingProvider object. Any help you can give would be appreciated. Thanks, Beverly --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en -~--~~~~--~~--~--~---