Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6795357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:20:04+00:00 2026-05-26T18:20:04+00:00

I usually work with PHP but need to setup this JSP with a server

  • 0

I usually work with PHP but need to setup this JSP with a server that I am interacting with. Here is the code I am trying:

<%
String filename = request.getParameter("file");
filename = "C:\Tomcat 5.5\webapps\myapp\\" + filename;
out.print(filename);

ActiveXObject theObject = new ActiveXObject("Scripting.FileSystemObject");
File theFile = new theObject.GetFile(filename);

theFile.Move("C:\Tomcat 5.5\webapps\myapp\processed\\");

%>

The goal is to send in a request to http://www.thewebsite.com/myfile.jsp?file=x.txt and the JSP file should take x.txt and move it to the processed directory.

When I call this JSP file I get an error that says ActiveXObject cannot be resolved to a type … so, I guess that I can’t do it this way.

Is it possible to move a file using JSP?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:20:05+00:00Added an answer on May 26, 2026 at 6:20 pm

    This

    ActiveXObject cannot be resolved to a type 
    

    usually means that we need to import the class where ActiveXObject resides. In JSP use import directive to import the package you need.

    <%@ page import="java.util.*" %>
    

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'll preface this by saying that I usually work in C#/.Net. Normally, I use
I usually test my code locally on my work machine and then move it
Usually when I need to fork in C, I do something like this: pid_t
I've written several Web MVC apps but never before in PHP, and I'm trying
At work we have a web app that we'll need to interface with another
I'm usually a lot better than this, I promise. Back story here: At my
I'm trying find a way to have PHP to indicate to the browser that
I need to retrieve a web content. I usually use wget but it's giving
I am building a php application that work on weather data and agricultural data.
I have to work with another team that is developing in php, when I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.