BUG in WLS ?? java.lang.ArrayIndexOutOfBoundsException: 1
Hi all, I am using a WLS and I seems to be getting the following exception randomly while accessing the JSP/ Servlets , There seems to be no reason at all..HAs any one encountered it ? or could it be a bug in WLS ? Thu Aug 10 15:54:38 PDT 2000: Servlet failed with R untimeException Thu Aug 10 15:54:38 PDT 2000: java.lang.ArrayIndexOutOfBoundsException: 1 at javax.servlet.http.HttpServlet.service(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled Code ) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled C ode) at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code) at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code) at weblogic.t3.srvr.ExecuteThread.run(Compiled Code) === 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: DB Access problem
Hi , This is a ODBC-JDBC specific error , I had got it once When The value specified for the argument ColumnNumber exceeded the maximum number of columns in the result set. ALSO Some Info : E10. SQLException: [S1002][Microsoft][ODBC SQL Server Driver] Invalid Descriptor Index This exception is usually thrown when retrieving a LONGVARCHAR or LONGVARBINARY column using the getXXXStream() method (column size > DefMaxFieldSize of idss.ini). This exception can be avoided by re-ordering your SELECT statement so that the long column is place at the end of the select list. In the two examples below, assume that picture is the only LONGVARBINARY type column. Then the first SELECT statement can cause this exception, while the second one works fine: (X) SELECT name, picture, address FROM employee SELECT name, address, picture FROM employee If there are two or more long columns in the same select list, place all of them at the end of the select list and make sure that your JDBC program retrieve them in the same order as they appear in the select list. -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Tarik Makota Sent: Wednesday, August 09, 2000 11:06 AM To: [EMAIL PROTECTED] Subject: Re: DB Access problem I changed odbc from CoffeePot to NorthWind (MSSQL 7.0) I have DSN under System and can access it from PowerBuilder so it works. This is the error i get when i run .jsp java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index - Original Message - From: Matthews,Paul <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 09, 2000 12:45 PM Subject: Re: DB Access problem > silly question- should that be 'CoffeePot' in the url? > > also call getConnection(url); rather than passing empty username/password > > regards, paul > > > -Original Message- > > From: Tarik Makota [mailto:[EMAIL PROTECTED]] > > Sent: 09 August 2000 17:37 > > To: [EMAIL PROTECTED] > > Subject: DB Access problem > > > > > > This is my acctual bean that is supposetly to connect to DB: > > I put the 'markers' so that i know where it stops. > > > > As soon as it hits Connection conn = ... it stops > > because in my jsp page print the propert userName > > so that i know wher do i get stuck. > > JSP page is displayed without any errors > > > > > > My DSN is ok because i have tried User and System. > > > > > > > > -- > > package foo; > > import java.util.*; > > import java.sql.*; > > import java.net.URL.*; > > > > > > public class DBLoginBean6{ > > private boolean isValid = false; > > private String userName; > > private String userPassword; > > > > public DBLoginBean6() { > > userName="Initalized"; > > userPassword=""; > > String url = "jdbc:odbc:CofeePot"; > > String query = "SELECT * FROM EMPLOYEES"; > > String firstName; > > String lastName; > > boolean more; > > try > > { > > userName="First Try"; > > try{ > > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > > } > > catch (java.lang.ClassNotFoundException ex) > >{ > > ex.printStackTrace(); > > } > > userName=" connection begin"; > > Connection con = DriverManager.getConnection(url,"",""); > > userName="I connected"; > > Statement stmt = con.createStatement(); > > userName="i created statement"; > > ResultSet rs = stmt.executeQuery(query); > > userName="i executed statement"; > > while (more = rs.next()) > > { > > firstName = rs.getString("FIRSTNAME"); > > lastName = rs.getString("LASTNAME"); > > System.out.println( firstName + " " + lastName); > > userName = "I was executed"; > > } > > userName="I did while"; > > rs.close(); > > stmt.close(); > > con.close(); > > userName="And i ewxited"; > > } > > catch (SQLException ex) > > { > > ex.printStackTrace(); > > } > > > > > > > > } > > > > public String getuserName() { > >return userName; > > } > > public String getuserPassword() { > >return "I am user Password"; > > } > > > > } > > > > > > == > > = > > 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:
Re: Parameters between two JSP files
but make sure that all the CGI variables are HTTP Encoded ! Cheers, Nagraj -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Jay Thoden Van Velzen Sent: Tuesday, August 08, 2000 9:27 AM To: [EMAIL PROTECTED] Subject: Re: Parameters between two JSP files This is not correct to start off with: Should be: etcetera Then from Reserveren.jsp: String code = request.getParameter("code"); -Original Message- From: Marcel van Kooy [mailto:[EMAIL PROTECTED]] Sent: 08 August 2000 09:08 To: [EMAIL PROTECTED] Subject: Parameters between two JSP files 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 === 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: JSP-Bean question
Hi Mark, One doesnt have to put it in the servlet classpath. I am using JSP use beans heavily and I have placed them in the CLASSPATH(Weblogic CLASSPATH since my App server is WEblogic) and if you could check the generated code I am sure you would find an answer as to why it has to be in a package... For example the bean is instantiated as : utils = (com.etrade.utilities) java.beans.Beans.instantiate(getClass().getClassLoader(), "com.etrade.utilities"); And with out the package name you would have to somehow have a import statement in the generated Java file.. Cheers, Naggi -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Mark Annese Sent: Wednesday, August 02, 2000 10:35 AM To: [EMAIL PROTECTED] Subject: Re: JSP-Bean question Ok, I got it to work. Here is what I did, I place the class in a package under the servletclasses directory. I had it at the root before. Does anyone know why it needs to be ina package? Thanks guys!! Mark -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Bains Rupali Sent: Wednesday, August 02, 2000 11:20 AM To: [EMAIL PROTECTED] Subject: Re: JSP-Bean question You dont need to register the bean. Did you place the bena in the myserver/serverclasses directory? -Rupali -Original Message- From: Mark Annese [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 02, 2000 1:13 PM To: [EMAIL PROTECTED] Subject: Re: JSP-Bean question I have checked the classname and it is consistant with the code in the class, the classname, filename, and alias name that I registered in Weblogic...I am confused . -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Sicaud Patrice Sent: Wednesday, August 02, 2000 10:54 AM To: [EMAIL PROTECTED] Subject: Re: JSP-Bean question is your class name accurate? -Original Message- From: Mark Annese [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 02, 2000 9:05 AM To: [EMAIL PROTECTED] Subject: JSP-Bean question I have created a small bean and I am trying to access it through a JSP. I am using Weblogic as my server. I registered the bean(did not know if I had to, but did anyway) and placed it in my classpath. when I run the JSP I get an error reading: C:\weblogic\myserver\classfiles\jsp_servlet\_stringbean.java:73: cannot resolve symbol probably occurred due to an error in /StringBean.jsp line 10: Any ideas on what I did wrong? Thanks! Mark === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === 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 === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
Re: **URGENT***
Manish, My first advise to you is to Isolate the problem . Try to write a Simple Java program which runs the unix command..and Make it to work.. And then try integrating it in to the SErvlet. I have been doing the same with out any problem ..although it was in Weblogic App Server native Secondly, Try Studying the servlet demostrated at : http://www.frontiernet.net/~imaging/FileUploadServlet.html Thirdly , I guess you would have to learn Java programming first before you speed ypur way in to App Servers..:) J/king Cheers, Nagraj -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Manish Shah Sent: Friday, July 21, 2000 8:02 AM To: [EMAIL PROTECTED] Subject: **URGENT*** Hye all I am kinda new to Java Programming as such and so to Jsp and servlet. I have a couple of questions [1] I get exceptions when i try to run unix command from my servlet To be precise about the error, this is what I get on the JSWDK1.0.1 startserver screen: java.io.IOException: CreateProcess: rlpq -H101.20.35.78 error=0 at java.lang.Win32Process.create(Native Method) at java.lang.Win32Process.(Unknown Source) at java.lang.Runtime.execInternal(Native Method) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) at java.lang.Runtime.exec(Unknown Source) I am performing the following command: rlpq -H101.20.35.78 which will query the printer 101.20.35.78 and check the status of the printer. However it works perfectly when I execute in a stand-alone application and I get the above mentioned IOException when I execute the same command from the Servlet. The code which I try to carry out is.. String[] tokenizedCom = new String[4]; String s; tokenizedCom[0] = "rlpq"; tokenizedCom[1] = "-H101.20.35.78"; try { Process myProcess = Runtime.getRuntime().exec(tokenizedCom); //DataInputStream in = new DataInputStream(new //BufferedInputStream(myProcess.getInputStream())); } catch (IOException e) { e.printStackTrace(); } I kinda am not sure as to what the problem might be. If possible, do send in a sample code alias to the above code. [2] I want to upload file from the JSP page to my servlet. One solution I found was to use the oreilley servlet package. I downloaded that. But I dont know how to use it. I tried to put that in the import statement, but not of much help. I even tried to modify my startserver.bat file on JSWDK1.0.1 by setting the class path. Please advice on it. Thanks a lot Manish __ Do You Yahoo!? Get Yahoo! Mail Free email you can access from anywhere! http://mail.yahoo.com/ === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets === To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". Some relevant FAQs on JSP/Servlets can be found at: http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.html http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
Re: including a dynamic file name
hi try : .html" flush="true"> Cheers, Naggi -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Stuart Maclean Sent: Tuesday, July 18, 2000 2:20 PM To: [EMAIL PROTECTED] Subject: including a dynamic file name I want to include a static HTML file from within a JSP page. The file name is derived from a parameter to the JSP page. I can't get this to work: .html" flush="true" /> It seems that the expression is not parsed correctly within a jsp include action??? I can get the desired functionality if I go from JSP to a servlet which uses the RequestDispatcher mechanism to do the include, but this is a pain needing the servlet to bridge the gap. I'm using Tomcat3.1 standalone, with JDK1.2, on WinNT. Any ideas anyone?? Thanks Stuart -- Stuart Maclean, Research Associate University of Washington ITS Research Program, College of Engineering Box 352500 Seattle, WA 98195-2500 Tel: (206) 543-0637 http://www.its.washington.edu === 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: Popup Windows
I guess try using some javascripting.. Look up : http://www.pageresource.com/jscript/jconfirm.htm Cheers, Nagraj -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Rupali Bains Goswami Sent: Tuesday, July 18, 2000 11:16 AM To: [EMAIL PROTECTED] Subject: Popup Windows In my jsp files, the user can update or delete some information. If they select delete I need to popup a confirmation window just to be sure that they want to delete the information and if they say yes i go to another jsp page, delete the row from the database and refresh the list Can someone tell me how i can do this confirmation dialog?? Thanks 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: JSP and Servlet application flow
hi Brad, I had the same confusion , the best approach is: Assume that your web app could have a lot of interfaces The Web Interface is th most obvious thing.. Lets say it could also have a WAP interface... and so on.. Anyway the point I want to drive home is that the Data is the same , but the GUI in a WAP and a Browser is entirely different... Hence we would have to find a mechanism to differentiate the Model from the View. And this is done using a Controller..(could be a servlet, or could be a EJ bean ..which say returns results and the respective JSPs render HTML...) but from a programmers point of view..utlimately even a JSP is converted in to a servlet and hence one might argue that ,why not do some processing in the JSPs too.. But what if the interface changes ??? you might have to touch all the code you had already written (in JSP)? Is it worth ? just because the GIU changed ? Hope this gives you some pointers... Cheers, Nagraj -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Brad Miley Sent: Tuesday, July 18, 2000 10:59 AM To: [EMAIL PROTECTED] Subject: JSP and Servlet application flow I am confused as to the best approach to: use servlets for generating data and flow and use jsp for presentation only. What is the advantage of using a servlet to generate data compared with using a jsp to generate data and then forwarding that information to another jsp which displays the results? 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: JSP editor
I am using Mutli-edit where in you could customize the editor to understand JSP.. try that.. --naggi -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Terence Lui Sent: Wednesday, July 05, 2000 12:39 PM To: [EMAIL PROTECTED] Subject: JSP editor What is the best editor for doing JSP, HTML, Javascript developemnt? -TL --- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.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