Re: Happy Diwali Greetings
hmm, I know, this sort of discution has nothing to do here but i am very curious and i'd like to know what is Diwali !? :) Sorry, I'm french, so this should not happen her Thanks and ... even if I don't know what it is Have a happy Diwali :o) Venu Gopal a écrit : > Same to you all guys out here .. > > Venu > > --- Ujwala Joglekar <[EMAIL PROTECTED]> wrote: > > Wishing you a very Happy Diwali too > > > > -Original Message- > > From: Tripat Singh [SMTP:[EMAIL PROTECTED]] > > Sent: Wednesday, October 25, 2000 6:35 AM > > To: [EMAIL PROTECTED] > > Subject:Happy Diwali Greetings > > > > Hey Everybody, > > Wish you'll all a very > > Happy Diwali > > > > With best wishes, > > > > > > Tripat singh Kharbanda > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > > body: "signoff JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > > body: "signoff JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > __ > Do You Yahoo!? > Yahoo! Messenger - Talk while you surf! It's FREE. > http://im.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Bean - Unable to setProperty
I had already answer this mail ... here it is again :-) Hi, The property ShopperRefNo should use a lowerCase = shopperRefNowhich will call setter and getter method with an Uppercase. Concerning the form property (or any property in URL), the same rule is used. this will go over all the property passed in the request and, if a setter method exist in the Bean for the property it will call that method ...The property name should start with a lower case and the set Property method with an Upper case. Hope this help Regards Veronqiue Sushil Singh a écrit : > Hi, > > I am unable to setProperty for a bean, its giving error: > com.sun.jsp.JspException: "setProperty(shiptoBean): Cant Find the method > > for setting {1}" > > Following is the code snippet: > > > value="17338459"/> > > Bean code is something like this: > private String dbUser = ""; > private String shopper_refno = ""; > public void setDbUser(String user) { dbUser = user; } > public String getDbUser(){ return dbUser; } > public void setShopperRefNo(String shrfno) { shopper_refno = shrfno; } > > public String getShopperRefNo() { return shopper_refno; } > > Also I would like to know how to specify setProperty so that all the set > > methods of beans should be automatically filled by form parameter or if > url is called with paramters. > > Thanks, > > Sushil > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Bean: Unable to do setProperty
Hi, The property ShopperRefNo should use a lowerCase = shopperRefNowhich will call setter and getter method with an Uppercase. Concerning the form property (or any property in URL), the same rule is used. this will go over all the property passed in the request and, if a setter method exist in the Bean for the property it will call that method ...The property name should start with a lower case and the set Property method with an Upper case. Hope this help Regards Veronqiue Sushil Singh a écrit : > Hi, > > I am unable to setProperty for a bean, its giving error: > com.sun.jsp.JspException: "setProperty(shiptoBean): Cant Find the method > for setting {1}" > > Following is the code snippet: > > > value="17338459"/> > > Bean code is something like this: > private String dbUser = ""; > private String shopper_refno = ""; > public void setDbUser(String user) { dbUser = user; } > public String getDbUser(){ return dbUser; } > public void setShopperRefNo(String shrfno) { shopper_refno = shrfno; } > > public String getShopperRefNo() { return shopper_refno; } > > Also I would like to know how to specify setProperty so that all the set > methods of beans should be automatically filled by form parameter or if > url is called with paramters. > > Thanks, > > Sushil > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Why did the bean not invoked?
I don't know where your problem is but maybe your could put some trace in order to see which code is executed or no (using System.out.println("1");...) You should then localize the problem ... Chandhan Rangarajan a écrit : > Hi mNm > > I am having a problem exactly similar to yours... > Pls let me know if u find a solution to this. > > Thanks > > -Original Message- > From: mNm [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 12, 2000 2:00 AM > To: [EMAIL PROTECTED] > Subject:Re: Why did the bean not invoked? > > Hi, > Thanks. "\n" is perfect. > > For the classpath, package, and exception I did make sure that everything is > there. > I've also put the SOP statement, but nothing printed out. > > - Original Message - > From: "shravan" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, October 12, 2000 12:16 AM > Subject: Re: Why did the bean not invoked? > > > to move the text to next line use "\n" > > > > example > > String str = "Hello\nWorld"; > > > > this will print as > > Hello > > World > > > > > > comming to your bean invocation from jsp, check if is available in the > > classpath or not, check it is in the correct package or not, check if it > is > > not throwing any exceptions and if it not doing so then embed some SOP > > (print) statements so that it can print in case the bean is invoked, u can > > always comment out these once the bean and jsp page is working properly > > > > > > > > -Original Message- > > From: mNm <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > > Date: Wednesday, October 11, 2000 5:03 PM > > Subject: Re: Why did the bean not invoked? > > > > > > >I'm really stuck on this, I did whatever I could but still couldn't solve > > >the problem > > >Please help me on this. I really don't know why did the bean not invoked. > > >I tried to remove the Bean & JSP code, then I can see the HTML contents. > > >But, if I put on the Bean & JSP code back, > > >I can't see the HTML content. It just showed blank page. > > >I assume the bean is not invoked because I did not receive any emails. > > > > > >The purpose of this page is, after the user have registered from the > > >register page, it will redirect to this confirmation page and > > >from this page will be sent a confirmation message to the registered user > > to > > >make sure that their email is valid. > > >And also, I wanted to know how to put CRLF to separate the sentence per > > >line? > > >I remember in ASP we can do like this, > > >bodytext = "Dear user," & chr(13) & chr(13) > > >bodytext = bodytext & "Thank you for registering with us." > > >then the result should be like this, > > >Dear user, > > > > > >Thank you for registering with us. > > > > > > > > >Please correct me if I have something wrong in my code, > > > > > ><%@ page info = "Confirmation Page" %> > > > > > > > > > > > > > > > > > > > > > > > scope="page" > > > class="com.net.mail.mailBean" > > >/> > > > > > > > > > > > ><% > > > String to = request.getParameter("email_add"); > > > String fullname = request.getParameter("name"); > > > String mailhost = "mail1.nettaxi.com"; > > > String from = "[EMAIL PROTECTED]"; > > > String cc = ""; > > > String bcc = ""; > > > String subject = "Confirmation Message"; > > > String bodytext = "Dear " + fullname + ", "; > > > bodytext = bodytext + "In order to get your account activated, please > send > > >a reply from this message."; > > > bodytext = bodytext + "Thank you for registering with us."; > > > bodytext = bodytext + "Regards,"; > > > bodytext = bodytext + "Admin"; > > > > > > sendmail.initMail(from, to, cc, bcc, subject, bodytext); > > > if (sendmail.Sending(mailhost)) > > > { > > >%> > > > > > > > > >A confirmation message has been sent to your email. > > >Please check your mailbox. Thanks. > > > > > > > > ><% > > > } > > > else > > > { > > >%> > > > > > > > > >We are very sorry. A confirmation message has not been sent due to > some > > >problems. > > >Please send email to mailto:[EMAIL PROTECTED]" > > >ONMOUSEOVER="window.status='Contact Support'"> us > > > > > >with the subject as "MAUMUL-PROBLEM" if you would like to report the > > >problem. > > >We will get back to you as soon as possible. Thanks. > > > > > > > > ><% > > > } > > >%> > > > > > > > > > > > >Any help would be very appreciated. > > > > > >Thank you, > > >Muliawan > > >- Original Message - > > >From: "Sachin S. Khanna" <[EMAIL PROTECTED]> > > >To: <[EMAIL PROTECTED]> > > >Sent: Wednesday, October 11, 2000 2:27 PM > > >Subject: Re: Why did the bean not invoked? > > > > > > > > >> Couple of things assuming that you had posted the complete source code > : > > >> > > >> a) In your jsp page you haven't declared the mailhost variable which > you > > >are > > >> sending as a parameter while calling the sendmail.Sending(mailhost) > > >method. > > >> > > >> b) Your if block doesnot have a opening curly bracket but has a closing > > >> cu
Re: Problem with session scope
You could mame youtr page not cacheable, by setting the appropriated headers (I don't remember them just know but have a look in the archive this has been discussed many time) . Just be sure it works unde IE and netscpe (differents headers are supported for both). And you should also makes some verification in your code in order to reply an error message if the user try to delete a inexistant item. Hope this help regards Veronique prasanna ganesan a écrit : > Hi > Sorry if u have already got this.I am new to JSP.I am doing a shopping cart >application in JSP.I am having the cart bean in session scope and the cart bean has >got a vector which stores the items ordered.I am facing a problem with the Refresh >button.Suppose I delete some items from the vector through the UI I have provided I >get the new set of items in the cart.Now when I hit the Refresh button of the browser >the same data that was passed for the previous delete operation is used and I am >getting ArrayIndexOutOfBoundsException.My guess is that the request is cached >somewhere in the server and the cached request is used when I press Refresh >button.How do I prevent the server from caching requests.I am using Tomcat Apache >server.Any help would be greatly appreciated > > Thanks & RegardsPrasanna.G. > > ___ > Click here to get your free domain name > and personal portal from NAMEzero(TM): > http://www.namezero.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Please help me with this!
In your servlet : request.setAttribute("varName", varObj); req.getRequestDispatcher(res.encodeURL("TestScope.jsp")).forward(req,res); in TestScope.jsp VarType varJsp = (VarType) requets.getAttribute("varName"); Hope this help Regards veronique Lorena Carlo a écrit : > Hi everybody, > > Can somebody give me an example of declaring a variable in request scope > (servlet) in order to see it then in a JSP page?. > > Thanks in advance > > Lorena Carlo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: expiry of session in the web page
Hi, I had th esame problem, and I choose to force the login page to go top. herte is how i did this... Hope this help Mohan_Adikesavalu a écrit : > This mail got bounced back , so i am resending the same message.' > > > Hi , > > > > I have developed a web site with lots of frames . The user need to enter > > the user id and pwd in the initial page , once it is valid the it will go > > into site. > > > > I am storing the user name in the session. If the user is not browsing > > this site , then session gets expired. When session is expired i am > > redirecting the page to login screen. > > > > My problem , when session gets expired the login page is displayed in one > > of the frames which user as last browsed. Assume a web page is spilt into > > two frames ie (80% 20%) , now think how it looks. Basically it should > > display in full screen not in frames. > > > > The code i am using to redirect the page is > > > > HttpSession session = request.getSession (true); > > > > if (session.getValue("logon.isDone") == null) > > response.sendRedirect ("/login.jsp?session=false" ); > > > > > > Could anyway help me . > > > > Thanks > > Mohan.A > > > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: bean and jsp question
What do you mean by you want to run it once ?!! What is the scope of yor bean ? If you'd like to have the same behaviour as a constructor, the exemple i gave you should work. If your beans scope is session, the <% toto.init(arg1, arg2);%> will only be called the first time the will be seen in a session. Then , as the bean has already been created, this code won't be run again, even if the user come's back to the same page, within the same session ! It is the same with a scope application ... I'm not sure I answered your question this tome :) Don't hasitate to ask again ! Regards Veronique Mike Lai a écrit : > Hi Veronique, > > Thank you very much, that's exactly what I want to know. > One more question, if I use <% toto.init(arg1,arg2);%>, then it will be > coded into the jspService function, right? But I only want it to be called > once, can I use <%! toto.init(arg1,arg2);%> instead? > > Regards, > Mike > > -?©l¶l?ó- > ±H?ó??: Veronique Dupierris <[EMAIL PROTECTED]> > ¦¬?ó??: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > ¤é´Á: 2000¦~9¤ë26¤é PM 04:45 > ?D¦®: Re: bean and jsp question > > >If you want to use the useBean tag, your constructor should NOT have > argument. > >That's a part of the beans definition Of course you could find a > workaround. > > > ><% toto.init(arg1, arg2); %> > > > > > >The code between and is only executed > when the > >instance is created > > > >Hope this help > >Regards > >Veronique > > > >Mike Lai a écrit : > > > >> Hi, > >> > >> I just start learning jsp and java bean, please give me some hint. > >> > >> My question is: can a bean has constructor that takes argument? If yes, > >> how can I pass the argument using the tag to do it? > >> Thank you very much. > >> > >> Mike > >> > >> > === > >> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > >> Some relevant FAQs on JSP/Servlets can be found at: > >> > >> http://java.sun.com/products/jsp/faq.html > >> http://www.esperanto.org.nz/jsp/jspfaq.html > >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > >Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: bean and jsp question
If you want to use the useBean tag, your constructor should NOT have argument. That's a part of the beans definition Of course you could find a workaround. <% toto.init(arg1, arg2); %> The code between and is only executed when the instance is created Hope this help Regards Veronique Mike Lai a écrit : > Hi, > > I just start learning jsp and java bean, please give me some hint. > > My question is: can a bean has constructor that takes argument? If yes, > how can I pass the argument using the tag to do it? > Thank you very much. > > Mike > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: The JavaBean doesn't run... PART 2
I don't know how it should work in your case ( variable starts with Uppercase) Normally, the "Java programming way" says that all variables names should start with a lowerCase. So for Java beans you should have String name; and methods getName() and setName(string toto) So maybe just try with a lowercase for your variable name. Regards Veronique "Robuschi (Delfi)" a écrit : > I adjusted the code but the result is the same. Do you know why? > Please, help me! > > Thanks to everybody > > Roberto > > > file: bean4.java > > import java.io.*; > import java.util.*; > > public class bean4 { > > private String Name; > > public bean4() > {Name = "Roberto"; } > > public void setName(String value) > {Name = value; } > > public String getName() > {return Name; } > } > > > File prova.jsp > > <%@ page import="java.sql.*" %> > > > > > PROVA JAVABEAN > > > Nome = > <% > out.println(prova.getName()); > prova.setName("Gabriele"); > out.println(""+prova.getName()); > %> > > > > > Error Message: > > Error: 500 > Location: /examples/prova4.jsp > Internal Servlet Error: > > javax.servlet.ServletException: Cannot find any information on property > 'Name' in a bean of type 'bean4' > at > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp > l.java:386) > at > _0002fprova_00034_0002ejspprova4_jsp_4._jspService(_0002fprova_00034_0002ejs > pprova4_jsp_4.java:104) > 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.ja > va: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: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(Unknown Source) > > Root cause: > org.apache.jasper.JasperException: Cannot find any information on property > 'Name' in a bean of type 'bean4' > at > org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibra > ry.java:211) > at > _0002fprova_00034_0002ejspprova4_jsp_4._jspService(_0002fprova_00034_0002ejs > pprova4_jsp_4.java:86) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) > > Robuschi Roberto Delfi srl > P.za Ravenet 1/b - 43100 PARMA > Tel. 0521/932411 Fax 0521/989045 > [EMAIL PROTECTED] --- http://www.delfi.it > - Original Message - > From: "Alarcon Fabio" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, September 25, 2000 3:11 PM > Subject: Re: The JavaBean doesn't run... > > > Hi ! > > You must code correctly the action, so: > > not > ...> > > I hope It'll help you > > > > Best regards > > > > > > > > Fabio Alarcon Ortiz > > > > Seguro Social de Salud, Lima - Peru > > Gerencia Central de Desarrollo e Informatica > > Gerencia de Sistemas > > Phones : (51 1) 265 6000, 265 7000 Extensions 2356, 2357 > > Mobile : (51 1) 855 1393 > > ICQ: 11002875 > > email : [EMAIL PROTECTED], [EMAIL PROTECTED] > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some
Re: The JavaBean doesn't run...
In setProperty you have to use name attrute rto identify your bean : instead of That's why you have this error : > org.apache.jasper.JasperException: setProperty: Mandatory attribute name > missing Regards Veronique Yue Zhang a écrit : > Try using the same property name as your javabean does, that is: > , > > because both java and JSP are case sensitive. > By the way, don't forget to use '/' to end setPropertity tag. > > Alvin > > - Original Message - > From: "Robuschi (Delfi)" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, September 22, 2000 11:09 AM > Subject: The JavaBean doesn't run... > > > Hello everybody!! First of all, have a nice Weekend to everybody!! > > > > I have a problem in my friday afternoon: I'm tryin to set a property of a > > Javabean via JSP using the jsp:setproperty directive but it doesn't run. > > > > I think it should work but it isn't. Also trying a jsp:getProperty > directive > > returns a null pointer exception (error 500). > > > > Can anybody help me? Thanks very much to everybody > > > > Here's the listing: > > > > file CurrentTimeBean.java > > > > public class CurrentTimeBean { > > private int Hours; > > > > public CurrentTimeBean() > > {this.Hours = 0; } > > > > public void setHours(int value) > > {this.Hours = value; } > > > > public int getHours() > > {return Hours; } > > } > > > > > > file prova4.jsp > > > > > > > > > > > > It is now > > <%= time.getHours() %> > > o'clock > > > > > > > > > > ERROR IN BROWSER: > > > > Error: 500 > > Location: /examples/time.jsp > > Internal Servlet Error: > > > > org.apache.jasper.JasperException: setProperty: Mandatory attribute name > > missing > > at org.apache.jasper.compiler.JspUtil.checkAttributes(JspUtil.java:202) > > at org.apache.jasper.compiler.Parser$SetProperty.accept(Parser.java:720) > > at org.apache.jasper.compiler.Parser.parse(Parser.java:1073) > > at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) > > at org.apache.jasper.compiler.Parser.parse(Parser.java:1034) > > at org.apache.jasper.compiler.Compiler.compile(Compiler.java:182) > > 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.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(Unknown Source) > > > > > > Robuschi Roberto Delfi srl > > P.za Ravenet 1/b - 43100 PARMA > > Tel. 0521/932411 Fax 0521/989045 > > [EMAIL PROTECTED] --- http://www.delfi.it > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Javascript(JSP) ???
Try maybe to remode the quotes of the href tag .. It may thing the end is at : name =" ... ) > or sufi malak a écrit : > Hi, could you please tell me why this code is wrong, or why a function > Javascript can not have > as argument > Is there any solution, > Thanks , your help will be appreciated. > > for (int i=0; i < concepts.length; i++) { > concept = concepts[i]; > %> > property="id_number"/>)"> > > > <% } %> > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: problem with scope in
This will set the bean with session scope not application scope ! Session scope = one instance by session (user) and application is one instance for all ...It depends what you really want : For application scope, use , this will create an instance the first time and then user the already created instance ... Hope this help Veronique Pranav Bansal a écrit : > hi, > you have to use > scope="session"/> > regards, > Pranav Kumar > Software Engineer > Informica India Pvt. ltd. > Noida,India > Phone: -91-118-4514702 > www.informica.com > - Original Message - > From: RAJESH SINGHANIA <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, September 20, 2000 9:11 AM > Subject: problem with scope in > > > hi guys, > > i am facing problem in defining scope actually my aim > > is to declare bean as application scope and then i > > want to use the same bean instance to all the pages. > > can anybody suggest me how to retrieve the bean > > instance in different pages. > > and what all i have to do for this. > > plz help me it's urgent. > > bye > > rajesh > > > > __ > > Do You Yahoo!? > > Send instant messages & get email alerts with Yahoo! Messenger. > > http://im.yahoo.com/ > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: RV: Access MySQL databases
Hi, I have dowloaded some from MySql Site (www.mysql.com) to access DBs under Nt an,d it works well ! If you want me to send you the jar file ... tell me ! Regards Veronique Luis Lorente a écrit : > Hello > > What is the best way to access a MySQL database from a JSP page? I don't > find "offcial" JDBC drivers for MySQL. > > Thank you in advanced > > Luis Lorente > > Anglat?cnic > > Barcelona, Spain > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: It is a pity,but I am still waiting for the response from the All good guys...
Hello, The answer you already had from Mauro Quartini didn't satisfy you ? First of all, you should have a look at the Tomcat documentation and specifically the tomcat-apache howto which help you run tomcat with an Apache Server. http://jakarta.apache.org/tomcat/jakarta-tomcat/src/doc/tomcat-apache-howto.html Then, you have to put your jsp file under the exemples\jsp directory of the tomcat server and access this file using localhost:8080/exemples/jsp/myJSPage.jsp (If i remember well). Or you can create your own WebApp and modify the server.xml to add your own context and access to your file with localhost:8080/myContextRoot/myPath/Jsppage.jsp Hope this help ! Regards Veronique Gill a écrit : > -Original Message- > From: Gill [mailto:[EMAIL PROTECTED]] > Sent: Saturday, September 16, 2000 2:46 PM > To: JSP-INTEREST > Subject: Will any good guy help me. > Importance: High > > Hi Fellows, > > I have downloaded and installed the Apache Software. I also copied > Jakarta-Tomcat in the Apache directory. I wrote a Simple JSP Page. But > whenever I tried to load that Page, I didn't succeed. Will you please help > me. > > Will you please guide me that where I have to put the JSP page and how > should I give the command to "localserver" to load the page. Please also > guide through the directory structure. > > Thanks and Best Regards. > > Gill > Just a beginner > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: question about semantics
Hi, When you add in your first page, this will do : - crearte an instance of type someclass named something and put that instance in the session object using session.putValue(..) or session.setAttribute(..) Then in other pages of the same application, if you want to use an instance, it is the same as in a class, you have to specifiy how to get that instance . In jsp ypou have to include the engine will fist look for a someclass object named something in the session object and use it if found else create it. If you want you could also get the object directly using session;getValue(something) ot getAttribute(something) Hope this answer your question Regards Veronique Rahul Naithani a écrit : > Hi, > Is it necessary to physically include the statement > > on top of each jsp page if the page has to use the bean "something"? > > If in the first page of the application I have already included the above > statement then as what scope should I use this bean again. > This question emerges because if the first page already has the session > scope of a bean declared, how to use the bean in other pages following the > first page? > > Thanks in advance, > Rahul. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Unable to open taglibrary
You also need to add this in your web.xml file or corresponding file for yoiur jsp engine yourTagLibURI /WEB-INF/lib/aromTags.tld Martin Cooper a écrit : > You need a taglib directive in your JSP file. Try adding something like: > > <%@ taglib uri="yourTagLibURI" prefix="yourTagPrefix" %> > > at the beginning of your JSP. > > -- > Martin Cooper > Tumbleweed Communications > > At 06:27 PM 9/11/00 +0200, you wrote: > >Hi all, > > > >I have such an error and I don't know where to modify code: > > > >I have a servlet forwarding request to a JSP file. > > > >That file instantiate a Bean and use a tag with attributes. > >I need to evaluate the body tag more than once. > > > >Thks > >Leonardo > > > >°°° > > > > > > > > > > >Object_List_to_Show="<%= ListContainer.getCollectionCat_Prod() %>" > > > > > <%= > >CategoryName %> > > > > > > > > > > > >°°° > >SimpleBean.java > > public Collection getCollectionCat_Prod() > > { > > Object id = null; > > this.loadCategories(id); > > Collection listcoll = this.getCollectionCategories(); > > return listcoll; > > } > >°°° > >ProvaTag.java > > /** This is a needed method since 'Object_List_to_Show' is a parameter > > > >of the tag 'ShowCategories' > >* @param > >*/ > >public void setObject_List_to_Show(Collection members) > >{ > > if (members.size() > 0) > > iterator = members.iterator(); > >} > > > > /** Executed at run-time when the tag is find > > */ > > public int doStartTag() throws JspException { > > if(iterator == null) > > return SKIP_BODY; > > if(iterator.hasNext()) { > > pageContext.setAttribute(name, iterator.next()); > > return EVAL_BODY_TAG; > > } > > else { > > return SKIP_BODY; > > } > > } > > > > > > /** Executed before the BodyContent has been evaluated . > > */ > > public void doInitBody() throws JspTagException { > > /* try > > { > > } catch (JspTagException e) { > > throw new JspTagException("InitTag: " + > >e.getMessage()); } > > > >°°° > >firsttaglib.tld > > >PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" > >"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> > > > > > > > > > > > > > > 1.0 > > 1.1 > > provatag > > My first tag! > > > > > > > > ShowCategories > > ProvaTag > > JSP > > An iteration tag handler > > > > > > > > name > > false/required> > > > > > > type > > false > > > > > > group > > false > > > > > > Object_List_to_Show > > true > > true > > > > > > > >°°° > > > >Error: 500 > > > >Internal Servlet Error: > > > >org.apache.jasper.JasperException: Unable to open taglibrary > >firsttaglib.tld : Could not locate TLD META-INF/taglib.tld > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > >JSP-INTEREST". > >Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > -- > Martin Cooper > Tumbleweed Communications > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Application Bean
You should write this in the all the page which is using this bean : Regards Veronique Pranav Bansal a écrit : > Hi all, > I am using an Application bean at my Home page as ... > >But when I call it at some other page like .. ><% int i=bean1.getMunber();%> > it's gives the error that 'bean1' is not a variable or class > > I am using the Weblogic 5.1 on Windows NT, > Please help me. > With Regards, > Pranav Kumar > Software Engineer > Informica India Pvt. ltd. > Noida,India > Phone: -91-118-4514702 > www.informica.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: passing a bean instance via a servlet to a jsp
You have to use the session objet . In your servlet: HttpSession session = req.getSession(); BeanDef myBean = new BeanDef(); ... session.putValue("myBeanVal", myBean); or session.setAttribute("myBeanVal", myBean); // since servlet API 2.1 I think and in your jsp <% BeanDef myNewBean = (BeanDef) session.getAttribute("myBeanVal"); or BeanDef myNewBean = (BeanDef) session.getValue("myBeanVal"); // THEN Use myNewBean %> or even : // THEN Use myBeanVal Regards Veronique Tasneem a écrit : > Hello everybody > I had a query i wanted to know how can i pass a bean instance via a servlet > to JSP page.And retrieve the necessary data from the bean. > > Please do reply > Thanks in advance. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Caching problem
This is exalctly what is happening... the page corresponding to your refresh is cached, so the vrowser will not send the request to the server again but will get the cached file. So, you have to set one or all of the following headers in your pages ! I think that you have to use more than one of these in order to disable page caching in most browse (ie - nsc... ) >From previous post : " I think you'll also want (need?) to include HTTP headers as well. Specifically, you'll want to include an "Expires" header (for HTTP 1.0 browsers), a "Pragma: no-cache" header (particulary for Netscape 3), *and*, finally, a "Cache-control: no-cache" header (for HTTP 1.1 browsers). " Hope this Helps Regards Veronique Anjan Ghosh a écrit : > Hi all, > I have the following problem. > I have two frames - leftframe and rightframe - in an HTML page. The > leftframe shows a list of key fields. On clicking one item in the list, the > corresponding details is fetched from the database and shown in the > rightframe. The user can edit the data in the rightframe and then submit it. > Now, the problem is, after the data is updated in the database, when the > user again clickes on the same list item in the leftframe, still the old > data is shown ( it is now not fetched from the database ). But when I right > click on the rightframe and click 'Refresh' from the menu, i get the actual > page with the current updated data. > Can you tell me why this is happening and how do i solve this problem > which appears to me, as if, the browser is caching the previous pages and > showing them in the second time also without going to the database and > fetching the record). > Please suggest what I should do to stop the browser cache the pages. > > Regards, > Anjan > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Values not trimming - writing to DB
I don't know if this could impact and if it's the same in your code but didn't you forget a ')' in your query : pSql = "INSERT INTO tbl_qa_errors (project_id, reported_by,error_type, is_urgent, error_title, notes) values (?,?,?,?,?,?)"; >>> <<< Walt Meyer a écrit : > I don't see anything wrong with what you have. I'm doing something similar > against an Oracle database and not having any problems. Maybe something SQL > server is doing? > > Walt > > -Original Message- > From: Neal Cabage [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 25, 2000 2:42 PM > To: [EMAIL PROTECTED] > Subject: Re: Values not trimming - writing to DB > > Thanks for taking a look. Here's basically what I am doing. This is a > method of a bean I am using. I have determined (by testing) that the values > are still without trailing spaces once fed into the method. It seems to be > something that happens after arriving in the method and during/after writing > to the dB. The odd thing is ... that even if something funky was going on > ... I presumed that my varChar dataType in SQL server would automatically > prevent this from happening. > > Well, I have found a way if living with this I suppose (simply trimming > every value on the way out of the db) but I would *really* like to know the > solution if you have any thought. > > Thanks in advance! > > Neal > > public void addError(int projId, String reporter, String type, int > urgent, > String title, String notes) { > // Add a new error to the database > try{ > >pSql = "INSERT INTO tbl_qa_errors (project_id, > reported_by, > error_type, is_urgent, error_title, notes values (?,?,?,?,?,?)"; >PreparedStatement pst = cn.prepareStatement(pSql); >pst.setInt(1,projId); >pst.setString(2,reporter.trim()); >pst.setString(3,type.trim()); >pst.setInt(4,urgent); >pst.setString(5,title.trim()); >pst.setString(6,notes.trim()); >pst.execute(); > > }catch (Exception > { >System.err.println(ex); > } > > } > > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of Walt Meyer > Sent: Friday, August 25, 2000 7:11 PM > To: [EMAIL PROTECTED] > Subject: Re: [JSP-INTEREST] Values not trimming - writing to DB > > Are you doing this > > String string1 = somevariable; > String string2 = someothervariable; > > string1.trim(); > string2.trim(); > > and then using string1 and string2 in the prepared statement? > > Walt > > -Original Message- > From: Neal Cabage [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 25, 2000 8:13 AM > To: [EMAIL PROTECTED] > Subject: Values not trimming - writing to DB > > I am setting values into my dB (SQL server) and using a prepared statement > to do so. I simply put in the values from my form and that should be that. > The values (once in the dB) however have a ton of empty spaces at the end of > the values however, up to the full length of the dB field. > > Here's the source of my confusion: > 1. The dataTypes in SQLServer are set to VarChar, not char. > 2. I am using the .trim() method on each string prior to setting it in the > prepared statement > 3. I just rolled the code that does the dB insert into a bean - but the > identical code within my JSP didn't give me thatproblem. > > Does anyone why this would be or how I could get around it? > > Thanks. > Neal > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mai
Re: request.getParameter() question.
If yoiu want your function to access request object you should pass it as a parameter ... Brian Slezak a écrit : > Why can you not use request.getParameter() in a declaration? > > More specific, how are you supposed to write a method that can check the > values of a form input. Say I want a method called checkValues() that validates > the user input to the form, and outputs which fields are invalid. > > Any help appreciated. > > Brian > Warning! Novice at work. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: please help
Did you import the java.sql stuff ! it seems that the compiler doesn't found it ! sumit shah a écrit : > hi all, > After changing the drivers and all i am now getting the following errors. > I am pasting the code snippet and also the errors. I think the code is > unable to find all the java classes but i have already installed jdk 1.1.7 > > code snippet: > Connection connection; > try { > Class.forName("com.ibm.db2.jdbc.app.DB2Driver "); > String url = "jdbc:db2:JVCLIVE"; > String username = "DB2ADMIN"; > String password = "frisky"; > connection = DriverManager.getConnection(url, username, password); > Statement stmt = con.createStatement(); > String query="SELECT > DB2ADMIN.CATEGORY.CATEGORY_ID,DB2ADMIN.CATEGORY.CATEGORY_NAME FROM > DB2ADMIN.CATEGORY"; > ResultSet RS=stmt.executeQuery(query); > > while(RS.next()) > out.println("RS(1)"); > RS.close(); > con.close(); > } > catch (ClassNotFoundException e) { >out.println("Could not load database driver!");} > catch (SQLException e) { >out.println("Could not connect to the database!");} > > %> > > The error statement are: > d:\WebSphere\Studio\check_out\Jvcpro\connect_jsp_1.java:75: > Class d_0003a.WebSphere.Studio.check_0005fout.Jvcpro.Connection not > found in type declaration. > ^ > d:\WebSphere\Studio\check_out\Jvcpro\connect_jsp_1.java:81: Undefined > variable or class name: DriverManager > ^ > d:\WebSphere\Studio\check_out\Jvcpro\connect_jsp_1.java:82: Class > d_0003a.WebSphere.Studio.check_0005fout.Jvcpro.Statement not found in type > declaration. > ^ > d:\WebSphere\Studio\check_out\Jvcpro\connect_jsp_1.java:82: Undefined > variable or class name: con > ^ > d:\WebSphere\Studio\check_out\Jvcpro\connect_jsp_1.java:84: Class > d_0003a.WebSphere.Studio.check_0005fout.Jvcpro.ResultSet not found in type > declaration. > ^ > > please help. > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: getProperties (more help)
Hi; Maybe I will say a stupidity but, normally the useBean will : Verify if in the specified scope object (session object or request object ...) there is an object of type FormProcessor and with the name sample. In your case you should use the same instance in page formtest.jsp and more_result.jsp but in th page result.jsp, a new instance of your instance !!! Now,a question could be which insrtance is used in the jsp:setProperty and getProperty ... But anyway, if you have created a bean with session scope, why don't you use this objet ! why do you use scope request after... Once you have created a session scope bean it will exist until you specifically remove it (session.removeAttribute()) or session expires. So if it exist it should be simpler to use it !? or did i miss something Regards Veronique Rick Reumann a écrit : > This still is not working. In the following you'll see three very > short pieces of code. What I don't understand is how come I can not > use to pull > stuff out of a session bean? It pulls the information out of the bean > but these values were not correctly updated from the previous page > that has request scope and should have set the values based on the > form submission. I was under the impression that if the bean has > matching set and get methods that match the form value names that the > bean would automatically be updated? If someone could look at the > following code I'd much appreciate it (very short). Everything works > fine until you get to the more_results page. This page for some > reason does not have the values that were set in the form. any help > much appreciated. THanks. > > 1st Page. formtest.jsp > > <%@ page import = "FormProcessor" %> > > > Name: > Phone: > > > > 2nd page form is submitted to. results.jsp ** > > <%@ page import = "FormProcessor" %> > > > > > NAME: property="name"/> > PHONE: > more results > > > 3rd page more_results.jsp - not giving me the correct values > submitted by the form.*** > > <%@ page import = "FormProcessor" %> > > > > More Results > Name: property="name"/> > Phone: > > > END * > > thanks > > On 22 Aug 2000, at 18:42, Vishu G wrote: > > > I guess the code inside and is executed > > only if that bean is instantiated.for session since that bean might > > have been instantiated already,the code inside will not be executed.if > > you move the out of the properties > > will be set whenever the page is executed(assuming control reaches > > it). > > > > > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: TR: re: out.println
Void Dans Code : Erwan TROEL a écrit : > > -Message d'origine- > > De : Erwan TROEL > > Envoyé : mercredi 23 ao?t 2000 14:08 > > ? : '[EMAIL PROTECTED]' > > Objet : re: out.println > > > > Quand j'utilise out.println dans: > > > > > > > > > > > > <%@ page language="java" import="java.sql.*" %> > > <%! > > > > // presentation > > final String styleTableBeg = ""; > > final String styleTableEnd = ""; > > final String styleDataRowBeg = ""; > > final String styleDataRowEnd = ""; > > final String styleHeaderCellBeg = ""; > > final String styleHeaderCellEnd = ""; > > final String styleStringCellBeg = ""; > > final String styleStringCellEnd = ""; > > > > // database connection > > final String drv = "sun.jdbc.odbc.JdbcOdbcDriver"; > > final String url = "jdbc:odbc:mabase"; > > final String login = ""; > > final String psw = ""; > > > > // Encodage HTML > > String HTMLEncode( String str ) { > > String res = ""; > > > > if( str == null ) return res; > > > > for( int i = 0; i < str.length(); i++ ) { > > char c = str.charAt( i ); > > switch( c ) { > > case '<' : res += "<"; break; > > case '>' : res += ">"; break; > > case '&' : res += "&"; break; > > default : res += c; > > } > > } > > > > return res; > > } > > > > // Fabrique un état sur une table quelconque > > void doReport( String query, JspWriter out) { > > Connection con; > > Statement stmt; > > ResultSet rs; > > ResultSetMetaData md; > > int numCols; > > > > // open driver > > try { > > Class.forName( drv ); > > } catch( Exception ex ) { > > out.println( "erreur : driver " + drv + " : " + ex ); > > return; > > } > > > > try { > > con = DriverManager.getConnection( url, login, psw ); > > stmt = con.createStatement(); > > rs = stmt.executeQuery(query); > > md = rs.getMetaData(); > > numCols = md.getColumnCount(); > > > > // print headers > > out.println( "styleTableBeg" ); > > out.println( styleDataRowBeg ); > > for( int i = 1; i <= numCols; i++ ) { > > out.println( styleStringCellBeg ); > > out.println( HTMLEncode( md.getColumnName( i ) ) ); > > out.println( styleStringCellEnd ); > > } > > out.println( styleDataRowEnd ); > > > > // report loop > > while( rs.next() ) { > > out.println( styleDataRowBeg ); > > for( int i = 1; i <= numCols; i++ ) { > > out.println( styleStringCellBeg ); > > out.println( HTMLEncode( rs.getString( i > > ))); > > out.println( styleStringCellEnd ); > > } > > out.println( styleDataRowEnd ); > > } > > > > out.println( styleTableEnd ); > > > > stmt.close(); > > con.close(); > > } > > catch( SQLException ex ) { > > out.println( "SQLException: " + ex + "" ); > > } > > // AJOUTER ICI Un catch sur IOException catch(IOException ioe) { System.out.println("An error occured in "); // Ne pas réutiliser out.println() qui demande un catch sinon on boucle ;) } > > > } > > > > %> > > > > > > Mon Premier Etat avec JSP et JDBC > > > > > > > > <% > > String strTableName = request.getParameter("TableName"); > > if( strTableName != null ) { > > %> > > Liste des enregistrements de <%=HTMLEncode( strTableName > > )%> > > > > <% > > doReport( "select * from " + strTableName, out ); > > > > %> > > > > <% > > } > > else { > > %> > > Etat d'une Table > > > > Nom de la table: > > > > > > <% > > } > > %> > > > > > > > > J' ai le message d'erreur: > > org.apache.jasper.JasperException: Unable to compile class for > > JSPC:\jakarta-tomcat\work\localhost_8080\_0002fmyfirst_0002ejspmyfirst_jsp > > _20.java:80: Exception java.io.IOException must be caught, or it must be > > declared in the throws clause of this method. out.println( "styleTableBeg" > > ); > > Peux tu m'aider merci > > > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name
Re: useBean tag ????
package is just in case yoiur bean is in a package ... Regards veronique sufi malak a écrit : > How to change this to a useBean tag : > <% >BasketBean basket = (BasketBean)session.getAttribute(BasketBean.BASKET); > %> > > _ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Active user
You could use an application scope variable to count number of incomming user and on session invalidate, decremet this same variable ... Regards veronique Khoo Sweechin a écrit : > Hello, > > I am creating a web chat application using Websphere server. > How can I know the number of active users that login into the chat room? > > --- > Disclaimer: > Confidential information may be contained in the e-mail and any files > transmitted with it ('Message'). If you are not the addressee indicated in > this Message (or responsible for the delivery of this Message to such > person), you are hereby notified that any dissemination, distribution, > printing or copying of this Message or any part thereof is strictly > prohibited. In such a case, you should delete this Message immediately and > advise the sender by return e-mail. Opinions, conclusions and other > information in this Message that do not relate to the official business of > e-BX nor any of its related companies shall be understood as neither given > nor endorsed by e-BX nor any of its related companies. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: out.println( styleTableBeg ); not the good syntax ?
In your jsp file you have certainly use a class method which throws a IOException and you should catch this exception ... Can't you send the portion of your code which causes the problem ?! It would be easier to explain what's going on ... Regards veronique Erwan TROEL a écrit : > Does anybody what is my problem? with: > out.println( styleTableBeg ); > org.apache.jasper.JasperException: Unable to compile class for > JSPC:\jakarta-tomcat\work\localhost_8080\_0002fmyfirst_0002ejspmyfirst_jsp_1 > 8.java:80: Exception java.io.IOException must be caught, or it must be > declared in the throws clause of this method. > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Tracking Sessions!
I'm afraid the only way ti track this, is onky when the session expires ! using the HttpBinding events, you could know when a sessionn expires (if user logout and if you do a session.invalidate or if the session expires on time out) But you can't know if the user close the browser or uit your site to visit a another one since, maybe, you use an applet on your pages and uses the applet "close" pr "destroy" method .. Regards Veronique. MALINI KRISHNAMURTHY a écrit : > Hi all. > > I have a very peculiar problemI need to allow any user to login only > once... >If the user does a proper logout, then I will be able to track the > session and allow the user to login again... >B ut, what if he/she closes the browser?How do I track that??? > > I am sorry if this is an off the subject question. > > Thanks. > > Regards > Malini > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: How To write a JSP file TO DO this ? Please HELP ME
Hi, I don't really understand what you mean by a jsp file which "returns" a string !!! If I well understand what you 'd like to do, you should call your file : file.jsp => then use a bean to connect ti the Db and get all your information in order to construct your string (concatenate your datas as in normal Java class ) and then "call" your flash page (I don't know at all how Flash works ) file.jsp?specialUser=Mark => then use a bean to connect the Db and get your information (with an other query) in order to construct your string and call your flash page. To be able to know what to call from your JSP page, you can do something like : <% String toDo = request.getParameter("specialUser"); if(toDo == null) // No parameters passed to the file { String result = myBean.getAllInfo(); } else { String result = myBean.getUserInfo(toDo); } %> Is it what you were looking for ?! Regards Veronique sufi malak a écrit : > Hi, to get data from a text file or a database, Flash is expecting > strings like this : > var0=value0&var1=value1&.. > Could you please help me on how to write a JSP file that when it's called > just like this file.jsp return some data from database, for example the > employee names in a string like this : > employee0=John&employee1=Jenny&employee2=Mark&.. > > but when we call this file.jsp like this : file.jsp?Mark it will go back to > the database and look for informations about Mark, for example it will > return a string like this : > firstname=Mark&address=Atlanta&Age=34&.. > > I will appreciate your help. > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Parameters between two JSP files
Hi, In the HREF you should specify both param name and param value and every parameters should be separated by & and not , etcetera then in Reserveren.jsp <% String firstParam = request.getParameter("param1"); String secParam = request.getParameter("param2"); %> or directly in a Bean wich have a serFirstParam method Regards Veronique Marcel van Kooy a écrit : > Hi all, > > In one JSP file I refer to another JSP files when you click on a link. > Then two parameters will be given to the other JSP file which i coded > like down below. > Can somebody please explain me how I can get the parameters in the other > JSP file? Summarized, what is the syntax of receiving parameters from > another file? > > etcetera > > Best regards, > Marcel van Kooy > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
[Fwd: scriptlet question]
I forward to the list as my reply only went to Suriya Narayan Varatharajan ... Veronique Dupierris a écrit : > This declaration will create a variable shared between all instances/thread of the > JSP pages which is dangerous and not necessary !! > If you want a variable to be an instance variable use a scriptlet with a ';' at > the end of the declaration as : > <% String cost = > WebMarket.getPriceQuoteMoney(currentQuote,PriceQuote.ASK_QUOTE_MONEY, theMarket); > %> > > Regards > Veronique > > Suriya Narayan Varatharajan a écrit : > > > here u r declaring String variable .. use this tag it will work... > > <%! String cost = WebMarket.getPriceQuoteMoney(currentQuote, > > PriceQuote.ASK_QUOTE_MONEY, theMarket) %> > > good luck... > > > > Q try for everything Q > > regards > > suriya > > contech software ltd... > > GIDC Estate > > Ghandhinagar > > ph:02712-43324(off) > > :02712-35567(pp) > > mail at:[EMAIL PROTECTED] > > visit at:www.contechgroup.com > > > > -Original Message- > > From: Caspar van Vroonhoven [SMTP:[EMAIL PROTECTED]] > > Sent: Monday, August 07, 2000 2:20 PM > > To: [EMAIL PROTECTED] > > Subject:scriptlet question > > > > Hi again, > > > > I've got a small problem: > > > > One of my classes is 'WebMarket'. It has a method getPriceQuoteMoney(..), > > which returns a string. > > In one of my (supplied) jsp pages, the following expression is written: > > > > <%= WebMarket.getPriceQuoteMoney(currentQuote, PriceQuote.ASK_QUOTE_MONEY, > > theMarket) %> > > > > which returns a certain price, works great, no problems here. > > > > Now I want to put this info in a String like this: > > > > <% String cost = WebMarket.getPriceQuoteMoney(currentQuote, > > PriceQuote.ASK_QUOTE_MONEY, theMarket) %> > > > > but this returns an error.. what's wrong? > > I understand the first code line is an expression and that it's being > > evaluated on the server, but that doesn't mean that the same info isn't > > available in the scriptlet (2nd line), right? > > > > regards and thanks in advance, > > > > Caspar van Vroonhoven > > www.tradingcars.com > > Amsterdam, the Netherlands > > > > P.S: I'll be buying a book on JSP in a few minutes, so my current flow of > > questions should decrease.. > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Javascript + JSP + Including
I added the following in my javascript function, but i'm surprised that the <%= %> for only the wanted param doesn't work ! <% out.println("window.open('"+response.encodeURL("/AppArom/CreateArom.jsp")+"?type=class','','resizable,status,height='+screenH+',width='+screenW+',scrollbar=yes')"); %> Hope this help Regards Veronique Caspar van Vroonhoven a écrit : > Hey everyone, > > I've got a little question about using Javascript and JSP together..: > > How can I include parameters () in a window > constructed by window.open in javascript... > This particular parameter is requested at the page where the javascript is, > so the real question is how to get a JSP string into a javascript one, so > that it can be put in my statement (if at all possible) like this: > > var cCW = window.open("/addinfo/currency.html?price=" + string + > ","currencyConverter","HEIGHT=400,WIDTH=400"); > > where the string is supplied by jsp.. > copying the whole <%= . %> thing doesn't work, I already tried that.. > > TIA, > > Caspar van Vroonhoven > www.tradingcars.com > Amsterdam, The Netherlands > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: trouble with startup.bat
It means : Command or File not found the startup.bat file just call the tomcat.bat file ... Are you sure you didn't copy the startup.bat file without modifying the path to point also to tomcat directory. If No, it may be in the tomcat.bat file Regards Veronique "Sergey A. Vorobiev" a écrit : > Hi! > > Erwan TROEL wrote: > > > > When i click on the startup.bat to run tomcat i have > > this message: > > "commande ou nom de fichier incorrect" what does it mean? > > Could you please translate it into English? > > -- > Regards, > Sergey Vorobiev > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: date formate fectching??dd/mm/yyyyy
I use a method in my StringUtil class , You can certainly do the same with only dd.MM. ... public static String getDateTimeAsString(Date aDate) { SimpleDateFormat formatter = new SimpleDateFormat ("dd.MM. HH:mm:ss"); String dateString = formatter.format(aDate); return dateString; } Regards Veronique subramanian Athimoolam a écrit : > hi > > how can i fetch date formate like mm/dd/yy > in jsp page. > here i am using java.util.date df=rs.getDate(1); > > it will be displaying 2000-08-03 > > i want to display 03-08-2000 > > how can i do it > thanks > > [ in oracle to_char('df','dd/mm/ ') its working but how can i implement > in jsp?? ] > > subu > > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Passing paramters between two jsp files
I don't know if it's a error in your mail only or in your code but, if you write response.setAttribute I'm not sure you can get your value from the request object. In your servelt you have to write request.setAttribute then get it back with request.getAttribute in your JSP or if it's 2 JSP you can use a hidden field to set the attribute in the request object response.setAttribute("AdminName","AccountManager"); Sneha Sharma a écrit : > Sneha Sharma@CONTEXT > 07/11/2000 09:46 AM > > Hey Rupali! > > I have been using the following approach. > > Before forwarding to another page, > I set the request.setAttribute("a","b"); > > > > and in 1.jsp > i say request.getAttribute("a"); > and it works. > > Try giving the absolute path in jsp:forward for ur page. > Also, try setting the attribute in request instead of response. > > Bye, > Sneha > > Rupali Bains Goswami <[EMAIL PROTECTED]> on 07/11/2000 11:51:39 AM > > Please respond to A mailing list about Java Server Pages specification and > reference <[EMAIL PROTECTED]> > > To: [EMAIL PROTECTED] > > cc: (bcc: Sneha Sharma/Context) > > Subject: Passing paramters between two jsp files > > I know this question has been posted before and I have tried the solutions > but somehow it doesnt work for me > > JSP1 > > response.setAttribute("AdminName","AccountManager"); > response.sendRedirect (response.encodeRedirectURL("Success.jsp")); > > In success.jsp > > out.print ("The user is : " + request.getAttribute("AdminName")); > > But the error I get for JSP1 is > > logonadministrator.java:138: cannot resolve symbol > probably occurred due to an error in /htdocs/login2/logonAdministrator.jsp > line 14: > response.setAttribute("AdminName","AccountManager"); > > Any ideas as to why I am getting this? > I am using weblogic 5.1 > Also I am using sendRedirect as I am unable to use the forward tag in jsp > ... I get a NoSuchMethod error when I use > > > > Thanks for the help > > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: custom tag question
Hi, I don't know if what I do is correct but - I've created a TEI to add a scripting variable with type a String Object, an other one that adds a variable of type a Date Object, for ex, and again an other one that add a sripting variable of type my own objetc - Then I associate one of these TEI with my tags depending of what the tags do. For ex, I have a Iterate Tag class which is associated with an Object TEI to create JSP iterate tag. But, in the taglib.tld, I also associated the Iterate Tag class with the String TEI to create the IterateOnString Tag and again this Iterate Tag class with the Date TEI to IterateOnDates JSP tag. Here is the code of the metho getVariableInfo(TagDate d) of the StringTEI ... It just creates a NESTED variable referenced by the id parameter of the associated tag. public VariableInfo[] getVariableInfo(TagData data) { String idValue = data.getId(); if ( idValue == null) { throw new Error("TagLibrary inconsistency"); } //Create a String Object with identifier 'idValue' (given by id) with Scope = NESTED VariableInfo info = new VariableInfo(idValue,"String",true,VariableInfo.NESTED); VariableInfo[] back = { info } ; return back; } I don't know if this answer your question or if this is the good way to use TEI ... but it may help you ! Regards Veronique "Holmes III, William S" a écrit : > Hi, > > Does anyone know of a good example using TagExtraInfo to declare scripting > variables? > The only example I've found so far is in the Orion Tag Extensions tutorial. > > Thanks, > Bill > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: RequestDispatcher class
Normally, Your servlet should be under WEB-INF\classes or servlets, i don't remember exactly with jswdk and it will search for your jsp file from the root of your web app. If in server.xml or similary file your webapp is C:\jswdk-1.0.1\examples you should give the path to your jsp files from there. So use "/jspFile/myJSP.jsp" if ypur jsp files are under C:\jswdk-1.0.1\examples\jspFile\myJSP.jsp. Hope ythis helps Veronique Mohan Nai a écrit : > hi Rema, > > If I use include it is giving me an "servlet > include error". > > I suspect this should be due to the placement of > jsp and the servlet. > > I am getting response from the servlet if I don't > forward or include the request. But If I do that it is > giving me an error. > > Can you tell me where you placed your jsp and the > servlet if you are using jswdk? > > thanx, > mohan > > --- Rema Kumar <[EMAIL PROTECTED]> wrote: > > Mohan, > > > > You could do something like this: > > > > RequestDispatcher dispatcher = > > > > > getServletContext().getRequestDispatcher("/yourjsp/myframe_header.jsp"); > > dispatcher.include(req, res); > > > > > > > * > > ("/yourjsp/myframe_header.jsp")- being the place > > where your JSP file > > resides. > > > > > * > > > > Refer to the following site for additional help > > > > > http://java.sun.com/products/servlet/2.1/api/javax.servlet.RequestDispatcher > > ..html > > > > Rema > > > > -Original Message- > > From: Mohan Nai [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, July 05, 2000 10:04 AM > > To: [EMAIL PROTECTED] > > Subject: RequestDispatcher class > > > > > > Hi, > > > > I saw a lot of mails regarding RequestDispatcher > > class. IF somebody is using it help me out. I have a > > problem in it. > > > > I am forwarding a request from a servlet to a Jsp > > using requestDispatcher. I am using jswdk1.0.1 . > > > > * Now where should I place my jsp(target) be placed > > (url in requestDispatcher forward method should > >start with "\"). > > > > * Where should I place my servlet. I am placing it > > in > > > > C:\jswdk-1.0.1\examples\WEB-INF\jsp\beans. > > > > Can anybody help ? > > > > mohan > > > > > > > > > > > > > > > > __ > > Do You Yahoo!? > > Kick off your party with Yahoo! Invites. > > http://invites.yahoo.com/ > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > > body: "signoff > > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with > > body: "signoff JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > __ > Do You Yahoo!? > Kick off your party with Yahoo! Invites. > http://invites.yahoo.com/ > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Session tracking problem between jsp and servlets
The session is maintain by - cookies if the browser supports them and the user, of course, didn't disabled them. Some server also have an option to enable or disable session tracking or - using URL rewriting with the methods encodeURL or encodeRedirectURL of the response object. Your server should of course supports the urlRewriting, I think now most of them support this. There are some more methods like using a form hidden field... all are well described in JAson hunter Book on servlet Regards veronique "LITT Vincent (Neuilly Gestion)" a écrit : > Hello, > Does anybody know how to pass a session object created in a Jsp by : > > session = request.getSession( true ); > session.putValue ("Usr_Name", request.getParameter("user_name") ); > > In fact I tried the same code in the servlet, but the 2 sessions objects are > different ... > > Any Help is welcome > > Vince > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Hyperlinks.
You should use quote like this : ">click here Regards Veronique krishna srinivasan a écrit : > I have a hyperlink that looks like this... > > click here > > if the value of username='xyz abc'[ie.two words],i'm not able to get both > the words in the hyperlink.Instead it's just 'xyz .How do i send both the > words to the next page if user clicks on the hyperlink ? > > Regards. > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
[Fwd: new try :) Load servlet at server startup]
Hi, I have send this mail on resin mailing list but I didn't get any response !! So I try here hoping somebody could help me Regards Veronique Hi, I run resin 1.1 under solaris with Apache 1.3.12. I'd like to load a servlet ( and run his init method) when the server is started ! So i added in my resin.conf : I added these 2 lines because i'd also like to be able to call this servlet using /login instead of /servlet/LoginHandler ... I only add in the init method a System.out.println("Login initialized"); to test this config. But it is only called when i effectively call the servlet from a jsp page and not when i start the server ! somebody has seen this problem before ? thanks for your help Regards Veronique - Sorry to send this again, but I tried again and again changing some syntax and it still doesn't work I tried ... .then I inserted a "1" between to tell load it first Please help :) regards -- Again some more tests i added some init-param to verify If they were "seen" and it returns me null !!! Should I precise somewhere that my servlet is in WEB-INF/classes ... Here is what i added : baz test1 and in LoginHandler init method I have : String test = conf.getInitParameter("baz"); System.out.println("Init Login : "+test); ... test is null and the init is still call when i first send a request to my servlet ! === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: 10 records displaying single jsp page
Look in the archive, this has been anwsered many times and again last week and again today We now have about 100 messages per day ! It would be very usefull if 'we' look at the archive or FAQ before sending a mail ! regards veronique subramanian Athimoolam a écrit : > hi > > i want to displaying 10 records in my single jsp page. how can i do > it.i am using ms access database. > > thanks > subu. > > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: request.getParameter("..") not working ???....help me please !!
Hi, The problem seems to be du to case sensitive : you use 'plantID' in your form and 'plantId' in your getParameter() ! So there are 2 different var ... Regards Veronique Geeta Kottapalli a écrit : > Having problem with request.getParameter("plantID") > which shows null > when submiting the info as part of query string i.e, > action="Form2.jsp?plantId=50&plantName=wxyz"> > or in a JavaScript function as > document.frm1.method ="post"; > > document.frm1.action="Form2.jsp?plantId=50&plantName=wxyz"; > document.frm1.submit(); > > When info from Form1.jsp is sent thru query string to > Form2.jsp, in the page > location > I can see the url same as query > string(http:///Form2.jsp?plantId=50&plantName=wxyz) > but when I use request.getParameter("..") to retrieve > values it shows null > values. > Even request.getQueryString() works fine. > > Does anyone know why this is happenning?? > I am using JWS2.0 with jdk1.2.2 on Windows NT4.0 > workstation. > > The following is the script for Form1.jsp and > Form2.jsp and if it needs any > corrections > or suggestions please let me know.I appreciate your > help. > > Form1.jsp : > > <%@ page language="java"%> > > // --> > Test > > onClick="submitInfo();"> > > Form2.jsp : > > <%@ page language="java"%> > > Test > > ueryString : > PLantID: > PLantName: > > Thanks, > Geeta > > __ > Do You Yahoo!? > Yahoo! Photos -- now, 100 FREE prints! > http://photos.yahoo.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re:
Hi, the out.println will be called the first time your bean will be created !! This means that if your bean have a application scope, all the code between and will be executed only once, if your scope is session it will be executed once by session and so on. If you don't recise any scope, i don't know whiwh one is the default, you could certainly found it in the spec. I always precise it... Have a nice Day Veronique. Brad Miley a écrit : > I have a form called form.jsp whose action is action.jsp. > In action.jsp I have the following: > > > <%out.print("test");%> > > > when I load action.jsp directly, 'test' is printed the first time the page > is loaded, but when I first open up form.jsp, test is not printed even > though it is the first time action.jsp is loaded. Can someone please > explain? > > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: (no subject)
An other way to pass these value to the bean is to use the setParameter tag : and in the setBeanPropertyName() method of your bean you can do what you need... Tushar Kuwad a écrit : > Hi, > I am using the getparameterNames( ) to get the field names from the > HTML page. > I would like to use these field names as input to my bean which is used > to insert > records in the database table. > 1)I am using getparameterNames( ) to get all the parameters from the > html forms. > But this also shows me the submit button's name as one of the > parameters. > I want to avoid this. > 2)Also the order in which the parameters are displayed is random. > Can I have it in a specific order?. > 3) Is there a way to store the values retrieved from getparameterNames( > ) into > an array. > > Regards, > > Tushar > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: <(ŠżŠ)> Anyone Can Make Money Exchanging Currency!
Of course, send me 25$ and I will explain you how to do money easily . ;-) [EMAIL PROTECTED] a écrit : > Dear Friend: > > If you have already responded to the following > announcement a few days ago, that means your package > is already on its way and it should be arriving soon! > If you have not responded to this before, please pay > attention to it now. This is very important!!! > > > > > > IMPORTANT ANNOUNCEMENT > IMPORTANT ANNOUNCEMENT > > ' > ' > > Your Future May Depend On It! > > ! > ! > ! > > Before you know about this 'Important Announcement', > you must first read the following 'Editorial Excerpts' > from some important publications in the United States: > > NEW YORK TIMES: "In concluding our review of Financial > Organizations to effect change in the new millenium, > special attention should be called to a California > based organization, 'INTERNATIONAL EXCHANGE ALLIANCE'. > Members of this organization are amassing hundred of > millions of dollars in the currency market using a completely > LEGAL method which has NEVER been divulged to the general > public. While their purpose is not yet known, their > presence has most certainly been felt". > > NBC NIGHTLY NEWS: "Members of 'International Exchange > Alliance', who always keep a low profile, are considered > to be some of the wealthiest people in North America". > > More excerpts later, but first let us give you this very > "IMPORTANT ANNOUNCEMENT": > > ' > ' > ' > ' > > We are glad to announce that for the first time and for > a very short period of time, INTERNATIONAL EXCHANGE > ALLIANCE will instruct a LIMITED number of people > worldwide on 'HOW TO CONVERT $25 INTO ONE HUNDRED OF > LEGAL CURRENCY'. We will transact the first conversion > for you, after that you can easily and quickly do this > on your own hundreds or even thousands of times every > month. TAKE ADVANTAGE OF THIS "SECRET FLAW"! > > ** > ** > > It is even more explosive than we have yet disclosed. > While currency does fluctuate daily, we can show you > 'HOW TO CONVERT $99 INTO $588 AS MANY TIMES AS YOU WANT'. > That means, you will be able to EXCHANGE $99, AMERICAN > LEGAL CURRENCY DOLLARS, FOR $580 OF THE SAME. You can do > this as many times as you wish, every day, every week, > every month. All very LEGAL and effortlessly! > > It takes only 5 to 10 minutes each time you do this. You > can do this from home, office or even while traveling. > All you need is access to a phone line and an address. > Best of all, you can do this from ANY CITY ON THIS EARTH!!! > > Again, we must reiterate, anyone can do this and the source > is NEVER-ENDING. For as long as the global financial > community continues to use different currencies with > varying exchange rates, the "SECRET FLAW" will exist. > > >>> > >>> > > As we said earlier, we will do the first transaction for > you and will show you exactly how to do this on your own, > over and over again! > > The amount of exchange you would do each time is entirely > up to you. Working just 2 to 10 hours a week, you can soon > join the list of Millionaires who do this on a daily basis > many times a day. The transaction is so simple that even a > high school kid can do it! > > We at the International Exchange Alliance would like to > see a uniform global currency backed by Gold. But, until > then, we will allow a LIMITED number of individuals > worldwide to share in the UNLIMITED PROFITS provided for > by the world currency differentials. > > We will not espouse any more political views nor will we > ask you to do so. We can say however, that our parent > organization, CILS, benefits greatly by the knowledge > being shared, as we ourselves, along with YOU, benefit > likewise. Your main concern surely will be, how you will > benefit. > > As soon as you become a member, you will make transactions > from your home, office, by telephone or through the mail. > You can conduct these transactions even while traveling. > > Don't believe us? Experience it for yourself! > > ; > > U
Re: How JSP & Servlet Forward work
I think you should considere your application context. In this case your Web App is example, so you should try : "/examples/jsp/jsptoserv/hello.jsp" or even "http://server:port/exampes/jsp/jsptoserv/hello.jsp" regards veronique Louis a écrit : > I try relative path like these > ../../../examples/jsp/jsptoserv/hello.jsp > ../../examples/jsp/jsptoserv/hello.jsp > ../examples/jsp/jsptoserv/hello.jsp > ../../../jsp/jsptoserv/hello.jsp > ../../jsp/jsptoserv/hello.jsp > ../jsp/jsptoserv/hello.jsp > > unfortunetly, it still not forward it. > > - Original Message - > From: bhupesh vora <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, May 22, 2000 3:06 PM > Subject: Re: How JSP & Servlet Forward work > > > try giving relative path > > > > > -Original Message- > > > From: Louis [SMTP:[EMAIL PROTECTED]] > > > Sent: Monday, May 22, 2000 6:57 PM > > > To: [EMAIL PROTECTED] > > > Subject: How JSP & Servlet Forward work > > > > > > Hi, > > > I try the JSP-Servlet-JSP example in JSWDK-1.0.1. This example is > show > > > how to forward from JSP to servlet and forward back to the JSP. > > > > > > I want to know the path working in JSWDK-1.0.1, so I move the > servletToJsp > > > servlet from the default directory > > > (C:\jswdk-1.0.1\examples\WEB-INF\servlets) to a new directory in > > > C:\jswdk-1.0.1\examples\WEB-INF\servlets\com\test\servlet\ . > > > Then I modified the > C:\jswdk-1.0.1\examples\jsp\jsptoservjsptoservlet.jsp > > > file to forward to the servlet. > > > > > > Run the example, the servlet cannot forward back to the JSP. I know the > > > problem is I need to change the forward path in the servlet class, but I > > > try > > > to give a absolute URL, it still cannot forward back to the JSP page. > > > > > > Anyone can tell me what the path I need to give? > > > > > > > > > Thanks > > > > > > > > > Louis > > > > > > > == > > > = > > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > > JSP-INTEREST". > > > Some relevant FAQs on JSP/Servlets can be found at: > > > > > > http://java.sun.com/products/jsp/faq.html > > > http://www.esperanto.org.nz/jsp/jspfaq.html > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Client side selection
I think you should reload your page with this new param set. the first time country = all for your second list and when you reload your page with country = france :) you can then load only those cities for the second list. If you don't want to reload yur page, you should have store all informations (all cities for all country) and then use javascript code to update your list using an onChange event. Hope I understood your question veronique "Aggarwal, Pawan" a écrit : > > > Hi All, > > Can you people suggest me something.. > > I am using a servlet which displays 2 drop down boxes... > If I make a selection in the first one then I need to update the > filter list in the second one... > > For example if the first dropdown is for Country .. > Now the moment I select any country without refreshing/changing the > page > I want the second dropdown to be updated with the cities in that > country only... > > How can I do that? > > Thanks, > > == > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
No Subject
You wrote : instead of regards veronique Sachdeva Khem a écrit : > >From [EMAIL PROTECTED] Fri May 19 >05:36:53 2000 > Received: from scam.xcf.berkeley.edu (scam.XCF.Berkeley.EDU [128.32.43.201]) by >lgs-systems.com (8.8.5) id FAA17389; Fri, 19 May 2000 05:36:52 -0600 (MDT) > Received: (qmail 83551 invoked by alias); 19 May 2000 11:17:36 - > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm > Delivered-To: mailing list [EMAIL PROTECTED] > Received: (qmail 83485 invoked from network); 19 May 2000 11:17:29 - > Received: from unknown (HELO himalaya.npi.stpn.soft.net) ([EMAIL PROTECTED]) > by scam.xcf.berkeley.edu with SMTP; 19 May 2000 11:17:29 - > Received: from npi.stpn.soft.net ([192.9.202.212]) > by himalaya.npi.stpn.soft.net (8.9.3/8.8.4) with ESMTP > id QAA11759; Fri, 19 May 2000 16:39:20 +0530 > Message-ID: <[EMAIL PROTECTED]> > Date: Fri, 19 May 2000 16:45:33 +0530 > From: Khem Chand Sachdeva <[EMAIL PROTECTED]> > X-Mailer: Mozilla 4.5 [en] (WinNT; I) > X-Accept-Language: en,pdf > MIME-Version: 1.0 > To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>, > JSP Mailing List <[EMAIL PROTECTED]> > Subject: basic problem > Content-Type: text/plain; charset=us-ascii > Content-Transfer-Encoding: 7bit > X-UIDL: 41a52d340da9058dd30b8902fa0ffe23 > > Hi All > i am new to JSP programming > could somebody tell me what is the problem with the above code. > when the jsp is called first time it should display login page > and then > after that it should disllay welcom > it is throwing following exception > _ > Unhandled error! You might want to consider having an error page > to > report such > errors more gracefully > com.sun.jsp.JspException: getProperty(try): cant find method to > read {1} > > at > > com.sun.jsp.compiler.GetPropertyGenerator.generate(GetPropertyGenerat > or.java:84) > at > > com.sun.jsp.compiler.Jsp1_0ParseEventListener$GeneratorWrapper.genera > te(Jsp1_0ParseEventListener.java:675) > at > > com.sun.jsp.compiler.Jsp1_0ParseEventListener.generateAll(Jsp1_0Parse > EventListener.java:143) > at > > com.sun.jsp.compiler.Jsp1_0ParseEventListener.endPageProcessing(Jsp1_ > 0ParseEventListener.java:114) > at com.sun.jsp.compiler.Main.compile(Main.java:284) > at > com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:135) > at > > com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspS > ervlet.java:77) > at > > com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.j > ava:87) > at > > com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java:218) > at > com.sun.jsp.runtime.JspServlet.service(JspServlet.java:294) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:840) > at > > com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java:155 > ) > at > com.sun.web.core.Context.handleRequest(Context.java:414) > at > > com.sun.web.server.ConnectionHandler.run(ConnectionHandler.java:139) > > > the bean and jsp code are attached with the document > thanx, > > _ > > JSP File > _ > > > > <%@ page import = "TryBean" %> > > > > > > Number Guess Game > > > > <% if (try.getStatus()) { %> > > > Enter your username and password > UserName : > Password : > > <% } else { %> > > Welcome to the Number Guess game. > Your username > Your Passowrd > > <% } %> > > > > _ > > Bean File > _ > public class TryBean > { > public String username; > public String password; > public boolean firstTime=true; > TryBean() > { > username=""; > password=""; > } > public void setUsername(String username) > { > this.username=username; > firstTime=false; > } > public void setPassword(String password) > { > this.password=password; > firstTime=false; > } > public String getPassword() > { > return password; > } > public String getUsername() > { > return username; > } > public boolean getStatus() > { > return firstTime; > } > } > > --- > To unsubscribe, mail [EMAIL PROTECTED] > To get help, mail [EMAIL PROTECTED] > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.co
Re: session problem
Hi, i'm not sure about tomcat 3.1, but I know that URL Rewriting is not supported under tomcat 3.0 ! You may try resin 1.1 or certainly other JSP engine ! Have a nice day Veronique ahfei a écrit : > thanks . i using tomcat3.1 . > >URL rewriting isn't supported by every JSP engine, and even if it is supported you >often have to enable it in a > >server config file .. What are you using ? > > > >veronique > > > >ahfei a écrit : > > > >> dear laurent andre > >> > >> but i had disabled cookies in netscape > >> > >> at 2000-4-25 17:01:00 your wrote: > >> >That means "your" session manager works with cookie ! So, if cookies > >> >are disabled, it doesnt work! > >> >i think > >> > > >> >ahfei wrote: > >> >> > >> >> dear all: > >> >> > >> >> i made a test jsp program to study URL rewriting ,but it seems don't work. . > >> >> > >> >> test1.jsp > >> >> <% > >> >> session.setAttribute("hello","abcd"); > >> >> response.sendRedirect(response.encodeRedirectURL("test2.jsp")); > >> >> %> > >> >> > >> >> test2.jsp > >> >> <% > >> >> out.println(session.getAttribute("hello")); > >> >> %> > >> >> > >> >> when i run the test1.jsp with cookie disabled,url rewriting don't work, and >test2.jsp return a null string. > >> >> > >> >> can somebody help me? > >> >> > >> >> thanks in advance! > >> >> > >> >> ahfei > >> >> [EMAIL PROTECTED] > >> >> > >> >> === > >> >> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > >> >> Some relevant FAQs on JSP/Servlets can be found at: > >> >> > >> >> http://java.sun.com/products/jsp/faq.html > >> >> http://www.esperanto.org.nz/jsp/jspfaq.html > >> >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > >> >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > >> > > >> >=== > >> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > >> >Some relevant FAQs on JSP/Servlets can be found at: > >> > > >> > http://java.sun.com/products/jsp/faq.html > >> > http://www.esperanto.org.nz/jsp/jspfaq.html > >> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > >> > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > >> > >> ahfei > >> [EMAIL PROTECTED] > >> > >> === > >> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > >> Some relevant FAQs on JSP/Servlets can be found at: > >> > >> http://java.sun.com/products/jsp/faq.html > >> http://www.esperanto.org.nz/jsp/jspfaq.html > >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > >Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > ahfei > [EMAIL PROTECTED] > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets ahfei a écrit : > thanks . i using tomcat3.1 . > >URL rewriting isn't supported by every JSP engine, and even if it is supported you >often have to enable it in a > >server config file .. What are you using ? > > > >veronique > > > >ahfei a écrit : > > > >> dear laurent andre > >> > >> but i had disabled cookies in netscape > >> > >> at 2000-4-25 17:01:00 your wrote: > >> >That means "your" session manager works with cookie ! So, if cookies > >> >are disabled, it doesnt work! > >> >i think > >> > > >> >ahfei wrote: > >> >> > >> >> dear all: > >> >> > >> >> i made a test jsp program to study URL rewriting ,but it seems don't work. . > >> >> > >> >> test1.jsp > >> >> <% > >> >> session.setAttribute("hello","abcd"); > >> >> response.sendRedirect(response.encodeRedirectURL("test2.jsp")); > >> >> %> > >> >> > >> >> test2.jsp > >> >> <% > >> >> out.println(session.getAttribute("hello")); > >> >> %> > >> >> > >> >> when i run the test1.jsp with cookie disabled,url rewriting don't work, and >test2.jsp return a null string. > >> >> > >> >> can somebody help me? > >> >> > >> >> thanks in advance! > >> >> > >> >> ahfei > >> >> [EMAIL PROTECTED] > >> >> > >> >> ==
Re: session problem
URL rewriting isn't supported by every JSP engine, and even if it is supported you often have to enable it in a server config file .. What are you using ? veronique ahfei a écrit : > dear laurent andre > > but i had disabled cookies in netscape > > at 2000-4-25 17:01:00 your wrote: > >That means "your" session manager works with cookie ! So, if cookies > >are disabled, it doesnt work! > >i think > > > >ahfei wrote: > >> > >> dear all: > >> > >> i made a test jsp program to study URL rewriting ,but it seems don't work. . > >> > >> test1.jsp > >> <% > >> session.setAttribute("hello","abcd"); > >> response.sendRedirect(response.encodeRedirectURL("test2.jsp")); > >> %> > >> > >> test2.jsp > >> <% > >> out.println(session.getAttribute("hello")); > >> %> > >> > >> when i run the test1.jsp with cookie disabled,url rewriting don't work, and >test2.jsp return a null string. > >> > >> can somebody help me? > >> > >> thanks in advance! > >> > >> ahfei > >> [EMAIL PROTECTED] > >> > >> === > >> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > >> Some relevant FAQs on JSP/Servlets can be found at: > >> > >> http://java.sun.com/products/jsp/faq.html > >> http://www.esperanto.org.nz/jsp/jspfaq.html > >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > >> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > > >=== > >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > >Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > ahfei > [EMAIL PROTECTED] > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Problems with sessions...
Hi, I have exactly the same application : - A UserInfo beans with session scope, where i also have static objects to share some info between all users and I have a logOff button which call session.invalidate(). I also use the HttpSessionBindingListener interface to know when the session is closed and do some cleanup. And it works well ! I use resin 1.1 under window NT ! I don't know what is different with your config ... Concerning the3) there isn't any real solution (I think !), the only possibility is to set the session Invalidate time out to an appropriated value and to catch the invalidate ( with the valueUnbound method) in order to do the needed cleanup ! and for the 2) I suppose this is related to your other problems : If your previous user has logged off ... It's du to the problem 1 which Should work ( To be sure invalidate() is called, try to add the HttpSessionBindingListener interface and see oif it's called ). If your user didn't logOff before, you can reconfigure your bean with the new information. Hope this help Regards Veronique Franck Rageade a écrit : > Hello everyone, > > Perhaps you may find my questions trivial, but I am not an experimented JSP >addict yet... I'm developping a JSP based intranet portal using Resin 1.1 as servlet >motor. When a user is authenticated, a User object is instanciated with the user's >configuration and this objet is stored in the session in order to be accessible from >every page of the portal. This works very very well, but... > (problems start here) there is a "logout" button, which calls a logout.jsp page, >in which the invalidate() method is supposed to kill the session. > > 1) When the user logs in again, the previous User object is retrieved, which >means that the session was not correctly invalidated. > > 2) When another user logs in from the same machine, the previous user's >configuration is retrieved. > > 3) When the user doesn't not properly log out (browser killed or simply points >to another URL), the invalidate() method is never called... > > Each of this point is a real problem and I would be very interested in any kind >of help. > > Best regards, > > Franck > > ¤ş°`°ş¤ř,¸¸,ř¤ş°`°ş¤ř,¸¸,ř¤ş°`°ş¤ř,¸¸,ř¤ş°`°ş¤ř > > FRANCK RAGEADE > Skill Group e-Business > > SBA 67 - France & Abroad > Cap Gemini France - Division Rhône-Alpes > > 11, Chemin des Prés > ZIRST 4403 > 38944 Meylan , France > > LoginId: frageade > Email: [EMAIL PROTECTED] > Phone: +33 (04) 76 04 23 30 > Fax: +33 (04) 76 41 24 61 > > ¤ş°`°ş¤ř,¸¸,ř¤ş°`°ş¤ř,¸¸,ř¤ş°`°ş¤ř,¸¸,ř¤ş°`°ş¤ř > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: How to dynamicaly include files in jsp,not using<%@ include file="filename"%>?
As Craig just told you in the previous mail , you habe to use : where pathname is the path and/or name of a file that could be depending on few parameters at runtime if(blabla) pathname= toto.jsp else pathname= titi.jsp regards veronique Arnab Acharya a écrit : > Dear Group, > > I'm afraid I'm not fully into this but, in our project we've done something > similar. We used : > > > > Here, we were able to take up the changed file. However, as far as dynamism > was concerned, the file was fixed i.e., top.jsp and not any other file. Now, > do u have anyway to choose a file at runtime? > > TIA, > > Arnab > > > -Original Message- > > From: Craig R. McClanahan [SMTP:[EMAIL PROTECTED]] > > Sent: Thursday, April 20, 2000 2:28 AM > > To: [EMAIL PROTECTED] > > Subject: Re: How to dynamicaly include files in jsp, not using<%@ > > include file="filename"%>? > > > > "Manty, George" wrote: > > > > > It appears to me as though there is no way to do this. I think this > > > functionality should be added to the JSP Spec. > > > > > > > It is, sorta ... see below. > > > > > > > > Right now, the only way it appears you can implement this is by hacking > > the > > > JSP engine code and you can only do this if you are using an open source > > JSP > > > engine. > > > > > > Anyone, have any other possible solutions? > > > > > > > The <%@ include file="..."%> directive is processed at the time your JSP > > page is > > compiled, not when it is executed. Therefore, there is no opportunity for > > you to > > calculate the name of the file to be included, because your scriptlet (or > > whatever) > > isn't used until a request is made. > > > > On the other hand, you can use instead, for example: > > > > <% > > String pathname = "/page" + request.getParameter("page_number"); > > %> > > > > > > This works because is processed at request time. > > > > > > > > Thanks, > > > George > > > > > > > Craig McClanahan > > > > == > > = > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > > JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: how to give parameters from a jsp to another?
If you use a link you can just write: ... If you use a form, you could use a hidden field Hope this help Veronique Hui Du a écrit : > There is a String userid in aaa.jsp, how can I tansfer it to bbb.jsp? > > __ > Get Your Private, Free Email at http://www.hotmail.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: problem with
Hi, To use jsp:forward you shouldn't have output anything before in your page if the page has no buffer ... See the JP1.1 Spec. : "If the page output is buffered then the buffer is cleared prioir to forwarding. If the page output was unbuffered and anything has been written to it, an attempt to forward the request will result in an IllegalStateException." Maybe you could try to increase the buffer size Hope This Help Veronique Varun a écrit : > hi all! > > some of u replied to my problem (original mail below) > that i should use > > > > only. > > I tried using that, but the problem still exists. > > Kuldip suggested that maybe there is some > problem with my browser(IE 5.0) settings. > Could u pls. suggest what settings do i need to change. > > Thnx > > Varun > > - Original Message - > From: Varun <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, April 18, 2000 2:13 PM > Subject: (no subject) > > > hi all! > > > > i'm having this peculiar problem > > > > if i use > > > > > > > > > > then i get an error : > > > > java.io.IOException: Error: Attempt to clear a buffer that's already been > flushed > > at com.sun.jsp.runtime.JspWriterImpl.clear(JspWriterImpl.java:115) > > at > C_0003a.varun.jswdk_0002d_00031_0005f_00030_0005f_00031.help_0002ddesk.jsp.p > roject_00032.jsp_0005cproject_00032_0005clogin_0002ejsplogin_jsp_12._jspServ > ice(jsp_0005cproject_00032_0005clogin_0002ejsplogin_jsp_12.java, Compiled > Code) > > at com.sun.jsp.runtime.HttpJspBase.service(HttpJspBase.java, > Compiled Code) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java, > Compiled Code) > > at > com.sun.jsp.runtime.JspServlet$JspServletWrapper.service(JspServlet.java, > Compiled Code) > > at com.sun.jsp.runtime.JspServlet.serviceJspFile(JspServlet.java, > Compiled Code) > > at com.sun.jsp.runtime.JspServlet.service(JspServlet.java, > Compiled Code) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java, > Compiled Code) > > at > com.sun.web.core.ServletWrapper.handleRequest(ServletWrapper.java, Compiled > Code) > > at com.sun.web.core.Context.handleRequest(Context.java, Compiled > Code) > > at com.sun.web.server.ConnectionHandler.run(ConnectionHandler > > > > > > > > If i use > > response.sendRedirect("ITmenu.jsp"). > > > > suppose i have a file A.jsp having code like this... > > > > > > if(request.getParameter("submit")!=null) > > { > > > > > > if(request.getParameter("type").equals("IT")) > > { > > response.sendRedirect("ITmenu.jsp"); > > } > > > > } > > > > When i click the Submit button, the file A.jsp is displayed > > and below it I get a message > > DOCUMENT MOVED HERE > > > > HERE is a hyperlink which takes me to the > > file ITmenu.jsp > > > > Nowhere have I done any coding like this! > > > > Any help will be much appreciated > > > > I'm using JSWDK-1.0.1 on Windows NT m/c > > > > Thnx > > > > Varun > > > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Exception thrown using getRequestDispatcher in Tomcat 3.1
Don't you want to pass sendClass the MyClass instance ? request.setAttribute("myclass", sendClass); should work ! regards Veronique Ed Park a écrit : > I have made a custom class of my own, let's call it > MyClass. When I try to forward it to a jsp page from > my servlet (called TestServlet) with the following > invocation: > > MyClass sendClass = new MyClass(); > > request.setAttribute("myclass", MyClass); > >getServletConfig().getServletContext().getRequestDispatcher("/test.jsp").forward(request, > response); > > I get this exception thrown: > java.lang.IllegalAccessError: try to access class > MyClass from class TestServlet > > What the heck's going on?? > > __ > Do You Yahoo!? > Send online invitations with Yahoo! Invites. > http://invites.yahoo.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Custom Tags problem
Hi, I'm actually developping some custom tags to clarify my jsp pages. Of course I wrote the 'iterate' tag which takes an iterator as attribute and I wrote 2 TagExtraInfo : one which return a String as scriplet variable (commonly used) and an other one which return an Object. I have often an iterator on objects (many differents beans) and in the 'iterate' loop i want to get properties from the bean. In order to use the jsp:getProperty tag I'd like to use the scriplet variable created by the iterate tag as an entry to the jsp:useBean tag. Is this possible, or is there an other way to do this ? For now, after the iterate tag i have a lot of <% String val1 = ( (BeanType) newBean).getVal1(); %> So the tag use doesn't really clean up my jsp pages. I know I could do an iterate tag for all beans (by creating as TagExtraInfo as I have bean ) but I'd like to have something more general. Thanks For You Furtur Help ;) Veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: ASKING FOR HELP: Unhandled error!
Hi, wildwolf horse a écrit : > Hi Veronique Dupierris: > > thanks a lot for your help. > I just checked the it in Webserver.xml and I added it > like that > docBase="WebApp" /> > I tried your's but it seems not work too. Maybe I > should specify the path? Yes, you should specify your path in docBase > > > Now I moved to examples path, thanks god it works. > But now I met another funny problem. > > At first I put my *.jsp and *.html files in > > C:\jswdk-1.0.1\examples\jsp\testOne\ > my beans in > C:\jswdk-1.0.1\Webapp\Web-inf\jsp\beans\testOne\ > > I run the jsp file it works perfectly. > > Then I moved the jsp and html file to > C:\jswdk-1.0.1\examples\jsp\tutorial\testOne\ > > when I run it the jspengine tole me: > > Unhandled error! > com.sun.jsp.compiler.ParseException: Cannot read file: > C:\jswdk-1.0.1\examples\jsp\testOne\golferror.html > > That means the engine still think the html file should > be in old directory. Even I reboot the machine or put > the html file to C:\jswdk-1.0.1\webpages\, it still > not work. > > So the jsp engine has a very strong memory and if you > put your file in one directory, you don't have chance > to move to another? > > How can I solve this funny problem? > I'm not really sure that the jsp engine has a strong memory ;) How do you access to golferror.html ? is it a link in an other pages, the error page of a jsp page or do you try to access this page directly? I tried to change the 'cal' example from example/jsp/cal to example/jsp/tutorial/cal and it works well, except of course, the images and links to specific location > > Thanks a lot for great help. > > Smart. > Veronique > > __ > Do You Yahoo!? > Send online invitations with Yahoo! Invites. > http://invites.yahoo.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
No Subject
If you do not want to use the session object to store the date, a solution could be to get the data in A.jsp and then set them in the src as request param to get them in b.jsp : b.jsp?param=val Or you could also, group all yout data in a bean and only save the bean in the session to be able to get these data from any jsp files and once you get your bean you can destroy it from session object if you want to be sure to not use these data several times. Regards Veronique Lakshmi Anantharaman a écrit : > Hi all, > I have a jsp question. > >I have a jsp program A.jsp which actually defines a frame. I have two > jsp pages b.jsp and c.jsp in the frame set. I have a servlet which fetches > some data from the database and calls A.jsp with the data. I used request > dispatcher to do this and I also added the data using request.setattribute. > > I am also able to see the data I fetched in A.JSP, but the data should > actually be displayed in frame 1 which is b.jsp which has the logic to > retrieve this data. It fails with a null pointer exception. > >In other words, do you know how to save some data in one jsp page and use > it in another. I know this can be done using sessions. But I will be > fetching a huge chunk of data and I am not sure If i should use session > variables to save this. Please advise. > > Thanks and regards > Ganesh > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: ASKING FOR HELP: Unhandled error!
I don't remember exactly with jswdk1.0.1 , but in general, you should have - Your classpath point to your classes - In Webserver.xml , yopur appli path : and it should work ! I have an app with my beans in an other path than web-inf and it worked Hope this help Veronique Xunming Liu a écrit : > Hi : > > I met the very similar problem as you. When I rename the example , compile the > java file and run the jsp, the machine always told me it can not find the class. > > Now I will give up the jsp and try to use servlet directly. > > I don't know if any one can help me? > > Xunming > > wildwolf horse wrote: > > > Hi there: > > > > I am using SDK1.2.2 and JSWDK1.0.1. > > > > I met a strange problem of Unhandled error! It is said > > it can not find my *.class. Any one can help me? > > > > Thanks a lot. > > > > Smart > > > > I put my *.jsp and *.html in > > > > C:\jswdk-1.0.1\Webapp\jsp\testOne\ > > > > I put my *.java and *.class in > > C:\jswdk-1.0.1\Webapp\Web-inf\jsp\beans\testOne\ > > Actually i just copy the errrorpage example of > > JSWDK1.0.1 and only change the name. > > > > The *.jsp page like this: > > > > <%@ page import="testOne.Golf" > > errorPage="errorpge.jsp" %> > > > class="testOne.Golf" /> > > <% > > String name = null; > > > > if (request.getParameter("name") == > > null) { > > %> > > <%@ include file="/jsp/testOne/golferror.html" %> > > <% > > } else { > > test.setName(request.getParameter("name")); > > if (test.getName().equalsIgnoreCase("integra")) > > > > name = "acura"; > > if (name.equalsIgnoreCase("acura")) { > > %> > > Yes!!! http://www.acura.com">Acura > > is my favorite car. > > <% > > } > > } > > %> > > > > > > > > my Golf.java is ( I use javac Golf.java to create the > > class) > > > > ** > > package testOne; > > > > import java.io.*; > > import java.lang.*; > > > > public class Golf { > > > > String name = ""; > > public String getName () { > > return name; > > } > > > > public void setName (String name) { > > this.name = name; > > } > > > > } > > ** > > > > __ > > Do You Yahoo!? > > Send online invitations with Yahoo! Invites. > > http://invites.yahoo.com > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
getRequestDispatcher()
Hi, Just a question : in all (i think) examples, the getRequestDispatcher method was call using : getServletConfig().getServletContext().getRequestDispatcher(url); I saw that we could use : request.getRequestDispatcher(url); Is there any difference ? Why do all examples uses the first which is longer ? Thanks Regards Veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: Convert query string into Chinese.
I had a similar problem and use ByteArrayInputStream. So I had to convert my string to byte[]... This works even if it's not very clean. But I had an other problem : I used this in a DecodeURL servlet to intercepte the URL of an applet (not mine si I havn't the source) which seems to encode it with UTF-8, so the destination files did'nt recognize the parameters (those with accent). So the applet is linked to DecodeURL which decode the parameters and forward to a JSp files. This worked with Netscape ! I saw after that IE 5 doesn't encode the parameters !! How can I know if the browser has encoded the parameters with UTF-8 or not. Does this depend on the browser or an option in the browser ? Thanks Veronique Jason Hunter a écrit : > Yoyo Chen wrote: > > > > Hi, all: > > > > I use String rstr = new BufferedReader(new InputStreamReader(new > > StringBufferInputStream(str), "Big5")).readLine(); to convert query > > string into Chinese(Big5). But StringBufferInputStream was > > deprecated. How can I do this? Can anyone give me a hint? > > I don't think you can, because this is a behavior the JDK doesn't > expect -- treating a String like an array of bytes. If anyone has a > way, speak up. I'll change p. 393 of my book to match. :-) > > The good news is the method is only deprecated, not removed, so the > code still works and probably will for a long time. I'll scream loudly > if they ever remove it. > > -jh- > > -- > Jason Hunter > [EMAIL PROTECTED] > Book:http://www.servlets.com/book > 2.0 to 2.1: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.html > 2.1 to 2.2: http://www.javaworld.com/jw-10-1999/jw-10-servletapi.html > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html > http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP > http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Off-topic: Security !?
hello, Sorry for the off-topic message but I don't know where to find some information. And I suppose some of you had to take care of security :) ! Here is my problem: I'm writing a web app. to view / modify some knowledge base. Each user will be able to access only some of these KB, and only some of them will have RW permission. So, to do this, I have a login page where the user enter his name / pswd and the KB (s)he want to access. Once I accept the user info, i verify at the begining of each other pages that the user has logged in and didn't try to access an other KB This work well, maybe it's a bit "heavy"... But what i'd like to do is to protect the user name / pswd info while the user is logging in. If i use a simple form, these information will be visible while going from the client to the server ! I first thought using SSL connection, but it seems to be maybe complex to set up for what I want to do ? no ? Ifit's the only way, could so tell me where to find some example .. ( Does the client need to have st installed on his machine, do we have to use a third server suchas verisign ) Thanks for having red and maybe answered to this message. and again sorry for this long off topic message. Veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Off-topic: Security !?
I send it again as i didn't see this mail in the list , sorry if you received it twice. > hello, > > Sorry for the off-topic message but I don't know where to find some > information. And I suppose some of you had to take care of security :) ! > > Here is my problem: > I'm writing a web app. to view / modify some knowledge base. Each > user will be able to access only some of these KB, and only some of them > will have RW permission. So, to do this, I have a login page where the > user enter his name / pswd and the KB (s)he want to access. Once I > accept the user info, i verify at the begining of each other pages that > the user has logged in and didn't try to access an other KB This > work well, maybe it's a bit "heavy"... > But what i'd like to do is to protect the user name / pswd info > while the user is logging in. If i use a simple form, these information > will be visible while going from the client to the server ! > I first thought using SSL connection, but it seems to be maybe > complex to set up for what I want to do ? no ? > Ifit's the only way, could so tell me where to find some example .. ( > Does the client need to have st installed on his machine, do we have to > use a third server suchas verisign ) > > Thanks for having red and maybe answered to this message. > and again sorry for this long off topic message. > > Veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Servlets scope
Hello, Just a little question to be sure.I have a servlet which is call by few jsp file, (a sort of controller). Some variables (say A) are initializes in the init proc and other (say B) in the doPost. Does this mean, that the A variable have an application scope, if session 1 set A to a value, session 2 will see this value ? (that's what i have) and of course variables B are initialized on each request, so no special surprise ! The problem, is that I want to keep a trace on what the user is doing (ask resource, modify, free...) maybe could I save all variables in session and reload them on each request to 'follow' the user ! Thanks for your help. Veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Servlet - Client Com !
Hi, I have few question : -I have a JSP page(1 frame in a 3 framed window) to get parameters from the user, when validated, a request is send to a Servlet. If all values are OK, then I'd like to foward a JSP to the same frame. To do that I could set the Form Target to _self or frameName. BUT if the values are not OK, I would like to foward a special error Page on a new window (So the users could keep his previous value entered). It seems that this isn't possible ! Is it ? Is there a work around as : always use _blank as target and if OK, then from OK.jsp, foward to frameName (on the other window) and close this new window !! IS this possible !? - Is it possible to call a servlet without updating the browser. (using conditionnal, if OK Update, else Not for example) Maybe should I use a call to a JavaBean and then call a servlet depending on the result. - And a little Applet question ... How can we quit the Applet, by loading a new page or something like that. Thanks to all for reponding ! and for this mailing list which is very helpful ! Veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Dynamic attributes to custom tags
This is because your expression is quoted, it should work if you write: Veronique Tim Fox a écrit : > Is there any way, using taglibs to get dynamic attributes passed into > the tag code, from my understanding it seems that the attributes get > passed as literals. > > For example: > > > > In my setter method for attribute1 in my tag code the string "(new > Date()).toString()" is passed in, rather than the evaluation of the > expression (new Date()).toString(). > > Can anyone shed any light on whether this is possible with jsp? > > (In theory there seems no reason why this is impossible, since the jsp > compiler could insert a few lines in the generated class for the jsp > page, like: > > String tmp = (new Date()).toString(); > ... > mytagobj.setAttribute1(tmp); > > ) > > -- > Tim Fox (¦¬o) > > Hyperlink plc > http://hyperlink.com > > email: [EMAIL PROTECTED] > phone: +44 (0) 207 240 8121 > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Can anyone see why this won't work?
Hi, i'm not a real specialist, bit I think your problem could be du to the 'import' that should be include in the page directive. You could write <%@ page import="db.DataBaseSelect, java.util.Vector" %> or <%@ page import="db.DataBaseSelect" import="java.util.Vector" %> Hope this help veronique Leon Andrews a écrit : > Any help would be most appreciated - I have converted a 0.92 JSP page, but > cannot get the bean to work. I get a 500 Internal Server error... > > Is the problem with the way I am calling the Bean, or is it with the Bean > itself? > > The JSP... > > <%@ page import="db.DataBaseSelect" %> > > > > > > > Select everything from a database > > > > <% out.print(select.connect()); %> > > <% out.print(select.select()); %> > > Format results > > > <%@ import="java.util.Vector" %> > <% Vector aResult = select.getResult(); %> > > > <% for (int i=0; i < aResult.size(); i++) { %> > > ><% out.print(aResult.elementAt(i)); %> > > > <% } %> > > > > > >and the Bean. > > package db; > > import java.sql.*; > import java.util.Vector; > > public class DataBaseSelect { > >private Vector result; > >public DataBaseSelect() { > result = new Vector(); >} // constructor DataBaseSelect > >public String connect() { > try { > Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); > return "Driver Loaded!"; > } catch (Exception E) { > return "Unable to load driver."; > } >} > >public String select() { > try { > > String url = "jbbc.bla.etc:thin:@mysite.bla.bla.bla"; > > Connection C = DriverManager.getConnection(url,"myusername","mypassword"); > > Statement Stmt = C.createStatement(); > > ResultSet myResult = Stmt.executeQuery("SELECT question_text from > leon_jtest_questions"); > > while (myResult.next()) { > result.addElement(myResult.getString(1)); > } > > // Clean up > myResult.close(); > Stmt.close(); > C.close(); > return "Connection Success!"; > } catch (SQLException E) { > return "SQLException: " + E.getMessage(); > } >} > >/** > * Accessor for result > **/ >public Vector getResult() { > return result; >} > >/** > * Mutator for result > **/ >public void setResult(Vector avector) { > result = avector; >} > > } // class DataBaseSelect > > Leon Andrews > JobNet Worldwide Pty Ltd > Tel: (02) 9966 8566 > http://www.jobnet.com.au > > - Original Message - > From: Wampler Dean <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, January 18, 2000 9:17 AM > Subject: Re: Tomcat vs. JSWDK > > > > > > among all the things that are not working properly: > > > > > > > > > > - response.setHeader("Content-Type", "foo/bar"); does not set the > > > > > content-type > > > > > > > > Are you by chance calling it at the wrong time (i.e. after the > response > > is > > > > committed to the output stream)? > > > > > > I don't think I'm doing anything illegal, I've reduced it to a sample > > > JSP file containing simply: > > > <% > > > response.setHeader("Content-Type", "foo/bar"); > > > %> > > > and it still fails. > > > I'm not sure if this is compliant with the spec, but on the same > > > conditions response.setContentType works. so I guess one of them is > > > wrong. > > > > For what it's worth, I have successfully used constructs like the > following > > with Tomcat: > > > > <% > > if (sendXML() == true) { > > response.setContentType ("text/xml"); > > } else { > > response.setContentType ("text/html"); > > } > > %> > > > > However, you get a servlet error if you do this: > > > > <% > > if (sendXML() == true) { > > <%@ page contentType="text/xml" %> > > } else { > > <%@ page contentType="text/html" %>} > > %> > > > > Despite what the spec recommends, it would be very "painful" (for me at > > least) if any JSP engine could not handle the "response.setContentType()" > > approach. > > > > dean > > > > Dean Wampler, Ph.D. > > System Design Engineer > > > > Mercata, Inc. > > 110 110th Ave. NE > > Bellevue, WA 98004-5840 > > mailto:[EMAIL PROTECTED] > > http://www.mercata.com > > (425)468-9723 > > > > I want my tombstone to say: > > "Unknown Application Error in DeanWampler.exe. > > Application Terminated" > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > FAQs on JSP can be found at: > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html
Re: has anyone implemented dynamic drop down list boxes using JSP?
Hi, If I understand what your looking for, i used jsp to fill list in form from a list in a bean; I first initiated my list with the wanted value from a db, then in the jsp page i get an iterator over the list and generate my list box : <% while(allValues .hasNext() ) { %> <%= allValues.next()%> <% } %> ... Is this what you was looking for ??? "Orr, Geoffrey" a écrit : > I know that I can generate my entire form using a servelet, with drop down > values populated > from the database, but is there anyway I can embed this sort of function in > a file system html > or jsp page? > > I'm convincing myself that this can't be done, but can it? Has anyone > figured out any clever workarounds? > > Thanks, > > Geoff Orr > > Application Systems Engineer 5 > Pricing Engine Group > Norwest Mortgage Systems Development Group > Wells Fargo Service Company > 301-846-8403 (6-8403) > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: server supporting JSP and servlet
For Tomcat, you should also download tomcat;zip file which is in the directory above win32 !!! All is explain in he following file on how to install it : http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat/src/etc/Tomcat%2bApache-HOWTO?rev=1.1.2.1&content-type=text/x-cvsweb-markup Bhagyashree a écrit : > Hi All, > I am on a Windows NT client m/c with a Enterprise server 3.2. 3.2 does not > support JSP and servlets. > > I tried to download tomcat. It seems to be a single dll for NT and a singlr > .so filr for a sun. > > Is that all I need to make my NT run a JSP ? What webserver ( free > download) can I use on my NT client to run JSP and sevlets. > > I tried iplanet.com but could not download any webserver. > > Thanks in advance > Bhagyashree > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Tomcat and Apache
Yes, maybe it could be usefull if you could send me your dll ! But I'm a little bit surprised that you have to run both Apache and Tomcat. I though i'd only have to start Apache which will access to Tomcat for JSP - servlet stuff. How can we be sure we access the Apache server and not the light tomcat server !! However, I'm not even able to start Apache now since i add loadModule JServ in the conf file, so I will try as soon as i'll receive your dll :-) Thanks. Veronique Jens Andersen a écrit : > Hi Veronique, > > This is how I made it possible to use Tomcat 3.0 with Apache on my NT box: > > I followed the steps which is documented at > http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat/src/etc/Tomcat%2bA > pache-HOWTO?rev=1.1.2.1&content-type=text/x-cvsweb-markup > > Then I started my Apache server and then Tomcat (start.bat) - Then try to > open your browser and go to http://localhost/examples/jsp and it should > work!!! I don't have any problems with the JServ module - please let me know > if you would like at copy of my dll > > Regards, > > Jens Andersen > > -Original Message- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of Veronique Dupierris > Sent: 30. december 1999 14:16 > To: [EMAIL PROTECTED] > Subject: Re: Tomcat and Apache > > Hi, > > I was just looking at this ! I've dowloaded apache 1.3.9 and tomcat 3.0 > from > apache site and also Apache-tomcat HOWTO file from the faqs. To make tomcat > work > with Apache you have to add a module (JServ module) and modify httpd.conf to > point > on tomcat configuration files (All is explained in the HOWTO file) : > > http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat/src/etc/Tomcat%2bA > pache-HOWTO?rev=1.1.2.1&content-type=text/x-cvsweb-markup > > This should help but I had a problem with the ApacheModuleJserv.dll, > when > starting Apache server I have an error "ApacheModuleJserv is not a valid Win > NT > image" !? > Is there a probleme with this file or am I doing something wrong > > If you are under NT maybe you could tell me your result !!! Or If any body > has an > anwser. > > Veronique. > > Happy New 'false' Millenium to All > > Telmo Sá a écrit : > > > Hello! > > Question: Isn't Tomcat supposed to work as an extention to Apache Web > > Server. > > Something like jserv. > > If so, how can i glue it to Apache. ( A link telling me how is also > > usefull). > > Thank you! > > > > Telmo > > > > > === > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > FAQs on JSP can be found at: > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.html > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Tomcat and Apache
Hi, I was just looking at this ! I've dowloaded apache 1.3.9 and tomcat 3.0 from apache site and also Apache-tomcat HOWTO file from the faqs. To make tomcat work with Apache you have to add a module (JServ module) and modify httpd.conf to point on tomcat configuration files (All is explained in the HOWTO file) : http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat/src/etc/Tomcat%2bApache-HOWTO?rev=1.1.2.1&content-type=text/x-cvsweb-markup This should help but I had a problem with the ApacheModuleJserv.dll, when starting Apache server I have an error "ApacheModuleJserv is not a valid Win NT image" !? Is there a probleme with this file or am I doing something wrong If you are under NT maybe you could tell me your result !!! Or If any body has an anwser. Veronique. Happy New 'false' Millenium to All Telmo Sá a écrit : > Hello! > Question: Isn't Tomcat supposed to work as an extention to Apache Web > Server. > Something like jserv. > If so, how can i glue it to Apache. ( A link telling me how is also > usefull). > Thank you! > > Telmo > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: THANKS HELP Encoding URL doesn't Work !
Thank you for your help !!! I did download LiteWebServer and now it WORKS fine. Again thanks to everyone Veronique Hans Bergsten a écrit : > Veronique Dupierris wrote: > > > > I did a copy / paste of your examples and, as you said, I'm affraid I " have a > > bigger > > problem." :-(( Each time I click on the link to reach the other page, the session > > is different and the "link Name" ( which should be the result of the encodeUrl > > method) > > is : "examples/jsp/tutorial/session2.jsp" whitout any additionnal Information ! > > I am a starting to despair. > > Any other idea concerning this problem I saw in some books/tutorial... that > > an other way of doing session tracking was to use a > > hidden input in a form. Does that mean that it is possible to save the session ID, > > to get it back in a new JSP file and then ask the server to use > > this session ! If this is possible it could be a "dirty" work- around... > > You say in the original message that you use JSWDK 1.0.1. That's why URL rewriting > doesn't work, since the servlet container in JSWDK 1.0.1 doesn't implement URL > rewriting. If you like to use an easy-to-use, free of charge, all Java server with > Servlet 2.2 (incl. URL rewriting) and JSP 1.1 support, you can try our LiteWebServer, > see http://www.gefionsoftware.com/LiteWebServer for details. > > > > > -Original Message- > > > > From: A mailing list about Java Server Pages specification > > > > and reference > > > > [mailto:[EMAIL PROTECTED]]On Behalf Of Veronique Dupierris > > > > > > > > I am trying to encode all my links to be able to retrieve my beans > > > > and parameters I have saved in the session object. I tried in 3 > > > > differents case : > > > > > > > > * for the error Page, the first problem i had, is to set a string > > > > variable in the page action ... <%@ page > > > > errorPage="<%newURL%>" %> > > > > > > > > *So I tried when I call other JSP files, using HREF : > > > > <% String newURL=response.encodeUrl("page.jsp"); %> or encodeURL() > > > > or directly using > > > > response.encodeUrl in the HREF tag. > > > > > > > > * In a form : > > > > <% String newURL=response.encodeUrl("page.jsp"); %> > > > > > > > > > > > > > In all cases,I display my session ID to verify it and each times, > > > > the session ID is differents I tried with both Netscape > > > > and IE5; I > > > > am using JSWDK-1.0.1. > > > > Could you please tell me where I did something wrong > > -- > Hans Bergsten [EMAIL PROTECTED] > Gefion Software http://www.gefionsoftware.com > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: HELP Encoding URL doesn't Work !
I did a copy / paste of your examples and, as you said, I'm affraid I " have a bigger problem." :-(( Each time I click on the link to reach the other page, the session is different and the "link Name" ( which should be the result of the encodeUrl method) is : "examples/jsp/tutorial/session2.jsp" whitout any additionnal Information ! I am a starting to despair. Any other idea concerning this problem I saw in some books/tutorial... that an other way of doing session tracking was to use a hidden input in a form. Does that mean that it is possible to save the session ID, to get it back in a new JSP file and then ask the server to use this session ! If this is possible it could be a "dirty" work- around... Thanks again to all Veronique Stephen Summerfield a écrit : > > -Original Message- > > From: A mailing list about Java Server Pages specification > > and reference > > [mailto:[EMAIL PROTECTED]]On Behalf Of Veronique Dupierris > > > > I am trying to encode all my links to be able to retrieve my beans > > and parameters I have saved in the session object. I tried in 3 > > differents case : > > > > * for the error Page, the first problem i had, is to set a string > > variable in the page action ... <%@ page > > errorPage="<%newURL%>" %> > > > > *So I tried when I call other JSP files, using HREF : > > <% String newURL=response.encodeUrl("page.jsp"); %> or encodeURL() > > or directly using > > response.encodeUrl in the HREF tag. > > > > * In a form : > > <% String newURL=response.encodeUrl("page.jsp"); %> > > > > > > > In all cases,I display my session ID to verify it and each times, > > the session ID is differents I tried with both Netscape > > and IE5; I > > am using JSWDK-1.0.1. > > Could you please tell me where I did something wrong > > In the examples below, each time you view one of these pages in a browser > with *cookies disabled* you should get a different session created > (pointer/reference and session id will be different) - the server cannot > know what the session ID is. > > The cross links in the pages are built using encodeURL, if you click on > these links you should see the session object then remain constant across > the two pages. > > I tested this using JRUN 2.3.3 and it works as I describe. > > In my case the encoded url becomes something like this: > >/test/session2.jsp?jrunsessionid=944650284078244912 > > (JSWDK-1.0.1 will be a bit different but the principle should be the same) > > Note: change the '/test/' bit to the directory where you put the files. > > If these example files don't work then I think you may have a bigger > problem... :-) > > --- > /test/session.jsp: > > > > Session Test (without Cookies) > > > > Session (without Cookies) > > <%= session %> > > "><%= > response.encodeUrl( "/test/session2.jsp" ) %>" > > > > > > --- > /test/session2.jsp: > > > > Session 2 Test (without Cookies) > > > > Session 2 (without Cookies) > > <%= session %> > > "><%= > response.encodeUrl( "/test/session.jsp" ) %>" > > > > > > > I > > also have a > > question concerning session, should I use session.getSession > > in some or > > all my JSP files ? > > The default value for the session attribute in the <%@ page %> page > directive, is 'true' so a session should always be created for you, so you > shouldn't need to use request.getSession(), as the 'session' object in JSP > should already be set/created for you. > > Hope that helps, > > Steve > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: HELP Encoding URL doesn't Work !
Thank you for your help Here are some more question / precision ( Sorry but I'm new in JSP/ Servlets so I have basics questions): I don't understand what you mean with "where do you get the value from? " Which values are you talking about ? I think that my problem is more basic , it seems, of course, that I will have to solve the new problem you told me about the form POST method, but I also tried replacing POST with GET, for testing because I have a lots of parameters, and I still have the problem !!! My session ID is different in the jsps files. As when I use simple link ! Should I pass 'page.jsp?param=value' to the encodeUrl or should I first encode the "page.jsp" and then use: ?param=value> I did some test and ain't able to have same session while browsing my different pages ! Thanks again Veronique David Wall a écrit : > > * In a form : > > <% String newURL=response.encodeUrl("page.jsp"); %> > > > > > Good questions, > > Since form POSTs don't use parameters in the URL, it seems like there would > be a problem. The session id for URL rewriting would need to be implemented > as a hidden input field or the like, but that means hard-coding the name of > the parameter used for session ids, and where do you get the value from? > > David === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
HELP Encoding URL doesn't Work !
Hello, I am trying to encode all my links to be able to retrieve my beans and parameters I have saved in the session object. I tried in 3 differents case : * for the error Page, the first problem i had, is to set a string variable in the page action ... <%@ page errorPage="<%newURL%>" %> *So I tried when I call other JSP files, using HREF : <% String newURL=response.encodeUrl("page.jsp"); %> or encodeURL() or directly using response.encodeUrl in the HREF tag. * In a form : <% String newURL=response.encodeUrl("page.jsp"); %> > In all cases,I display my session ID to verify it and each times, the session ID is differents I tried with both Netscape and IE5; I am using JSWDK-1.0.1. Could you please tell me where I did something wrong I also have a question concerning session, should I use session.getSession in some or all my JSP files ? Thanks for your help veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Encoding URL for links
Hi, As I said in a previous mail, I have many jsp files that call each other using links. To avoid 'disable cookies' problem, I'd like to encode the URL. I tried both : ?TheDb=<%=allInstances.getTheDbName()%> > and String instanceURL = response.encodeUrl("instance.jsp"); ?TheDb=<%=allInstances.getTheDbName()%> > Instance.jsp, I display the session ID (session.getId()), and it changes each time i call the instance jsp page. Did i forget something ? I also wanted to be able to keep same session while my errorPage is called, is there a way to encode the errorPage URL ? Thanks for your help veronique === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Re: Some questions on WebAppli-cookies....
I have a response reading the jguru FAQ concerning the encodeURL utility regarding Cookies problem. I also output the session ID in my pages and could see they were different if cookies was disabled so suppose i had as many of beans instances as I had session. !?! So I tried the encodeURL and I still have different session ID if cookies are disabled. For the error page set by errorPage Tag, how could we encode the URL ? I tried test.jsp: <% String errURL = response.encodeURL("error.jsp"); %> ... <@ page import errorPage= xxx /> with xxx = <%=errURL%> I had an error ' Attributes must be quoted' = "<%=errURL%>" It seems to try to access to page <%=errURL%> ="response.encodeURL(/"error.jsp/")" still doesn't work I also tried for my links ?params > or <% String pageURL = response.encodeURL("mypage" ); %> ?params > In both case, the session ID are differents each time I call my page and if I display the pageURL string, it display only mypage.jsp I used JSWDK 1.0.1 What could be the reason for this ? thanks Veronique Veronique Dupierris a écrit : > Hi, > > I'm new in Web application, JSP... so sorry for my basics questions > !! > I have to write an application which access to a specific database. > All works fine but I 've read some mails about cookies and I'm wondering > if my application will work well in any case: > - I didn't wrote any servlet only JSP files. When i call a JSP from > another JSP file, I passes some parameters (DB name) to be able to get > my beans(usebean with same ID and then use setParameter DB name). Even > if no cookies are set (disable cookies in browser), it seems to work ( > Is it true ?, do I really access to the same instance ?) >- But to load my error page in top window not in a frame, I first > call error.jsp from errorPage tag which calls a second error page > (top.document.location.href="error2.jsp") after putting the exception > object in session (session.putValue); In this case the error2.jsp file > causes an error !! ( Null pointerException : certainly when I try to get > the exception object with session.getValue). > > I suppose i could load the error page on top windows without > calling a second page but i would like to know if the test i done on my > PC concerning the 'disable cookie' is valid and if I have to do > something in the case the user disable cookies in his browser. I saw > some encoding url .. could we do this in a JSP file ? > > Thank you for your help > veronique. > > I' ll certainly have a lot of other questions for you :-)) > > === > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > FAQs on JSP can be found at: > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.html === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
Some questions on WebAppli-cookies....
Hi, I'm new in Web application, JSP... so sorry for my basics questions !! I have to write an application which access to a specific database. All works fine but I 've read some mails about cookies and I'm wondering if my application will work well in any case: - I didn't wrote any servlet only JSP files. When i call a JSP from another JSP file, I passes some parameters (DB name) to be able to get my beans(usebean with same ID and then use setParameter DB name). Even if no cookies are set (disable cookies in browser), it seems to work ( Is it true ?, do I really access to the same instance ?) - But to load my error page in top window not in a frame, I first call error.jsp from errorPage tag which calls a second error page (top.document.location.href="error2.jsp") after putting the exception object in session (session.putValue); In this case the error2.jsp file causes an error !! ( Null pointerException : certainly when I try to get the exception object with session.getValue). I suppose i could load the error page on top windows without calling a second page but i would like to know if the test i done on my PC concerning the 'disable cookie' is valid and if I have to do something in the case the user disable cookies in his browser. I saw some encoding url .. could we do this in a JSP file ? Thank you for your help veronique. I' ll certainly have a lot of other questions for you :-)) === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html
JSWDK, how to configure JSP Engine
Hi, I'm new in JSP (even Java) environnement. I have installed jswdk on my system qnd I 'd like to have my own directories for my application : MyApp |---> JSP for my jsp files |---> Bean for all my beans. I tried to modify the webserver.xml file by changing exemples by myapp but it doesn't work. I have an exception : can't find bean.BeanName. Could someone tells me how and where we configure the server for our application ??? Thanks a lot ! veronique Dupierris === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". FAQs on JSP can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html