Re: JSP/Bean returning a null
Do a couple of things as follows : a) rename ur zipcode variable to zipCode and make the relevant changes in the bean source file. b) Also rename zipcode to zipCode in the html fie. This should solve ur problem. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Henry S. Hayden <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 18, 2002 3:24 AM Subject: JSP/Bean returning a null > I have a JSP, using a Bean, returning values from an HTML form. I'm using > Tomcat 3.3. > > So far, I have a very simple form with five fields on the first JSP. The > values from the input form are POSTed to the display form. When submitted, > a Bean handles the field processing and sends the values to a second JSP. > The last page displays all of the results. The thing that has me stumped > so far is the fact that only the first four contain values, while the last > one is displayed as "null." > > Here's the Bean: > = > > package biz_info; > > public class Company { > >private String company = null; >private String address = null; >private String city= null; >private String state = null; >private String zipcode = null; > >// Default constructor >public Company() { >} > >// Public accessors >public String getCompany() { > return company; >} > >public void setCompany(String theCompany) { > this.company = theCompany; >} > >public String getAddress() { > return address; >} > >public void setAddress(String theAddress) { > this.address = theAddress; >} > >public String getCity() { > return city; >} > >public void setCity(String theCity) { > this.city = theCity; >} > >public String getState() { > return state; >} > >public void setState(String theState) { > this.state = theState; >} > >public String getZipCode() { > return zipcode; >} > >public void setZipCode(String theZip) { > this.zipcode = theZip; >} > > } > > > Certainly, nothing very fancy here. Now, here's most of the JSP display > page: > = > ... > > > ... > > > Company: > <%= biz_bean.getCompany() %> > > > > > <%= biz_bean.getAddress() %> > > > > > <%= biz_bean.getCity() %> > > > > > <%= biz_bean.getState() %> > > > > > <%= biz_bean.getZipCode() %> > > > > > Again, nothing terribly fancy. I'd appreciate it greatly if anyone can > point me in the right direction for a solution. As a test, I've just added > another field to the input form, and added the proper methods to the Bean. > Now the display form displays the company name, address, city, state, and > phone, with the zipcode still null. I've also added toString to the JSP > display page, thinking that there was possibly a data-type conversion > problem, to no avail. Can anyone tell me what's going on here? Thanks for > your help! > > > Henry > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: JAVA HOSTING
www.webappcabaret.com do post to the list if u come across other sites not already posted here. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Maurice M <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 13, 2002 12:58 PM Subject: Re: JAVA HOSTING > You need a website hosted? > > - Original Message - > From: "syed s" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, February 13, 2002 1:25 AM > Subject: JAVA HOSTING > > > > Hi, all > > Can anybody tell me tht Is there any site that > > provides "FREE hosting" of java (.class files) without > > paying setup fee or any registration charges even ONLY > > FOR ONE MONTH ? > > If anybody knows then please tell me I will be > > thankful to u. > > Regards > > > > > > __ > > Do You Yahoo!? > > Send FREE Valentine eCards with Yahoo! Greetings! > > http://greetings.yahoo.com > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: simple question please
Try putting quotes around like value="<%=request.getParameter("ipaddress")%>"> Hope that helps. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: sufi malak <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, February 04, 2002 9:53 PM Subject: simple question please > HI, I have a form, I want if this form is not processed, the fields missing > change the color ( this is done using style html), but I don't know why the > other fields entered have gone, here is the form : > > > > > face="arial,helvetica">Please > add a new entry, don't leave any field empty > > > > face="Verdana"> > > > <%=request.getParameter("ipaddress")%> > > > <% if (!("".equals(ipaddress))) { %> > IP Address > <% } else { %> > name="ipaddress" value=<%=request.getParameter("ipaddress")%>>Reenter IP > Address > <% } %> > > > > My question why this line <%=request.getParameter("ipaddress")%> > works, and this : > name="ipaddress" value=<%=request.getParameter("ipaddress")%>>Reenter IP > Address > does not > > Thanks > > > _ > Chat with friends online, try MSN Messenger: http://messenger.msn.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
Re: Bean Error
Just change the line 52 to the following and it should work : if ((telepon==null) || ("").equals(telepon) ) { Assume this should help. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Isak Rickyanto <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, September 30, 2001 1:33 PM Subject: Bean Error > Hello I have a bean to manage form registration > > I think it is because nullpointerexception... (from the error below) at the > foo.FormBean1.validate .. right? > I read the error say (FormBean1.java.52)... it means that the error code in > the line 52 right? > the code : > it is on line 52:if (telepon.equals("") || (telepon==null)) { > errors.put("telepon","Please enter your last > name"); > telepon=""; > allOk=false; >} > > and I don't know how to solve it > ... > > Please hellp me... > > Error: 500 > Location: /vcdshop/pendaftaran.jsp > Internal Servlet Error: > > > Root cause: > java.lang.NullPointerException > at foo.FormBean1.validate(FormBean1.java:52) --> it mean the > error on line 52 of FormBean.java ... right or not? > > at > _0002fpendaftaran_0002ejsppendaftaran_jsp_0._jspService(_0002fpendaftaran_00 > 02ejsppendaftaran_jsp_0.java:106) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja > va:130) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja > va:282) > at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) > at org.apache.tomcat.core.Handler.service(Handler.java:287) > at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) > at > org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 > 2) > at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) > at > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC > onnectionHandler.java:213) > at > org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) > at > org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) > at java.lang.Thread.run(Thread.java:484) > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: possible idiot question
First of all don't tear your hair out because : a) You won't look good and b) It won't solve your problem. I guess you are trying to do too much too soon. In my opinion first try compiling the two classes from the command line and once you are successful, try doing the same within Forte. There isn't any problem getting the Book class to compile. After you have done that set the classpath variable from the command prompt by giving the following command. set classpath=%classpath%;c:\Program Files\Jakarta Tomcat 4.0\webapps\begjsp-ch07\WEB-INF\classes; Out here double check the path. One thing to note here is that if possible don't have spaces within the folder names. for eg. our classpath command would be something like this : set classpath=%classpath%c:\tomcat\jakarta-tomcat-4.0-m5\webapps\cedric\WEB-INF\classes; After that assuming you are still in the library folder compile the ChildrensBook.java file. Assume this should help you. Have a nice day.With regards,Sachin S. Khanna - Original Message - From: Ewan Taylor To: [EMAIL PROTECTED] Sent: Monday, September 24, 2001 9:43 PM Subject: Re: possible idiot question Hi Shivaraj... thanks for your patience on this one... i'm gonna run down what i know that i've got now... the two classes contained in this mail (below) are both in the same directory C:\Program Files\Jakarta Tomcat 4.0\webapps\begjsp-ch07\WEB-INF\classes\com\wrox\library the first class Book compiles without a hitch, but the subclass ChildrensBook is still giving me grief... when attempting to compile it through forte I get... WEB-INF/classes/com/wrox/library/ChildrensBook.java [3:1] Class Book not found in type declaration or import. public class ChildrensBook extends Book { ^ 1 error and when trying the same through the console, with the command: javac ChildrensBook.java I get ChildrensBook.java:3: cannot resolve symbol symbol : class Book location: class classes.com.wrox.library.ChildrensBook public class ChildrensBook extends Book { ^ 1 error i have also set my CLASSPATH, under environment variables to ... C:\Program Files\Jakarta Tomcat 4.0\webapps\begjsp-ch07\WEB-INF\classes please if you gotten to the end of this mail, could you shed some light on my predicament, as i am really beginning to tear my hair out here cheers ewan -Original Message-From: shivaraj [mailto:[EMAIL PROTECTED]]Sent: 24 September 2001 14:18To: [EMAIL PROTECTED]Subject: Re: possible idiot question u can set your classpath in project --> setting --> servlet jsp --> expert tab . First make sure u r tomcat is running or not - Original Message - From: Ewan Taylor To: [EMAIL PROTECTED] Sent: Monday, September 24, 2001 5:53 PM Subject: Re: possible idiot question thanks for you reply... i feel i may be getting somewhere now that someone has pointed out the things that are right.. my classes are stored in the webapps folder of tomcat under the directory... webapps\begjsp-ch07\WEB-INF\classes\com\wrox\library\ does this tally with my package declaration? i am unclear as to where the classpath is defined, and what it should contain... (any suggestions?) there will be many more classes within this pakage by the time i have finished this section of the tut. thanks again shivaraj cheers ewan -Original Message-From: shivaraj [mailto:[EMAIL PROTECTED]]Sent: 24 September 2001 12:49To: [EMAIL PROTECTED]Subject: Re: possible idiot question 1) Where r u stroing your classes? If u r classes are in com.wrox.library then what r u doing right. But i think u have to check u r classpath and have it pointing to directory which is containing com package. 2) If u just want to use that package, just import that package instead of declaring a package. and com.wrox.library should be in u r classpath. happy coding - Original Message - From: Ewan Taylor To: [EMAIL PROTECTED] Sent: Monday, September 24, 2001 4:48 PM Subject: Re: possible idiot question thanks very much for you reply, but i think that is what i have done with the declaration... package
Re: how to access java classes from jsp
Like to slightly correct you here that the jar files should be stored under the /WEB-INF/lib folder. Assume that helps. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Isak-Rickyanto <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 19, 2001 9:49 AM Subject: Re: how to access java classes from jsp > I am newbie too... > > but I try to answer your question.. > > maybe you should place the jar in the right place.. > if you use tomcat you should follow the rule.. like place > the class in folder classes... like that.. > > what app server do u use? > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: MVC implementation Clarification
Well in the pure MVC architecture : Model -> Java Beans View -> Jsp / Html Controller -> Servlet There is a lot, that has been discussed about the MVC architecture in this list (checkout the archives), jsp / servlet books, ect. Assume that will give you a reasonable lead to go and dvelve into the world of MVC. Have a nice day.With regards,Sachin S. Khannahttp://www.emailanorder.com - Original Message - From: Senaka Suriyaarachchi To: [EMAIL PROTECTED] Sent: Tuesday, September 18, 2001 2:40 PM Subject: MVC implementation Clarification Hi All We are design an application based on J2EE architecture. We are planning to follow MVC pattern and I want to clarify whether following approach is correct with above MVC pattern. We use JSP/HTMl for View, Java Beans for Control and RDBMS for Model. Please give me your comments on that approach. Please tell me when we have to use Java Servlets for Control. Are there any advantages comparing over Java Beans? Regards Senaka Suriyaarachchi
Re: Calling a Static Method in JSP
Can't you make the method public. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Parag Patwa <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 5:07 PM Subject: Re: Calling a Static Method in JSP > That does not work, i keep getting the following error > method is not public in the class cannot be accessed from outside package > regards > Parag > > > > > "Sachin S. Khanna" <[EMAIL PROTECTED]> on 14/09/2001 10:25:56 > > Please respond to A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > cc:(bcc: Parag Patwa/LON/WLB) > > Subject: Re: Calling a Static Method in JSP > > > > Just as you would do it in a normal java program: > a) Import the requisite class. > b) Call the static method of that class. > It is assumed that the class file is under the WEB-INF/classes folder. > Have a nice day. > With regards, > Sachin S. Khanna > http://www.emailanorder.com > - Original Message - > From: Parag Patwa <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, September 14, 2001 4:12 PM > Subject: Calling a Static Method in JSP > > > > My scenario is as follows: > > > > >From /admin/test.jsp, am trying to call a static method which is in a > class in > > com.x.y.z. > > > > How can I do this? > > any help much appreciated. > > > > > > > > > > > > > > > > Diese Nachricht ist vertraulich. Sie ist ausschliesslich fuer > > den im Adressfeld ausgewiesenen Adressaten bestimmt. > > Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten > > wir um eine kurze Nachricht. Jede unbefugte Weiterleitung > > oder Fertigung einer Kopie ist unzulaessig. Da wir nicht die > > Echtheit oder Vollstaendigkeit der in dieser Nachricht > > enthaltenen Informationen garantieren koennen, schliessen wir > > die rechtliche Verbindlichkeit der vorstehenden Erklaerungen > > und Aeusserungen aus. Wir verweisen in diesem Zusammenhang > > auch auf die fuer die Bank geltenden Regelungen ueber die > > Verbindlichkeit von Willenserklaerungen mit verpflichtendem > > Inhalt, die in den bankueblichen Unterschriftenverzeichnissen > > bekannt gemacht werden. > > > > This message is confidential and may be privileged. It is > > intended solely for the named addressee. If you are not the > > intended recipient please inform us. Any unauthorised > > dissemination, distribution or copying hereof is prohibited. > > As we cannot guarantee the genuineness or completeness of > > the information contained in this message, the statements > > set forth above are not legally binding. In connection > > therewith, we also refer to the governing regulations of > > WestLB concerning signatory authority published in the > > standard bank signature lists with regard to the legally > > binding effect of statements made with the intent to > > obligate WestLB. > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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 > > > > > > > > > > > > Diese Nachricht ist vertraulich. Sie ist ausschliesslich fuer > den im Adressfeld ausgewiesenen Adressaten bestimmt. > Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten > wir um eine kurze Nachricht. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Da wir nicht die > Echtheit oder Vollstaendigkeit der in dieser Nachricht > enthaltenen Informationen garantieren koennen, schliesse
Re: Calling a Static Method in JSP
Just as you would do it in a normal java program: a) Import the requisite class. b) Call the static method of that class. It is assumed that the class file is under the WEB-INF/classes folder. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Parag Patwa <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, September 14, 2001 4:12 PM Subject: Calling a Static Method in JSP > My scenario is as follows: > > >From /admin/test.jsp, am trying to call a static method which is in a class in > com.x.y.z. > > How can I do this? > any help much appreciated. > > > > > > > > Diese Nachricht ist vertraulich. Sie ist ausschliesslich fuer > den im Adressfeld ausgewiesenen Adressaten bestimmt. > Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten > wir um eine kurze Nachricht. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Da wir nicht die > Echtheit oder Vollstaendigkeit der in dieser Nachricht > enthaltenen Informationen garantieren koennen, schliessen wir > die rechtliche Verbindlichkeit der vorstehenden Erklaerungen > und Aeusserungen aus. Wir verweisen in diesem Zusammenhang > auch auf die fuer die Bank geltenden Regelungen ueber die > Verbindlichkeit von Willenserklaerungen mit verpflichtendem > Inhalt, die in den bankueblichen Unterschriftenverzeichnissen > bekannt gemacht werden. > > This message is confidential and may be privileged. It is > intended solely for the named addressee. If you are not the > intended recipient please inform us. Any unauthorised > dissemination, distribution or copying hereof is prohibited. > As we cannot guarantee the genuineness or completeness of > the information contained in this message, the statements > set forth above are not legally binding. In connection > therewith, we also refer to the governing regulations of > WestLB concerning signatory authority published in the > standard bank signature lists with regard to the legally > binding effect of statements made with the intent to > obligate WestLB. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 access java classes from jsp
Just check to see that your class file is in the classpath. Normally the class files lie in the WEB-INF/classes folder of your web application. Have a nice day.With regards,Sachin S. Khannahttp://www.emailanorder.com - Original Message - From: nadia To: [EMAIL PROTECTED] Sent: Friday, September 14, 2001 1:03 PM Subject: how to access java classes from jsp Hi there all. I have just started learning jsp and am not sure how to access a class file from within a jsp page. I have heard that it should be a Bean and u access it by doing the following. class="hellopackage.Hello" /> My problem is that I have created the following bean.. package hellopackage; public class Hello{private String username; public Hello(){ username=null;}public void setUserName(String name){username=name;}public String getUsername(){ return username;}} and I am trying to access it with the folowing page.. <%@ page import="hellopackage.Hello"%> class="hellopackage.Hello" /> Hello,User What is your name ? <% if(request.getParamater("username") != null){%><%@ include file="response.jsp" %><% }%> I keep getting the following error jsp:useBean can't find class `hellopackage.Hello' I am realy stuck cause how do u let the jsp see the bean.. I have even tried putting the bean in a jar file called hellopackage... Pls help Thanking you all in adavance
Re: Setting a JavaBean
Yes, its surely an issue with the scope. Just see to it that the bean either has a session or an application scope depending upon the nature of your web application. A quick look through a jsp book or the jsp specification should sort out the matter. In case you are still stuck just post the relevant code to the list and someone will surley help you out. But use this as the last resort :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Joel Carklin <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 13, 2001 8:48 PM Subject: Setting a JavaBean Hi All, I'm a bit confused here, but I think the answer to my query is pretty simple. Basically, I want to use a JavaBean in my JSP page that has already been intantiated by a Java object before loading the page. The object handles the request from the page before, intantiates a JavaBean, sets various properties in it and then directs the browser to the next jsp page. I want the second jsp page to access the new JavaBean with the properties as set by the Object, using the tag. My Page seems to intantiate a new bean each time I call this tag, rather than just locating the one which has already been instantiated. Is this an issue with scope? Any ideas? Thanks Joel = To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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=P http://www.jguru.com/jguru/faq/faqpage.jsp?name=rvlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Logout problem...
In my opinion a slightly different approach such as the folowing could be better. When a user successfully logs in, create a variable and store it in the users session. When you want to log out the user just remove the variable from the users session and be sure to keep a check on every page for this variable, which you want the user to be logged in before accessing. If you donot find the variable just direct the user to the login page. In case you are employing a MVC architecture your job could be further simplified by just keeping the check for the variable in the Controller. Assume this helps. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Chiara Berti <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 13, 2001 10:05 PM Subject: Logout problem... > Hy, > I have a problem with JspI have an application that logs in the user by a servlet (called by Login.jsp); in this servlet I do: > > > sessione = req.getSession(true); > > and then I call some Jsp...when a user logs out I call the same login servlet; in this servlet I do: > > > sessione.invalidate(); > > and redirect the user to Login.jsp. > Now if the user press the browser back button my application runs..why??? > I invalidate the session...and I want that my application doesn' run without logging in. > Please help me... > > Thanks, > Chiara > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: war fromat
yes that is quite normal. One other thing, by placing your propertiesFiles folder under the root your *.properties files would be viewable by your clients directly from the browser. A better option would be to move the propertiesFiles folder under WEB-INF folder. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Bernard Granier <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 13, 2001 2:15 PM Subject: war fromat > Hi, > > I have to package a simple war file containing : > - jsps under the root directory > - properties files > - jar files > > I am working on NT. > > Is the following strucuture corect : > file1.jsp > file2.jsp > /propertiesFiles/.properties > /web-inf/web.xml > /web-inf/lib/aJar.jar > > Is it normal to have file1.jsp and not /file1.jsp ? > > If I understood the war documentation, for a so simple application my > web.xml is : > 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > > > > Bernard Granier > Mr Ted > 115 rue du Fbg Poissonniere > 75009 Paris > www.MrTed.com > Tel : 33 1 55 31 02 65 > mail : [EMAIL PROTECTED] > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: CALLING A SERVLET FROM A JSP
Use the RequestDispatcher interface. In case you would like to know how to use it, first check the archives of this mailing list, you should surely find a lot of relevant information in the form of code examples, explanation, ect. out there. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Parag Patwa <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 12, 2001 3:07 PM Subject: CALLING A SERVLET FROM A JSP > Hi, > > I am trying to call an existing servlet from a jsp. Can this be done and if so, can someone give me some example code? > > thanks > Parag > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: jsp:forward
Upgrade to a later version of the servlet container. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: M Sankar <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, September 12, 2001 1:26 PM Subject: jsp:forward > Hi > > What sort of bug can happen in the web container. What do I have to do > to rectify > that?? I am sure that the request object will be passed to the second > JSP.. > > > REGARDS > Sankar > > Hans Bergsten wrote: > > > BMS Robot Email wrote: > > > > > > Hi Sankar, > > > Parameters of the previous HTML or a prior JSP, are not forwarded > from > > > the current JSP1 to the next JSP2 unless you set them again in JSP1. > > > > supposing the required parameters are p1, p2 and values are v1, v2 > > > Set the parameters in JSP1 using something like > > > > > > > > > > > > > > > > Actually, the web container is supposed to pass on all parameters > > to the target of a or according to the > > spec.. You only need to use if you need to *add* new > > parameters to the request for the target page. If the original > > parameters are not available in the target page, it's due to a bug > > in the web container. > > > > Hans > > > > > [...] > > > -Original Message- > > > From: M Sankar [mailto:[EMAIL PROTECTED]] > > > Sent: Sunday, September 09, 2001 10:20 PM > > > To: [EMAIL PROTECTED] > > > Subject: jsp:forward page > > > > > > Hi, > > > > > > I am posting a request from an HTML to a jsp page(call it jsp1). Now > > > > jsp1 checks for some parameters using request.getParameter and pass > this > > > request using jsp:forward to jsp2. But from the jsp2 when I do > > > request.getParameter, I am getting null values. > > > > > > Is it that the new jsp page does not understand the request object. > But > > > some documentation says that jsp: forward just forwards the request > to a > > > new page for processing. > > > > > > Replies from gurus would be helpful > > > Thx > > > sankar > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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
Two ways : a) Either add the java 2 plugin to your browser, then your applet should load, but this wouldn't be a universal solution as not all browsers that surfers use to browse your site would have that plugin. b) Try redesigning your applet with the jdk 1.1 version classes, don't think you will be able to use the swing classes in that case. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Surender Rana <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 29, 2000 4:20 PM Subject: Re: urgent help > so how should i make it to support that. > thanks > - Original Message - > From: Sachin S. Khanna <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, August 30, 2001 3:40 PM > Subject: Re: urgent help > > > > Your browser doesnot support the jdk1.2 version that your applet uses. > > Have a nice day. > > With regards, > > Sachin S. Khanna > > http://www.emailanorder.com > > - Original Message - > > From: Surender Rana <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, August 29, 2000 2:51 PM > > Subject: urgent help > > > > > > > Hi There, > > > I am trying to run a applet in internet explorer. In this applet i am > > > instantiating a class which is extending JFrame but it is but it is not > > > running and showing security exception. Though by appletviewer it is > > > running. can anyone help me in this. > > > thanks > > > rana > > > > > > - Original Message - > > > From: SriHari <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Thursday, August 30, 2001 2:36 PM > > > Subject: encryption and decryption > > > > > > > > > > Hi There > > > > > > > > Can any One Point me to the information avaliable on net to encrypt > > and > > > > decrypt using java > > > > Actually i need two seperate methods forl encryption and decryption > > > > > > > > > > > > Cheers > > > > SriHari > > > > > > > > > > > > > > === > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > > JSP-INTEREST". > > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > > DIGEST". > > > > 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". > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > > 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". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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
Your browser doesnot support the jdk1.2 version that your applet uses. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Surender Rana <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 29, 2000 2:51 PM Subject: urgent help > Hi There, > I am trying to run a applet in internet explorer. In this applet i am > instantiating a class which is extending JFrame but it is but it is not > running and showing security exception. Though by appletviewer it is > running. can anyone help me in this. > thanks > rana > > - Original Message - > From: SriHari <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, August 30, 2001 2:36 PM > Subject: encryption and decryption > > > > Hi There > > > > Can any One Point me to the information avaliable on net to encrypt and > > decrypt using java > > Actually i need two seperate methods forl encryption and decryption > > > > > > Cheers > > SriHari > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Stuck with beans
The value of the property attribute in the setProperty tag should be the name of the variable whose value you wish to alter in your bean and not the name of the method. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Jon Garry <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 06, 2001 3:03 PM Subject: Stuck with beans > Hello all, > > I've started to write my first beans/JSPs and have come across a problem > that I am stuck on. > > I've wrote the bean and can get values out and display the HTML fine, but > what I want to update a var in the bean by passing a value in the query > string called id - eg the link will be update.jsp?id=2 for example. > > Here is my code so far: > > <%response.setContentType("text/html");%> > > value="<%=request.getParameter("id")%>" /> > > Now, I know that id is getting passed across because when I do > <%=request.getParameter("id")%> is prints 2 on the screen!! > > Any help would be much appreciated! > > Thanks > Jon > --DISCLAIMER--- > The information contained in this e-mail and any files > transmitted with it are confidential and intended for > the addressee only. No other person is authorised to > copy, forward, disclose, distribute or retain this > email in any form. If you have received this e-mail in > error please notify the originator or send an e-mail to > [EMAIL PROTECTED] This e-mail and any > associated attachments have been scanned for viruses > prior to dispatch, however Emap Performance and its > subsidiary companies accept no liability for any losses > resulting from infected e-mail transmissions. > > Please note any views expressed may be those of the > originator and do not necessarily reflect those of this > organisation. > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: MVC Issue
What makes you believe that the Controller Servlet in the MVC model has to be a Singleton Class. Another thing as per my limited knowledge having a singleton class doesn't mean that it implements a SingleThreadModel interface.It only means that whenever the static getInstance method of the class is called only one instance would be returned and the Class has a private constructor which helps in achieving the above mentioned behaviour. The performance of an application could suffer if the Controller Servlet implemented the SingleThreadModel interface in my opinion. Looking forward to your (Mr. Sandhu) as well as others comments. Have a nice day.With regards,Sachin S. Khannahttp://www.emailanorder.com - Original Message - From: Rajinder Sandhu To: [EMAIL PROTECTED] Sent: Thursday, August 02, 2001 12:35 PM Subject: Re: MVC Issue There is no need for synchronizing the process method in the request handlers in the MVC model. As the controller servlet is a singleton class (implements single thread model) i.e. two threads cant call the service method concorrently. so no two clients can call the same process method of the request handler. you can say Servlet works as a synchronizing agent. (Or actually synchronization never takes place/ reqiured ). Cheers!! raj -Original Message-From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]]Sent: Thursday, August 02, 2001 12:15 PMTo: [EMAIL PROTECTED]Subject: MVC Issue Hello Jspians, I'd just like to get your comments on the following : In the MVC model, each action class has a process(...) or similar method. I'd like to know if there is a need to synchronize this method. Looking forward to your comments. Have a nice day.With regards,Sachin S. Khannahttp://www.emailanorder.com
MVC Issue
Hello Jspians, I'd just like to get your comments on the following : In the MVC model, each action class has a process(...) or similar method. I'd like to know if there is a need to synchronize this method. Looking forward to your comments. Have a nice day.With regards,Sachin S. Khannahttp://www.emailanorder.com
Re: conditional forwarding from within a jsp page
Well the following could be done : At the beginning of your JSP page, retrieve the array from the session object calling the getAttribute method after that use an if statement to check whether the array object returned with the above method call is null or if the size of the array is zero. If it is stop processing the current jsp page and either forward / redirect to your other page. Assume it helps :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Martie Parten <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 02, 2001 12:02 AM Subject: conditional forwarding from within a jsp page > In the app I'm working on, there is supposed to be an > array of objects containing some information that I > need to display on the jsp. This array is stored in > the session (an HttpSession). Before using any of the > objects and their methods, I'm checking to see if the > array in the session is null or zero length. If so, > then I don't have the data and shouldn't display the > page. What is the best way to handle this and display > an alternate page? > > Any suggestions welcomed, and thanks in advance for > your input. > > Martie > > __ > Do You Yahoo!? > Make international calls for as low as $.04/minute with Yahoo! Messenger > http://phonecard.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: using super in Jsp
If thats the case couldn't another approach be taken by having a Master Controller Servlet forward to the other Controller Servlets(based on some criteria) which would handle various different sections of the web app which inturn would after relevant logic processing forward to the relevant jsp pages to display the result. Just an idea, it would be quite enlightening for me as well as the list if you could let us know why such an approach would not be better than the one that you have decided on by actually removing the controller servlet completely. Assume i have understood your problem correctly. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Rajinder Sandhu <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 01, 2001 10:38 AM Subject: Re: using super in Jsp > Yes u are right. project was based on MVC only and it was exactly like what > u said. but problem with this is that there is huge bottle neck at the > servlet. so what i am trying to do is to use use:bean tags to instantiate my > request handlers. and taking out the servlet. > > So i wont be using the servlet at all. > So i need to do the session tracking from the very first (say logon.jsp). as > erlier it was taken care by servlet. > > Cheers!! > raj > > -Original Message- > From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 01, 2001 10:26 AM > To: [EMAIL PROTECTED] > Subject: Re: using super in Jsp > > > Well i won't be answering your question to begin with but would (hopefully) > provide you enough food for thought to have a rethink of your design > strategy. > As others on this list would agree that the best way to use JSP's is in > conjunction with Servlets and Java Beans, in short "The MVC Architecture > Model". > In the above mentioned model JSP's are used for display purposes and the > logic is placed in Beans whereas the Servlet acts as a Controller. In case > you need more information on MVC check out any good JSP Book and even the > archives of this list is a wonderful resource. > Now lets get back to your question, the answer to it is you can use the > super keyword for what you intend to do. > But "BEWARE" that doing so will surely make your JSP's messy as well as > unmaintainable in the long run, could be in the short run as well :-). > Assume this helps. > Have a nice day. > With regards, > Sachin S. Khanna > http://www.emailanorder.com > - Original Message - > From: Rajinder Sandhu <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, July 31, 2001 3:46 PM > Subject: using super in Jsp > > > > Hi all, > > > > In my JSP file i am initiating a transaction (any of the action in between > > can throw an exception), and including/calling other jsp's as well. So for > > catching exception and to track where the exception exactly has occured. I > > want define a Basic exception class and have other exception classes > > extending this class for catching a particular exception. > > > > Now my Question is : > > Can we use super to call base class method/constructor in a JSP file ? So > > that i can pass the Ex to the base class. > > If yes, A little idea How to implement it. > > > > If my solution is wrong or if the problem can be solved in a better > manner, > > please guide me. > > > > Thanks in advance. > > > > Cheers!! > > raj > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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 un
Re: response.setStatus()----URGENT
Try and run the following code : file name -> setstatus.jsp code for setstatus.jsp === Calling setStatus Hello Calling response.setStatus() method ! <% response.setStatus(response.SC_FORBIDDEN); %> == Assume this helps and just a request, next time first try it out at your end and if you can't get it to work then post to the list. Also remember the golden rule that "All JSP's are compiled into Servlets !". Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Abhijeet Surve <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 01, 2001 6:18 AM Subject: response.setStatus()URGENT > Hello... > > Can response.setStatus be directly used in a JSP? > > Answers with small examples will be highly appreciated... > > thanx > Abhi > > > > > > > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: using super in Jsp
Well i won't be answering your question to begin with but would (hopefully) provide you enough food for thought to have a rethink of your design strategy. As others on this list would agree that the best way to use JSP's is in conjunction with Servlets and Java Beans, in short "The MVC Architecture Model". In the above mentioned model JSP's are used for display purposes and the logic is placed in Beans whereas the Servlet acts as a Controller. In case you need more information on MVC check out any good JSP Book and even the archives of this list is a wonderful resource. Now lets get back to your question, the answer to it is you can use the super keyword for what you intend to do. But "BEWARE" that doing so will surely make your JSP's messy as well as unmaintainable in the long run, could be in the short run as well :-). Assume this helps. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Rajinder Sandhu <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 31, 2001 3:46 PM Subject: using super in Jsp > Hi all, > > In my JSP file i am initiating a transaction (any of the action in between > can throw an exception), and including/calling other jsp's as well. So for > catching exception and to track where the exception exactly has occured. I > want define a Basic exception class and have other exception classes > extending this class for catching a particular exception. > > Now my Question is : > Can we use super to call base class method/constructor in a JSP file ? So > that i can pass the Ex to the base class. > If yes, A little idea How to implement it. > > If my solution is wrong or if the problem can be solved in a better manner, > please guide me. > > Thanks in advance. > > Cheers!! > raj > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: <%@ including a file twice
Posting your entire code would assist you in getting a possible solution from the people on this list much faster. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Quinn Stone <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 27, 2001 9:44 PM Subject: <%@ including a file twice > Hello: > > I am running on Jrun 3.1. I want to include standard form button at the > top AND bottom of my forms. What I tried was this: > > <%@ include file="includes/formButtons.jsp" %> > > at the top and bottom of the form in my jsp page. However, Jrun displays > the following error: > > Parse Error in JSP page: The include directive on line 155 of page > /note.jsp The page '/includes/formButtons.jsp' cannot be included, > including it here will cause infinite recursion. > > To me, it seems the compiler might be trying to create internal methods > of the same name whenever it encounters the <% include %> for the same > file. I can create two include files with different names that contain > the same code to get around it, but that's not very modular. > > formButtons.jsp looks like this: > <% > if ( inserting ) > { > %> > > > <% > } else { > %> > > > > <% > } > %> > > Any suggestions? > -- > Quinn Stone > Stone Consultants > 2214 1/2 Santa Clara Ave. > Alameda, CA 94501 > 510.865.7342 > www.stoneconsultants.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: configuring tomcat
Post your entire code for the jsp and bean to this list. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Rajinder Sandhu <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 17, 2001 12:33 PM Subject: Re: configuring tomcat > I am working in windows environment. > > jsp file is in \examples\ directory > class file is in \examples\web-inf\classes\ directory > > java_home = c:\jdk1.3 > tomcat_home = e:\tomcat\bin > > It is still giving same exception. > > thanx for the reply. > > Cheers !! > raj > > > -Original Message- > From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 17, 2001 12:28 PM > To: [EMAIL PROTECTED] > Subject: Re: configuring tomcat > > > Where have you placed the UserData.class file, it should be placed in the > /WEB-INF/classes directory. > In the above case it is assumed that the UserData.java doesnot have a > package statement. > Have a nice day. > With regards, > Sachin S. Khanna > http://www.emailanorder.com > - Original Message - > From: Rajinder Sandhu <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, July 17, 2001 11:41 AM > Subject: configuring tomcat > > > > Hi All , > > > > I have installed Tomcat (apache tomcat/4.0-b5) on my machine. It is > > processing JSPs. > > But there is a problem when i use Tag > > it throws exception :- > > > > org.apache.jasper.JasperException: Unable to compile class for > > JSPE:\tomcat\bin\..\work\localhost\examples\SaveName1_jsp.java:57: Class > > org.apache.jsp.UserData not found. > > UserData user = null; > > ^ > > E:\tomcat\bin\..\work\localhost\examples\SaveName1_jsp.java:60: Class > > org.apache.jsp.UserData not found. > > user= (UserData) > >^ > > E:\tomcat\bin\..\work\localhost\examples\SaveName1_jsp.java:65: Class > > org.apache.jsp.UserData not found. > > user = (UserData) > > java.beans.Beans.instantiate(this.getClass().getClassLoader(), > "UserData"); > > > > Although Class file Userdata is in \examples\web-inf\classes directory. > > > > AnyHelp wil be appreciated. > > > > Cheers!! > > Raj > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: configuring tomcat
Where have you placed the UserData.class file, it should be placed in the /WEB-INF/classes directory. In the above case it is assumed that the UserData.java doesnot have a package statement. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Rajinder Sandhu <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 17, 2001 11:41 AM Subject: configuring tomcat > Hi All , > > I have installed Tomcat (apache tomcat/4.0-b5) on my machine. It is > processing JSPs. > But there is a problem when i use Tag > it throws exception :- > > org.apache.jasper.JasperException: Unable to compile class for > JSPE:\tomcat\bin\..\work\localhost\examples\SaveName1_jsp.java:57: Class > org.apache.jsp.UserData not found. > UserData user = null; > ^ > E:\tomcat\bin\..\work\localhost\examples\SaveName1_jsp.java:60: Class > org.apache.jsp.UserData not found. > user= (UserData) >^ > E:\tomcat\bin\..\work\localhost\examples\SaveName1_jsp.java:65: Class > org.apache.jsp.UserData not found. > user = (UserData) > java.beans.Beans.instantiate(this.getClass().getClassLoader(), "UserData"); > > Although Class file Userdata is in \examples\web-inf\classes directory. > > AnyHelp wil be appreciated. > > Cheers!! > Raj > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: application scope & jsp:useBean
Post the entire code for the servlet, jsp as well as the bean and maybe we can help you out. A little difficult without that to find a reason for the error. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Mark Fuller <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 16, 2001 6:46 PM Subject: Re: application scope & jsp:useBean > Sorry about that (it was just a typo in the email): > > (this is in the doPost method of the servlet:) > ServletContext sContext = this.getServletContext(); > MyBean myBean = (MyBean) > sContext.getAttribute("myBean"); > > (And later:) > sContext.setAttribute("myBean", myBean); > > Then, in the jsp: > > > > > class="myPackage.myBean"> > > > > > > I get the following error in my tomcat logs > > > > > > java.lang.Error: Fatal Error: missing resource: > > > java.util.PropertyResourceBundleat > > > > > > org.apache.jasper.Constants.getString(Constants.java:206) > > > at > > > > > > org.apache.jasper.compiler.BeanGenerator.checkSyntax(BeanGenerator.java:121) > > > at > > > > > > org.apache.jasper.compiler.BeanGenerator.generate(BeanGenerator.java:93) > > > at > > > > > > org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J > > spParseEventListener.java:730) > > > at > > > > > > org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi > > stener.java:200) > > > at > > > > > > org.apache.jasper.compiler.JspParseEventListener.generateHeader(JspParseEven > > tListener.java:242) > > > at > > > > > > org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE > > ventListener.java:167) > > > at > > > > > > org.apache.jasper.compiler.Compiler.compile(Compiler.java:183) > > > at > > > > > > org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413) > > > at > > > > > > org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe > > rvlet.java:149) > > > at > > > > > > org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja > > va:161) > > > at > > > > > > org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) > > > at > > > > > > org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) > > > at > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > at > > > > > > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) > > > at > > > > > > org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.j > > ava:163) > > > at > > > > > > com.aepona.managementInterfaces.managementEntity.MEServlet.gotoPage(MEServle > > t.java:721) > > > at > > > > > > com.aepona.managementInterfaces.managementEntity.MEServlet.doPost(MEServlet. > > java:323) > > > at > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > > > at > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > at > > > > > > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) > > > at > > > > > > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597) > > > at > > > > > > org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257) > > > at > > > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > > at > > > > > > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) > > > at > > > > > > org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) > > > at > > > > > > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection > > (Ajp12ConnectionHandler.java:156) > > > at > > > > > > org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338 > > ) > > > at java.lang.Thread.run(Thread.java:484) > > >
Re: application scope & jsp:useBean
don't really know if this is the reason or is it just a typo error at your end, it isn't > getServletContext.setAttribute("myBean", myBeanInstance); instead it should be getServletContext().setAttribute("myBean",myBeanInstance); If that isn't solving the problem, post the code to the list and someone out here would surely help you with it. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Mark Fuller <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, July 16, 2001 6:07 PM Subject: application scope & jsp:useBean > Hi. > > I've seen a couple of messages in the archives about > the following problem but none have received a reply > to date: > > When I try to use application scope by using the > getServletContext.setAttribute("myBean", > myBeanInstance) and then access that same instance in > a JSP using > > class="myPackage.myBean"> > > I get the following error in my tomcat logs > > java.lang.Error: Fatal Error: missing resource: > java.util.PropertyResourceBundleat > org.apache.jasper.Constants.getString(Constants.java:206) > at > org.apache.jasper.compiler.BeanGenerator.checkSyntax(BeanGenerator.java:121) > at > org.apache.jasper.compiler.BeanGenerator.generate(BeanGenerator.java:93) > at > org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.generate(J spParseEventListener.java:730) > at > org.apache.jasper.compiler.JspParseEventListener.generateAll(JspParseEventLi stener.java:200) > at > org.apache.jasper.compiler.JspParseEventListener.generateHeader(JspParseEven tListener.java:242) > at > org.apache.jasper.compiler.JspParseEventListener.endPageProcessing(JspParseE ventListener.java:167) > at > org.apache.jasper.compiler.Compiler.compile(Compiler.java:183) > at > org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java:413) > at > org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:149) > at > org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja va:161) > at > org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) > at > org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) > at > org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.j ava:163) > at > com.aepona.managementInterfaces.managementEntity.MEServlet.gotoPage(MEServle t.java:721) > at > com.aepona.managementInterfaces.managementEntity.MEServlet.doPost(MEServlet. java:323) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) > at > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597) > at > org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) > at > org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) > at > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection (Ajp12ConnectionHandler.java:156) > at > org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338 ) > at java.lang.Thread.run(Thread.java:484) > > Any ideas? > > __ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JSP calls instance method, bombs with odd message
Martin - I ran your code on a windows 98 machine having Java 2 SDK Version 1.3 and Tomcat 4.0 beta 5. Hope this helps ? If you can't get through still, do let us know the error ? Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Martin Smith <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 11, 2001 8:07 AM Subject: Re: JSP calls instance method, bombs with odd message > Sachin-- > > I compared your "working" code to what I posted as best I could, and found 1 > significant change: setting "public" on variable dynamicstring in the class file. > I changed that. > > However, I'm still getting the same error. > > Did I miss some other change? What version of Tomcat did you run it successfully > on? > > Thanks! > > Martin > > > "Sachin S. Khanna" wrote: > > > Martin, > > Find the copy of your working jsp and .java files. > > Hope this helps you :-). > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JSP calls instance method, bombs with odd message
Martin, Find the copy of your working jsp and .java files. Hope this helps you :-). JSP File-- <%@ page import="javax.naming.*, javax.naming.directory.*,java.util.*" %> <%@ page import=" wpv3beta5 " %> <% String cnvals = "" , context = "" , i = "", href = "", namestring = "namestring" , pstring = "", scope = "", actualfilter = "" , filter = "(|(CN=*)(OU=*))", max = "200", children = "N" ; %> U.S. Federal White Pages Directory Find example: " beth ander " will find "Elizabeth Anderson", "Beth Sanderson" and "Elizabeth VanderPutten" List of Directory Entries in this Context Name--Click to drill downTitlePhoneE-Mail / Web <%= i %><%= namestring %> <%= pstring %> <%= pstring %> <%= pstring %> This search used: scope= <%= scope %>, filter=<%= actualfilter %>, directory context=" <%= context %>". Basic Search Part of directory to search (blank=entire directory) Names or parts of name to search for:(example: "beth anders") Advanced Search Options Search filterExamples Search scope Default Entire subtree Single level Show number of entries below each item (can be VERY slow!)? No Yes Maximum items to be retrieved (there's a max of 1,000 anyhow, since more than that will blow out your browser.)"> <%= wpv3beta5.staticstring %> <% wpv3beta5 w = new wpv3beta5(); %> <%= wpv3beta5.staticstring %> <%= wpv3beta5.lsearch("Shortcut") %> <%= wpv3beta5.echo("Whaup, Doc??") %> <%= w.dynamicstring %> Your Java Bean Source File--- import javax.naming.*; import javax.naming.directory.*; import java.util.Properties; import java.util.Hashtable; import java.util.Enumeration; import java.io.* ; import java.util.Vector; public class wpv3beta5 { public static String staticstring = "testing staticstring" ; public String dynamicstring = "firstdynamic"; static SearchControls ctls = new SearchControls(); static String[] returnAttrs = {"cn", "mail", "telephoneNumber", "title", "labeleduri", "pager", "description", "mobile", "facsimiletelephonenumber"}; static String[] returnNothing = {}; private static String max = "200"; static String context = ""; static String separator = ""; static String filter = "(|(CN=*)(OU=*))"; static String cnvals = ""; static String scope = "ONELEVEL_SCOPE"; static String children = "N"; // Set maximum items returned from a search public void setMax(String max) { this.max = max ; if (max.equals(null)) max = "200"; if (Integer.valueOf(max).intValue() > 1000) max = "1000"; ctls.setCountLimit(Integer.valueOf(max).longValue()); } public String getMax() { return max; } // Set search context public void setContext(String context) { if (context.equals(null)) context = ""; this.context = context; if (! context.equals("")) this.separator = ", "; } file://set the search filter if it's provided in the request public void setFilter(String filter) { if (filter != null && filter.trim() != "") this.filter = filter; } file://set the simple name search values if provided in the request public void setCnvals(String cnvals) { if (cnvals != null ) this.cnvals = cnvals; } file://set scope public void setScope(String scope) { if (scope != null) this.scope = scope; } file://See if children are wanted public void setChildren(String children) { if ( ! children.equals(null) && children.equals("Y") ) children = "Y"; } /** constructor */ public wpv3beta5 () { this.dynamicstring = "in constructor dynamicstring"; this.staticstring = "staticstring changed in constructor"; } file://end constructor public static String echo(String in) { return "I heard you say " + in ; } public static String lsearch(String in) { return "OK"; } } // end class Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Martin Smith <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 6:22 AM Subject: JSP calls instance method, bombs with odd message > I
Re: Need your help one float and double calc.
The below mentioned code should give you the result you are looking for : import java.text.*; public class testD { public static void main(String args[]) { float d1=99.44f; float d2=99.40f ; float d3=d1-d2 ; DecimalFormat df = new DecimalFormat("0.00"); System.out.println(df.format(d3)); } } Hope this helps :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: lancelot <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 29, 2001 2:11 PM Subject: Need your help one float and double calc. > Dear all, > Who can tell me why the result is 0.04916? and why it's not = > 0.04, if I want to get 0.04 how could I do? thanks > > Lancelot > > D:\test>type testD.java > public class testD > { > public static void main(String args[]) > { > float d1=3D99.44f; > float d2=3D99.40f ; > float d3 =3D d1-d2 ; > System.out.println(d3); > } > } > > > D:\test>java testD > 0.04916 > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: placing data in Application level from servlets
Not quite right ! application is an implicit object available within jsp's and not servlets. In case of servlets you could get a handle to the ServletContext object with the following line of code : ServletContext context = getServletConfig().getServletContext(); Then use the repective methods mentioned in the ServletContext interface to store and retrieve the application level objects. Hope this helps. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Atilio Ranzuglia <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 28, 2001 8:18 PM Subject: Re: placing data in Application level from servlets > Anyway, application is an implicit object, so you can > use without declaration. > > In this case, you can do the following: > application.getAttribute("objectName") or > application.getValue("objectName") > It depends on the servlet API version you are using. > The first one is for servlet's version 2.2 and the > second one is servlet's version 2.1. > > Hope this help > Atilio > > > --- Mattias Jiderhamn <[EMAIL PROTECTED]> wrote: > > > wondering if anyone has any ideas on how to access > > the application > > level > > > objects ( i.e similar to ASP application object) > > using a servlet? > > > > Try pageContext.getAttribute("objectName", > > PageContext.SESSION_SCOPE ); > > See javax.servlet.jsp.PageContext for documentation > > > > Mattias Jiderhamn > > Expert Systems > > [EMAIL PROTECTED] > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > > body: "signoff JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: > > "set JSP-INTEREST DIGEST". > > 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 > > > = > Ing. Atilio Ranzuglia Buteler > [EMAIL PROTECTED] > > __ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail > http://personal.mail.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 create a file in java
Assuming you have access to the JDK Documentation, checkout the FileOutputStream and FileWriter Class in the java.io package. That should be sufficient to write files to the disk. If you need more detailed assistance, a java book or searching the net would be a couple of workable options. Last but not the least, i need to remind you that this list is for jsp related issues. Why not post such queries to a more general java related mailing list :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Lorena Carlo <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 25, 2001 8:37 PM Subject: How to create a file in java > Hello all, > > Does anybody know how to create a file in java and then save it to some > direction of the disk? > > Please help me, thanks in advance > > Lorena Carlo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: borrowing a "request"
Well in that case, why don't you post the code for your jsp and bean to the mailing list. Someone would surely give you a perfect idea about what is going wrong :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Martin Smith <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, June 19, 2001 5:34 AM Subject: Re: borrowing a "request" > Sachin--Thanks for the reply. Having burned another 10 hours or so on this, I can > report it goes way beyond the request object. As far as I can tell, I can't get > ANY dynamic response from a bean or non-bean (class) from my JSP, without > generating the servlet illegal-state error complaining that "response is already > committed." > > It's always a good idea to upgrade, but I'm wondering if I'm missing greatly in my > understanding of inter-object communication within a JSP container. > > Anyone know a clear statement of what you can and can't invoke from a JSP > scriptlet?? > > Martin > > "Sachin S. Khanna" wrote: > > > Sometimes the error you are facing could be because of a bug in the Servlet > > Jsp Engine. > > I'd advice you to download the latest Tomcat 4.0 and see if it gives you the > > same problem. > > Have a nice day. > > With regards, > > Sachin S. Khanna > > http://www.emailanorder.com > > - Original Message - > > From: Martin Smith <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Sunday, June 17, 2001 9:20 AM > > Subject: Re: borrowing a "request" > > > > > Get/set and a null constructor, I thought. Anyhow. Fact is, I can't seem > > to > > > directly reference my class from a jsp without getting that "response > > already > > > committed" error. I even trimmed down the class to be trivial (does > > nothing) and > > > still get a error creating an instance of it or referring to its (only) > > static > > > variable. > > > > > > Maybe it's some rule built into the JSP container (tomcat 3.1) that you > > can't > > > reference classes (except via usebean) in the user app area > > (WEB-INF/classes), or > > > maybe I am staring some obvious thing right in the face & not seeing it. > > > > > > Martin > > > > > > Brad Cox wrote: > > > > > > > As far as I'm concerned, bean is just Sun's marketing name for objects. > > JSP' > > > > s usebean just requires the object to have get/set methods, which is > > > > another bad idea that JSP perpetrates with usebean. > > > > > > > > On Saturday, June 16, 2001, at 08:38 PM, Martin Smith wrote: > > > > > So I'm not doing usebean, for example > > > > > > > > > > === > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > > > 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". > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > > 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". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > 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://w
Re: borrowing a "request"
Sometimes the error you are facing could be because of a bug in the Servlet Jsp Engine. I'd advice you to download the latest Tomcat 4.0 and see if it gives you the same problem. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Martin Smith <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 17, 2001 9:20 AM Subject: Re: borrowing a "request" > Get/set and a null constructor, I thought. Anyhow. Fact is, I can't seem to > directly reference my class from a jsp without getting that "response already > committed" error. I even trimmed down the class to be trivial (does nothing) and > still get a error creating an instance of it or referring to its (only) static > variable. > > Maybe it's some rule built into the JSP container (tomcat 3.1) that you can't > reference classes (except via usebean) in the user app area (WEB-INF/classes), or > maybe I am staring some obvious thing right in the face & not seeing it. > > Martin > > Brad Cox wrote: > > > As far as I'm concerned, bean is just Sun's marketing name for objects. JSP' > > s usebean just requires the object to have get/set methods, which is > > another bad idea that JSP perpetrates with usebean. > > > > On Saturday, June 16, 2001, at 08:38 PM, Martin Smith wrote: > > > So I'm not doing usebean, for example > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JavaMail problem
Just check to see that the email client you are using to read the generated email has been configured to read html emails. If the above doesnot solve your problem, post your code to the list and someone will surely help you out with your problem. Hope tha helps :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Warty, Koustubh <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2001 8:16 PM Subject: Re: JavaMail problem > Hello , >Yesterday in response to my JavaMail problem I received 2 solutions. But I was not able to succesfully run either of them. > > The 2 suggestions were - > > 1. here > > 2. Set Content Type = "text/html" also use single quotes (') instead of double as follows >String abc = "Hello! this is test msg. Click here" > > I tried both did not work. Where do I add the set content type ? I tried it before setting the message but . > > In case of case No. 2 it just prints the message as - > Hello! this is test msg. Click here > In case of case No. 1 it just prints the message as - > Hello! this is test msg. Click here > > > Please do let me know. > > Regards, > - Koustubh > > > > > -Original Message- > From: King Maurice [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 12, 2001 3:56 PM > To: [EMAIL PROTECTED] > Subject: Re: JavaMail problem > > > TRY > > here > > > - Original Message - > From: "Warty, Koustubh" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, June 12, 2001 3:35 PM > Subject: JavaMail problem > > > > Hello, > >I have a problem in using Java Mail thru JSP. I use the sample code > that the Sun has in the Java Mail software. In that the TO, FROM, SUBJECT > work fine. Also the Message works fine if I say on the JSP page like > > String message = "Thanks for placing an Order"; > > > > But if I want to pass a link in that message string something like - > > String message = "Thanks for placing an Order. You can view your order by > clicking here." I want the 'here' to be a hyperlink. I tried various > combinations in the message string by using the HTML ="a.jsp">here. But it does not seem to understand this syntax. > > > > Please help me. > > > > Regards, > > - Koustubh > > > > > > > > > > > === > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > DIGEST". > > > 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". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun
Re: Who know how to create a "Connection Pool" in Java?
This line of code should do the job : arr = null; assuming arr is your array. There is no equivalent of a C++ delete in Java. The GC is your only option for reclaiming memory and by assigning null to your reference you are signalling the GC to reclaim the memory being used by this reference on its next run. Hope this helps :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: King Maurice <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 2:26 AM Subject: Re: Who know how to create a "Connection Pool" in Java? > Does any one know the implementation of how to destroy an array or delete an > array. > > > - Original Message - > From: "David Shanes" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, June 13, 2001 4:45 PM > Subject: Re: Who know how to create a "Connection Pool" in Java? > > > > Chandra, > > Maybe you can answer this. I am trying to set up BEA Weblogic > 6.0. > > We are testing app servers to see which one we want to use. I am trying to > > set up a connection pool to an Oracle 8.1.7 database. > > If you have not worked with Weblogic, first you create a pool and > > then you create a datasource and assign the pool to the datasource. I am > > doing this all using the Administrative console web interface. > > When I set the pool with the initial capacity set to 0, the app > > server starts up fine. If I set it to 1 (or anything other than 0), then > > when the app server starts, it fails while trying to create my pool - see > > the exception below... > > > > Thanks, > > > > David > > > > > 'oraclePool_JMINI' will be tested at: '10 minute intervals.> > > Starting Loading jDriver/Oracle . > > > > > > -- LOGIN ERROR CODE: 24327 > > > > > > -- LOGIN ERROR CODE: 24327 > > > createResource()> > > > startup connection pool "oraclePool_JMINI" > weblogic.common.ResourceException: > > Could not create pool connection. The DBMS driver exception was: > > java.sql.SQLException: ORA-24327: need explicit attach before > > authenticating a user - (operational/@rumba) > > at > > weblogic.db.oci.OciConnection.getLDAException(OciConnection.java:161) > > at weblogic.jdbcbase.oci.Driver.connect(Driver.java:92) > > at > > > weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection > EnvFactory.java:158) > > at > > > weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Connection > EnvFactory.java:114) > > at > > > weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.j > ava:653) > > at > > > weblogic.common.internal.ResourceAllocator.(ResourceAllocator.java:261 > ) > > at > > > weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:695 > ) > > at > > weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:108) > > at > > > weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT > arget.java:327) > > at > > > weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment > Target.java:277) > > at > > > weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D > eploymentTarget.java:232) > > at > > > weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym > entTarget.java:192) > > at java.lang.reflect.Method.invoke(Native Method) > > at > > > weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl > .java:562) > > at > > > weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:5 > 48) > > at > > > weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea > nImpl.java:285) > > at > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555) > > at > > com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523) > > at > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:439) > > at > weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:180) > > at $Proxy41.updateDeployments(Unknown Source) > > at > > > weblogic.management.config
Re: RequestDispatcher: forward call failed
Check the value that is held by the userName value. I think it could be null after your call to the getHeader Method. Just a guess :-). One last piece of advice sometimes it could help you get a faster and corrrect response to your problem if you posted the entire code. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Blaney, Colin (CAP, CORP Contractor) <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 14, 2001 3:28 AM Subject: RequestDispatcher: forward call failed > I am trying to chnge my application from grabbing the logon credentials from a url (request.getParameter) to grabbing it from a http header (request.getHeader). All I am switching > is how a local variable is getting created and is crashes out to the error. > String userName = request.getParameter("user"); > to > String userName = request.getHeader("global_id"); > Any suggestions? > Colin > > Error: > RequestDispatcher: forward call failed > StackTrace: > javax.servlet.ServletException: RequestDispatcher: forward call failed > at java.lang.Throwable.fillInStackTrace(Native Method) > at java.lang.Throwable.fillInStackTrace(Compiled Code) > at java.lang.Throwable.(Compiled Code) > at java.lang.Exception.(Compiled Code) > at javax.servlet.ServletException.(Compiled Code) > at com.netscape.server.http.servlet.NSRequestDispatcher.forward(Compiled Code) > at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:355) > at _jsps._cockpit._retry_jsp._jspService(_retry_jsp.java:124) > at org.apache.jasper.runtime.HttpJspBase.service(Compiled Code) > at javax.servlet.http.HttpServlet.service(Compiled Code) > at com.netscape.server.http.servlet.NSServletRunner.Service(Compiled Code) > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Basic Object Reference Question
Personally speaking i'd go in for the first approach because according to me it would be more efficient if there are a lot of ResultSet Objects that would have to be traversed in the while loop and i really don't find any use of storing the String in a variable except for the fact that it makes your code a little more cleaner and easier to follow. Lastly, do remember that Strings are immutable objects in java. Hope that helps :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Sushil Singh <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2001 7:55 AM Subject: Basic Object Reference Question > Hi, > > I am having a basic object reference question. Consider the following > code snippet: > while (rootRs.next()) > { > > categories.addElement(getCategory(rootRs.getString("cat_id"))); > } > > Another code snippet: > String catID = ""; > while (rootRs.next()) > { >catID = rootRs.getString("cat_id"); >categories.addElement(getCategory(catID)); > } > > Now my question is which one is better? When we say > categories.addElement(getCategory(rootRs.getString("cat_id"))); > > then we are getting a reference to the resultset string object or its > new object. If its a new String object, then the while loop will be > creating n no of objects throughout the loop!!! > > Awaiting your feedback. > > Thanks. in advance. > > Sushil > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 processing
Its time i got in and clarified. The orignal query posted is quoted below for your convenience : "> > > > Hi, > > > > in my form generated by my JSP page I want to have some validation > > added > > > on the submit event of a button and on sucessful validation I want to > > > forward it to a servlet. How do I do it?" Please note the keywords "some validation added on the submit event and on successful validation forward it to the servlet ". Based on the above context my reply was Javascript. As in my opinion that was one of the only ways out. (I'll luv to know about others !) With regards to the pros and cons of using Javascript there is a lot that can be argued but thats not what the orignal query was. Hope thats clarified things once and for all :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Hoorn, Michiel van <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2001 4:51 PM Subject: Re: Form processing > It is possible in *any* browser to turn off JavaScript. JavaScript doens't > work then (duh). What if you validate your form, check if a date-field is > empty or not with JavaScript.that check will NOT work then. > > What if that datefield is a primary key in your database and you were trying > to insert something into it and the JavaScript-validation was the only > validation to check if that datefield was empty or not. That will give you > an SQLException, won't it.thus, i think JavaScript is not suitable for > validating stuff. And if you do think it is, wel that's fine for you. > > Michiel; > > > -- > > From: Mayuresh Kadu[SMTP:[EMAIL PROTECTED]] > > Reply To: A mailing list about Java Server Pages specification and > > reference > > Sent: Wednesday, June 13, 2001 12:56 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Form processing > > > > funny ?!? How do u find it funny ?! I mean show me the screen and i shall > > make sure that i get u a guarantee that u will never see a value related > > SQLException ever :) > > > > Frankly i dont see the joke ! > > > > Mayuresh > > > > -Original Message- > > From: A mailing list about Java Server Pages specification and reference > > [mailto:[EMAIL PROTECTED]]On Behalf Of Hoorn, Michiel van > > Sent: Wednesday, June 13, 2001 2:19 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Form processing > > > > > > And what if i set my JavaScript of in my browser? > > Will i get an SQLException or a nice NullPointerException? > > Yes, i'll certainly will. > > > > JavaScript is funny but not a solution. > > > > Grz, > > Michiel; > > > > > > > -- > > > From: Sachin S. Khanna[SMTP:[EMAIL PROTECTED]] > > > Reply To: A mailing list about Java Server Pages specification and > > > reference > > > Sent: Wednesday, June 13, 2001 10:42 AM > > > To: [EMAIL PROTECTED] > > > Subject: Re: Form processing > > > > > > Use Javascript :-). > > > Have a nice day. > > > With regards, > > > Sachin S. Khanna > > > http://www.emailanorder.com > > > - Original Message - > > > From: Sanjib Biswas <[EMAIL PROTECTED]> > > > To: <[EMAIL PROTECTED]> > > > Sent: Wednesday, June 13, 2001 12:15 PM > > > Subject: Form processing > > > > > > > > > > Hi, > > > > in my form generated by my JSP page I want to have some validation > > added > > > on the submit event of a button and on sucessful validation I want to > > > forward it to a servlet. How do I do it? > > > > > > > > Sanjeev > > > > > > > > > > > > > == > > > = > > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > > JSP-INTEREST". > > > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > > DIGEST". > > > > 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 processing
Use Javascript :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Sanjib Biswas <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 13, 2001 12:15 PM Subject: Form processing > Hi, > in my form generated by my JSP page I want to have some validation added on the submit event of a button and on sucessful validation I want to forward it to a servlet. How do I do it? > > Sanjeev > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 force the download of an excel file (please help!!!!!!!!!!!!!!!)
Its always better to post the code to the list for prompt and correct answers to your queries. Just an opinion :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Lorena Carlo <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 07, 2001 10:29 PM Subject: How to force the download of an excel file (please help!!!) > Hello everybody, > > I have a problem forcing the download of an excel file that is generated by > a servlet. I use the following line of code: > > response.setHeader("Content-Disposition","attachment; filename=\"" + > "movimiento.xls" + "\";"); > > It prompts the dialog to save, but after I has finished to download the file > in the client machine, the window keeps running, and i doesn't stop. > > I am using IE 5.0 to do the tests, please tell me what is wrong is there a > bug on servlets, or if there another way to force the downloading of a file. > > For your help I thank you in advance > > Lorena Carlo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 can I pass user defined class to another jsp page?
Use the session.setAttribute() and session.getAttribute() methods. For the exact syntax check the relevant Api Docs. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: AYTUG AYDIN <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 07, 2001 12:43 PM Subject: How can I pass user defined class to another jsp page? > Hi guys? > I have a simple question. > > I can pass JMLSTRING and JMLNUMBER parameters from a JSP to another JSPs. > But I couldn' t pass a class defined by myself to another JSP? > > Please, explain me, how I can manage this situation. > > Example below. > -- -- > ="request" > > /> > > > "This bean can be passed, value can be used on another JSPs." > -- -- > > > > > or > > > -- -- > "our_user is my class, in both cases above, I coludn' t pass the fields of > the class to another JSP. All fields would be initialized on the next JSP. > I can' t get the values on the next JSP." > > Thanks. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Excel and Servlets
Amazing ! As we all know, Jsp's are Compiled into Servlets. If you can construct an excel sheet with a jsp (well thats not recommended though), you shouldn't be facing any problem doing the same with servlets. In case you still can't do that post the problem you are facing and someone would surely help you with it. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Lorena Carlo <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 30, 2001 1:54 PM Subject: Excel and Servlets > Hello all, > > Can yot tell me how can I construct an excel sheet with a servlet. I > already know how to do it with jsp. I need to construct it with servlets, > please help me if you know. > > Thanks in advance > > Lorena Carlo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: cannot find the package
That should be fine. If you have renamed the folder to WEB-INF, it doesn't really matter what it displays. Try running your webapp again. If it still doesn't work there might be some other problem. Post it to the list and surely some one will help you out. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: [Qari Qasim] <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 23, 2001 8:31 PM Subject: Re: cannot find the package > It's a bit funny, but I have tried to rename Web-inf to WEB-INF. But as I > press 'return' key, it changes back to 'Web-inf'. Do u how I can keep the > name as WEB-INF. > Regards, > > -Original Message- > From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, May 23, 2001 2:09 PM > To: [EMAIL PROTECTED] > Subject:Re: cannot find the package > > Try renaming the Web-inf folder to WEB-INF. > It might just do the trick :-). > Have a nice day. > With regards, > Sachin S. Khanna > http://www.emailanorder.com > - Original Message - > From: [Qari Qasim] <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, May 23, 2001 5:29 PM > Subject: cannot find the package > > > > Hi > > > > I have a java class package in the following directory: > > /webapps/JSP/Web-inf/classes/test > > > > and in my .jsp file I try to import this package : > > > > <%@ page import="test.*" session="true" errorPage="error.jsp" %> > > > > (I have this jsp file in /webapps/jsp ) > > > > but somehow, when I try to run this file, I get the error that this > package > > is not found. > > > > Can anyone help > > > > thanks > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: cannot find the package
Try renaming the Web-inf folder to WEB-INF. It might just do the trick :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: [Qari Qasim] <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 23, 2001 5:29 PM Subject: cannot find the package > Hi > > I have a java class package in the following directory: > /webapps/JSP/Web-inf/classes/test > > and in my .jsp file I try to import this package : > > <%@ page import="test.*" session="true" errorPage="error.jsp" %> > > (I have this jsp file in /webapps/jsp ) > > but somehow, when I try to run this file, I get the error that this package > is not found. > > Can anyone help > > thanks > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JSP
Just check on the Servlet Api Version that you are using. Maybe you are using an older version which uses the getValue and setValue methods of session object instead of the setAttribute and getAttribute methods. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Richie Bab A. Boyboy <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 23, 2001 5:06 PM Subject: JSP > Hi people! > Could anyone send me a jsp code using session object? > I have a problem using the session.setAttribute() method. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JSP-JSP Invocation
Instead of using the request object use the session object like : session.setAttribute("name of your object", yourobject); and to retrieve the object use the corresponding session.getAttribute("name of your object"); Don't forget to cast it to your object type :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Randy San Miguel <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 23, 2001 1:12 PM Subject: JSP-JSP Invocation > Hi, > I am relatively new to JSP and I would like to ask if it is possible > to pass an object between JSP's? > Suppossed I have EmpResult.JSP that passes a HashTable value to > EmpResultNext.JSP. How should I code it? > > fragment of my scriplet code in EmpResult.JSP is: > > ... > <% request.setAttribute("empHT", "empHT"); %> > ... > > > > while on the recieving end, EmpResultNext.JSP > > ... > <%@ page language="java" %> > <%@ page import = "EmployerInfo,java.util.*,java.sql.*,java.io.*" %> > <% Hashtable empHT3 = (Hashtable)request.getAttribute("empHT"); %> > <%= empHT.size() %> > ... > > > thanks in advance. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Deploying JSP with Tomcat
Well you are missing a closing " symbol in the import statement. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: G. Misa III <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 20, 2001 4:29 PM Subject: Deploying JSP with Tomcat > Hi, sorry for the basic question. I'm just new to > JSP. I just installed Tomcat 3.2.1 in Win98. I > created a JSP page, put it in examples\jsp\ and a > Javabean class in examples\web-inf\classes. I started > Tomcat and tried to browse the jsp file. This error > always occurs: > > Internal Servlet Error: > org.apache.jasper.compiler.ParseException: > c:\tomcat\tomcat\webapps\examples\jsp\resa\conference.jsp(1,27) > Attribute connection has no value at > org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:499) > ... > ... > ... > ... > > The first part of my jsp file looks like this: > > <%@ page import="java.sql.*%> > scope="session"/> > > Is there something missing in my code or do I have to > do extra configuration with Tomcat? Thanks. > > __ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: SV: Defining variables in index file
Not really ! Variables declared between the <%!... > tags are instance variables and not session variables. A look at the jsp specification or better still at any of the books on jsp will surely help :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Nicholas Larsson <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 18, 2001 3:57 PM Subject: SV: Defining variables in index file > My index.jsp doesn't have a header. > The other jsp to access this variable only has a useBean header. > > Isn't it true that when declaring a variable with variable. > > /Nico > > -Ursprungligt meddelande- > Från: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]För Alexandre Equoy > Skickat: den 18 maj 2001 12:11 > Till: [EMAIL PROTECTED] > Ämne: Re: Defining variables in index file > > > Hi nico, > what is the header of your jsp ? > You also use the getAttribute of HttpSession when you want to retrieve your > params. > > Bye. > > > Hi all! > > > > Why do I get an compile time error in the following situation. > > > > A variable is defined in my index.jsp file like this: > > <% > > session.setAttribute("loginFail","false"); > > %> > > <%! boolean userInserted = false; %> > > > > > > > > when I try to reach this variable from another jsp file it says that the > > variable is not defined. > > > > /nico > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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 > > -- > --- > Alexandre Equoy > ALICANTE > Parc Eurasanté, 180 Ave. Eugène Avinée > 59120 LOOS > Tél: 03 28 55 92 50 - Fax: 03 28 55 92 51 > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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
No Subject
Find the modified jsp and bean files below : They are working :-) bean file : mport java.sql.*; import java.util.*; public class databank { private String driver = "sun.jdbc.odbc.JdbcOdbcDriver"; private String url = "jdbc:odbc:db1"; private Connection connection; private Statement statement; private ResultSet res; private ResultSetMetaData meta; private String naam; private int aantal; public databank(){} public ResultSet lijst(){ try { String query = "select * from klant"; Class.forName(driver); connection = DriverManager.getConnection(url); statement = connection.createStatement(); res = statement.executeQuery(query); } catch (SQLException e){ } catch (ClassNotFoundException cnfex){} return res; } } -- jsp file html> <%@ page import="databank" %> <%@ page import="java.sql.*" %> <%! ResultSet res; ResultSetMetaData meta; int aantal; int kol; %> <% res = db.lijst(); %> <% if(!res.next()) { System.out.println("Reached here again"); out.println("Deze instructie heeft geen resultaten"); } else res.next(); %> <%= res.getString(0) %> <% } %> Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Jonas Devries <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 18, 2001 3:14 PM > This is the whole jsp-file!!! > > Hope you can do something with it!! > > Thanx > Jonas > > > > > <%@ page import="databank" import="java.sql.*" %> > > > > <%! ResultSet res; > ResultSetMetaData meta; > int aantal; > int kol; > %> > > <% res = db.lijst("select * from klant"); %> > > <% if(!res.next()) { > out.println("Deze instructie heeft geen resultaten"); > } > else { %> > <%= res.getString(0) %> > <% } %> > > > > > > > >From: "Sachin S. Khanna" <[EMAIL PROTECTED]> > >Reply-To: A mailing list about Java Server Pages specification and > > reference <[EMAIL PROTECTED]> > >To: [EMAIL PROTECTED] > >Date: Fri, 18 May 2001 14:37:47 +0530 > > > >Couple of things : > >a) Provide the complete source code for the jsp. > >b) Apparently nothing seems to be wrong with your java bean code. > >Have a nice day. > >With regards, > >Sachin S. Khanna > >http://www.emailanorder.com > >- Original Message - > >From: Jonas Devries <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Friday, May 18, 2001 1:04 PM > > > > > > > Does somebody knows why this code doesn't work? I want to acces a MS = > > > Access DB and give a simple query. I give the ResultSet back to my JSP > >= > > > file but he gives some errors. JSP and Java-bean are included. Errors > >= > > > also. There is data in the db and the odbc-jdbc driver is installed. > > > > > > Thank you very much in advance > > > > > > Jonas > > > > > > > > > import java.sql.*; > > > import java.util.*; > > > > > > public class databank { > > > > > > private String driver =3D "sun.jdbc.odbc.Jdbc.OdbcDriver"; > > > private String url =3D "jdbc:odbc:db1"; > > > private Connection connection; > > > private Statement statement; > > > private ResultSet res; > > > private ResultSetMetaData meta; > > > private String naam; > > > private int aantal; > > > > > > public databank(){} > > > =20 > > > =20 > > > public ResultSet lijst(){ > > > > > > try { > > >String query =3D "select * from klant"; > > >Class.forName(driver); > > >connection =3D DriverManager.getConnection(url);=20 > > >statement =3D connection.createStatement(); > > >res =3D statement.executeQuery(query);=20 > > > =20 > > > } > > > catch (SQLException e){} > > > catch (ClassNotFoundException cnfex){}=20 > > > > > > return res; > > > > > > } > > > > > > } > > > > > > > > > > > > > > > ResultSetMetaData meta =3D res.getMetaData(); int aantal =3D > > > meta.getColumnCount(); %> while (res.next()){ for (kol =3D 1; kol <=3D > > > aantal; kol++) %> > > > > > > > > > > >
No Subject
Couple of things : a) Provide the complete source code for the jsp. b) Apparently nothing seems to be wrong with your java bean code. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Jonas Devries <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 18, 2001 1:04 PM > Does somebody knows why this code doesn't work? I want to acces a MS = > Access DB and give a simple query. I give the ResultSet back to my JSP = > file but he gives some errors. JSP and Java-bean are included. Errors = > also. There is data in the db and the odbc-jdbc driver is installed. > > Thank you very much in advance > > Jonas > > > import java.sql.*; > import java.util.*; > > public class databank { > > private String driver =3D "sun.jdbc.odbc.Jdbc.OdbcDriver"; > private String url =3D "jdbc:odbc:db1"; > private Connection connection; > private Statement statement; > private ResultSet res; > private ResultSetMetaData meta; > private String naam; > private int aantal; > > public databank(){} > =20 > =20 > public ResultSet lijst(){ > > try { >String query =3D "select * from klant"; >Class.forName(driver); >connection =3D DriverManager.getConnection(url);=20 >statement =3D connection.createStatement(); >res =3D statement.executeQuery(query);=20 > =20 > } > catch (SQLException e){} > catch (ClassNotFoundException cnfex){}=20 > > return res; > > } > > } > > > > > ResultSetMetaData meta =3D res.getMetaData(); int aantal =3D > meta.getColumnCount(); %> while (res.next()){ for (kol =3D 1; kol <=3D > aantal; kol++) %> > > > > > > Error: 500 > Location: /test9.jsp > Internal Servlet Error: > > javax.servlet.ServletException > at = > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContext= > Impl.java:386) > at = > _0002ftest_00039_0002ejsptest9_jsp_0._jspService(_0002ftest_00039_0002ejs= > ptest9_jsp_0.java:126) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at = > org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet= > .java:174) > at = > org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) > at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at = > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:5= > 03) > at = > org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) > at = > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnect= > ion(Ajp12ConnectionHandler.java:156) > at = > org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:= > 338) > at java.lang.Thread.run(Thread.java:484) > > Root cause:=20 > java.lang.NullPointerException > at = > _0002ftest_00039_0002ejsptest9_jsp_0._jspService(_0002ftest_00039_0002ejs= > ptest9_jsp_0.java:93) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at = > org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet= > .java:174) > at = > org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261) > at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at = > org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:5= > 03) > at = > org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) > at = > org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnect= > ion(Ajp12ConnectionHandler.java:156) > at = > org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:= > 338) > at java.lang.Thread.run(Thread.java:484) > > > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.co
Re: plz help me out ....
Couple of things: a) There is no tag defined by the name of gen, there is one with the name of FirstTag check your .tld file. In your jsp change the call from gen to FirstTag. b) Just double check to see that the header ( the first couple of lines) of your .tld file are correct. After doing the above the code is working fine on an windows 98 machine running tomcat 4.0 / jdk 1.3. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: K.S.SREEDHAR KUMAR <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 17, 2001 11:21 AM Subject: plz help me out > hey buddies > > i'm a newbie to the JSP arena i've just come to custom tag > development i'm getting mad in deploying a sample app btw i'm using > tomcat 3.2.1 server... > > is there any strict naming convention for the tld file if so plz specity > it > > i'm providing u source for web.xml, tld file ,tag handler(.java) and jsp > file with this.. > > the directory structure which i'm having now is as follows: > > > sample web application context path is : /gen > > tld file is in : /gen/Meta-Inf/GenTag.tld > web.xml file is in : /gen/Web-Inf/web.xml > tag handler class file is in : /gen/Web-Inf/classes/GenTag.class > jsp file is in : /gen/test.jsp > > > btw context path adddr is : /webapps/gen > > hte error which i'm getting is:: > org.apache.jasper.compiler.CompileException: > C:\Jakarta\jakarta-tomcat-3.2.1\webapps\gen\test.jsp(0,0) Unable to open > taglibrary FirstTag : C:\Jakarta\jakarta-tomcat-3.2.1\webapps\gen\FirstTag > (The system cannot find the file specified) > > > all i want is this sample app should work... what ever u say i'm ready to > accept > > > TEST.JSP:: > > <%@ taglib uri="FirstTag" prefix="test" %> > > > > custom action result is > > false > > hahhaha > > > > WEB.XML :: > > > 2.2//EN""http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";> > > > > > > FirstTag > > > > /Web-Inf/GenTag.tld > > > > > > > > GenTag.tld :: > > >PUBLIC "-//Sun Microsystems, Inc.//DTD JSP TagLibrary 1.1 file://EN" >"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";> > > 1.0 > 1.1 > FirstTag > > > FirstTag > GenTag > > > > > > GenTag.java:: (TAG HANDLER) > > import java.io.*; > import javax.servlet.jsp.tagext.*; > import javax.servlet.jsp.*; > > public class GenTag extends BodyTagSupport{ > > public int doStartTag() { > try { >JspWriter out = pageContext.getOut(); >out.print("Custom tag example " + > "(coreservlets.tags.ExampleTag)"); > } catch(IOException ioe) { >System.out.println("Error in ExampleTag: " + ioe); > } > return(SKIP_BODY); > } > } > > thanx in advance > > regards > ks > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JSP Counter
One possible reason could be the restarting of the jvm on mycgiserver.com for some reason or the other and as far as my experience goes free servers donot provide private jvm for every free account as it doesnot make economic sense because of which you could be facing such a behaviour. Hope this bit of info helps :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Kalman Hazins <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 16, 2001 8:33 AM Subject: JSP Counter > Hi, all. I have a small problem. > > I got some free webspace at www.mycgiserver.com and tried practicing writing > a JSP counter. > > This was my code: > > <% out.println("This page has been accessed ") ; %> > <%! int times = 0; %> > <% out.println(times++ + " times") ; %> > > So, it basically works. That is when I hit the "Refresh" button the # of > counts goes up. And sometimes even when I close the browser window and > reopen it again --- it shows the right count... BUT... every once in a while > I come back to the page ( a few hours later) and I see that a lot of times > the count starts from 0 again. What can the problem be ??? > > --- Kalman > > P.S. The page I created was www.mycgiserver.com/~Kalman > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JDBC connection
Sad :-(, if it didnot help. Then the possible cause could be a problem with the classpath. Your piece of code is working fine at my end. Post the exact problem alongwith your classpath settings & any other relevant information if you wish to get more assistance from this list. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Sharon Om <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 14, 2001 9:55 PM Subject: Re: JDBC connection > sorry... didn't help. > > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of Sachin S. Khanna > Sent: Friday, May 11, 2001 11:32 PM > To: [EMAIL PROTECTED] > Subject: Re: JDBC connection > > > > Class.forName("sun.jdbc.odbc.JdbcOdbcDrive"); > may be you have fallen prey to a typo error by missing out on the alphabet > 'r':-). > The above should be changed to : > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > Have a nice day. > With regards, > Sachin S. Khanna > http://www.emailanorder.com > - Original Message - > From: Sharon Om <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, May 12, 2001 1:53 AM > Subject: JDBC connection > > > > Hello. I have the following code for connecting to the jdbc:odbc pool. > > While compiling the Java code, I keep getting an "ClassNotFoundException" > in > > Class.forName. > > I also tried declaring Class T and have T.forName. I get the similar > error > > for "T.forName". How can I get this to work? > > > > Thank you for your help. > > Sharon > > > > package property; > > > > > > import java.sql.*; > > import java.io.Serializable; > > > > public class database implements java.io.Serializable > > { > > > > public database() { > > > > } > > > > public String runSql() > > { > > String browserOutput = ""; > > Connection sqlca = null; > > Statement sqlStatement = null; > > ResultSet myResultSet=null; > > > > > > /*Connect to database, run SQL and produce output */ > > > > try { > > /* Connection to the database */ > > Class.forName("sun.jdbc.odbc.JdbcOdbcDrive"); > > String theDatabase = "jdbc:odbc:loadtool"; > > sqlca = > DriverManager.getConnection(theDatabase,"loadtool","loadtool"); > > } > > catch (SQLException e) { > > > > browserOutput = "Error:SQL error of: "+e.getMessage(); > > } > > > > return browserOutput; > > } > > > > } > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Invalid jsp:include tag ??
It always helps to look at the error being thrown. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: sufi malak <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 14, 2001 7:44 AM Subject: Invalid jsp:include tag ?? > Hi, could you please tell me why this is not valid : > > <% > if(portal.getUser().equals(portal.getDefaultUser()) || > (request.getParameter("action") != null && > request.getParameter("action").equals("loginForm"))){ >%> <--- this is line 83 > > <% > } > %> > ... > > This the error I got : > Error: 500 > > Location: /openportal/portal.jsp > > Internal Servlet Error: > > org.apache.jasper.compiler.CompileException: > C:\tomcat321\webapps\openportal\portal.jsp(83,6) Invalid jsp:include tag > > Thanks lot > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: jsp throws java.lang.NoClassDefFoundError
Try adding the tools.jar to the classpath as well. Maybe that might help :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Mayuresh Kadu <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, May 13, 2001 11:11 PM Subject: Re: jsp throws java.lang.NoClassDefFoundError > thats an interesting error ! i think u should try re=installing JDK. > > Mayuresh > > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of skkanth > Sent: Tuesday, May 09, 1995 12:59 > To: [EMAIL PROTECTED] > Subject: jsp throws java.lang.NoClassDefFoundError > > > Hi guys !! > I am using tomcat.java_home & tomcat_home are set ok in autoexec file.Tomcat > starts ok.When i run jsp file it throws > java.lang.NoClassDefFoundError:Sun/tools/javac/main at > org.apache.jasper.compile.SunJavaCompiler.compile(SunJavaCompiler.java:128) > > etc. > Can u please say why ? Where should i make rectification if at all i have to > do ? > > Thanks !! > (s.k.kanth) > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.250 / Virus Database: 123 - Release Date: 4/18/99 > > > _ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JavaMail with JSP
One problem could be getting the session before adding the property of mail.smtp.host to the properties object. Try interchanging their order. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Supreme Being <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 11:53 PM Subject: JavaMail with JSP > i succesfully downloaded the JavaMail and JAF from sun's site in order to use them with my JSP which i'm running on JRun Studio on my win98 PC. i added the CLASSPATH (in autoexec.bat) as told by the docs along with them. Now what? coz nothing is working. I have this HTML page and a JSP page which is supposed to send email...but it's not working... i'm getting a java.SendMailException error. what do i have to do? is there something i missed? > The codes i'm using are as follows : > [The HTML Page] : javamail.html > > > > > > To: > > > From: > > > > > Subject: > > > > > Message: > > > > > > > > [The JSP Page] : javasendmail.jsp > > <%@ page > import=" javax.mail.*, javax.mail.internet.*, javax.activation.*,java.util.*" > %> > > > <% > > try{ >Properties props = new Properties(); >Session sendMailSession; >Store store; >Transport transport; > > > sendMailSession = Session.getInstance(props, null); > > props.put("mail.smtp.host", "smtp.jspinsider.com"); > > Message newMessage = new MimeMessage(sendMailSession); > newMessage.setFrom(new InternetAddress(request.getParameter("from"))); > newMessage.setRecipient(Message.RecipientType.TO, new InternetAddress(request.getParameter("to"))); > newMessage.setSubject(request.getParameter("subject")); > newMessage.setSentDate(new Date()); > newMessage.setText(request.getParameter("text")); > > transport = sendMailSession.getTransport("smtp"); > transport.send(newMessage); >%> > Your mail has been sent. > <% > } > catch(MessagingException m) > { > out.println(m.toString()); > } > %> > > > > > Tell me what i'm doing wrong? or if i have to do some other thing or use some other codes > > Regards, > T. Edison jr. > > > > > Are you a Hoboe? Hobnob at http://www.hoboe.com > Click here -> http://www.hoboe.com Global Mail Access > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JDBC connection
> Class.forName("sun.jdbc.odbc.JdbcOdbcDrive"); may be you have fallen prey to a typo error by missing out on the alphabet 'r':-). The above should be changed to : Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Sharon Om <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 12, 2001 1:53 AM Subject: JDBC connection > Hello. I have the following code for connecting to the jdbc:odbc pool. > While compiling the Java code, I keep getting an "ClassNotFoundException" in > Class.forName. > I also tried declaring Class T and have T.forName. I get the similar error > for "T.forName". How can I get this to work? > > Thank you for your help. > Sharon > > package property; > > > import java.sql.*; > import java.io.Serializable; > > public class database implements java.io.Serializable > { > > public database() { > > } > > public String runSql() > { > String browserOutput = ""; > Connection sqlca = null; > Statement sqlStatement = null; > ResultSet myResultSet=null; > > > /*Connect to database, run SQL and produce output */ > > try { > /* Connection to the database */ > Class.forName("sun.jdbc.odbc.JdbcOdbcDrive"); > String theDatabase = "jdbc:odbc:loadtool"; > sqlca = DriverManager.getConnection(theDatabase,"loadtool","loadtool"); > } > catch (SQLException e) { > > browserOutput = "Error:SQL error of: "+e.getMessage(); > } > > return browserOutput; > } > > } > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Login Page Problem???
On top of every jsp page which requires the user to be logged in, you could check to see if the user is logged in by getting the relevant attribute from the session. If he is logged on you could allow him to proceed further if not redirect the user to the logon page. In case you are using the MVC architecture you could just add the above check in the controller Servlet. Just in case, if you are not aware of the MVC architecture refer to the lists archives. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Ruaidhrí Fernandes <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 6:57 PM Subject: Re: Login Page Problem??? > Hi, > ok, so on my main login page, if the user has a valid > username and password, then I create a session and > store his username in the session and on my log out > page I remove this from the session. But what check > should i perform on pages to see if the the user has > logged in or not? Like after a user logs out using the > log out page and the hits the back button, they should > not be allowed to see the previous pages because they > have logged out.How can I chack this? > thanks > Rui > --- Patrick Pierra <[EMAIL PROTECTED]> > wrote: > > I'm not sure, but i'have operated like that for my > > application. You have to > > create a logout link. When the user click on it, the > > user object stored in > > session is removed. > > > > <%@ page import= "lds.gui.user.User" %> > > > > <% > > User tUser = > > (User)session.getAttribute("user"); > > if ( tUser != null) > > session.removeAttribute("user"); > > %> > > > > > > > > Patrick PIERRA > > > > > > > > Ruaidhrí Fernandes > > >[EMAIL PROTECTED] > > YAHOO.COM> cc: > > Sent by: A mailing > > Subject: Login Page Problem??? > > list about Java > > Server Pages > > specification and > > reference > > <[EMAIL PROTECTED] > > UN.COM> > > > > > > 05/11/01 02:40 PM > > Please respond to A > > mailing list about > > Java Server Pages > > specification and > > reference > > > > > > > > > > > > > > Hi, > > I have a login page that lets a user enter his/her > > username and password. If valid it takes them to a > > page where they can administer a table in their > > database using form fields. > > My question is, if another user comes along after > > somebody has been logged in,and presses the back > > button or forward button on the browser and gets > > passed the login page to see the administraion page > > , > > how can I stop this. > > Could anyone tell me how I can stop this from > > happening. I'd like to use sessions but i'm not sure > > on how to go about it. > > Thanks > > Rui > > > > = > > "If a rabbit's foot is so lucky,. what happened > > to the rabbit?" > > > > __ > > Do You Yahoo!? > > Yahoo! Auctions - buy the things you want at great > > prices > > http://auctions.yahoo.com/ > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > > body: "signoff > > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: > > "set JSP-INTEREST > > DIGEST". > > 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". > > For digest: mailto [EMAIL PROTECTED] with body: > > "set JSP-INTEREST DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://ww
Re: response already commited
Post the entire code of your jsp. Its quite possible that the problem code lie somewhere else. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Patrick Pierra <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 2:54 PM Subject: response already commited > Hello, > > I' try to create an Object in a JSP : > > <% > User tUser = new User(); > .. > %> > > When i run this JSP on Tomcat i receive this error message : > > Error: 500 > Location: /odata1/Registration.jsp > Internal Servlet Error: > java.lang.IllegalStateException: Response has already been committed >java.lang.Throwable(java.lang.String) >java.lang.Exception(java.lang.String) >java.lang.RuntimeException(java.lang.String) >java.lang.IllegalStateException(java.lang.String) >void > org.apache.tomcat.core.HttpServletResponseFacade.sendError(int, > java.lang.String) >void > org.apache.jasper.runtime.JspServlet.unknownException(javax.servlet.http.Htt pServletResponse, > > java.lang.Throwable) >void > org.apache.jasper.runtime.JspServlet.service(javax.servlet.http.HttpServletR equest, > > javax.servlet.http.HttpServletResponse) >void > javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, > javax.servlet.ServletResponse) >void > org.apache.tomcat.core.ServletWrapper.handleRequest(org.apache.tomcat.core.R equest, > > org.apache.tomcat.core.Response) >void > org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request , > > org.apache.tomcat.core.Response) >void > org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.a pache.tomcat.service.TcpConnection, > > java.lang.Object []) >void org.apache.tomcat.service.TcpConnectionThread.run() >void java.lang.Thread.run() > > > any explication ? > > Patrick PIERRA > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: package not found
Not really. If the web app can find the class with a help of a fully qualified class name there is no way it can find it with an import statement. The only thing that might happen is that you would get two error messages instead of one. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Amarnath N <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 9:36 AM Subject: Re: package not found > import the class and try..i hope u will get it > - Original Message - > From: "Sharon Om" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, May 11, 2001 7:10 AM > Subject: package not found > > > > Hello. I am just a beginner in JSP and I am having a little bit of > trouble > > instantiating a bean. > > My bean1.java is contained in a package called "property" and I am calling > > the bean in my JSP file called LTMerch.jsp using the following line: > > > > > > > > > > I get the following error and I am unable to find out why. All the files > > seem to be in place. (bean1.class is in the property folder...). > > > > org.apache.jasper.JasperException: Unable to compile class for > > > JSPC:\Apache\jakarta-tomcat\work\localhost_8080%2Fexamples\_0002fJSP_0002fLT > > Merch_0002ejspLTMerch_jsp_0.java:72: Class property.bean1 not found. > > property.bean1 myBean = null; > > ^ > > > > Could someone please help me pointing out what might be my problem? > > Thank you. > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: package not found
It looks that the web application can't find your bean. Where have you placed it ? You need to place it in the /WEB-INF/classes or /WEB-INF/lib (if its in a .jar file) folder so that your web app can find it. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Sharon Om <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 11, 2001 7:10 AM Subject: package not found > Hello. I am just a beginner in JSP and I am having a little bit of trouble > instantiating a bean. > My bean1.java is contained in a package called "property" and I am calling > the bean in my JSP file called LTMerch.jsp using the following line: > > > > > I get the following error and I am unable to find out why. All the files > seem to be in place. (bean1.class is in the property folder...). > > org.apache.jasper.JasperException: Unable to compile class for > JSPC:\Apache\jakarta-tomcat\work\localhost_8080%2Fexamples\_0002fJSP_0002fLT > Merch_0002ejspLTMerch_jsp_0.java:72: Class property.bean1 not found. > property.bean1 myBean = null; > ^ > > Could someone please help me pointing out what might be my problem? > Thank you. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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, custom taglibs, parse error in jsp page
It looks there is a problem with the .tld file of your custom tag library. Either check your tld file and if you can't still the solution post the relevant code to this list, i'm sure somebody will be able to help you. Its always makes the job of the guys on this list a lot easier if you post the code alongwith the error. Try to adopt the above approach and you shall surely benefit :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: cedric sk chin <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 12:11 PM Subject: help, custom taglibs, parse error in jsp page > hi guys, > > i desperately need some help here in these custom taglibs thing, coz i'm very new in writing taglibs, i didnt know what to do with the following error: > > can anyone shed some light on this? or tell me what does the following error imply? > > thanks and best regards, > ced > > javax.servlet.ServletException: Parse Error in JSP page: Error parsing TLD '/WEB-INF/loginvalidate.tld': null. > allaire.jrun.jsp.ParseException: Error parsing TLD '/WEB-INF/loginvalidate.tld': null. > at allaire.jrun.jsp.JSPParser.directive(JSPParser.java, Compiled Code) > at java.lang.Exception.(Unknown Source) > at allaire.jrun.jsp.ParseException.(ParseException.java, Compiled Code) > at allaire.jrun.jsp.JRunTagLibraryInfo.(JRunTagLibraryInfo.java, Compiled Code) > at allaire.jrun.jsp.JSPParser.directive(JSPParser.java, Compiled Code) > at allaire.jrun.jsp.JSPParser.parse(JSPParser.java, Compiled Code) > at allaire.jrun.jsp.JSPParser.writeXML(JSPParser.java, Compiled Code) > at allaire.jrun.jsp.JSPParser.generateXML(JSPParser.java, Compiled Code) > at allaire.jrun.jsp.JSPParser.generateXML(JSPParser.java, Compiled Code) > at allaire.jrun.jsp.JSPServlet.parsePage(JSPServlet.java, Compiled Code) > at allaire.jrun.jsp.JSPServlet.createServlet(JSPServlet.java, Compiled Code) > at allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java, Compiled Code) > at allaire.jrun.jsp.JSPServlet.service(JSPServlet.java, Compiled Code) > at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code) > at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java, Compiled Code) > at allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav a, Compiled Code) > at allaire.jrun.servlet.JRunSE.service(JRunSE.java, Compiled Code) > at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java, Compiled Code) > at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java, Compiled Code) > at allaire.jrun.ThreadPool.run(ThreadPool.java, Compiled Code) > at allaire.jrun.WorkerThread.run(WorkerThread.java, Compiled Code) > > __ > Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 extend a class in jsp.
Nice thought. But for all practical purposes this is not regarded as the best approach. A lot has been discussed on this mailing list about the pros and cons involved in extending a jsp. Do search the list archives. In short doing the above limits the jsp engine's capability to optimize the execution of the jsp for performance gains. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: A Stephen <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 1:57 AM Subject: How to extend a class in jsp. > How do i extend a class in jsp , so that i would not have to deal with a > class some one else has written. > Thanks in advance, > Cheers!! > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: sendRedirect from jsp page
Just use : response.sendRedirect("url of the resource that you wish to redirect the client"); It would greatly help you as well as the list if you use Servlet and Java Server Pages API documentation as a reference. Just an oipinion :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: drew w <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 09, 2001 10:55 PM Subject: sendRedirect from jsp page > Do I have to build a function: > public abstract void sendRedirect(String location) throws IOException > > if so how can I invoke it from jsp? > > > thanks, > andrew > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: JSP and Applets
You would need to create a URLConnection to the resource and then open an ObjectInputStream to get the Vector object. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Tello, Fredy Ramiro <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 5:12 AM Subject: JSP and Applets > Hi, I need to recive a Vector Object in a applet; the Vector is created in a > JSP; can anybody help me please?? > > Thanks, regards > > Freddy Tello > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: sending emails
Yes it surely can be done. Try out the demo at the below mentioned url. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Warty, Koustubh <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 1:48 AM Subject: sending emails > Hello , > In my application suppose the customer places an Order through a JSP page by clicking on the "Submit Order" button. Is it possible to send an automatic email response back to the client giving him his order details ?? > > Please do let me know . > > thanks, > - Koustubh > > > > > > > > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > >JSP-INTEREST". > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > >DIGEST". > >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". > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > >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 > > > > Are you a Hoboe? Hobnob at http://www.hoboe.com > Click here -> http://www.hoboe.com Global Mail Access > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Best book for JSP
I do agree with Jayson's comments ! Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Jayson Falkner <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 10, 2001 12:34 PM Subject: Re: Best book for JSP > Speaking of Professional JSP..Pro JSP 2nd edition was just released by Wrox. > > http://www.amazon.com/exec/obidos/ASIN/1861004958/ > > Using the beta Tomcat 4 release it covers JSP 1.1, JSP 1.2(based on pfd), > Servlets 2.2 and Servlets 2.3. I can only vouch for the first half I have > read, but so far I am very impressed. IMHO Pro JSP 2 would currently be best > JSP title and does a heck of a good job on servlets too. > > Call me biased, but those cover pictures have some handsome fellows! > > P.S. I like JSP Insider too :) Check it out for free JSP material! > > Jayson Falkner > V.P./CTO, Amberjack Software LLC > [EMAIL PROTECTED] > www.jspinsider.com > > - Original Message - > From: "Crisalyn Ramos" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, May 09, 2001 5:58 PM > Subject: Re: Best book for JSP > > > > Benjamin, > > > > Try Profession JSP by Wrox! Great Book! Also try to visit > www.jspinsider.com > > a great site to get great articles and sample codes for JSP. > > > > God bless! > > > > Crisalyn > > > > > > >From: "Nevarez, Benjamin" <[EMAIL PROTECTED]> > > >Reply-To: A mailing list about Java Server Pages specification and > > > reference <[EMAIL PROTECTED]> > > >To: [EMAIL PROTECTED] > > >Subject: Best book for JSP > > >Date: Wed, 9 May 2001 17:34:13 -0700 > > > > > >Please recommend me the best book for servlets and the best book for JSP. > > > > > >Thanks, > > > > > >Benjamin > > > > > > >=== > > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > >JSP-INTEREST". > > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > > >DIGEST". > > >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 your FREE download of MSN Explorer at http://explorer.msn.com > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Folder
application.getRealPath("url of the virtual path"); Sometimes a quick search in the archives or a look at the Api can get you the solution as well :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Tom Troonbeeckx <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 09, 2001 1:23 PM Subject: Folder > Hi there, > > Do you hava any idea how i can recall the folder-path with a java-method > where the application is running in? > > e.g. > The index.jsp is open in a browser, but is stored in the server in the > following path "/home/sites/site33/index.jsp".How can I retrieve this path > with a java-method? > > Thx in advance! > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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 somebody tell me if there is a way to automatically invalidate a session variable?
session.removeAttribute("Name of the session attribute"); It's a good practice to refer to the relevant java docs before posting a query to the list. Just an opinion :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Lorena Carlo <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001 11:00 PM Subject: Can somebody tell me if there is a way to automatically invalidate a session variable? > Hello all, > > Can somebody tell me if there is a way to automatically invalidate a session > variable?, not the whole session, just a variable, please answer me. > > Thanks in advance, > > Lorena Carlo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: PROBLEM-Changes in included pages not updating?
Nice Suggestion. But do understand the effects of replacing a compile time include with a runtime include. It might be a little helpful during your production phase but would surely add a burden of runtime evaluation when you deploy your web application, specially if your web app doesnot require the use of run time evaluation. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Ashish Shrestha <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 07, 2001 7:13 AM Subject: Re: PROBLEM-Changes in included pages not updating? > Hi! > > I believe you used the include directive to include a file. > <%@ include ... %> includes the file and then compiles it > into servlet. So if you want the changes in the included > file to be reflected you need to change the date of the main > file using utilities like touch or making dummy changes as > you mentioned. > > If don't want to do this and want you changes to reflect > immediately, use > > > Ashish > -- > a s h i s h @ j d g n p . o r g > Get Headlines 0.5.2 for free at > http://headlines.sourceforge.net/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Problem in Jswdk-1.0
It would be nice if you used Tomcat instead of the jswdk. Thats the latest reference implementation for Java Servlets and Java Server Pages being supported by Sun Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: kumar seema <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, May 05, 2001 1:44 PM Subject: Problem in Jswdk-1.0 > Hi all !! > I am new in JSP and am facing the following problem. > While trying to open a JSP page using jswdk-1.0, I get > the following error message : > " Package com.sun.jsp.runtime not found" > Could anybody tell me where this package can be > downloaded from. > Please help as this is highly urgent. > > Thanks in Advance... > Seema > > __ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Application wide data globals
Nice Question ! As far as i'm concerned i'd go for the third option as it would be easier to access it from any other resource of the web application. Just my opinion :-) Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Gerry Scheetz <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 8:03 PM Subject: Application wide data globals > Hello group, > > I am coding a web application using the MVC design. My controller is a servlet. My model are some JavaBeans and a couple Java classes to access the database. My view is JSP files. I have a couple values that are constant throughout the application like application title and length of time before a password expires. These values are accessed within JavaBeans and within JSP files. I can think of about 3 ways I can code this, > 1) JavaBean put in the application scope (tough to retrieve in another JavaBean) > 2) Singleton class (trying to minimize code in JSP and this takes a couple of lines) > 3) class with all static variables and functions (just unfamiliar with this, I guess) > > Anyway in this whole development effort, I am also setting up standards for our team to code to in the future, so I want to do this right the first time. Advise on which of my options to pursue or is there a better option? > > Thanks, > > > Gerry Scheetz > Web Application Development > Global Information Technology Division > TRW - S&ITG > Helena, Montana, USA > [EMAIL PROTECTED] > (406) 594-1878 > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: implementing custom tags
Well that piece of code should work. Maybe there is a bug in the jsp container that you are using. It works on Tomcat 4.0 Milestone 5. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: erik morton <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, May 04, 2001 12:47 AM Subject: implementing custom tags > Hello. > > We are implementing the setPageContext method and then later writing to > the output stream in the doStartTag method. When we test for null in the > doStartTag Method we find out that the pageContext is null. What are we > missing here? Any ideas would be great. Thanks. > // > public void setPageContext(PageContext pc) { > this.pageContext = pc; > } > > public int doStartTag() { > if(this.pageContext == null) System.out.println("I don't get > it!"); > } > // > erik > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Difference between bean.field and
I have repeated it a few times and would do it once again :-). Do post your complete source code alongwith the problem you are facing. Its not easy for anyone to guess the exact source code you have written by only knowing the problem you are facing. This would surely help you to get a solution from the list. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Jann VanOver <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 4:52 AM Subject: Re: Difference between bean.field and > I'm not sure why it isn't working, but to be a "good" bean, your attributes > contract_id and payment_method should be private, not public. This answers > your original question -- beanname.propertyname because the latter does an end-run around the bean. > > > > -Original Message- > From: BERWART Thierry [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 26, 2001 12:15 AM > To: [EMAIL PROTECTED] > Subject: Re: Difference between bean.field and name="bean " property="field" /> > > > Hi, > > I have already tested it but without success :/ > > when I use > " > > > it displays nothing in my textedit > but when I use directly contract.payment_method, it works !!! > > Any ideas ? ;) > > Thierry > > -Message d'origine- > De : Rishabh Agarwal [mailto:[EMAIL PROTECTED]] > Envoyé : jeudi 26 avril 2001 8:51 > À : [EMAIL PROTECTED] > Objet : Re: Difference between bean.field and name="bean " property="field" /> > > > U have the method as getPayment_method(). U have to use: > > " name="contract" property="Payment_method" />" > > to get the correct value. Lemme know if it doesn't work. > > Rishabh. > > -Original Message- > From: BERWART Thierry > [mailto:[EMAIL PROTECTED]] > Sent: Thursday, April 26, 2001 2:27 PM > To: [EMAIL PROTECTED] > Subject:Difference between bean.field and > > > Hello, > > I have a JSP page and a bean. > When I want to display some fields of this bean for > editing, > > I used this : > > " name="contract" property="payment_method" />" > > > but it display nothing as if "payment_method" is null or > is > "". > > I change this code with this : > > " > SIZE=30 MAXLENGTH=40> > > and it's working !!! it displays the value of the > "payment_method" field > > Do you have an idea ? > What is better to use ? bean.field or > ??? > > > Thanks you > > Thierry > > > PS : > > A part of my bean : > > public class Contract { > > file://attributes > > private StringBuffer error_message = null; > > public Integer contract_id; > . > public String payment_method; > . > > public String getPayment_method() > { > return payment_method; > } > public void setPayment_method(String > newPayment_method) > { > payment_method = newPayment_method; > } > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: 3 classes in same dir can't see each other
It looks that you are trying too hard and too much to get your source code working. This has happened with everybody at sometime or other. Give yourself some time, relax if possible. And to get some assistance from this list, post the source code of your .java files as well as the classpath settings and your directory structure in which the files are present. Be sure someone out here would surely help you :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: drew w <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 02, 2001 3:03 AM Subject: 3 classes in same dir can't see each other > I am trying to reference one class file from another but for some reason it > isn't working. > I have set the CLASSPATH to point to this dir. > I have set the PATH to point to this dir. > I have put "package project;" at the top of each one. > I have even tried "import Person;" which is the name of the class file. > > Any ideas are very much appreciated? > > > thanks, > andrew > _ > Get your FREE download of MSN Explorer at http://explorer.msn.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: redirecting to same servlet
Well it be great if you could post your code to the list. It would help you generate a better response from the list with regards to the solution to your problem and maybe a better approach to handling your requirement. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Erwin <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 28, 2001 3:39 PM Subject: redirecting to same servlet > Hi everyone > > What is the best way to redirect a servlet to the same servlet? > When I tried it by a simple sendRedirect, it worked, but none of the > attributes I set in the session during the first call of the servlet were > available in the second call. It works fine if I redirect to some other > servlet. > > What I'm trying to do is this: I have a servlet which acts as a > 'Controller.' It accepts a path info which tells it to do some work. I dont > want the user to bookmark this url, so I'd like to change the address in > his browser to some other url (referring to the same Controller servlet, > but a different path info). I thought a redirect would be just great, but > the session attributes are acting funny. > > If I made sense to anyone, please advice. > Thanks in advance. > > Erwin > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: cookie problems
The piece of code that you have supplied to the list is working fine. Maybe the error is being generated due to some other lines of code. A post of the entire jsp file to the list would surely get you a solution from this list :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Charles Luo <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 4:17 PM Subject: cookie problems > Dear mailinglist, > > Currently, I am trying to use cookies to store data about site visitors' > actions. > > the logic is that > > Cookie[] cookies=request.getCookies(); > > if (cookies==null || cookies.length==0) { > aCookie=new Cookie(key,"0"); > aCookie.setMaxAge(60*10); // expires after 10 minute > response.addCookie(aCookie); > } > > ... do somthing here ( modifying the value of key: for example 0 -> 1) > > and then > > for (int i=0; i if (cookies[i].getName().equals(key)){ > cookies[i].setValue("1"); > cookies[i].setMaxAge(60*30); // expires after 30 minute > response.addCookie(cookies[i]); > } > > > > When I first run this jsp, it works fine and on the second time, I got some > exceptions thrown > > Mon Apr 23 11:40:34 BST 2001: exception > raised on '/polling/bepoll.jsp' > java.lang.NullPointerException > at jsp_servlet._polling._bepoll._jspService(_bepoll.java:230) > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java > :123) > at > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp > l.java:761) > at > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp > l.java:708) > at > weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext > Manager.java:252) > at > weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:346) > at > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246) > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135) > > > > Has any one got this kind of response before? Any comments will be > appreciated. > > Cheers, > Charles > -Original Message- > From: Sachin S. Khanna [mailto:[EMAIL PROTECTED]] > Sent: 23 April 2001 07:54 > To: [EMAIL PROTECTED] > Subject: Re: vs <%= bean.getXxx %> > > > The following extract from the jsp1.2 specification clarifies the behaviour > witnessed by you :: > > "The value of the name attribute in jsp:setProperty and jsp:getProperty will > refer to an object that is obtained from the pageContext object through its > findAttribute() method. > > The object named by the name must have been "introduced" to the JSP > processor using either the jsp:useBean action or a custom action with an > associated VariableInfo entry for this name. > > Note: a consequence of the previous paragraph is that objects that are > stored in, say, the session by a front component are not automatically > visible to jsp:setProperty and jsp:getProperty actions in that page unless a > jsp:useBean action, or some other action, makes them visible. " > > Based on the above if you add the following line of code to your jsp > it should generate the output you are looking for : > pageContext.setAttribute("invoice",invoice); > > This line of code should come inside the for loop of your jsp and after the > following line of code : > invoice = invoices[i]; > > Assume this helps :-). > Have a nice day. > With regards, > Sachin S. Khanna > http://www.emailanorder.com > - Original Message - > From: Gerry Scheetz <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, April 22, 2001 4:50 AM > Subject: vs <%= bean.getXxx %> > > > > I have a JSP file that is > > > > <%@ page import="ChildCare.InvoiceBean" > contentType="text/html;charset=ISO-8859-1" %> > > > > <% InvoiceBean[] invoices = > (InvoiceBean[])session.getAttribute("invoices"); %> > > > > <% > > for (int i=0; i< invoices.length; i++) { > >invoice = invoices[i]; > > %> > > > > > > > > <%= invoice.getInvoiceNumber() %> > > > > > > <% > > } > > %> > > > > > > > > > > My bean code is > > > > package ChildCare; > > > > public class InvoiceBea
Re: new to java desperately need help
Well just type the following line java Countdown 3 You should see the following output : 3 2 1 Assuming you have compiled the source file (Countdown.java) to a class file (Countdown.class) using the javac compiler :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Marshall, Katyann <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 23, 2001 9:38 PM Subject: new to java desperately need help > I'm trying some simple java code I'm getting directly from a book, the code > looks as follows, it's running fine how do I see the output, a co worker > told me that I'm using inner class in the code but I'm not too sure what he > meant, can some on look at this code and tell me what I'm missing to see the > output. > here is the code > > class Countdown { > > public static void main(String args[]) { > int i = Integer.valueOf(args[0]).intValue(); > for(int j= i; j>0; j--) > System.out.print(j + " "); > System.out.print("\u0007"); > } > } > > > thanks > Katyann > > > > -Original Message- > From: Sainz de Murieta [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 23, 2001 11:34 AM > To: [EMAIL PROTECTED] > Subject: > > > A tomcat specific question: > > Im using Tomcat 3.2 on Windows 2000. It's working fine when I start and stop > it > manually (I mean, executing the scripts in /bin). But it doesn't work if I > install it as a service. All my paths on the wrapper.properties seem to be > ok. > I install it as server; just after starting it, it stops again writing the > file > jvm.stderr with the following content: > > java.lang.NoClassDefFoundError: de > Exception in thread "main" > > > Does anybody know what my problem could be? > > Cheers, > Iñaki. > > - > This message was sent using Endymion MailMan. > http://www.endymion.com/products/mailman/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: iplanet -jsp problem urgent, please help!!!!
Its always better if you post the code alongwith the explanation of the problem to the list for a quicker and a better answer to your query. I assume you will agree that to guess the your code from the explanation of your problem and then finding a solution for it is not going to be very easy for this list. Just an opinion :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: charu gupta <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 24, 2001 7:48 AM Subject: iplanet -jsp problem urgent, please help > Hi , > I am using jsp, oracle 8 on win nt platform with > iplanet as the web server. > The application is a simple login page which verifies > a user account that is the user name and the password. > > till sometime back everything was working fine, then > suddendly the application started bombing. "Page > cannot be displayed" message shows up whenever the > user enters the username and password and hits enter. > on hitting enter the information is checked from the > database. > Since in my code I was not closing the connection so I > thot the web server must have exhausted all the d/b > connections so i shut down and strated the server > again but the problem is still there. > > please help! > > > __ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: vs <%= bean.getXxx %>
The following extract from the jsp1.2 specification clarifies the behaviour witnessed by you :: "The value of the name attribute in jsp:setProperty and jsp:getProperty will refer to an object that is obtained from the pageContext object through its findAttribute() method. The object named by the name must have been "introduced" to the JSP processor using either the jsp:useBean action or a custom action with an associated VariableInfo entry for this name. Note: a consequence of the previous paragraph is that objects that are stored in, say, the session by a front component are not automatically visible to jsp:setProperty and jsp:getProperty actions in that page unless a jsp:useBean action, or some other action, makes them visible. " Based on the above if you add the following line of code to your jsp it should generate the output you are looking for : pageContext.setAttribute("invoice",invoice); This line of code should come inside the for loop of your jsp and after the following line of code : invoice = invoices[i]; Assume this helps :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Gerry Scheetz <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, April 22, 2001 4:50 AM Subject: vs <%= bean.getXxx %> > I have a JSP file that is > > <%@ page import="ChildCare.InvoiceBean" contentType="text/html;charset=ISO-8859-1" %> > > <% InvoiceBean[] invoices = (InvoiceBean[])session.getAttribute("invoices"); %> > > <% > for (int i=0; i< invoices.length; i++) { >invoice = invoices[i]; > %> > > > > <%= invoice.getInvoiceNumber() %> > > > <% > } > %> > > > > > My bean code is > > package ChildCare; > > public class InvoiceBean implements Serializable{ > int invoiceNumber; > > /** >* Constructor >*/ > public InvoiceBean() { > } > > public int getInvoiceNumber() { > return invoiceNumber; > } > > public void setInvoiceNumber(int newInvoiceNumber) { > invoiceNumber = newInvoiceNumber; > } > } > > I get a 0 returned from > and I get the invoice number from <%= invoice.getInvoiceNumber() %> > > I am using Tomcat as my servlet container and JSP engine, apache is my web server. > > Any idea on why I do not get the invoice number using the getProperty command? > > Side note, why do I have to specify my package name (ChildCare) in the useBean command since I included it in > my page directive. > > Thanks, > > > > Gerry Scheetz > Web Application Development > Global Information Technology Division > TRW - S&ITG > Helena, Montana, USA > [EMAIL PROTECTED] > (406) 594-1878 > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Running dos native commands from java application...
Couple of things : a) Maybe you are using an older version of the jdk. b) If thats not the case it would be better for you as well as the list if you posted the code alongwith the errors. So that people on the list donot have to spend time in comprehending what code you have written. Just a suggestion :-). Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: CHAKCHOUK, Anis <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 10:04 PM Subject: Re: Running dos native commands from java application... > hi, > help please: > Java Server Page Translation Error > Error during compilation : > C:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_list.java:99: Class > pagecompile.jsp.Iterator not found in type declaration. > Iterator i = v.iterator(); > ^ > C:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_list.java:99: Method > iterator() not found in class java.util.Vector. > Iterator i = v.iterator(); >^ > 2 errors > > > -Message d'origine- > De : Anis Kasmani [mailto:[EMAIL PROTECTED]] > Envoyé : lundi 9 avril 2001 21:01 > À : [EMAIL PROTECTED] > Objet : Re: Running dos native commands from java application... > > > Commands such as dir, copy etc would need to be executed as > > rt.exec("cmd /c dir"); > > do let me know if it worked for u. > > Anis > > > > - Original Message - > From: "Padmakar Neelapareddy" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, April 08, 2001 11:28 PM > Subject: Running dos native commands from java application... > > > > Dear All, > > > > I need to execute DOS native commnads such as "dir","copy","copy x.txt > > > prn"...etc > > from inside a java application. > > > > I tried them using following code > > > > Runtime rt = Runtime.getRuntime(); > > rt.exec("dir"); > > rt.exec("copy x.txt > prn"); > > > > But I got following exception > > > > java.io.IOException: CreateProcess: dir error=2 > > at java.lang.Win32Process.create(Native Method) > > at java.lang.Win32Process.(Unknown Source) > > at java.lang.Runtime.execInternal(Native Method) > > > > Can any one help me regarding this please ? I want it > > urgently...! > > > > Waiting for your valuable replies > > > > Rgds > > padmakar neelapareddy > > > > > > The information in this message is confidential and may be legally > privileged. It is intended solely for the addressee. Access to this message > by anyone else is unauthorized. If you are not the intended recipient, any > disclosure, copying, or distribution of the message, or any action or > omission taken by you in reliance on it, is prohibited and may be unlawful. > Please immediately contact the sender if you have received this message in > error. > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > 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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: problem with javamail
There doesn't seem to be any problem with your code.It ran fine. Have a nice day. With regards, Sachin S. Khanna http://www.emailanorder.com - Original Message - From: Raghu Movva <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 2:37 PM Subject: problem with javamail > Hi, > I have written a program using javamail. It is compiling correctly. But > when I am running the code it is giving the following error. Can any body > please figure it out. The error is "java.lang.Noclassdeffounderror > com/sun/mail/utilMailDateFormat. > I am sending the code also > > > import javax.mail.*; > import javax.mail.internet.*; > import java.util.*; > > public class SendEmail > { > public static void main(String[] args) > { > if (args.length != 6) > { >System.out.println("usage: sendmessage > "); >System.exit(1); > } > SendMessage(args[0],args[1], args[2], args[3], args[4], args[5]); > } > > public static String SendMessage(String emailto, String emailfrom, String > smtphost, String emailmultipart, String msgSubject, String msgText) > { > boolean debug = false; // change to get more information > String msgText2 = "multipart message"; > boolean sendmultipart = Boolean.valueOf(emailmultipart).booleanValue(); > // set the host > Properties props = new Properties(); > props.put("mail.smtp.host", smtphost); > // create some properties and get the default Session > Session session = Session.getInstance(props, null); > session.setDebug(debug); > try > { > // create a message > Message msg = new MimeMessage(session); > // set the from > InternetAddress from = new InternetAddress(emailfrom); > msg.setFrom(from); > InternetAddress[] address = > { > new InternetAddress(emailto) > }; > msg.setRecipients(Message.RecipientType.TO, address); > msg.setSubject(msgSubject); > if(!sendmultipart) > { > // send a plain text message > msg.setContent(msgText, "text/plain"); > } > else > { > // send a multipart message// create and fill the first message part > MimeBodyPart mbp1 = new MimeBodyPart(); > mbp1.setContent(msgText, "text/plain"); > // create and fill the second message part > MimeBodyPart mbp2 = new MimeBodyPart(); > mbp2.setContent(msgText2, "text/plain"); > // create the Multipart and its parts to it > Multipart mp = new MimeMultipart(); > mp.addBodyPart(mbp1); > mp.addBodyPart(mbp2); > // add the Multipart to the message > msg.setContent(mp); > } > Transport.send(msg); > } > catch(Exception e) > { System.out.println(e); > e.printStackTrace(); > } > return "Email sent to " + emailto; > } > > } > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Split in JSP?
The piece of code provided by you is fine except that wrong values would be assigned to the year and day variables. Just an observation :-). Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: N Hari Babu <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 12, 2001 2:33 PM Subject: Re: Split in JSP? > Hi yaya, > > use StringTokenizer class for splitting date. > > for example date: 12-04-2001. or 12-APR-01 > > then you have to write the code like this > > > StringTokenizer st = new StringTokenizer(date,"-"); > if(st.hasMoreTokens()) > { > year = st.nextToken(); > month = st.nextToken(); > day = st.nextToken(); > } > > > test above code. > > > regards, > Haribabu. > > > > > At 02:57 PM 4/12/01 +0700, you wrote: > >How can i split a date from database? > >i want to split year, month, and day , and then put them into variables. > >Please help me! > > > >Thank's > > > >-yaya- > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > >For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > >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". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Integer ?? String ?? - Can't find a method to write property 'age ' in a bean ...
Well in most probability it could be bug in Tomcat 3.2.1, because your code is working fine with tomcat 4.0 Maybe its time you upgrade to the tomcat 4.0 version :-). Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: BERWART Thierry <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 11, 2001 12:20 PM Subject: Re: Integer ?? String ?? - Can't find a method to write property 'age ' in a bean ... > Hello Alexandr > > Thanks you but that doesn't solve my problem :( > > I am using Tomcat-3.2.1 ... > It's perhaps a bug ? or ... I don't know :( > > Thierry > > -Message d'origine- > De : Alexandr Karimov [mailto:[EMAIL PROTECTED]] > Envoyé : mardi 10 avril 2001 19:15 > À : [EMAIL PROTECTED] > Objet : Re: Integer ?? String ?? - Can't find a method to write property > 'age ' in a bean ... > > > Everything is right :-). > > It means that your bean has a method "setAge(String p_age)". Attribute must > be a String type and you would use the next code: > >public void setAge(String p_age) > { > try { > age = Integer.parseInt(p_age); > }catch (Exception e){ } > } > > Best Regards, > Alexandr Karimov > > - Original Message - > From: "BERWART Thierry" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 10, 2001 2:55 PM > Subject: Integer ?? String ?? - Can't find a method to write property 'age ' > in a bean ... > > > > Hello > > > > I have a jsp and a bean : > > > > > > jsp > > > > > > > > > > > > > > > > > > > > > > Hello > > > > please enter your name and your email ... > > > > > > Name : > > > > Email : > > > > Age : > > > > > > > > > > <% if ( request.getParameter( "p_name" ) != null ) { %> > > > > > > Nom : > > > > > > Age : > > > > > > <% } %> > > > > > > > > > > > > > > > > bean > > > > > > import java.util.*; > > > > public class test_tbe > > { > > private String name=null,email=null; > > private int age; > > > > public test_tbe() > > { > > } > > > > public String getName() > > { > > return email; > > } > > > > public int getAge() > > { > > return age; > > } > > > > public void setName(String p_name) > > { > > name = new String(p_name); > > } > > > > public void setEmail(String p_email) > > { > > email = new String(p_email); > > } > > > > public void setAge(int p_age) > > { > > age = p_age; > > } > > > > } > > > > > > It's work but when I enter a String for the age, its generates an error. > > So I change the code in the bean with : > > > > public void setAge(String p_age) > > { > > try { > > age = Integer.parseInt(p_age); > > } > > catch(Exception e) > > { > > age=24; // by default > > } > > } > > > > it seems to be correct but when I try this example, I have this error : > > > > org.apache.jasper.JasperException: Can't find a method to write property > > 'age' in a bean of type 'test_tbe' > > at > > > org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibra > > ry.java:212) > > at > > > _0002ftest_0005ftbe_0002ejsptest_0005ftbe_jsp_0._jspService(_0002ftest_0005f > > tbe_0002ejsptest_0005ftbe_jsp_0.java:97) > > at > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > at > > > org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja > > va:177) > > at > > org.apache.jasper.servlet.JspServlet.serviceJspFile(J
Re: JSP - ArrayList Issues
Inside FormBean.java --- Instead of instantiating the PaintColor object in the no args constructor of the FormBean class, instantiate it in the setColor( String pColorCode, String pColorDesc) method and things should be looking up :-). Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Willy LEGIMAN <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 09, 2001 3:03 PM Subject: JSP - ArrayList Issues > Hi all, > > I've written a sample application to demonstrate the use of > and ArrayList/Iterator concepts in JSP. See code below. When I run the JSP > (which collects ColorCode & ColorDesc from a form and stores the data in an > ArrayList), it only shows the last item from the ArrayList on my JSP. Why is > this so? > > Regards > Will > > > <%-- > JSP to process Color information from Form > --%> > > <%@ page import="java.util.*,java.io.*" %> > > > <% > String pColorCode = new String(); > String pColorDesc = new String(); > > for (int i=0; i<100; i++){ > // Get Details > pColorCode = request.getParameter("pColorCode"+i); > pColorDesc = request.getParameter("pColorDesc"+i); > > FormBean.setColor( >pColorCode > ,pColorDesc > ); > } > > // Demonstrate use of Iterator... > Iterator objIterator = FormBean.LstColorRec.iterator(); > PaintColor objRec; > > while (objIterator.hasNext()) { > objRec = (PaintColor)objIterator.next(); > // Display Color Listing > out.print(objRec.getColorCode() + objRec.getColorDesc() +""); > } > FormBean.LstColorRec.clear(); > > %> > > --- > // FormBean Class > > import java.util.*; > import java.io.*; > > public class FormBean { > > public PaintColor colorRec; > public ArrayList LstColorRec; > > public FormBean() { > colorRec = new PaintColor(); > LstColorRec = new ArrayList(); > } > > public void setColor( > String pColorCode, > String pColorDesc > ) { > colorRec.setColorCode(pColorCode); > colorRec.setColorDesc(pColorDesc); > > // Add to LstColorRec arrayList > LstColorRec.add(colorRec); > } > > } > > --- > // Color Class > > import java.util.*; > import java.io.*; > > public class PaintColor { > > private String colorCode; > private String colorDesc; > > public PaintColor() { > colorCode = new String(); > colorDesc = new String(); > } > > public String getColorCode() { > return colorCode; > } > > public String getColorDesc() { > return colorDesc; > } > > public void setColorCode(String s) { > colorCode = s; > } > > public void setColorDesc(String s) { > colorDesc = s; > } > } > > --- > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Classloaders & JVM (was: Organizing Application Constants)
Then next logical question in this thread would be what is the procedure for having a seperate / dedicated jvm for every web app running in the webserver. Assuming the web apps are running with tomcat and apache. It would be great if someone could throw some light on the above. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Isaac Shabtay <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 07, 2001 2:31 PM Subject: Classloaders & JVM (was: Organizing Application Constants) > Hi, sorry for jumping in, but: > > > Or rather, the > > spec requires the platform to be implemented to use a different > > classloader for each application, to make it appear to the program > > that it's living in its very own JVM, and hence each application would > > have its own singleton. Check the 2.2 servlet spec and read up on > > "web applications". > > Actually, the JVM spec (1.2.2 & 1.3) forbids having two different copies of > the > same class under the same JVM, even if the copies were loaded using > different class loaders > (section 5.3.4, "Loading Constraints"). > Hence, the term "appear to the program that it's living in its very own JVM" > is not > very correct. In fact, it imposes a problem. Consider the following > scenario: > > I have two web applications inside a JVM. Each application has its own > classpath. > I have a JAR file that both should use. I copy it once to each application - > now I have > two copies of the JAR file, one inside each application's classpath. > > I want to replace a class that is found inside the JAR file, so the changes > will imply > only in application A. So, I go to A's claspath's JAR file and replace it. > Then - boom! > I have two different copies of the same class under the same JVM, then my > application server > throws me exceptions and I have to restart the whole thing. > > > - Isaac > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: internal server error
Create a Properties Object using the new operator instead of calling the System.getProperties() method. Maybe the SecurityManager is throwing an exception on System.getProperties() method, try using the System.getProperty(String property) method to access any required information. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Sivakumar Chiluvuri <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 07, 2001 2:34 PM Subject: internal server error > hi, > > iam trying to send mail using jsp, iam getting the following error > > javax.servlet.ServletException: access denied java.util.PropertyPermission * > read, write) > > url to my program: http://www.webappcabaret.com/aviskumar/MailForm.html > this form send (post) data to MailExample.jsp > (Note: iam using free jsp site webappcabaret.com ) > pl. help > > thanks > > siva kumar > > code for MailExample.jsp > > > > JSP JavaMail Example > > > > > <%@ page import="java.util.*" %> > <%@ page import="javax.mail.*" %> > <%@ page import="javax.mail.internet.*" %> > <%@ page import="javax.activation.*" %> > > <% > String host = "mail.webappcabaret.com"; > String to = request.getParameter("to"); > String from = request.getParameter("from"); > String subject = request.getParameter("subject"); > String messageText = request.getParameter("body"); > boolean sessionDebug = false; > > // Create some properties and get the default Session. > Properties props = System.getProperties(); > props.put("mail.host", host); > props.put("mail.transport.protocol", "smtp"); > > Session mailSession = Session.getDefaultInstance(props, null); > > // Set debug on the Session so we can see what is going on > // Passing false will not echo debug info, and passing true > // will. > mailSession.setDebug(sessionDebug); > > // Instantiate a new MimeMessage and fill it with the > // required information. > Message msg = new MimeMessage(mailSession); > > msg.setFrom(new InternetAddress(from)); > InternetAddress[] address = {new InternetAddress(to)}; > msg.setRecipients(Message.RecipientType.TO, address); > msg.setSubject(subject); > msg.setSentDate(new Date()); > msg.setText(messageText); > > // Hand the message to the default transport service > // for delivery. > Transport.send(msg); > > out.println("Mail was sent to " + to); > out.println(" from " + from); > out.println(" using host " + host + "."); > > %> > > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: accesing images from another server
http:\\www.geocities.com\somepage\someimage.jpg Use this http://www.geocities.com/somepage/someimage.jpg Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Antillon Reyes Rafael Martin - EXT <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 05, 2001 9:55 PM Subject: accesing images from another server > Hi all: > > When i run a JSP and in an has a source from another server > (i.e. c) it doesn´t > display the image, but if the image is local (i.e. > src="/images/someimage.jpg") > it does work. > > What´s keeping the jsp from displaying them? > because the source is ok, and if i copy the generated html > and save it and then open it, it works like a charm. > > what is wrong or what can i do? > > Thanx in advance. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: resultset & vector
Couple of things : a) Your MedewerkerBean doesn't seem to be in the classpath, hence it is not found. b) You need to cast the object to MedewerkerBean type after retrieving it from the Vector using the elementAt(int index) method of the Vector class. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Jasper de Barbanson <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 3:22 PM Subject: resultset & vector > Hi there, > > I'm doing something wrong, but I don't know how to solve this. I've put a > resultset in a vector, and I'm returning this vector to a JSP-page. Now I > get these 2 errors: > > - Type medewerkerBean was not found > - The type of the left-hand side in this assignment, "medewerkerBean", is > not compatible with the type of the right-hand side expression, > "java/lang/Object". > Does anybody know how to solve this problem? > > (perhaps this is a very simple question, but I'm new to Java Serverside > Programming) > > This is de JSP-page (i've removed unnecessary html-code): > > > <%@ page language="java" import="java.util.*" %> > > Testje > > > > <% > Vector vect = new Vector(); > vect = medewerkerBean.findMedewerker("SP_AlleMedewerkers"); > int size = vect.size(); > > for (int i=0; i { >medewerkerBean mwb = vect.elementAt(i); > %> > > <%= mwb.getPersoneelsnummer()%> > <%= mwb.getVoornaam()%> > <%= mwb.getAchternaam()%> > <%= mwb.getAdres()%> > <%= mwb.getPostcode()%> > <%= mwb.getWoonplaats()%> > <%= mwb.getGebdatum()%> > <%= mwb.getTelnummer()%> > <%= mwb.getEmail()%> > > <% > } > %> > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Object Serialization Between JSP and Servlet
As far as my understanding goes one possible solution could be Remote Method Invocation (RMI). Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Ganesh MohanRao <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 04, 2001 2:40 AM Subject: Object Serialization Between JSP and Servlet > This is what I wanted to do. > > I need to call the servlet from a JSP which connects to Database and > Retrieves the Data. > > Servlet needs to send the Data as Object. JSP needs to receive the Object > sent by the Servlet and display the > > data in a specific format. > > How do I do this Object Serialization between JSP and Servlet. > > Please help me with some sample code. > > Onemore thing, the JSP is not in the Same server where the Servlet resides. > JSP needs to call the Servlet which is residing in the Remote Server. > > > This is the Full Scenariao. > > DiplayData.jsp > { > Object obj = (Object) "http://servlet/DBServlet"; > Process the Data and Display the Page with the Data. > } > > DBServlet resides remote and it has to send the Data back in the form of > Object. > > Please help me > > > Ganesh > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Getting error in compilation of page
It seems you donot have a return statement in the body of the readEmployeeFile() method. We'd be able to help you further if you provide us with the relevant code. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Dan Lopez <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 03, 2001 8:16 PM Subject: Getting error in compilation of page > SortEmployee.java:129: Return required at end of > Edinc.empcompsys.EmployeePayInfo readEmployeeFile(). >private EmployeePayInfo readEmployeeFile() > > > -- > > Any suggestions? > > > Thanks > > > > __ > Do You Yahoo!? > Get email at your own domain with Yahoo! Mail. > http://personal.mail.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Are ArrayLists supported in JSP1.1?
Whether you can use ArrayList instead of Arrays would depend on the version of the JDK that you are using, nothing really to do with the JSP Specification. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: joe smith <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 28, 2001 11:14 PM Subject: Are ArrayLists supported in JSP1.1? > I'm using Tomcat 3.2.1, which supports servlet2.2 and JSP1.1. > > Are ArrayLists supported in JSP1.1? In my implementation, I would like to > use an ArrayList vs. an array. > > Thanks > > > __ > FREE Personalized Email at Mail.com > Sign up at http://www.mail.com/?sr=signup > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Application object
Do the following : Import the javax.servlet.* package in your bean. So that the interface ServletContext is available in your bean. >From your jsp pass the application object to your bean. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Marino Vittorio <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 28, 2001 5:41 PM Subject: Application object > How can I access the application object from inside a bean of my app? > Thanks > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: Tomcat + JavaMail
Yes the activation.jar and mail.jar should be in the classpath as well. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Nicholas Larsson <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 26, 2001 12:15 AM Subject: Tomcat + JavaMail > Hi > Hoe do I configure and use JavaMail with tomcat? > Do I need to put activation.jar and mail.jar in the webserver? > > file://nico > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: EJB trouble
In your code the debugger is trying to make you aware of a simple java error, nothing to do with EJB's. Calling a method named hello on a MyHelloWorldAccessBean object named bAcces which is null. It would surely throw a NullPointerException. Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: DIMINO David <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 26, 2001 1:30 PM Subject: EJB trouble > hello, > > this is my first message to the list, I'm new at Java and I'd like to > experiment the EJB's. > I work with VisualAge for Java (IBM) in the Websphere Test Environment. > > I've created an EJB group, MyHelloWorldGroup; an EJB (session), > MyHelloWorldBean and an access Bean, > MyHelloWorldAccessBean. > > I'd like to create a client class "MyHelloWorldClient" to test my EJB. > Here is the main method of this class: > > public static void main(java.lang.String[] args) > > { > try > { > String beanResult = null, ch = null; > ch = "lalalala"; > MyHelloWorldAccessBean bAcces = null; > beanResult = bAcces.hello(ch); file://hello(String param) that > only returns > file://param is a remote method of my > EJB. > > System.out.println("Retour de Bean Session: " + beanResult); > } > catch(Exception e) > { > System.out.println("Erreur: " + e.getMessage()); > } > } > > This code doesn't work, I don't understand why it opens the debugger with > the insert: > > beanResult = bAcces.hello(ch (java.lang.String) lalalala); > > Could someone help me please... > > Thanks. > > David. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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: absolute path
Call the getRealPath("your virtual path") method of the ServletContext interface. It would be nice for you as well as the mailing list if you look at the Servlet and Jsp Api documentation before posting your queries here :-). Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Manish <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 14, 2001 2:11 PM Subject: absolute path > hello > how can i get the absolute path of the documentroot(public_html directory) > of my web server thre a jsp. > i want the full path like > c:/dir1/dir2/dir3/public_html > thanx > manish > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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't find servlets
You don't need to add a / (slash) to the tag value. The correct syntax would be : CHT.Control.CHTcontroller Have a nice day. With regards, Sachin S. Khanna. www.emailanorder.com - Original Message - From: Ivan Handler <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 22, 2001 10:44 PM Subject: can't find servlets > I have an application that I am switching to MVC. I suspect my provider > has not configured my server correctly, but I have no idea. If anyone > has any insight on what I have done wrong or what could be wrong, I > would greatly appreciate it. > > I have a context declared in my server.xml (I am using Tomcat 3.2.x). I > declare my servlet in web.xml as follows: (the comment does not exist in > the original) > > > >CHTcontroller > > > Controller Servlet > > > /CHT.Control.CHTcontroller > > > > I also map the servlet as follows: > --- > > > CHTcontroller > > >/controller > > > -- > These constructions all work just fine with jsps (at least the ones I > can get to before the controller is invoked). I am also not able to get > through to any of the example servlets, so I think there is a > configuration error, but I do not know what it could be. I am also on a > virtual Linux host. > > btw, just to be clear I attempt to link to the servlet as follows > http://domain-root/context-root/controller > > Again, thanks for your time in advance. > -- > Ivan Handler > Networking for Democracy > [EMAIL PROTECTED] > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > 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". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". 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