What I want to do is very simple. For the following HTML file, I want to use javax.swing.text.html.parser to retrieve the text between <a> and </a>.
Sample code please, even a piece does help.
<html>
<body>
<a>test</a>
</body>
</html>
I have an XML file. Whhen I parsed it, I always got the exception:
Reference to undefined entity "&char1;"
Factually, I don't care this undefined entity. Is there any way to get it around?
and, what's the final solution?
thanks in advance,
I have an XML file. Whhen I parsed it, I always got the exception:
Reference to undefined entity "&char1;"
Factually, I don't care this undefined entity. Is there any way to get it around?
and, what's the final solution?
thanks in advance,
I need some code to do this: when I click a cell of a table, the row in which that cell resides will change background color.
I need this code to work for both IE and NN. thanks for your input.
I want to use JavaScript and DHTML to create a tab (click Tools --> Internet Options..., you will see what the tab is). Is there any available code?
thx in advance,
<B>System:</B>
Linux
<B>Question:</B>
how to do file locking stuff?
<B>What I have done:</B>
Synchronizing all objects that will be operating files.
any suggestion?
trust me, that reference is pretty cool. it's comprehensive and not hard to understand (well, sometimes needs some tries). but be advised that's JScript reference, which is not 100% same as JavaScript implemented strictly by Netscape. So all stuff in that reference works well for IE, but some...
well, File.list() just returns file names in a String[], no time info included. i think u should sort them based on time by yourself. take a look at the following piece:
String[] FileName = File.list();
for (int i=0; i<FileName.length; i++)
{
File fileObj = new File(FileName[i]);
long...
i found how to solve this problem. see the window.open() syntax:
oNewWindow = window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
set the last parameter 'bReplace' to false. it will guarantee the new page shows up in previously opened window.
for further info, please refer to...
in page 1, i have a sentense
<a href="javascript:window.open(url, '')">
every time i click this link, it will pop up a new window.
what i want to see is:
the first time i click it, it pops up a new window. for the second time, it doesn't pup up another new window. instead, it uses the...
I have 3 questions on TextArea:
1) Suppose a textarea contains a couple of lines and i want it to scroll down to the last line. is there any code compatiable to both IE and NN?
(I know for IE, i can use the following to scroll down one page...
When I starts Tomcat, i notice (ps auxww | grep tomcat) that Tomcat launches many (about 30+) Java processes. What are they for? can I reduce them to 5-10 processes?
thx,
Vepo,
Your code does really work for me, though it doesn't look good. i know it's J's fault, not yours. Thanks a lot for your hint.
I've figured out what's preventing me from running the samples @ at http://www.javaworld.com/jw-12-2000/jw-1229-traps.html. add "proc.waitFor()" before...
old question, new variation.
we all know the following piece does work well:
String cmd = "ls";
Process proc = Runtime.getRuntime().exec(cmd);
here, the external command is simple enough.
now, i wanna play with pipe. for example, i wanna execute
"ls -l | grep -i abc" with...
your code is incomplete for successfully executing an external application. here's a piece of sample code. the variable 'extCommand' is the external program name (of course, make sure the right path is applied).
this code does work for running external Perl program. i do believe it works for...
the html code looks like:
<form method="post" action="http://xxx/servlet/receiver" enctype="multipart/form-data">
<input type="file" name="doc">
</form>
my question is: how to receive the file on server side (java servlet)?
thanks a lot in advance
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.