The Artima Developer Community
Sponsored Link

Java Answers Forum
Why am I getting error with program that works?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sid Northfield

Posts: 20
Nickname: northfield
Registered: Aug, 2002

Why am I getting error with program that works? Posted: Sep 22, 2002 4:21 PM
Reply to this message Reply
Advertisement
I am using an ftpbean to basically log into server.
set the directory and get a file.

Here is the error:

Location: /myJSPs/jsp/grid-portal-project2/ftplogin.jsp
Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dpo rtal_0002dproject2\ftplogin_1.java:99: ')' expected.
ftp.setDirectory("/home/eland/u6/k3074/w0109699/simple-bean");
^
1 error, 1 warning

at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:898)
at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:733)
at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Inte rceptor.java:176)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:5 16)
at java.lang.Thread.run(Thread.java:536)

Here is my jsp page:

<!-- ftplogin.jsp -->
<html>
<head>
<title> FTP Login </title>
</head>
<body>

<%@ page import= "ftp.* " %>
<jsp:useBean class="ftp.FtpBean"; id="ftpbean" scope="session" />

<%

String servername = request.getParameter("serverName");
String username = request.getParameter("username");
String password = request.getParameter("password");
ftpbean.ftpConnect(servername, username, password);
%>


<h1> Welcome to the FTP Login. </h1>

<FORM ACTION="ftplogin.jsp" METHOD=post>

Please login
Enter name of server:
<input type="text" name="servername"><br>

Enter user name?
<input type="text" name="username"><br>

Enter password
<input type="text" name="password"><br>

<input type="submit" name="Submit info">

</FROM>

<%=
ftp.setDirectory("/home/eland/u6/k3074/w0109699/simple-bean");
%>
<%=
ftpbean.getBinaryFile("accessbean.jsp", "local_file_name", this);
%>
<%=
ftpbean.close();
%>
</body>
</html>

I would also like to know if you have a better way to access the ftpbean using JSP as I think my style is lame. My plan is to use most of the functions of ftpbean package. But first starting of with the basics.

Topic: JTable problem Previous Topic   Next Topic Topic: drag and drop images in applet

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use