|
 |
pro_jsp thread: how to print out the results of the memo type
Message #1 by "Seyalastry Breme" <seyalastry@i...> on Tue, 6 Nov 2001 05:20:35
|
|
hi Ljubisa Kovacevic,
how r u?. I am fine.
thank u very much for ur reply.
but i found and finsihed 2 days before.
it is working perfectly.
InputStream stmtint=rs.getString("stmt");
i assign this "stmtint" value to the textarea box.
it has read correctly .
how can i show this value on textarea box?.
answer me please.
regards
seyalastry Breme
> Your exception "Class org.apache.jsp.InputStream not found" has nothing
to
> do with the Type you're using.
>
> The compiler is looking for the wrong package, it doesn't import
> "java.io.InputStream", so you need to fix your JSP import statement,
either
> one of those should work:
>
> ----- Original Message -----
> From: Seyalastry Breme <seyalastry@i...>
> To: Pro_JavaServer_Pages <pro_jsp@p...>
> Sent: Tuesday, November 06, 2001 5:20 AM
> Subject: [pro_jsp] how to print out the results of the memo type
>
>
> > Hi,
> >
> > i want ur help ie. "how to print out the
> > results of the memo type".
> >
> > I've written a short JSP code that connects
> > to a MsAccess database and prints the
> > results of the column called stmt.
> > The column is of "memo" type.
> >
> > I'm used type of getAsciiStream and getBinaryStream
> > to read the value from the database, but both are
> > not working, it gives exception error ie.
> > "Class org.apache.jsp.InputStream not found".
> >
> >
> > i have sent jsp code and error alongwith this.
> >
> > The following is the JSP code i'm working on.
> >
> > <html>
> > <head>
> > <style>
> > body
> > {
> > font-family:sanserif;
> > font-size:150%;
> > font-weight:bold;
> > color:purple;
> > }
> > h2{ color:darkviolet;}
> > td{ color:deeppink;
> > font-size:100%;
> > font-weight:bold;
> > }
> > </style>
> > </head>
> > <%@ page language="java" import="java.sql.*" import="java.io.*" %>
> > <%@ page errorPage="error.jsp" %>
> > <body bgcolor=white>
> > <%
> > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> > Connection con=DriverManager.getConnection("jdbc:odbc:pollen");
> > Statement stmt1=con.createStatement();
> > String userid=request.getParameter("uid");
> > ResultSet rs=stmt1.executeQuery("select * from userform where
> > mail='"+userid+"' ");
> > %>
> > <h2><center>User Form</center></h2>
> > <table align=center>
> > <%
> > while(rs.next())
> > {
> > String fnam=rs.getString("fname");
> > String lnam=rs.getString("lname");
> > String place=rs.getString("insti");
> > String addr=rs.getString("add");
> > String street=rs.getString("add1");
> > String city=rs.getString("city");
> > String state=rs.getString("state");
> > String pincode=rs.getString("code");
> > String pno=rs.getString("phone");
> > String fno=rs.getString("fax");
> > String mailid=rs.getString("mail");
> > String country=rs.getString("country");
> > String quali=rs.getString("quali");
> > String desig=rs.getString("desig");
> > String like=rs.getString("research");
> > InputStream stmtint=rs.getBinaryStream("stmt");
> > // out.println(stmtint);
> > String geo=rs.getString("geowork");
> > %>
> >
> > <tr>
> > <td> First Name</font></td>
> > <td><input type=text name=fname value=<%= fnam %>></td>
> > <td> Phone No</td>
> > <td><input type=text name=phone value=<%= pno %>></td>
> > </tr>
> > <tr>
> > <td> Last Name</font> </td>
> > <td><input type=text name=lname value=<%= lnam %>></td>
> > <td> Fax No </td>
> > <td><input type=text name=fax value=<%= fno %>></td>
> > </tr>
> > <tr>
> > <td> Institution </td>
> > <td><input type=text name=ins value=<%= place %>></td>
> > <td> E-mail Id </td>
> > <td><input type=text name=email value=<%= mailid %>></td>
> > </tr>
> > <tr>
> > <td> Full Address</td>
> > <td><input type=text name=add value=<%= addr %>></td>
> > <td> Country</td>
> > <td><input type=text name=country value=<%= country %>></td>
> > </tr>
> > <tr><td></td><td><input type=text name=add1 value=<%= street %
> > >></td></tr>
> > <tr>
> > <td> City </td>
> > <td><input type=text name=city value=<%= city %>></td>
> > <td> Academic Qualification</td>
> > <td><input type=text name=quali value=<%= quali %>></td>
> > </tr>
> > <tr>
> > <td> State </td>
> > <td><input type=text name=state value=<%= state %>></td>
> > <td> Designation </td>
> > <td><input type=text name=desig value=<%= desig %>></td>
> > </tr>
> > <tr>
> > <td> Zip Code </td>
> > <td><input type=text name=code value=<%= pincode %>></td>
> > <td> Area of Research Interest </td>
> > <td><input type=text name=like value=<%= like %>></td>
> > </tr>
> > <tr>
> > <td> Statement of Interest(5 lines)</td>
> > <td><textarea name=stmt value=<%= stmtint %> cols="40"
> > rows="8"></textarea></td>
> > <td> Geographic Areaof Work</td>
> > <td><input type=text name=geo value=<%= geo %>></td>
> > </tr>
> > <tr>
> > <td><a href='insertnewuserform.jsp?id=<%= mailid %> &name=<%=
fnam %
> > >'><img src="../../images/insertnewuser.png" title="If U need Add for
> > Authorised User"></a></td>
> > <td></td>
> > <td></td>
> > <td><a href='deletenewuserform.jsp?id=<%= mailid %> '><img
> > src="../../images/delete.png" title="If no need Delete the
User"></a></td>
> > </tr>
> > </table>
> > <%
> > }
> > stmt1.close();
> > con.close();
> > %>
> > </body>
> > </html>
> >
> > and the error is
> > ****************
> >
> > A Servlet Exception Has Occurred
> > org.apache.jasper.JasperException: Unable to compile class for JSP
> >
> > An error occured between lines: 30 and 51 in the jsp
> > file: /jsp/webdatac/userformdetails.jsp
> >
> > Generated servlet error:
> > C:\Tomcat 4.0
> > \work\localhost\examples\jsp\webdatac\userformdetails$jsp.java:98:
Class
> > org.apache.jsp.InputStream not found.
> > InputStream stmtint=rs.getBinaryStream("stmt");
> > ^
> > 1 error
> >
> > at org.apache.jasper.compiler.Compiler.compile(Compiler.java:284)
> > at org.apache.jasper.servlet.JspServlet.loadJSP
> > (JspServlet.java:543)
> > at
> > org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary
> > (JspServlet.java:176)
> > at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
> > (JspServlet.java:188)
> > at org.apache.jasper.servlet.JspServlet.serviceJspFile
> > (JspServlet.java:381)
> > at org.apache.jasper.servlet.JspServlet.service
> > (JspServlet.java:473)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
> > at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> > (ApplicationFilterChain.java:247)
> > at org.apache.catalina.core.ApplicationFilterChain.doFilter
> > (ApplicationFilterChain.java:193)
> > at org.apache.catalina.core.StandardWrapperValve.invoke
> > (StandardWrapperValve.java:243)
> > at org.apache.catalina.core.StandardPipeline.invokeNext
> > (StandardPipeline.java:566)
> > at org.apache.catalina.core.StandardPipeline.invoke
> > (StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke
> > (ContainerBase.java:943)
> > at org.apache.catalina.core.StandardContextValve.invoke
> > (StandardContextValve.java:215)
> > at org.apache.catalina.core.StandardPipeline.invokeNext
> > (StandardPipeline.java:566)
> > at org.apache.catalina.authenticator.AuthenticatorBase.invoke
> > (AuthenticatorBase.java:472)
> > at org.apache.catalina.core.StandardPipeline.invokeNext
> > (StandardPipeline.java:564)
> > at org.apache.catalina.core.StandardPipeline.invoke
> > (StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke
> > (ContainerBase.java:943)
> > at org.apache.catalina.core.StandardContext.invoke
> > (StandardContext.java:2366)
> > at org.apache.catalina.core.StandardHostValve.invoke
> > (StandardHostValve.java:164)
> > at org.apache.catalina.core.StandardPipeline.invokeNext
> > (StandardPipeline.java:566)
> > at org.apache.catalina.valves.AccessLogValve.invoke
> > (AccessLogValve.java:462)
> > at org.apache.catalina.core.StandardPipeline.invokeNext
> > (StandardPipeline.java:564)
> > at org.apache.catalina.core.StandardPipeline.invoke
> > (StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke
> > (ContainerBase.java:943)
> > at org.apache.catalina.core.StandardEngineValve.invoke
> > (StandardEngineValve.java:163)
> > at org.apache.catalina.core.StandardPipeline.invokeNext
> > (StandardPipeline.java:566)
> > at org.apache.catalina.core.StandardPipeline.invoke
> > (StandardPipeline.java:472)
> > at org.apache.catalina.core.ContainerBase.invoke
> > (ContainerBase.java:943)
> > at org.apache.catalina.connector.http.HttpProcessor.process
> > (HttpProcessor.java:1005)
> > at org.apache.catalina.connector.http.HttpProcessor.run
> > (HttpProcessor.java:1098)
> > at java.lang.Thread.run(Unknown Source)
> >
> >
> > i am eagerly expecting your answer.
> > send immediately please.
> >
> > regards
> > seyala
> > ---
> > Do you need true END-TO-END (e2e) Java Messaging (JMS)? Softwired
> > offers industry's ONLY complete 100% JMS messaging solutions for your
> > needs TODAY.
> > Visit
> http://adtracking.wrox.com/track.asp?x=p2p%2Fe%2Fjava%
2Dsoftwired&url=www.so
> ftwired-inc.com NOW and find
> > out more!
> > Our unique product range includes: iBus//Mobile (wireless data),
> > iBus//MessageBus (IP Multicast), iBus//MessageServer (store and
forward)
> > and much more!
> >
> >
> >
>
|
|
 |