Can I read a text file thru a bean
Hi all, My requirement is as follows: I have a initialization file containing the database name. Thru my bean I want to read the DB name and establish connection with that particular database. I don't want to hardcode the db name. Please suggest how to achieve this. Thanks Ritu === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Can I read a text file thru a bean
Hi, You can creat a jsp file, and define the url, username, password variables in it. In the JSP or other files need to connect to DB include it. I think it is faster than reding files to get the string before connect to DB. For example: 1.db.jsp %! String m_url = "jdbc:oracle:thin:@hostname:1521:servicename" String m_username = "scott"; String m_password = "tiger"; % 2.a.jsp includes db.jsp %@ page language="java" % %@ include file="db.jsp"% xgh - Original Message - From: "Ritu Kama" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 28, 2000 3:19 PM Subject: Can I read a text file thru a bean Hi all, My requirement is as follows: I have a initialization file containing the database name. Thru my bean I want to read the DB name and establish connection with that particular database. I don't want to hardcode the db name. Please suggest how to achieve this. Thanks Ritu === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: How to refresh a JSP-Page
Thanks to all who gave me tips.The Error, why my page did'nt refresh, was that the scope of the Bean was only page. Changed to session it worked fine. Thanks a lot Herb === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Can I read a text file thru a bean
Ritu Kama wrote: Hi all, My requirement is as follows: I have a initialization file containing the database name. Thru my bean I want to read the DB name and establish connection with that particular database. I don't want to hardcode the db name. Please suggest how to achieve this. have a servlet that reads the configfile at servletengine startup, have that servlet read the config variables into public static variables eg: class ConfigServlet { public static String dbDriver; public static String dbName; init () { read variables from configfile } class TheBean { Class.forName(ConfigServlet.dbDriver); Connection con = DriverManager.getConnection(ConfigServlet.dbName,"", ""); and so on... } this is how i did it, comments are welcome //peter -- /** *peter sönnergren consultant *i n t e r b i z z s c a n d i n a v i a a b * http://www.interbizz.com */ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Can I read a text file thru a bean
Ritu Kama wrote: Hi all, My requirement is as follows: I have a initialization file containing the database name. Thru my bean I want to read the DB name and establish connection with that particular database. I don't want to hardcode the db name. Please suggest how to achieve this. have a servlet that reads the configfile at servletengine startup (specified in web.xml for tomcat), have that servlet read the config variables into public static variables eg: class ConfigServlet { public static String dbDriver; public static String dbName; init () { read variables from configfile } class TheBean { Class.forName(ConfigServlet.dbDriver); Connection con = DriverManager.getConnection(ConfigServlet.dbName,"", ""); and so on... } this is how i did it, comments are welcome //peter -- /** *peter sönnergren consultant *i n t e r b i z z s c a n d i n a v i a a b * http://www.interbizz.com */ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Can I read a text file thru a bean
well, just read the text file ;-) However, you might want to store more than just the database name. Maybe you also want to put other connection parameters like userid, servername, password there. Or parameters for several databases. In that case consider using a Properties object. This has methods (store and load I think) that read and write all the properties to a file in an INI file format. Geert Van Damme -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Ritu Kama Sent: vrijdag 28 juli 2000 9:19 To: [EMAIL PROTECTED] Subject: Can I read a text file thru a bean Hi all, My requirement is as follows: I have a initialization file containing the database name. Thru my bean I want to read the DB name and establish connection with that particular database. I don't want to hardcode the db name. Please suggest how to achieve this. Thanks Ritu == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Can I read a text file thru a bean
You may use a format as follows: file.ini --- driver=namedriver db=namedb . this is the classical format of a properties file. Than you just open a stream to that file and use the load function of a java.util. Propeties object to load the whole file. than do something like: name=prop.getProperty("db"); driver=prop.getProperty("driver"); Example: java.io.FileInputStream is = null; java.util.Properties p = new java.util.Properties(); String propertiesFilename = "settings.ini"; try { is = new java.io.FileInputStream(propertiesFilename); p.clear(); // not realy necessary p.load(is); //System.out.println("pr:" + Prop.properties.toString()); } catch (java.io.IOException ioex) { System.out.println("Can't read the settings file"); } catch (Exception ex) { ex.printStackTrace(); } finally { if (is != null) { try { is.close(); } catch (java.io.IOException ioex1) { ioex1.printStackTrace(); } is = null; } } than even you use an: Enumeration e = p.keys(); or simply get a value of a property as I have shown you above. Ciao, Ionel Condor. Xing guohong wrote: Hi, You can creat a jsp file, and define the url, username, password variables in it. In the JSP or other files need to connect to DB include it. I think it is faster than reding files to get the string before connect to DB. For example: 1.db.jsp %! String m_url = "jdbc:oracle:thin:@hostname:1521:servicename" String m_username = "scott"; String m_password = "tiger"; % 2.a.jsp includes db.jsp %@ page language="java" % %@ include file="db.jsp"% xgh - Original Message - From: "Ritu Kama" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 28, 2000 3:19 PM Subject: Can I read a text file thru a bean Hi all, My requirement is as follows: I have a initialization file containing the database name. Thru my bean I want to read the DB name and establish connection with that particular database. I don't want to hardcode the db name. Please suggest how to achieve this. Thanks Ritu === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Development Tool and JSP Deployment
you can use Jbuilder3.5 EE. But the evaluation copy is not free. So, if you want to get it, you have to pay 7 US$. Just check the jbuilder's site for more info. -- From: Randy San Miguel[SMTP:[EMAIL PROTECTED]] Reply To: A mailing list about Java Server Pages specification and reference Sent: Friday, July 28, 2000 2:24 PM To: [EMAIL PROTECTED] Subject: Development Tool and JSP Deployment Greetings, I am looking for a development tool for JSP and EJB's other than Oracle JDeveloper3.0. I also seek help regarding JSP deployment to any application server. Thanks in advance. -randy == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
capturing standard out
JSP list, Could anyone help me? I am attempting to run a java class (which has a main method) from within a jsp page, and display the output, which is being sent to System.out.println. Is this possible, I feel that it should be, but my attempts have all fallen flat. If this is not simple to do with jsp, could anyone advise a better way to run a java class and capture the output in a browser? I have tried perl but can't seem to get hold of the output. TIA Chris Probert [EMAIL PROTECTED] Electronic Trade Services St. Alkmunds House 103 Belper Road Derby DE1 3ER === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: [capturing standard out]
HI Chris, I am not sure why you want them. I guess it can be done. I am sure main method will not run in JSP so you have to write some method which does your process and gives an output. Now if you want to get the output try to print it as a file in the server. Then you have to find the location of the file that has been generated and read it using I/O stream. By this way you will be able to read the output and convert it as a string. Now you can pass this string to the System.out.println or what ever you want to do with it. There is a small problem here. You have to make your file name unique so that it can be identified as your application as it may be used by any other person in the network. To achive this you can read the machine ip address as the file name. Hope this would save your purpose. If you find any other solution i would be happy to know. Regards, Jagan Rao M Chris Probert [EMAIL PROTECTED] wrote: JSP list, Could anyone help me? I am attempting to run a java class (which has a main method) from within a jsp page, and display the output, which is being sent to System.out.println. Is this possible, I feel that it should be, but my attempts have all fallen flat. If this is not simple to do with jsp, could anyone advise a better way to run a java class and capture the output in a browser? I have tried perl but can't seem to get hold of the output. TIA Chris Probert [EMAIL PROTECTED] Electronic Trade Services St. Alkmunds House 103 Belper Road Derby DE1 3ER === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets Get free email and a permanent address at http://www.netaddress.com/?N=1 === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: [doing code inspection]
Hi, I would be more happy to know the solution as i do need it. Hope you would send me once u have got it. Thanks Jagan Rao M Calixto Melean [EMAIL PROTECTED] wrote: I am looking for code inspection resources on JSP pages. Any guidelines on how to do it, what things to look for, checklist. Can anybody point me in the right direction? thanks === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets Get free email and a permanent address at http://www.netaddress.com/?N=1 === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: capturing standard out
Read my debugging chapter in Wrox 'Professional JSP'. I show how to create a StringBuffer that keeps the last 32K of the System.out messages and I can show that in a browser through a servlet. This is ideal for debugging server side. I'm currently working on a class that redirects the System.out to a Socket so you can have the debug messages in your telnet window. Geert 'Darling' Van Damme -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Chris Probert Sent: vrijdag 28 juli 2000 11:37 To: [EMAIL PROTECTED] Subject: capturing standard out JSP list, Could anyone help me? I am attempting to run a java class (which has a main method) from within a jsp page, and display the output, which is being sent to System.out.println. Is this possible, I feel that it should be, but my attempts have all fallen flat. If this is not simple to do with jsp, could anyone advise a better way to run a java class and capture the output in a browser? I have tried perl but can't seem to get hold of the output. TIA Chris Probert [EMAIL PROTECTED] Electronic Trade Services St. Alkmunds House 103 Belper Road Derby DE1 3ER == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: How to call a servlet from a javascript function?
Pull all listboxes to client and depend upon selection show required listbox with the help of DHTML and DIV/LAYER tag. Manish. - Original Message - From: Anu Pidaparti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 26, 2000 9:49 PM Subject: How to call a servlet from a javascript function? Can anyone provide me an example of how to do this? I have seen the archives and learnt that this can be done but I didn't find an example. More specifically, I need to populate one listbox based on a selection in another listbox and I need to make trip to the server to get the data. Thanks. Anu === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
FW: capturing standard out
Chris, I have spent the last week trying to use a Java class in my JSP page, too. Standard Java library classes work fine, but the one I wrote (which works from the command line) gives me a 'method not found' error no matter what I do. It found the class but not the method within it. I finally changed my class into a Bean and accessed it with the Bean JSP commands and it worked fine. However, if there is a way to use Java classes instead of Beans, I'd be interested, too. Stephanie -Original Message- From: Chris Probert [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 5:37 AM To: [EMAIL PROTECTED] Subject: capturing standard out JSP list, Could anyone help me? I am attempting to run a java class (which has a main method) from within a jsp page, and display the output, which is being sent to System.out.println. Is this possible, I feel that it should be, but my attempts have all fallen flat. If this is not simple to do with jsp, could anyone advise a better way to run a java class and capture the output in a browser? I have tried perl but can't seem to get hold of the output. TIA Chris Probert [EMAIL PROTECTED] Electronic Trade Services St. Alkmunds House 103 Belper Road Derby DE1 3ER === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: capturing standard out
Well Chris, you can user classes to log your output to some log file on your computer, if you want to do this for debugging puposes. If you want to do debugging then I have written a set of classes for that purpose that log your output to a log file in your user-home directory. If you are interested, I can send them to you. regards Y - Original Message - From: Chris Probert [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 28, 2000 2:36 PM Subject: capturing standard out JSP list, Could anyone help me? I am attempting to run a java class (which has a main method) from within a jsp page, and display the output, which is being sent to System.out.println. Is this possible, I feel that it should be, but my attempts have all fallen flat. If this is not simple to do with jsp, could anyone advise a better way to run a java class and capture the output in a browser? I have tried perl but can't seem to get hold of the output. TIA Chris Probert [EMAIL PROTECTED] Electronic Trade Services St. Alkmunds House 103 Belper Road Derby DE1 3ER === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Help for JSP implicit objects
refer to following faqs...you will find good help.. http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets -- From: Ruchi Duggal[SMTP:[EMAIL PROTECTED]] Reply To: [EMAIL PROTECTED] Sent: Friday, July 28, 2000 3:03 PM To: [EMAIL PROTECTED] Subject: Re: Help for JSP implicit objects See on java.sun.com... U'll find it -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of manish jain Sent: 28 July 2000 10:25 To: [EMAIL PROTECTED] Subject: Help for JSP implicit objects Where can i get help for JSP implicit objects session,application,request,responseetc Can u tell me links Also books for the same Manish. == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets This message has been checked for all known viruses, by Star Internet, delivered through the MessageLabs Virus Control Centre. For further information visit: http://www.star.net.uk/stats.asp == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: XML syntax in JSP
Hello Kevin and Stanley, Kevin: Orion does indeed support that and has for well over a year, or maybe you meant something else? Stanley: As Craig McClanahan pointed out, Tomcat does not support the XML mapping yet and the mapping is rather immature in JSP 1.1. Wait for JSP 1.2 for this to become stable. However, in Orion your page works, but I added a contentType directive to it since the leading ?xml... would otherwise fool the JSP engine to send it as text/xml rather than text/html which could mean that XSLT filters get applied if so configured. So I changed your page directive line to: jsp:directive.page session="false" contentType="text/html"/ and it works. For further info on Tomcat specific questions, I recommend you visiting http://jakarta.apache.org/ and visit Tomcat specific mailing lists. Regards, Karl Avedal The Orion team (http://www.orionserver.com) Kevin Duffey wrote: The browser doesn't understand it from what I can tell. I did this too and had the same problem in JRUN, Resin and Orion. Generally you would have JSP output XML so that you can feed that xml output to an XSLT engine which would then translate it to HTML. Otherwise, your sending XML to the browser and until MSIE 5.5 (or 6.0 is it?) and later versions of Netscape adobt XML output, they wont render it. I think the HTML 5.0 standard..if it ever comes out, will require xml syntax for html tags, and for browsers to render xml..who knows though. -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Stanley Santiago Sent: Thursday, July 27, 2000 1:56 PM To: [EMAIL PROTECTED] Subject: XML syntax in JSP Hi, I am trying to use XML syntax in my JSP, running under Tomcat 3.1. Tomcat doesn't seem to understand and parse the XML tags and just writes to it to the browser. Has anyone tried this before ? Example: ?xml version="1.0" encoding="ISO-8859-1" standalone="yes"? ! DOCTYPE root PUBLIC "-//Sun Microsystems Inc.//DTD JavaServer Pages Version 1.1//EN" "http://java.sun.com/products/jsp/dtd/jspcore_1_0.dtd" jsp:root xmlns:jsp="http://java.sun.com/products/jsp/dtd/jsp_1_0.dtd" html jsp:directive.page session="false"/ body bgcolor="white" font size=4 ul liHELLO WORLD ! /li /ul /font /body /html /jsp:root Thanks, Stan === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Struts example doesn't work
Hi All, I am trying to install and run an example from struts framework. My Platform: Windows NT Workstation 4.0 Tomcat 3.1 Jdk1.2.2 Struts release as of 7/25/00 I had no problem running examples which came with Tomcat. However, after following all struts instructions and invoking the first page I got blank page back. View source revealed the following error: ** * html head titleh1Error: 500/h1 h2Location: /struts-example/index.jsp/h2bInternal Servlet Error:/bbr pre java.lang.IllegalStateException: Response has already been committed at org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServlet ResponseFacade.java:157) at org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java: 299) at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.jav a:503) at org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:163) at org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java:18 7) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.jav a:503) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection (HttpConnectionHandler.java:160) at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.ja va:338) at java.lang.Thread.run(Thread.java:479) /pre ** * I asked friend of mine to run it on his side but his Tomcat wasn't starting up after he copied struts-example.war under webapps directory. Anybody got this example to work? Thanks, Mark. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Form Validation With JSP
Thank you very much It did work but still I've got this problem My autoexec.bat is: mode con codepage prepare=((850) c:\windows\COMMAND\ega.cpi) mode con codepage select=850 keyb uk,,c:\windows\COMMAND\keyboard.sys set PATH=C:\jdk1.2.2\bin set CLASSPATH=C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2; The java programs work well but with jswdk the problem is the following: When I start my startserver.bat at the prompt the java console is initialized and I can invoke examples in http://localhost or 127.0.0.1:8080 but when I try to stop the server by typing in the console: C:\jswdk-1.0.1\ stopserver.bat I have got the following problem: Using classpath: .\classes;.\webserver.jar; .etc the same message you get when you start startserver.bat but the next line is : Bad command or file name Basically I can not stop the server by command but I have to close the dos window which I hate How can I overcome this problem -Original Message- From: Kevin Duffey [SMTP:[EMAIL PROTECTED]] Sent: 27 July 2000 22:53 To: [EMAIL PROTECTED] Subject: Re: Form Validation With JSP Yep..that is how you would do it. Something like: input type="text" name="SomeName" onfocus="some_javascript_routine()" onblur="..." value="..." I know onfocus is when the control gets keyboard focus..I thin the onblur="" is the one where the control loses focus whether its a tab or a mouse click into another control. Your routine it calls would validate the field at that time. I wrote some javascript validation routines using Regular Expressions of javascript so that when they submit the form it validates the whole form. You simply put input type="hidden" name="validate" value="required,digits_only,phone,email,etc.." right before a field you want validated, and the form onsubmit="" calls the one function in javascript that iterates over every field in the form. If an error occurs it displays an image next to the field indicating its an error, and doesn't submit the form. -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Randy Murrish Sent: Thursday, July 27, 2000 2:18 PM To: [EMAIL PROTECTED] Subject: Re: Form Validation With JSP About the only way I've been able to do this is write some javascript that watches the textbox and handles validation on the client. Randy Philip Moschovas wrote: I was wondering if it is possible to do instant validation on a text box within a form instead of waiting until the person submits. I am using a scanner to read a barcode string and I need to validate the string when it's in the textbox and immediately give focus to the next text box if the validation passes. We are supposed to use JSP for this project and the only textbox event I could possibly see that would call a JSP script is onchange but that is only triggered if I manually change the focus from the first text box. Any idea on how to proceed? Thanks Phil == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets -- Randy Murrish mailto:[EMAIL PROTECTED] Spider Guy, ChannelPoint, Inc. http://www.channelpoint.com == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: urgent-install jsp problems
Thank you very much It did work but still I've got this problem My autoexec.bat is: mode con codepage prepare=((850) c:\windows\COMMAND\ega.cpi) mode con codepage select=850 keyb uk,,c:\windows\COMMAND\keyboard.sys set PATH=C:\jdk1.2.2\bin set CLASSPATH=C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2; The java programs work well but with jswdk the problem is the following: When I start my startserver.bat at the prompt the java console is initialized and I can invoke examples in http://localhost or 127.0.0.1:8080 but when I try to stop the server by typing in the console: C:\jswdk-1.0.1\ stopserver.bat I have got the following problem: Using classpath: .\classes;.\webserver.jar; .etc the same message you get when you start startserver.bat but the next line is : Bad command or file name Basically I can not stop the server by command but I have to close the dos window which I hate How can I overcome this problem -Original Message- From: Klacansky, Igor [SMTP:[EMAIL PROTECTED]] Sent: 27 July 2000 23:25 To: [EMAIL PROTECTED] Subject: Re: urgent-install jsp problems I have the same problem with WIN NT 4.0. The solution I found is to switch from jdk1.3 back to jdk1.2.2. I sent it to tomcat_dev group as a bug/question and I am still hoping to get an answer. Igor [EMAIL PROTECTED] == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Problems when Tomcat run stand alone
Hello, I develope JSP with the JBuilder 3.5 . I integrate the Tomcat in the JBuilder to test the JSP. When I test the JSP all things function so as I expectedly. But when I run the Tomcat standalone the setValue() method is not called. I use: jsp:useBean id="men" scope="session" class="eshop.MenuBean" / jsp:setProperty name="men" property="*" / Can anyone help me? Sorry about the bad english Jens-Uwe Eilers === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Form Validation With JSP
Thank you very much It did work but still I've got this problem My autoexec.bat is: mode con codepage prepare=((850) c:\windows\COMMAND\ega.cpi) mode con codepage select=850 keyb uk,,c:\windows\COMMAND\keyboard.sys set PATH=C:\jdk1.2.2\bin set CLASSPATH=C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2; The java programs work well but with jswdk the problem is the following: When I start my startserver.bat at the prompt the java console is initialized and I can invoke examples in http://localhost or 127.0.0.1:8080 but when I try to stop the server by typing in the console: C:\jswdk-1.0.1\ stopserver.bat I have got the following problem: Using classpath: .\classes;.\webserver.jar; .etc the same message you get when you start startserver.bat but the next line is : Bad command or file name Basically I can not stop the server by command but I have to close the dos window which I hate How can I overcome this problem -Original Message- From: Randy Murrish [SMTP:[EMAIL PROTECTED]] Sent: 27 July 2000 22:18 To: [EMAIL PROTECTED] Subject: Re: Form Validation With JSP About the only way I've been able to do this is write some javascript that watches the textbox and handles validation on the client. Randy Philip Moschovas wrote: I was wondering if it is possible to do instant validation on a text box within a form instead of waiting until the person submits. I am using a scanner to read a barcode string and I need to validate the string when it's in the textbox and immediately give focus to the next text box if the validation passes. We are supposed to use JSP for this project and the only textbox event I could possibly see that would call a JSP script is onchange but that is only triggered if I manually change the focus from the first text box. Any idea on how to proceed? Thanks Phil == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets -- Randy Murrish mailto:[EMAIL PROTECTED] Spider Guy, ChannelPoint, Inc. http://www.channelpoint.com == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
recursive jsp:include
hi The following recursive include example doesn't work, who can explain this to me ... %-- recursiveInclude.jsp --% %@ page contentType="text/html;charset=WINDOWS-1252" % %@ page errorPage="errorPage.jsp" % % int vLevel = -1; try { vLevel = Integer.parseInt(request.getParameter("pLevel")); } catch(NumberFormatException ex) { vLevel = -1; } % HTML HEAD TITLErecursiveInclude/TITLE /HEAD BODY H2recursiveInclude : %= vLevel %/H2 % if (vLevel 0) { vLevel = vLevel - 1; String vURL = "recursiveInclude.jsp?pLevel=" + vLevel; % vURL : %= vURL % jsp:include page="%= vURL %" flush="true" / % } % /BODY /HTML %-- - --% I get the message : -- javax.servlet.ServletException: Unable to reload page: /jvv/jsppages/recursiveInclude.jsp because not at top level. Please resend request. -- thanks Jan === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
oracle connection pooling and jrun
hello, is anyone using oracles jdbc 2.0 extension connection pooling drivers with jrun? i'm having difficulty configuring jrun to use jdbc 2.0 connection pooling and not their own generic implementation. thanks for any help! | chris wilson || web dev ||| www.wondergeek.com || | === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Problems when Tomcat run stand alone
Please send MenuBean to check it! marvel. Jens-Uwe Eilers wrote: Hello, I develope JSP with the JBuilder 3.5 . I integrate the Tomcat in the JBuilder to test the JSP. When I test the JSP all things function so as I expectedly. But when I run the Tomcat standalone the setValue() method is not called. I use: jsp:useBean id="men" scope="session" class="eshop.MenuBean" / jsp:setProperty name="men" property="*" / Can anyone help me? Sorry about the bad english Jens-Uwe Eilers === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Debuggin JSPs with JRun30 and IBM VisualAge for Java
A bit of topic. I have setup JRun30 within IBM VisualAge for Java 30. I can now invoke servlets from my browser, run them on JRUN30 and debug them in the VisualAge IDE. However, I would also like to debug my JSP in the same way. Any idea about doing this, without having to import the servlet source code of my JSPs into VisualAge ? Any ideas are welcome. Thanks, Edwin === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Question about methodology for referencing storing images.
Hi, I wanted to discuss as to what methodologies people are using to implement image intensive web sites with this list. The most common practice is to store a link to a picture in a database (or a resource bundle) and pick up the image from there directory. However, I don't see this is being the best option when one has to search for a particular image file if there are thousand images for a site. Here are my thoughts: Why not use BLOBs in databases instead? Are there are any products that link text references to images, give faster search facilities and optimize storage of images? Wouldn't an object database do this precisely? Which ones do people like? Thanks in advance. R/ Jeet - Chris Wilson [EMAIL PROTECTED] on 07/28/2000 10:45:04 AM Please respond to A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Jeet Shahani/PSDI) Subject: oracle connection pooling and jrun hello, is anyone using oracles jdbc 2.0 extension connection pooling drivers with jrun? i'm having difficulty configuring jrun to use jdbc 2.0 connection pooling and not their own generic implementation. thanks for any help! | chris wilson || web dev ||| www.wondergeek.com || | === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Debuggin JSPs with JRun30 and IBM VisualAge for Java
Edwin, Use the JSP Execution Monitor that comes with VisualAge. To use it just go to quick start and add feature called JSP Execution Monitor. To use it go to tools and click on JSP execution Monitor then click the Enable monitoring JSP execution check box. Now anytime you run the JSP page in a browser you can step through the JSP page in VisualAge. I am using the WebSphere test environment that comes with VisualAge but JRUN30 might work also. Good Luck, Dustin Zwonitzer -Original Message- From: Dhondt, Edwin [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 8:45 AM To: [EMAIL PROTECTED] Subject: Debuggin JSPs with JRun30 and IBM VisualAge for Java A bit of topic. I have setup JRun30 within IBM VisualAge for Java 30. I can now invoke servlets from my browser, run them on JRUN30 and debug them in the VisualAge IDE. However, I would also like to debug my JSP in the same way. Any idea about doing this, without having to import the servlet source code of my JSPs into VisualAge ? Any ideas are welcome. Thanks, Edwin === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Proprtionate String Padding
Hello, How can I pad a string with variable spaces? When I query a database, the columns I get are not of fixed length. I would like to make it uniform length. Is there any short cut to add spaces at the end of a string? In other words can anyone give me the Java equivalent to this pseudo code? desiredString = string1 + (35 - string1.length()) spaces. Thanks in advance BRN === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Debuggin JSPs with JRun30 and IBM VisualAge for Java
But this slows down the system terribly and eventually I had go back to the process of elimination or builduing jsp code in small blocks. -Original Message- From: Zwonitzer, Dustin [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 11:32 AM To: [EMAIL PROTECTED] Subject: Re: Debuggin JSPs with JRun30 and IBM VisualAge for Java Edwin, Use the JSP Execution Monitor that comes with VisualAge. To use it just go to quick start and add feature called JSP Execution Monitor. To use it go to tools and click on JSP execution Monitor then click the Enable monitoring JSP execution check box. Now anytime you run the JSP page in a browser you can step through the JSP page in VisualAge. I am using the WebSphere test environment that comes with VisualAge but JRUN30 might work also. Good Luck, Dustin Zwonitzer -Original Message- From: Dhondt, Edwin [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 8:45 AM To: [EMAIL PROTECTED] Subject: Debuggin JSPs with JRun30 and IBM VisualAge for Java A bit of topic. I have setup JRun30 within IBM VisualAge for Java 30. I can now invoke servlets from my browser, run them on JRUN30 and debug them in the VisualAge IDE. However, I would also like to debug my JSP in the same way. Any idea about doing this, without having to import the servlet source code of my JSPs into VisualAge ? Any ideas are welcome. Thanks, Edwin === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Struts example doesn't work
"Zeltser, Mark" wrote: Hi All, I am trying to install and run an example from struts framework. My Platform: Windows NT Workstation 4.0 Tomcat 3.1 Jdk1.2.2 Struts release as of 7/25/00 I had no problem running examples which came with Tomcat. However, after following all struts instructions and invoking the first page I got blank page back. View source revealed the following error: You would do best to ask Struts-specific questions on the STRUTS-USER mailing list at JAKARTA.APACHE.ORG. In this particular case, it would also be useful to know the contents of any logfiles that were created by Tomcat, to see if it detected some sort of errors. Craig McClanahan === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: urgent-install jsp problems
It seems to me you have a path problem (are there spaces in your path?). What about to close the path into "..." in stopserver.bat? -Original Message- From: BLAKCORI, Ansar [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 6:48 AM To: [EMAIL PROTECTED] Subject: Re: urgent-install jsp problems Thank you very much It did work but still I've got this problem My autoexec.bat is: mode con codepage prepare=((850) c:\windows\COMMAND\ega.cpi) mode con codepage select=850 keyb uk,,c:\windows\COMMAND\keyboard.sys set PATH=C:\jdk1.2.2\bin set CLASSPATH=C:\jdk1.2.2\lib\tools.jar;C:\jdk1.2.2; The java programs work well but with jswdk the problem is the following: When I start my startserver.bat at the prompt the java console is initialized and I can invoke examples in http://localhost or 127.0.0.1:8080 but when I try to stop the server by typing in the console: C:\jswdk-1.0.1\ stopserver.bat I have got the following problem: Using classpath: .\classes;.\webserver.jar; .etc the same message you get when you start startserver.bat but the next line is : Bad command or file name Basically I can not stop the server by command but I have to close the dos window which I hate How can I overcome this problem -Original Message- From: Klacansky, Igor [SMTP:[EMAIL PROTECTED]] Sent: 27 July 2000 23:25 To: [EMAIL PROTECTED] Subject: Re: urgent-install jsp problems I have the same problem with WIN NT 4.0. The solution I found is to switch from jdk1.3 back to jdk1.2.2. I sent it to tomcat_dev group as a bug/question and I am still hoping to get an answer. Igor [EMAIL PROTECTED] == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Proprtionate String Padding
Try this { String desiredstring ="", string1 =""; string1="column_name"; desiredstring = string1; if ( string1.length() != 35 ) { desiredstring = string1 + "00"; desiredstring = desiredstring.substring(0,35); System.out.println("Desired String Length is "+desiredstring.length()+" "+desiredstring); } If this looks OK to you , replace zeroes with equal number of spaces Hope this helps Santosh B R Nair [EMAIL PROTECTED] on 07/28/2000 09:26:13 AM Please respond to A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Santosh Daryani/IT/Aon Consulting) Subject: Proprtionate String Padding Hello, How can I pad a string with variable spaces? When I query a database, the columns I get are not of fixed length. I would like to make it uniform length. Is there any short cut to add spaces at the end of a string? In other words can anyone give me the Java equivalent to this pseudo code? desiredString = string1 + (35 - string1.length()) spaces. Thanks in advance BRN === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Struts example doesn't work
The latest version of struts example is running fine. Thanks for reply, Mark. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 1:54 PM To: [EMAIL PROTECTED] Subject: Re: Struts example doesn't work "Zeltser, Mark" wrote: Hi All, I am trying to install and run an example from struts framework. My Platform: Windows NT Workstation 4.0 Tomcat 3.1 Jdk1.2.2 Struts release as of 7/25/00 I had no problem running examples which came with Tomcat. However, after following all struts instructions and invoking the first page I got blank page back. View source revealed the following error: You would do best to ask Struts-specific questions on the STRUTS-USER mailing list at JAKARTA.APACHE.ORG. In this particular case, it would also be useful to know the contents of any logfiles that were created by Tomcat, to see if it detected some sort of errors. Craig McClanahan === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Proprtionate String Padding
Try this with spaces instead of 0 function addZeros() { var v = document.form.elementX.value.length; if(v 0){ for(var i=document.form.elementX.value.length; i35; i++){ document.form.elementX.value = '0' + document.form.elementX.value } } } -Original Message- From: Daryani Santosh [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 1:08 PM To: [EMAIL PROTECTED] Subject: Re: Proprtionate String Padding Try this { String desiredstring ="", string1 =""; string1="column_name"; desiredstring = string1; if ( string1.length() != 35 ) { desiredstring = string1 + "00"; desiredstring = desiredstring.substring(0,35); System.out.println("Desired String Length is "+desiredstring.length()+" "+desiredstring); } If this looks OK to you , replace zeroes with equal number of spaces Hope this helps Santosh B R Nair [EMAIL PROTECTED] on 07/28/2000 09:26:13 AM Please respond to A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Santosh Daryani/IT/Aon Consulting) Subject: Proprtionate String Padding Hello, How can I pad a string with variable spaces? When I query a database, the columns I get are not of fixed length. I would like to make it uniform length. Is there any short cut to add spaces at the end of a string? In other words can anyone give me the Java equivalent to this pseudo code? desiredString = string1 + (35 - string1.length()) spaces. Thanks in advance BRN === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Development Tool and JSP Deployment
If money isn't an object, look at WebGain Studio. It has Visual Cafe 4, DreamWeaver 3, StructureBuilder, WebLogic app server ( 1 connection license) for $5000. The tools are well integrated including deployment to weblogic server for EJB in the Visual Cafe ide, and you can build beans and taglibs in Visual Cafe and deploy them to DreamWeaver for use as drag/drop on JSP pages. Also, you can debug JSP (at runtime) in the Visual Cafe ide, as well as servlets and javabeans. WebLogic runs inside the VisualCafe environment for full debugging, etc. Greetings, I am looking for a development tool for JSP and EJB's other than Oracle JDeveloper3.0. I also seek help regarding JSP deployment to any application server. Thanks in advance. -randy == = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Proprtionate String Padding
If you are displaying the String in a browser, padding the string with spaces will not produce the desired results since HTML ignores extra spaces and newline characters. Instead, you need to append "#160;" in place of a space character. String padString(String s, int desiredSize) { String SPACE = "#160;"; StringBuffer sb = new StringBuffer(); // Validate the input parameters if (desiredSize 0) desiredSize = 0; if (s == null || s.equals("")) { // if s is null or is an empty string, return all spaces for(int i=0;idesiredSize;i++) sb.append(SPACE); return sb.toString(); } // add the original string to the string buffer sb.append(s); // append the spaces for(int i=s.length();idesiredSize;i++) sb.append(SPACE); return sb.toString(); } -Richard -Original Message- From: B R Nair [mailto:[EMAIL PROTECTED]] Sent: Friday, July 28, 2000 6:26 AM To: [EMAIL PROTECTED] Subject: Proprtionate String Padding Hello, How can I pad a string with variable spaces? When I query a database, the columns I get are not of fixed length. I would like to make it uniform length. Is there any short cut to add spaces at the end of a string? In other words can anyone give me the Java equivalent to this pseudo code? desiredString = string1 + (35 - string1.length()) spaces. Thanks in advance BRN === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Urgent help needed
I'm still running into this same problem. However I noticed that if I hit the test.jsp first, then hit the servlet, it worked. Has anyone ran into this problem using Java Web Server 2.0, and servlet 2.1? TIA, Kachana --- Vasudha Deepak [EMAIL PROTECTED] wrote: Hi, Check the version of servlet.jar.Probably it needs the new one ie servlet.jar version2.2 Also verify your classpath. If you have the new verison,may be it is referring to the old one somewhere. Vasudha - Original Message - From: Kachana Ung [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 21, 2000 10:18 AM Subject: Urgent help needed Hi, I tried unsuccessfully to write a servlet that simply forwards the request to another jsp page (test.jsp) to be proccessed. The test.jsp is a simple PURE html page that just prints something. Here's the code: = package workflow.servlet; import javax.servlet.*; import javax.servlet.http.*; public class TestServlet extends HttpServlet{ public void service (HttpServletRequest req, HttpServletResponse res) throws ServletException, java.io.IOException{ RequestDispatcher rd = getServletContext().getRequestDispatcher("/workflow/test.jsp"); rd.forward(req, res); } } === I kept getting the following error message: --- 500 Internal Server Error The servlet named Test at the requested URL http://sabrejspServlet reported this exception: java.lang.NullPointerException. Please report this to the administrator of the web server. java.lang.NullPointerException at com.sun.server.http.pagecompile.GenericPageCompileServlet.loadClass(GenericP ageCompileServlet.java:517) at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.compileAndLoadServlet (JspServlet.java:274) at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.processJspPage(JspSer vlet.java:254) at com.sun.server.http.pagecompile.jsp.runtime.JspServlet.service(JspServlet.ja va:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:202) at com.sun.server.http.HttpRequestDispatcherImpl.forward(HttpRequestDispatcherI mpl.java:249) at com.thevegroup.client.service.workflow.servlet.TestServlet.service(TestServl et.java:21) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at com.sun.server.ServletState.callService(ServletState.java:226) at com.sun.server.ServletManager.callServletService(ServletManager.java:936) at com.sun.server.ProcessingState.invokeTargetServlet(ProcessingState.java:423) at com.sun.server.http.HttpProcessingState.execute(HttpProcessingState.java:79) at com.sun.server.http.stages.Runner.process(Runner.java:79) at com.sun.server.ProcessingSupport.process(ProcessingSupport.java:294) at com.sun.server.Service.process(Service.java:204) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java :374) at com.sun.server.http.HttpServiceHandler.handleRequest(HttpServiceHandler.java :166) at com.sun.server.HandlerThread.run(HandlerThread.java:162) --- However when I rewrote the servlet to forward the request to an html page (test.jsp above saved as test.html), the message is displayed correctly. Please, help. I'm using NT, jws 2.0, and servlets 2.1. Thanks, Kachana __ Do You Yahoo!? Get Yahoo! Mail - Free email you can access from anywhere! http://mail.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets __ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
Re: Proprtionate String Padding
s tim ja se to priveze si nelamej hlavu.. hlavne aby to bylo kopene a ten pro koho to bude je kaja vyzralekk ne aby jsi mu to rikal ze hodlam usit takovou habaduru - Original Message - From: "Daryani Santosh" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 28, 2000 11:08 AM Subject: Re: Proprtionate String Padding Try this { String desiredstring ="", string1 =""; string1="column_name"; desiredstring = string1; if ( string1.length() != 35 ) { desiredstring = string1 + "00"; desiredstring = desiredstring.substring(0,35); System.out.println("Desired String Length is "+desiredstring.length()+" "+desiredstring); } If this looks OK to you , replace zeroes with equal number of spaces Hope this helps Santosh B R Nair [EMAIL PROTECTED] on 07/28/2000 09:26:13 AM Please respond to A mailing list about Java Server Pages specification and reference [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: Santosh Daryani/IT/Aon Consulting) Subject: Proprtionate String Padding Hello, How can I pad a string with variable spaces? When I query a database, the columns I get are not of fixed length. I would like to make it uniform length. Is there any short cut to add spaces at the end of a string? In other words can anyone give me the Java equivalent to this pseudo code? desiredString = string1 + (35 - string1.length()) spaces. Thanks in advance BRN === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
BUG? on Handling run time exception from jsp file within jsp: inc lude
There seems to be an issue(bug?) when handling a run time exception from within jsp:include of Tomcat 3.1. If you implement the three small files as below(error.jsp, temp.jsp, and badcode.jsp), you should be able to reproduce my issue. In theory, it should display "You got an error". Unfortunately, the system displayed it's ugly head and stated "Included servlet error: 500 . java.lang.IllegalStateException: Cannot forward as OutputStream or Writer has already been obtained." Are there any work around for this issue? Scott (Note: please create the following files with the code as shown in a jsp directory such as "errortest") error.jsp: %@ page isErrorPage="true" % %= "You got an error" % temp.jsp: %@ page errorPage="error.jsp" % HTML TITLEBlah/TITLE /HEAD body text here jsp:include page="/jsp/errortest/badcode.jsp" flush="true" / more text /BODY /HTML badcode.jsp: %@ page errorPage="error.jsp" % % int i = 5/0; % === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Observer / Observable Applet-Servlet Comm
Hello, I am making an housie game using the applet-servlet communication. Problem: I want the number generated at the server to be intimated to the client(applet). For this i am taking help of the observer and observable class/interface. But I am unsuccessful in doing it. So please do let me know:-- how do I get the number generated from the server, be intimated to all the clients at the same time. Thanks Paras Shah [EMAIL PROTECTED] === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Same session shared by 2 jsp
Hi everybody! I have 2 simple JSP and I want them to share the same ''session'' predefined object. I thought it was implicit but when I ask for the session identifier by using the getId( ) method I get two different identifier in each JSP. Even when I reload one of theses pages , I get a new identifier. Anyone can help me? (both of the JSP are placed in the same application directory and I'm using Tomcat on Apache Webserver. I'm using wml but I don't think it's important here.) Thanks Sophie === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Sorry!!Session shared ...
I'm sorry, I've just found the problem come from the wap browser, My JSPs works with html and Netscape!! Sophie === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Help for JSP implicit objects
Mnish, try this one: http://java.sun.com/products/jsp/index.html BRN. -Original Message- From: manish jain [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, July 28, 2000 2:55 PM Subject: Help for JSP implicit objects Where can i get help for JSP implicit objects session,application,request,responseetc Can u tell me links Also books for the same Manish. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
.\ in class path
Hello, In the SET CLASSPATH=C:\SBN\LEGAL.JAR;.\ statement (MS DOS environment), what is the function of the last two characters, namely, ".\"? Thanx in advance. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
how do I?
Hi guys, I have a program that generates XML and calls a JSP. I want the JSP to somehow takes this XML input (not necessarily a file) and do processing. How should the XML generating program call the JSP? I don't think I can embed the XML into URL. Any idea guys? Thank you very much. howard === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
JSP compatibility
Hi, I heard that JSP is neither backward nor forward compatible. Is that correct? Can anyone give any clarification on this? Regards, Silja === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: .\ in class path
"." simply means the current working directory in MS-DOS. In a message dated 7/28/00 11:01:42 PM Central Daylight Time, [EMAIL PROTECTED] writes: Subj: .\ in class path Date:7/28/00 11:01:42 PM Central Daylight Time From:[EMAIL PROTECTED] (B R Nair) Sender: [EMAIL PROTECTED] (A mailing list about Java Server Pages specification and reference) Reply-to:[EMAIL PROTECTED] (A mailing list about Java Server Pages specification and reference) To: [EMAIL PROTECTED] Hello, In the SET CLASSPATH=C:\SBN\LEGAL.JAR;.\ statement (MS DOS environment), what is the function of the last two characters, namely, ".\"? Thanx in advance. === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
jsp code not working in oracle
hi friends, i have a problem. i am wroking jsp using Acess it will works fine. but the same querey i am ascess through oracle it wont work properly.the prgrame is like tree view . here i written my code: % String t11 =null; String t12 =null; try { String reh=request.getParameter("newt"); String rem=request.getParameter("newm"); String asrep1=request.getParameter("asrep"); int asrep2=Integer.parseInt(asrep1); String r=request.getParameter("rrepid"); String ca=request.getParameter("catid"); String titl=request.getParameter("title"); int p=Integer.parseInt(request.getParameter("pos1")); int tit=Integer.parseInt(request.getParameter("titid")); String u=request.getParameter("usname"); String msgd=request.getParameter("msgdate"); String parid2=request.getParameter("parentid"); String Cat=request.getParameter("value"); int iw=0; int titleid=0; int assrepid1=0; int temptitleid=0; int assrepid=0; int pari11=0; boolean matchfound=true; Connection conn; try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); // Connect to the database conn = DriverManager.getConnection("jdbc:oracle:thin:@oracle:1521:portaldb","portaldb","portaldb"); Statement stmt1=conn.createStatement ( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE ); conn.setAutoCommit(false); stmt1.executeUpdate("UPDATE msgdf SET flag=0"); Statement stmt2=conn.createStatement ( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE ); Statement stmt3=conn.createStatement ( ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE ); ResultSet rs2=stmt1.executeQuery("SELECT title,titleid,parentid,assrepid,postion1 FROM msgdf where parentid=0 and assrepid=0 and catid="+Integer.parseInt(ca)+" and titleid="+tit+" and status='A' order by titleid"); while(rs2.next()) { int par1=Integer.parseInt(rs2.getString("titleid")); int maintitleid=par1; int pd=Integer.parseInt(rs2.getString("parentid")); int as=Integer.parseInt(rs2.getString("assrepid")); int po1=Integer.parseInt(rs2.getString("postion1")); assrepid=par1; %bgcolor=#EEimg src="folder.gif" border=0 A href="reply3.jsp?value=%=java.net.URLEncoder.encode(request.getParameter("value"))%titid=%=par1%asrep=%=as%catid=%=ca%pos1=%=po1%parid=%=pd%pcatid=%=pcatid%" %out.println(rs2.getString(1)); %/Abr% int partitle=par1; if(assrepid!=0) { do { if(assrepid!=0) { ResultSet rs5=stmt2.executeQuery("SELECT title, titleid,assrepid,postion1,parentid FROM msgdf where flag=0 and parentid="+partitle+" and status='A' order by parentid,titleid"); //out.println(" par1 : " + par1 +"br"); while(rs5.next()) { int asr1=Integer.parseInt(rs5.getString("assrepid")); //out.println(asr1); int po=Integer.parseInt(rs5.getString("postion1")); int ti1=Integer.parseInt(rs5.getString("titleid")); int pari1=Integer.parseInt(rs5.getString("parentid")); String indent; indent ="nbsp;nbsp;"; if(par1-asr1==0) { for (int i=0; i=po; i++) { indent=indent + " nbsp;nbsp;nbsp; "; } assrepid=asr1; par1=ti1; out.println(indent); % img src="folder.gif" border=0 A href="reply3.jsp?value=%=java.net.URLEncoder.encode(request.getParameter("value"))%titid=%=ti1%asrep=%=asr1%catid=%=ca%pos1=%=po%parid=%=pari1%pcatid=%=pcatid%" %out.println( rs5.getString(1)); %/abr% stmt3.executeUpdate("UPDATE msgdf SET flag=1 where titleid="+ti1+" "); titleid=ti1; matchfound=true; } }