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

  • SEARCH
  • Home
  • 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 8881361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:19:55+00:00 2026-06-14T20:19:55+00:00

i have uploaded one war file in remote tomcat server.here i have to unzip

  • 0

i have uploaded one war file in remote tomcat server.here i have to unzip the war file.here i have to run the Demo java class on my browser.how can i do????

this is the saved path of Demo.java:

/var/lib/tomcat7/webapps/Example/WEB-INF/classes/com/testprops/ws

Here i have to run these means URL http://xx.xx.xx.xxx:8080/Example/ means am getting these page successfully.please check this:http://screencast.com/t/DKZW1t9Z1

This is my Demo.java:

 public class Demo {
 public String customerData(){
 String customerInfo = "";
 int a=10;
 customerInfo = customerInfo + a;
  try{
  Class.forName("com.mysql.jdbc.Driver");
   Connection con =  DriverManager.getConnection("jdbc:mysql://localhost:3306/android","androiduser","AN124@7#7");
  //Find customer information where the customer ID is maximum
   PreparedStatement statement =  con.prepareStatement("SELECT * FROM xcart_customers");
   ResultSet result = statement.executeQuery();
   while(result.next()){
   customerInfo = customerInfo + a + "&" + result.getString("login") + "&" + result.getString("password") + "&"+result.getString("firstname") + "&"+result.getString("email");
   //Here "&"s are added to the return string. This is help to split the string in Android application
    }
      }
    catch(Exception exc){
    System.out.println(exc.getMessage());
     }  
    return customerInfo;
    }
    }

How can i run the Demo.java class on my browser.please help me.

  • 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-06-14T20:19:56+00:00Added an answer on June 14, 2026 at 8:19 pm

    That is because you need to write a servlet that runs the code. Basically when you give a request to the above given link, then it calls Demo.java class and the output is given.

    It is recommended to please first learn a bit basics about servlets. That should help.

    So have a simple servlet like

    public void doGet(HttpServeletRequest r, HttpServletResponse s){
     Demo demo = new Demo();
     demo.run();//your Demo.java is invalid as all that try catch code needs to be inside a method
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well i have one file on my server and other on my computer. What
I have uploaded my project on server. Now when i am trying to upload
what's the problem there, I have uploaded this video to server, but now its
I'm trying to develop a Facebook application, and I have uploaded my index.php file,
I have uploaded some images on my server in Images Folder i want path
hey guys, i am using TFS 2010, i have uploaded content on TFS server,
I have uploaded one site developed with codeigniter. and after applying the .htaccess, it
I have uploaded two APK files into the Google Play store. One is a
I am working in a file management system.I have uploaded a document into a
i have uploaded an app yesterday by 6pm but till now i can't find

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.