Re: InitialContext
sorry, found the typo. thanks. cheers teng --- renyu teng [EMAIL PROTECTED] wrote: hi there, could anyone tell me how to set the Context.INITIAL_CONTEXT_FACTORY in tomcat 4.0.01, I use the following code: Hashtable env_ht = new Hashtable(); env_ht.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactor); env_ht.put(java.naming.provider.url, localhost:1099); env_ht.put(java.naming.factory.pkgs, org.jboss.naming:org.jnp.interfa ces); InitialContext jndiContext = new InitialContext(env_ht); The code is a part of bean, and I use in jsp page. But if I print out the INITIAL_CONTEXT_FACTOR, I always get: org.apache.naming.java.javaURLContextFactory could anyone please drop me a line and tell me why? I use Win2k, and tomcate 4.0.1, Java 1.3 thanks regards teng __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
InitialContext
hi there, could anyone tell me how to set the Context.INITIAL_CONTEXT_FACTORY in tomcat 4.0.01, I use the following code: Hashtable env_ht = new Hashtable(); env_ht.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactor); env_ht.put(java.naming.provider.url, localhost:1099); env_ht.put(java.naming.factory.pkgs, org.jboss.naming:org.jnp.interfa ces); InitialContext jndiContext = new InitialContext(env_ht); The code is a part of bean, and I use in jsp page. But if I print out the INITIAL_CONTEXT_FACTOR, I always get: org.apache.naming.java.javaURLContextFactory could anyone please drop me a line and tell me why? I use Win2k, and tomcate 4.0.1, Java 1.3 thanks regards teng __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Servlet, Bean Standalone
Hi guys, I need your help. I try to use bean to connect EJB managed by JBOSS. If I use standalone java program to access the data in JBOSS, everything is perfect. But if I use the a jsp page which in turn uses a Bean to access Jboss, then I got the following msg: javax.naming.NameNotFoundException: Name cd is not bound in this Context where cd is part of my jndi directory: cd/CDColection. could anyone tell me what the difference between the two approach mentioned above? I means I should be able to access data in jboss right? I believe I have set resouce description in web.xml correctly, but I am not sure whether I need it or not. I am lost. thank you. teng __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
tomcat jboss
this is a little bit off the topic, anyway, could anyone tell me where I could find a useful information to run tomcat jboss together? thank you. teng __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: tomcat jboss
--- Javier Soques [EMAIL PROTECTED] wrote: www.jboss.org? Hi, I have gone through the web site, and I could find any doc. telling me to how set up the conf. to run both, and I have down the jboss embedded with tomcat, but it doesn't even have readme, it is a little bit hard for me to figure out. regards teng --- renyu teng [EMAIL PROTECTED] wrote: this is a little bit off the topic, anyway, could anyone tell me where I could find a useful information to run tomcat jboss together? thank you. teng __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://shopping.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
JBoss mailing list
this is off the topic, sorry. could anyone tell me where is the mailing list for JBOSS, I have gone through the web page, but I can't find one, maybe I have missed something. thanks. teng __ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Create JSP file or a Servlet file for web browser.
Hi tom, thanks. I will definitely check the book. By the way, do you mean that I should use FrontPage or other tools to create a html file with a layout I want and then modify the html file? Please bear me such stupid question. Thanks regards teng --- Tom Drake [EMAIL PROTECTED] wrote: Teng: It sounds like your application consists of 'boilerplate' html (lots of static html with a few simple variable replacements for name, address, etc...). If this is this case, then JSP will suit you very nicely. No need to use println statements at all. You'll need to write a bean that provides getter methods to retrieve the value(s) you want to plug in to your html (e.g. getName(), getAddress() ). Then you can write a jsp file that looks something like this: %@ page language=java import=com.mydomain.* % jsp:useBean id=customer scope=request class=com.mydomain.Customer/ jsp:setProperty name=customer property=*/ html headtitleCustomer jsp:getProperty name=customer property=name//title/head body Customer name: jsp:getProperty name=customer property=name/br Address: jsp:getProperty name=customer property=address/br /body /html The above jsp file will populate all properties of the Customer from request parameters (that came from a POST or GET request via a user form). Note that 'jsp:getProperty name=customer property=address/' will be replaced with the value returned by the call to customer.getAddress() where customer is defined as: com.mydomain.Customer customer = new com.mydomain.Customer(); There is alot more to JSP's than this. It's best to pickup a good book (I like Professional JSP from Wrox press) and delve into the details. I hope this helps. Good Luck Tom - Original Message - From: renyu teng [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Tom Drake [EMAIL PROTECTED] Sent: Monday, November 26, 2001 7:55 PM Subject: Re: Create JSP file or a Servlet file for web browser. | | | Hi tom, | | thanks for your response. | | Actually my question is very simple: if I use | FrontPage to create a html file, and I want to dump | this html file with a little bit change (e.g. name, | address,etc), then should I use println to do it? If | it is the only choice, then I have to accept it. | | All the books about jsp or servlet I have gone through | in the book store are always giving simple examples | using println, I can't image I could follow this | approach to create html file as I could no way control | the layout. There should a tool like FrontPage so I | could create whatever pages I want with images, text, | different fonts, colors etc., then I could dump this | html file into web browser with my own modification | through jsp or servlet. Starting Hello World with c, | you have a new C world, but with jsp,you can't go far | as you can't use println to control layout which is | crucial for web browser. | | regards | teng | | --- Tom Drake [EMAIL PROTECTED] wrote: | Please provide some more details. Your description | is really | too vague to respond to. | | However, If you are attempting to generate a | 'complicated' | html document, a JSP or set of JSP (with JSP or HTML | includes) provides ample means for generating highly | complicated HTML. You may want to consider using | CSS as well. This may simplify your html somewhat. | | You're right about using 'out.println(...);'. This | technique is | extremely clumsy, and difficult to maintain. JSP's | give you | the ability to write plain-vanilla HTML, which you | can intersperse | with java code that can do the fancy stuff. When you | add | taglibs to the mix, then you can do some very | powerful things | with some fairly simple HTML / XML. | | Regards, | | Tom Drake | | - Original Message - | From: renyu teng [EMAIL PROTECTED] | To: Tomcat Users List | [EMAIL PROTECTED] | Sent: Monday, November 26, 2001 6:09 PM | Subject: Create JSP file or a Servlet file for web | browser. | | | | | | As a new guy to use tomcat, I have the following | | question: | | | | if I want to dump the response to a web browser, | then | | I need to format this into html or xml. However, | it is | | really complicate html file, I should have tools | to do | | it, right? I feel it is too clumsy to write all | the | | html text through out.println. How the complicated | web | | pages are created in the really project? could | anyone | | please shed some light to it? I have gone throught | | some jsp servlet books, and the projects inside | the | | books are really too simple. | | | | how could a complicated web pages are created | through | | println statement? And if so, how could you | control | | the layout? I feel it is impossible, but I may be | | wrong. | | | | thanks
Re: Create JSP file or a Servlet file for web browser.
Hi Tom, thanks you. I will definitely check the book. by the way, do you mean I should use FrontPage or other tools to create html file with layout I want and then modify the file with jsp tags? please bear me such stupid question. thanks regards teng --- Tom Drake [EMAIL PROTECTED] wrote: Teng: It sounds like your application consists of 'boilerplate' html (lots of static html with a few simple variable replacements for name, address, etc...). If this is this case, then JSP will suit you very nicely. No need to use println statements at all. You'll need to write a bean that provides getter methods to retrieve the value(s) you want to plug in to your html (e.g. getName(), getAddress() ). Then you can write a jsp file that looks something like this: %@ page language=java import=com.mydomain.* % jsp:useBean id=customer scope=request class=com.mydomain.Customer/ jsp:setProperty name=customer property=*/ html headtitleCustomer jsp:getProperty name=customer property=name//title/head body Customer name: jsp:getProperty name=customer property=name/br Address: jsp:getProperty name=customer property=address/br /body /html The above jsp file will populate all properties of the Customer from request parameters (that came from a POST or GET request via a user form). Note that 'jsp:getProperty name=customer property=address/' will be replaced with the value returned by the call to customer.getAddress() where customer is defined as: com.mydomain.Customer customer = new com.mydomain.Customer(); There is alot more to JSP's than this. It's best to pickup a good book (I like Professional JSP from Wrox press) and delve into the details. I hope this helps. Good Luck Tom - Original Message - From: renyu teng [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED]; Tom Drake [EMAIL PROTECTED] Sent: Monday, November 26, 2001 7:55 PM Subject: Re: Create JSP file or a Servlet file for web browser. | | | Hi tom, | | thanks for your response. | | Actually my question is very simple: if I use | FrontPage to create a html file, and I want to dump | this html file with a little bit change (e.g. name, | address,etc), then should I use println to do it? If | it is the only choice, then I have to accept it. | | All the books about jsp or servlet I have gone through | in the book store are always giving simple examples | using println, I can't image I could follow this | approach to create html file as I could no way control | the layout. There should a tool like FrontPage so I | could create whatever pages I want with images, text, | different fonts, colors etc., then I could dump this | html file into web browser with my own modification | through jsp or servlet. Starting Hello World with c, | you have a new C world, but with jsp,you can't go far | as you can't use println to control layout which is | crucial for web browser. | | regards | teng | | --- Tom Drake [EMAIL PROTECTED] wrote: | Please provide some more details. Your description | is really | too vague to respond to. | | However, If you are attempting to generate a | 'complicated' | html document, a JSP or set of JSP (with JSP or HTML | includes) provides ample means for generating highly | complicated HTML. You may want to consider using | CSS as well. This may simplify your html somewhat. | | You're right about using 'out.println(...);'. This | technique is | extremely clumsy, and difficult to maintain. JSP's | give you | the ability to write plain-vanilla HTML, which you | can intersperse | with java code that can do the fancy stuff. When you | add | taglibs to the mix, then you can do some very | powerful things | with some fairly simple HTML / XML. | | Regards, | | Tom Drake | | - Original Message - | From: renyu teng [EMAIL PROTECTED] | To: Tomcat Users List | [EMAIL PROTECTED] | Sent: Monday, November 26, 2001 6:09 PM | Subject: Create JSP file or a Servlet file for web | browser. | | | | | | As a new guy to use tomcat, I have the following | | question: | | | | if I want to dump the response to a web browser, | then | | I need to format this into html or xml. However, | it is | | really complicate html file, I should have tools | to do | | it, right? I feel it is too clumsy to write all | the | | html text through out.println. How the complicated | web | | pages are created in the really project? could | anyone | | please shed some light to it? I have gone throught | | some jsp servlet books, and the projects inside | the | | books are really too simple. | | | | how could a complicated web pages are created | through | | println statement? And if so, how could you | control | | the layout? I feel it is impossible, but I may be | | wrong. | | | | thanks
Create JSP file or a Servlet file for web browser.
As a new guy to use tomcat, I have the following question: if I want to dump the response to a web browser, then I need to format this into html or xml. However, it is really complicate html file, I should have tools to do it, right? I feel it is too clumsy to write all the html text through out.println. How the complicated web pages are created in the really project? could anyone please shed some light to it? I have gone throught some jsp servlet books, and the projects inside the books are really too simple. how could a complicated web pages are created through println statement? And if so, how could you control the layout? I feel it is impossible, but I may be wrong. thanks. teng __ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Create JSP file or a Servlet file for web browser.
Hi tom, thanks for your response. Actually my question is very simple: if I use FrontPage to create a html file, and I want to dump this html file with a little bit change (e.g. name, address,etc), then should I use println to do it? If it is the only choice, then I have to accept it. All the books about jsp or servlet I have gone through in the book store are always giving simple examples using println, I can't image I could follow this approach to create html file as I could no way control the layout. There should a tool like FrontPage so I could create whatever pages I want with images, text, different fonts, colors etc., then I could dump this html file into web browser with my own modification through jsp or servlet. Starting Hello World with c, you have a new C world, but with jsp,you can't go far as you can't use println to control layout which is crucial for web browser. regards teng --- Tom Drake [EMAIL PROTECTED] wrote: Please provide some more details. Your description is really too vague to respond to. However, If you are attempting to generate a 'complicated' html document, a JSP or set of JSP (with JSP or HTML includes) provides ample means for generating highly complicated HTML. You may want to consider using CSS as well. This may simplify your html somewhat. You're right about using 'out.println(...);'. This technique is extremely clumsy, and difficult to maintain. JSP's give you the ability to write plain-vanilla HTML, which you can intersperse with java code that can do the fancy stuff. When you add taglibs to the mix, then you can do some very powerful things with some fairly simple HTML / XML. Regards, Tom Drake - Original Message - From: renyu teng [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 26, 2001 6:09 PM Subject: Create JSP file or a Servlet file for web browser. | | As a new guy to use tomcat, I have the following | question: | | if I want to dump the response to a web browser, then | I need to format this into html or xml. However, it is | really complicate html file, I should have tools to do | it, right? I feel it is too clumsy to write all the | html text through out.println. How the complicated web | pages are created in the really project? could anyone | please shed some light to it? I have gone throught | some jsp servlet books, and the projects inside the | books are really too simple. | | how could a complicated web pages are created through | println statement? And if so, how could you control | the layout? I feel it is impossible, but I may be | wrong. | | thanks. | teng | | __ | Do You Yahoo!? | Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. | http://geocities.yahoo.com/ps/info1 | | -- | To unsubscribe: mailto:[EMAIL PROTECTED] | For additional commands: mailto:[EMAIL PROTECTED] | Troubles with the list: mailto:[EMAIL PROTECTED] | | | -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]