This is probably more of a web-based question. I have a basic web crawler I wrote with Java (using JSoup) which crawls through our repositories and stuff to locate the paths to certain snapshots and whatnot. It crawls through using the file tree which gets exposed when you try to go to a directory in a URL.
The problem I am having is that some of the directories contain index files, which means the connection to the directory redirects from the file tree to the index file. Any way to prevent that redirection?
I have a java assignment concerning formatting. I know I have no syntax errors but that doesn't mean that my formatting is correct and I can't figure out how to create a .txt file and view my code in notepad just to verify the formatting.
Usually, the code works very well. But sometimes, the download gets stalled indefinitely. Is there a way to set a time out period for the downloading of this file?
I am creating a web application that runs on server X(unix) and it has another unix system mounted on it. I want to generate the file tree structure of this mounted unix file system and show it on to a web application so that users can select a file and move it onto this current unix machine.
I know this sounds stupid and you may want to say why cant we directly copy the file, I am doing a proof of concept and using this as a basis.
I need to view, update and insert records through a jsp page.example: Employee details..If we give an admission number of an employee, and if the admission number exists in the database then the details like Name, DOB, DOR, Address, Contact info should be displayed in the appropriate fields.(simply a select query in SQL) . The fields are editable and if we need to make any changes we can update in that details itself. If admission number doesn't exists means we can insert all the details except the admission number and a temporary admission number is generated and displayed. The problem with this is i can't able to revert it to the same page.
How to do draw the original binary tree based on traversal results?
A binary tree has this pre-order traversal result: A,B,D,H,I,E,F,C,G,K,J (TreeNodes) And the same tree gives the following in-order traversal: B,H,I,D,A,C,F,E,K,G,J. Can you draw the tree structure?
I want to store sql query in tree format in xml file.I wrote a code which split the code into different tokens and store it in xml file.I am storing keywords like "select",from,where etc as xmlelements and the values of these keywords as textnodes inside corresponding elements.When the query contains single single statement it works as i need.but when nested query occurs i want to store the nested query inside "where" element.In that case the code didn't works properly.I am hereby attaching the code. When i try to store the xmldata in "CreateFiles.xml" file ,the file is not displaying in the corresponding folder.what is the reason for that?
CreateXml.java /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package querywork; import java.io.File; import java.io.StringReader; import java.io.StringWriter;
So I am having trouble with trying to get the main method to work. The program is supposed to construct a BinaryTree, and deserialize a file that is used for the Tree.
I am trying to draw a binary node tree to a text file.
public class BinaryTreeExample { public static void main(String[] args) { new BinaryTreeExample().run(); } static class Node { Node left; Node right; int value; public Node(int value) {
[Code] .....
This will output:
Building tree with rootvalue25 ================================= Inserted 11 to left of node 25 Inserted 15to right of node 11 Inserted 16to right of node 15 Inserted 23to right of node 16 Inserted 79to right of node 25 Traversing tree in order ================================= Traversed 11 Traversed 15 Traversed 16 Traversed 23 Traversed 25 Traversed 79
I need to print this information in the form of a graphic to a text file. so for example:
So that I can map the first request coming say www.xyz.net to my first page , it does the work but some of my css and images is not getting displayed .
I am working on a little project to create an App that can read contents from a website and return it back to my app. What protocol to use for that. Just the reading/retrieving content from a website.
Is it possible to use java to log on to a website? I mean,Ii know how to connect to a website and send commands, but I am not sure how to tell the server that i want to login?
And then after you logged in is it possible to then do something? like, if you logged in to gmail.com you would be able to see your emails?
I have a Java application that was built by a third party and my task is to embed this in a web site. To do so I got an HTML snippet, a .JAR and da .DAT file that seems to be called by the app. I tested this locally on my machine and it works ok. After uploading to the web server I get an error message
NumberFormatException For input string: "i>>?<html>"(the question mark is actually upside down, the >> is really one character)
At first sight this looks like a common issue with UTF-8 file being delivered when the file itself holds only ANSI characters (or vice versa). So I made sure that the .HTM and the .DAT file are indeed stored in ANSI 8-bit (and not Unicode 16-bit) format. However, this does not solve the issue. The .HTM file itself also holds a ISO 8859-1 directive. The server is set to deliver UTF-8 by default. I cannot change this due to a huge lot of other dependencies.
So I am not sure if my suspicion is right - is it indeed a character set issue? Or is it something else?
I am currently trying to update a few java applets for a website. As of right now, the applets are automatically blocked on all computers when they are accessed because the newest updates for Java have caused them to be blocked. I have determined that the solution to this is to resign the .jar files that are used to run the application with a new certificate.
I requested and received a certificate (in pkcs 12 format, a .p12 file), imported it into the computer, and used it to sign the .jar files. However, I have been getting an error after signing the .jar files stating that the full certificate chain of the code signing certificate is not valid.
I tried to check the path of the certificate using a method he recommended (using OpenSSL) but didn't really find anything of use.
I have a Java application this application sits on a Dedicated server and gets information about the machine and run commands on the machine.
I need it so that i can run these commands from pressing buttons on a website. For example i press a button to retrieve CPU info, it goes to the app, and the app sends the CPU info back.
I'm fine with the website and app its just the middle bit. How do i get the app to run commands sent from a webpage. Been ratting my brains for a couple weeks now.
I am having a difficult time trying to get results from the code below. The purpose is for my program to insert the DHL tracking number in the tracking text box, and then for the program to "click" the search button and get the tracking results.
This is the code:
import com.gargoylesoftware.htmlunit.WebClient; import java.io.*; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.html.HtmlInput; import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; import java.net.*; public class DHL {
[Code]...
These are the results I am getting in the console (in red), which look like an error:
Apr 23, 2015 7:55:49 PM com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement addbehavior WARNING: Unimplemented behavior: #default#userdata Exception in thread "main" com.gargoylesoftware.htmlunit.ElementNotFoundException: elementName=[*] attributeName=[name] attributeValue=[sbtc] at com.gargoylesoftware.htmlunit.html.HtmlPage.getElementByName(HtmlPage.java:1747) at htmlTest.main(htmlTest.java:17)
I just cannot figure it out for the life of me. Also, is there a community that focuses on HTML Unit?
I am trying to make a program to go on a stock website find the value a particular stock is at and display it to the user. Then repeat at your selected timeframe.
I can get my code to read the entire source of the page or open a page but I cannot seem to get it to find something within the source.
What It would do when completed. Get input from the user on what stock and sight to search and how often to check it. Once the run button is clicked I would like it to take the input from the user and run in the back ground going on the website searching the stock and display the numbers back to the user. I have only been able to have it display the entire source code though, not just the stock numbers.
i have this code to connect and login to a HTTPS website Now when i run it i get a 500 code error and if i print out the html of the website it says something went wrong. This is the website [URL]