 |
 |
Index ‹ java-programmer
|
- Previous
- 4
- <defunct> processesI've got a problem with <defunct> (zombie) processes on Linux...
I'm running child processes using Runtime.exec() and it usually goes well.
But just sometimes (undefined sometimes), process finishes as defunct. Is
there anything I can do about it? I suck out both inputStream and
errorStream, check Process.exitValue(), but it stucks on Process.waitFor().
I even try to suck these streams in separate threads, but it doesn't help.
I had the idea to detect if the process has stucked, and then try from
another thread to Process.destroy(), but it didn't help! Destroy does
nothing, process is still defunct, and waitFor() blocks it again... There
are no more methods in class Process to try, and I've already tried all the
combinations of existing ones...
Newsgroups and web are full of similar questions, but no answer. They all
say that a process is zombie if it is finished, but parent process hasn't
yet read the exit code. But I do read exitValue, and I also do
Process.waitFor(). Can I consider this a bug in Java VM?
Where could find the solution? Which direction should I go? I've been trying
for months, but no results...
Now, this is the latest version of code, as seen on java.sun.com...
{
...
Process process = Runtime.getRuntime().exec(commandLine);
inputVacuum = new TextVacuum(process.getInputStream());
errorVacuum = new TextVacuum(process.getErrorStream());
process.waitFor();
int exitValue = process.exitValue();
...
}
public class TextVacuum extends Thread {
private BufferedReader reader;
private StringBuffer buffer = new StringBuffer();
...
public TextVacuum(InputStream inStream) {
reader = new BufferedReader(new InputStreamReader(inStream));
start();
}
public void run() {
try {
char[] cbuf = new char[4096];
int numRead = reader.read(cbuf);
while (numRead != -1) {
buffer.append(new String(cbuf, 0, numRead));
numRead = reader.read(cbuf);
}
}
catch (IOException e) { }
finally {
try { reader.close(); }
catch (IOException e) { }
reader = null;
}
}
...
}
Thanks!
- 4
- jsp servlet code seperation confusionI posted this on the .help NG but I believe you folks could probably
provide more of an accurate answer considering the help group is
targeted towards true beginners.
Okay, where I am employeed I have the options of programming with
Microsoft Technologies and Java specifically J2EE. I have been
investigating the task of learning Java for about the last 3 to 4
months. I am a ASP.Net developer fulltime at work with C#. I was new to
OOP when I started into .Net about a year ago and am getting better.
However, our corporation uses Java as a National standard and I am
looking to advance some day and need to learn Java. Furthermore, where I
live, KY there are very few jobs for technologies other than .Net and
Java. No PHP or ColdFusion.
In the last couple of years this code seperation theory has overloaded
the programming world. .Net does it with what's called code behind. In
my research of Java the only things I see that reference code seperation
is servlets (I am sure J2EE and EJB contribute also). However,
everything I have read on servlets reference outputing HTML back to the
browser via the HttpServletResponse and Request objects.
My question, why in the world do they consider outputting HTML back to a
browser via a servlet considered code seperation. Furthermore, it
seems very time consuming and difficult to hand code complex layouts in
HTML and incorporate/format it for a servlet.
Can someone please explain or direct me to a resource where I can
understand why using servlets at any point in an application would be
better than jsp or even applets? Sometimes it's hard enough to design
complex layouts with the assistance Dreamweaver for example.
Thanks for any insight you can provide, I have read hundreds of pages of
information concerning this and trying to compare it with the my current
knowledge in the .Net world.
Marty U.
- 4
- JSP questionshave some questions about JavaServer Pages to ask
1. I made several input fields for user to input the height, width and
other stuff to create a table. how can I make the font in color red in
first row and first column automaticly and font in other rows and
columns remain the same color?
2. I want to add a title inside the table that need to colspan the
rest of the table. Becasue I don't know what # the user will input for
columns, so I can't set it before user input. so plz help me on this.
3. Randomly place an input field in one of the cells ?a different
cell on each refresh. If the user enters the correct product there and
changes the focus (by clicking outside the field), a Javascript
provided by the jsp page checks the answer and makes appropriate alert
My jsp file looks like this:
<HTML>
<head></head>
<BODY>
<%
String s2 = request.getParameter("Bsize") ;
s2 = s2.trim();
out.print("<table bgcolor=silver border= ");
out.print(s2);
out.print(" ");
String s3 = request.getParameter("Bcolor") ;
s3 = s3.trim();
out.print("bordercolor= ");
out.print(s3);
out.print(">");
String m1 = request.getParameter("mName") ;
m1 = m1.trim();
int M = Integer.parseInt(m1);
String n1 = request.getParameter("nName") ;
n1 = n1.trim();
int N = Integer.parseInt(n1);
String s = request.getParameter("FullName") ;
s = s.trim();
out.println("<font color=red size=6>");
out.println(s);
out.println("'s table is: </font>");
out.println("<tr colspan= ");
out.print(m1);
out.println(">");
out.print("<th> Numbers </th> </tr>");
for (int i =1; i<= M; i++ )
{
out.println("<tr width= 10 >");
for (int j =1; j<= N; j++ )
{
out.println("<th >");
out.println(j * i);
out.println("</th>");
}
out.println("</tr>");
}
%>
</table>
- 9
- 2 extendsDale King wrote:
> The Wogster wrote:
>
>> Thomas G. Marshall wrote:
>>
>>> The Wogster coughed up:
>>>
>>>> Irlan agous wrote:
>>>>
>>>> It's like the goto, it's legal in C, but the only times I have seen it
>>>> used, were because someone had programmed themselves into a corner.
>
>
> In C there were some cases where it was necessary/mad the code clearer.
> Most of those cases in Java have other constructs that eliminate the
> need for an arbitrary goto. Exceptions, labelled break and continue
> eliminate most of the cases for goto from C. But since C doesn't have
> those you are forced to use goto or over complicate the code.
>
>> With languages that have richly designed looping and redirection
>> constructs, you shouldn't need the goto. I didn't say it was always
>> to be avoided, just that when you feel the need to use goto (except
>> maybe in Gee Whiz Basic), it's usually a pretty good indicator that
>> the code design is lacking.
>
>
> That design as you said could be the design of the language and not
> necessarily the design of the program. Or are you one of those anti-goto
> that also disagrees with goto-like constructs like break, continue, and
> exceptions?
Uh no, because those leave control with the language. Most people who
defend the goto so vehemently,are, with modern languages like Java,
simply are using it to emulate something else available within the language.
Let's see, in the last 10 years, I have written about 1,000,000 lines of
C code, the number of actual goto's in there, none. During that time, I
viewed probably 40,000,000 more lines, which contained maybe 20 gotos.
Shows how little goto is actually needed. Of those 5, were code that
was complex trying to do something simple, usually the reason I was
looking at it, was because it wasn't working (poor design). Five more
were instances where you had the jack-of-all-procedures, where the
programmer had written a bunch of procedures in one block of code (again
poor design). They used goto to make the thing work. The remaining
ones, were places where the programmer had written themselves into a
corner, and under pressure of getting the thing to work, used goto to
bail out (again poor design).
W
- 9
- Whatever happened to PvdL?My curiosity about Hotjava now sated, what of Peter van der Liden? I recall
that he used to be pretty active on Usenet and quite a prolific author and
Java advocate.
As I recall he used to author the Java FAQ (which now 404's). I liked his
writing style (dating to the ugly fish book) and the Just Java series. The
6th edition came out in 2004 and no errata has published since January
2005.
Is Mr. van der Liden still active in the Java community? I realize he's no
longer with Sun and without treading into personal matters, did he have a
falling out with the people there? In spite of being published by Sun, his
Java books did contain quite a few barbs about misfeatures in the language.
- 11
- Baffling class not found problemHello, I'm using Java 1.3 with WebLogic 5.1 on Solaris. I have these
files:
cms/system/CMSException.class
cms/system/Constants.class
cms/system/InitServlet.class
cms/system/Log.class
When I include this line on my JSP page
<%@ page import="cms.system.*" %>
everything compiles fine. As does this line
<%@ page import="cms.*" %>
but when I try
<%@ page import="cms.system.Constants" %>
(r using any of the 4 class names above) I get the error:
Compilation of '/tmp/support/jsp_servlet/_www/__temp.java' failed:
/tmp/support/jsp_servlet/_www/__temp.java:16: Class
cms.system.Constants not found in import.
probably occurred due to an error in /www/temp.jsp line 1:
<%@ page import="cms.system.Constants" %>
How can this be? The perms on the files above are all 775. Can anyone
think of an explanation for why these files can't be found?
Thanks, - Dave
- 12
- Learning Apache Ant, problems with Swing(?)I'm attempting to learn Apache Ant (apache-ant-1.6.1); OS Linux Fedora
Core 2; j2sdk1.4.2_04. I appear to have problems with Ant + Swing, but
each work separately.
The following is my first build file (copied from the web).
<?xml version="1.0"?>
<!-- build file for lesson 1 -->
<project name="tutorial" default="build" basedir=".">
<target name="build">
<javac srcdir="." />
</target>
</project>
Works fine on a simple Java program, e.g.
import java.io.*;
public class Hello {
public static void main(String args[]) {
System.out.println("Hello");
}
}
However, when I progress to anything involving Java Swing, I get
compilation errors like:
[javac] /home/jc/java/classes/anttest/GuiScreens.java: In method
`GuiScreens.main(java.lang.String[])':
[javac] /home/jc/java/classes/anttest/GuiScreens.java:24: error:
Can't find constructor
`javax.swing.JFrame(Ljava/lang/String;Ljava/awt/GraphicsConfiguration;)'
in type `javax.swing.JFrame'.
[javac] frame[j][i] = new JFrame("Config: " + i,
gc[i]);
/This program compiles okay using javac./
(BTW jc@localhost~/java/classes/anttest>$ echo $ANT_HOME
/usr/apache-ant-1.6.1
jc@localhost~/java/classes/anttest>$ echo $JAVA_HOME
/usr/java/j2sdk1.4.2_04)
Any ideas?
TIA,
Jon C.
- 13
- [OT] gov't sponsored drug development"Peter Koehlmann" <email***@***.com> wrote:
> Tim Tyler wrote:
>> Development of life-saving drugs would be sponsored by the government.
> What universe was it you said you live in?
Oh, probably the one where in the US at least, the National Institutes
of Health do exactly that, every business day.
Tim lives in one of the civilized countries where they have Public
Health for all, and of course there, the government is money ahead
if new drugs cut down the total balanced cost of treating the ill and
compensating for the other disbenefits to society that illness causes,
even at the tax base level, and if they had any brains would realize
that and fund research accordingly.
xanthian.
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
- 14
- Midlet TextBox-------------------
TextBox tb = new TextBox("title", null, 5, TextField.DECIMAL);
tb.addCommand(new Command("Ok", Command.BACK, 0));
tb.setCommandListener(this);
Display dis = Display.getDisplay(this);
dis.setCurrent(tb);
-------------------
The code above shows (in my mobile Sony Ericsson K300i) a TextBox with 2
Commands "Ok" and "Ok".
If TextBox is empty of chars, first "Ok" is grayed but second not.
I suspect that the first Command "Ok" is part of TextBox (Screen) and
when I press it, it does nothing and commandAction method does not run.
Only when I press the second Command "Ok" commandAction method runs.
So, first "Ok" is "feature" of my mobile or it is in MIDP Specification?
If the second, how can I get access to this Command?
- 14
- database connection pooling in tomcat 3.3.1Hi,
I have a webapp which uses database connection pooling setup just like
the tomcat how-to suggests. But, I can't seem to get it to work on
tomcat 3.3.1. I couldn't even find any how-tos or guidances on it
anywhere. Is it supported ?
I get a javax.naming.NoInitialContextException: error when I set it up
in the conf/app-myapps.xml like the 3.3.1 doco suggests.
Appreciate any help on this.
Regards,
Lenine
- 14
- Grab common name from https://[ip]Hello,
I checked around on here a bit, and was unable to find an answer to
this one by searching for the error message. I'm hoping someone here
can help me with this issue.
I am attempting to gather the common name from an SSL certificate for a
given IP address. Following is the code I am using thus far (two
classes being used):
IP_Justification.java:
import java.net.*; //for https connection
import java.io.*; //for input parsing
import javax.net.ssl.HttpsURLConnection;
public class IP_Justification
{
private String IP; //IP address to search
private String domain; //common name returned by viewing IP via
https://ip
//default constructor
public IP_Justification()
{
throw new IllegalArgumentException("Please provide IP and domain");
}
//create with IP provided
public IP_Justification(String ip)
{
IP = ip;
domain = "";
}
public void getDomain() throws IOException
{
String urlToCheck = "https://" + IP;
URL techURL = new URL(urlToCheck);
System.out.println("URL created: " + techURL);
HttpURLConnection techUrlConn =
(HttpURLConnection)techURL.openConnection();
System.out.println("HttpURLConnection created" + techUrlConn + "\n");
techUrlConn.connect();
}
}
IPJustMain.java
import java.io.*;
public class IPJustMain
{
public static void main(String[] args) throws IOException
{
IP_Justification testing;
testing = new IP_Justification("64.233.167.99");
testing.getDomain();
try
{
}
catch(Exception e)
{
System.out.println("Start of output - Exception block");
System.out.println(e.getMessage());
System.out.println("End of output - Exception block");
}
}
}
Following is the output received when running IPJustMain:
URL created: https://64.233.167.99
HttpURLConnection
createdsun.net.www.protocol.https.DelegateHttpsURLConnection:h
ttps://64.233.167.99
Exception in thread "main" java.io.IOException: HTTPS hostname wrong:
should be
<64.233.167.99>
at
sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(HttpsClient.j
ava:490)
at
sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:
415)
at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect
(AbstractDelegateHttpsURLConnection.java:170)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLCon
nectionImpl.java:133)
at IP_Justification.getDomain(IP_Justification.java:54)
at IPJustMain.main(IPJustMain.java:15)
Press any key to continue . . .
I fully expect to have an exception thrown, and am hoping to be able to
parse that for the information I require. The problem I am running
into is the exception itself:
Exception in thread "main" java.io.IOException: HTTPS hostname wrong:
should be
<64.233.167.99>
It seems to be responding with the URL I pass to it, and not the common
name for the SSL at the specified IP address.
Anyone happen to know if there is a way around this or if my code is
flawed in someway?
Thanks for any help that can be provided!
- 15
- imageicon problemHello,
I have problem with loading an image from a directory.
I got a folder called images wich is located in my project directory :
c:\MijnJava\Swing_01.
But when i start this application i get a window with a title and in this
window a square that indicates that the picture is not found. Earlier i set
my classpath : set classpath= .;c:\MijnJava; this is in windows xp.
I am using Jcreator. The code works fine on my computer in school but not at
home.
I tryed moving the folder images to other directorys but with no luck.
What is the problem with this?
Can anyone help?
thanks
Tom
import javax.swing.*;
import java.awt.*;
import javax.swing.border.*;
import tomwouters.myswingutils.*; This is a folder where my packages
are.
public class Afbeelding_01 extends ExitableJFrame{
public Afbeelding_01(String titel){
super(titel);
TitledBorder paneelBorder =
BorderFactory.createTitledBorder("JPanel");
Container container = getContentPane();
JPanel paneel = new JPanel();
paneel.setBorder(paneelBorder);
JLabel label = new JLabel();
JLabel label2 = new JLabel();
ImageIcon afbeelding = new ImageIcon("images/jugg23.gif");
label.setIcon(afbeelding);
TitledBorder labelBorder =
BorderFactory.createTitledBorder("JLabel met jugg23.gif");
label.setBorder(labelBorder);
paneel.add(label);
container.add(paneel);
pack();
}
public static void main(String[] args) {
Afbeelding_01 frameMetAfbeelding = new Afbeelding_01("Afbeelding_01");
frameMetAfbeelding.setVisible(true);
}
}
- 15
- GridBagLayout and JMenuBar problemsHere's another interesting one. I looked on the Bug Parade to see if
this was present, but rapidly drowned in the sea of totally unrelated
results I got back from the brain dead search capabilities.
I built up a JPanel using GridBagLayout and various components. Works
fine; I'm quite used to GridBagLayout and its quirks. I'm using the
Java look and feel with native decorations turned off, so GridBagLayout
respects my panel's minimum size constraints.
I had been testing this layout in a JFrame without a JMenuBar, just to
validate the layout. Now when I added a JMenuBar to the JFrame, the
layout screws up when I resize the panel down to its smallest size.
It's as though the GridBagLayout does not take the JMenuBar's dimensions
into account when resizing happens. In my case, a couple of buttons
shrink in height, a text field bizarrely grows to 1.5X height, and
another text field overlaps it. None of these problems show up unless
the menu bar is in place.
Again: a known bug? Or should I submit it?
If there's any interest I'll whittle my code down to a SSCCE. Then I'll
try it with native window decorations turned on to see if that's where
the problem lies.
Laird
- 15
- turn off multiref in Axis(SOAP)Is there any possibilities to turn off references in soap envelope.
I would like to have response axis format equivalent old soap format.
thanks for help
bastek
- 15
- How to speed up the Portal development in eclipseHi all,
I am new in portal development. I am used to Eclipse to write Java
standalone application, but no server contained application such as
servlet.
Is there any way to setup a integrated development environment with
JetSpeed in Eclipse to do portal environment?
Please enlighten me.
Thanks in advance for your inputs and ideas.
Eclifeww
|
| Author |
Message |
Ken Kast

|
Posted: 2004-5-24 1:24:00 |
Top |
java-programmer, AccessControlException
The following is a snippet from a method in an applet RSSTree:
private Document getOPMLFile(String OPMLFileName) {
Document OPMLFile = null;
try {
URL u = new URL(getCodeBase(), OPMLFileName);
try {
BufferedReader br = new BufferedReader(new
InputStreamReader(u.openStream()));
if (br != null) {
try {
Builder parser = new Builder();
OPMLFile = parser.build(br);
}
.
.
.
This method is called out of RSSTree.start(). Document & Builder are
classes in the open source XML processor com.nu.xom. I get the following
error when parser.build(br) is executed:
java.lang.ExceptionInInitializerError
at RSSTree.getOPMLFile(RSSTree.java:63)
at RSSTree.start(RSSTree.java:31)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied
(java.util.PropertyPermission
org.apache.xerces.xni.parser.XMLParserConfiguration write)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.System.setProperty(Unknown Source)
at nu.xom.Builder.<clinit>(Unknown Source)
If I replace the bad line with a loop to read the the stream myself and
write out the lines, I get the XML I expect.
Without seeing the source for XOM can someone give me an idea as to why I
have an access problem when going through XOM but don't when the applet
reads directly?
Thanks.
Ken
|
| |
|
| |
 |
Chris Smith

|
Posted: 2004-5-24 7:45:00 |
Top |
java-programmer >> AccessControlException
Ken Kast wrote:
> This method is called out of RSSTree.start(). Document & Builder are
> classes in the open source XML processor com.nu.xom. I get the following
> error when parser.build(br) is executed:
>
> java.lang.ExceptionInInitializerError
[...]
> Caused by: java.security.AccessControlException: access denied
> Without seeing the source for XOM can someone give me an idea as to why I
> have an access problem when going through XOM but don't when the applet
> reads directly?
Sure. When XOM initializes itself, it tries to set a system property.
That's not allowed in an applet context. You might check documentation
for XOM or ask their support or mailing lists how to prevent XOM from
trying to set that system property. Otherwise, that library isn't
usable from a non-privileged applet, or any other code running under a
restricted SecurityManager.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
|
| |
|
| |
 |
guyvo

|
Posted: 2005-5-30 0:50:00 |
Top |
java-programmer >> AccessControlException
Hi,
I writing a simple applet which try to connect on a local sever via a simple
AWT button but I get in the actionPerformed following message in my debug
window when i run it in debug (using netbeans 4.1) :
Exception in thread "AWT-EventQueue-1" java.security.AccessControlException:
access denied (java.net.SocketPermission 127.0.0.1:6969 connect,resolve)
What is the problem here ?
Thnx
Guy
|
| |
|
| |
 |
Malte

|
Posted: 2005-5-30 1:11:00 |
Top |
java-programmer >> AccessControlException
guyvo wrote:
> Hi,
>
> I writing a simple applet which try to connect on a local sever via a simple
> AWT button but I get in the actionPerformed following message in my debug
> window when i run it in debug (using netbeans 4.1) :
>
> Exception in thread "AWT-EventQueue-1" java.security.AccessControlException:
> access denied (java.net.SocketPermission 127.0.0.1:6969 connect,resolve)
>
> What is the problem here ?
>
> Thnx
> Guy
>
>
fw?
|
| |
|
| |
 |
Tor Iver Wilhelmsen

|
Posted: 2005-5-30 2:01:00 |
Top |
java-programmer >> AccessControlException
"guyvo" <email***@***.com> writes:
> Exception in thread "AWT-EventQueue-1" java.security.AccessControlException:
> access denied (java.net.SocketPermission 127.0.0.1:6969 connect,resolve)
Are you running an applet? You cannot access any other machines than
the one in "codebase" without signing the applet.
|
| |
|
| |
 |
guyvo

|
Posted: 2005-5-30 2:30:00 |
Top |
java-programmer >> AccessControlException
Yes it is an applet. Can you pass me some example to sign an applet please
or a link ?
"Tor Iver Wilhelmsen" <email***@***.com> wrote in message
news:email***@***.com...
> "guyvo" <email***@***.com> writes:
>
>> Exception in thread "AWT-EventQueue-1"
>> java.security.AccessControlException:
>> access denied (java.net.SocketPermission 127.0.0.1:6969 connect,resolve)
>
> Are you running an applet? You cannot access any other machines than
> the one in "codebase" without signing the applet.
|
| |
|
| |
 |
Roland

|
Posted: 2005-5-30 3:00:00 |
Top |
java-programmer >> AccessControlException
On 29-5-2005 20:00, Tor Iver Wilhelmsen wrote:
> "guyvo" <email***@***.com> writes:
>
>
>>Exception in thread "AWT-EventQueue-1" java.security.AccessControlException:
>>access denied (java.net.SocketPermission 127.0.0.1:6969 connect,resolve)
>
>
> Are you running an applet? You cannot access any other machines than
> the one in "codebase" without signing the applet.
Apart from signing the applet it's also possible to grant the
appropriate permissions (SocketPermission in this case) to it (on the
computer where the applet is going to run in the browser).
--
Regards,
Roland de Ruiter
___ ___
/__/ w_/ /__/
/ \ /_/ / \
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2005-5-30 7:22:00 |
Top |
java-programmer >> AccessControlException
On Sun, 29 May 2005 20:30:19 +0200, guyvo wrote:
> Yes it is an applet. Can you pass me some example to sign an applet please
> or a link ?
Start here, <http://java.sun.com/docs/books/tutorial/jar/>.
--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
|
| |
|
| |
 |
Roedy Green

|
Posted: 2005-6-13 12:09:00 |
Top |
java-programmer >> AccessControlException
I have been blithely reading files via URL from an Applet. They
worked fine locally, but with Java 1.5 I'm getting
AccessControlExceptions. I should have been getting these all along.
Any comments on this?
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
|
| |
|
| |
 |
Roedy Green

|
Posted: 2005-6-13 12:32:00 |
Top |
java-programmer >> AccessControlException
On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
<email***@***.com> wrote or quoted :
>I have been blithely reading files via URL from an Applet. They
>worked fine locally, but with Java 1.5 I'm getting
>AccessControlExceptions. I should have been getting these all along.
>
>Any comments on this?
>--
Is an unsigned Applet supposed to be able to read arbitrary files from
the server it came from with
url = new URL( getDocumentBase(), "../xxxx.ser" );
URLConnection urlc = (URLConnection)url.openConnection();
urlc.setAllowUserInteraction( false );
urlc.setDoInput( true );
urlc.setDoOutput( false );
urlc.setUseCaches( false );
urlc.connect();
InputStream is = urlc.getInputStream();
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
|
| |
|
| |
 |
Roland

|
Posted: 2005-6-13 21:16:00 |
Top |
java-programmer >> AccessControlException
On 13-6-2005 6:31, Roedy Green wrote:
> On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
> <email***@***.com> wrote or quoted :
>
>
>>I have been blithely reading files via URL from an Applet. They
>>worked fine locally, but with Java 1.5 I'm getting
>>AccessControlExceptions. I should have been getting these all along.
>>
>>Any comments on this?
>>--
>
>
> Is an unsigned Applet supposed to be able to read arbitrary files from
> the server it came from with
>
> url = new URL( getDocumentBase(), "../xxxx.ser" );
> URLConnection urlc = (URLConnection)url.openConnection();
> urlc.setAllowUserInteraction( false );
> urlc.setDoInput( true );
> urlc.setDoOutput( false );
> urlc.setUseCaches( false );
> urlc.connect();
> InputStream is = urlc.getInputStream();
>
AFAIK, this should be possible. But judging from your question, you seem
to have trouble with it.
I've created a test applet using your code snippet, and hosted on my
local Apache webserver. It works perfectly with JRE 1.5.0_03 (no
AccessControlExceptions).
--
Regards,
Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
|
| |
|
| |
 |
Lucy

|
Posted: 2005-6-14 3:47:00 |
Top |
java-programmer >> AccessControlException
"Roedy Green" <email***@***.com> wrote in message
news:email***@***.com...
> On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
> <email***@***.com> wrote or quoted :
>
> >I have been blithely reading files via URL from an Applet. They
> >worked fine locally, but with Java 1.5 I'm getting
> >AccessControlExceptions. I should have been getting these all along.
> >
> >Any comments on this?
> >--
>
> Is an unsigned Applet supposed to be able to read arbitrary files from
> the server it came from with
I was under the impression that the unsigned Applet could be able
to access (read and write) from the server it came from, but only
within the same directory (sub)tree if that is the right word. I.e.
if ~jones has an applet, it cannot access ~smith files.
>
> url = new URL( getDocumentBase(), "../xxxx.ser" );
> URLConnection urlc = (URLConnection)url.openConnection();
> urlc.setAllowUserInteraction( false );
> urlc.setDoInput( true );
> urlc.setDoOutput( false );
> urlc.setUseCaches( false );
> urlc.connect();
> InputStream is = urlc.getInputStream();
>
> --
> Bush crime family lost/embezzled $3 trillion from Pentagon.
> Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
> http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
>
> Canadian Mind Products, Roedy Green.
> See http://mindprod.com/iraq.html photos of Bush's war crimes
|
| |
|
| |
 |
Roland

|
Posted: 2005-6-14 4:44:00 |
Top |
java-programmer >> AccessControlException
On 13-6-2005 21:46, Lucy wrote:
> "Roedy Green" <email***@***.com> wrote in message
> news:email***@***.com...
>
>>On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
>><email***@***.com> wrote or quoted :
>>
>>
>>>I have been blithely reading files via URL from an Applet. They
>>>worked fine locally, but with Java 1.5 I'm getting
>>>AccessControlExceptions. I should have been getting these all along.
>>>
>>>Any comments on this?
>>>--
>>
>>Is an unsigned Applet supposed to be able to read arbitrary files from
>>the server it came from with
>
>
> I was under the impression that the unsigned Applet could be able
> to access (read and write) from the server it came from, but only
> within the same directory (sub)tree if that is the right word. I.e.
> if ~jones has an applet, it cannot access ~smith files.
>
This is not the case: an applet is allowed to read a resource at levels
higher than the document base (i.e. where the document containing the
applet resides).
A Java applet has no knowledge of what "~jones" means. That's entirely
defined by the webserver. Though, it is possible that the webserver does
not allow to access resources of "~smith" (for instance because user
"smith" has restricted access rights of his/her files or folders). In
that case the webserver probably would return a 403 (Forbidden) or a 404
(Not Found) response, and the urlc.connect() below would throw an
IOException, rather than the applet throwing an AccessControlException.
>
>>url = new URL( getDocumentBase(), "../xxxx.ser" );
>> URLConnection urlc = (URLConnection)url.openConnection();
>> urlc.setAllowUserInteraction( false );
>> urlc.setDoInput( true );
>> urlc.setDoOutput( false );
>> urlc.setUseCaches( false );
>> urlc.connect();
>> InputStream is = urlc.getInputStream();
--
Regards,
Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
|
| |
|
| |
 |
Lucy

|
Posted: 2005-6-14 5:11:00 |
Top |
java-programmer >> AccessControlException
"Roland" <email***@***.com> wrote in message
news:42adf01b$0$83698$email***@***.com...
> On 13-6-2005 21:46, Lucy wrote:
>
> > "Roedy Green" <email***@***.com> wrote in message
> > news:email***@***.com...
> >
> >>On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
> >><email***@***.com> wrote or quoted :
> >>
> >>
> >>>I have been blithely reading files via URL from an Applet. They
> >>>worked fine locally, but with Java 1.5 I'm getting
> >>>AccessControlExceptions. I should have been getting these all along.
> >>>
> >>>Any comments on this?
> >>>--
> >>
> >>Is an unsigned Applet supposed to be able to read arbitrary files from
> >>the server it came from with
> >
> >
> > I was under the impression that the unsigned Applet could be able
> > to access (read and write) from the server it came from, but only
> > within the same directory (sub)tree if that is the right word. I.e.
> > if ~jones has an applet, it cannot access ~smith files.
> >
>
> This is not the case: an applet is allowed to read a resource at levels
> higher than the document base (i.e. where the document containing the
> applet resides).
>
> A Java applet has no knowledge of what "~jones" means. That's entirely
> defined by the webserver. Though, it is possible that the webserver does
> not allow to access resources of "~smith" (for instance because user
> "smith" has restricted access rights of his/her files or folders). In
> that case the webserver probably would return a 403 (Forbidden) or a 404
> (Not Found) response, and the urlc.connect() below would throw an
> IOException, rather than the applet throwing an AccessControlException.
Guess I better go protect my files right away WOWOWOWOWOWOWOW.
And, also, YIPES !!!
|
| |
|
| |
 |
Roland

|
Posted: 2005-6-14 6:06:00 |
Top |
java-programmer >> AccessControlException
On 13-6-2005 23:11, Lucy wrote:
> "Roland" <email***@***.com> wrote in message
> news:42adf01b$0$83698$email***@***.com...
>
>>On 13-6-2005 21:46, Lucy wrote:
>>
>>
>>>"Roedy Green" <email***@***.com> wrote in message
>>>news:email***@***.com...
>>>
>>>
>>>>On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
>>>><email***@***.com> wrote or quoted :
>>>>
>>>>
>>>>
>>>>>I have been blithely reading files via URL from an Applet. They
>>>>>worked fine locally, but with Java 1.5 I'm getting
>>>>>AccessControlExceptions. I should have been getting these all along.
>>>>>
>>>>>Any comments on this?
>>>>>--
>>>>
>>>>Is an unsigned Applet supposed to be able to read arbitrary files from
>>>>the server it came from with
>>>
>>>
>>>I was under the impression that the unsigned Applet could be able
>>>to access (read and write) from the server it came from, but only
>>>within the same directory (sub)tree if that is the right word. I.e.
>>>if ~jones has an applet, it cannot access ~smith files.
>>>
>>
>>This is not the case: an applet is allowed to read a resource at levels
>>higher than the document base (i.e. where the document containing the
>>applet resides).
>>
>>A Java applet has no knowledge of what "~jones" means. That's entirely
>>defined by the webserver. Though, it is possible that the webserver does
>>not allow to access resources of "~smith" (for instance because user
>>"smith" has restricted access rights of his/her files or folders). In
>>that case the webserver probably would return a 403 (Forbidden) or a 404
>>(Not Found) response, and the urlc.connect() below would throw an
>>IOException, rather than the applet throwing an AccessControlException.
>
>
> Guess I better go protect my files right away WOWOWOWOWOWOWOW.
> And, also, YIPES !!!
On Unix/Linux systems running a webserver, the URL
http://your.server.com/~yourname/
typically --but not allways-- corresponds to the subdirectory
'public_html' in your home directory, e.g.
/usr/home/yourname/public_html/
and not your entire homedir tree:
/usr/home/yourname/
All files in 'public_html' and subdirs are typically readable by the
webserver (otherwise it cannot serve them to some browser, at the other
side of the world, for example). For the remaining files in your homedir
tree you should apply normal access rules, i.e. protecting files from
access by others if you want don't want to share them, and less strict
if you do.
I don't have experience with webservers running on a Windows host, but I
guess a similar setup is conceivable, i.e. some subfolder containing
files accessible and served by the webserver, remaining files protected
by normal access rules.
--
Regards,
Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
|
| |
|
| |
 |
John Currier

|
Posted: 2005-6-14 9:32:00 |
Top |
java-programmer >> AccessControlException
Even if an applet had those restrictions the "protected" resources
would still be available from any browser not running the applet.
You're probably thinking of the visibility scope of an HTTP session.
John
http://schemaspy.sourceforge.net
|
| |
|
| |
 |
Lucy

|
Posted: 2005-6-14 11:27:00 |
Top |
java-programmer >> AccessControlException
"Roland" <email***@***.com> wrote in message
news:42ae035c$0$84219$email***@***.com...
> On 13-6-2005 23:11, Lucy wrote:
>
> > "Roland" <email***@***.com> wrote in message
> > news:42adf01b$0$83698$email***@***.com...
> >
> >>On 13-6-2005 21:46, Lucy wrote:
> >>
> >>
> >>>"Roedy Green" <email***@***.com> wrote in message
> >>>news:email***@***.com...
> >>>
> >>>
> >>>>On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
> >>>><email***@***.com> wrote or quoted :
> >>>>
> >>>>
> >>>>
> >>>>>I have been blithely reading files via URL from an Applet. They
> >>>>>worked fine locally, but with Java 1.5 I'm getting
> >>>>>AccessControlExceptions. I should have been getting these all along.
> >>>>>
> >>>>>Any comments on this?
> >>>>>--
> >>>>
> >>>>Is an unsigned Applet supposed to be able to read arbitrary files from
> >>>>the server it came from with
> >>>
> >>>
> >>>I was under the impression that the unsigned Applet could be able
> >>>to access (read and write) from the server it came from, but only
> >>>within the same directory (sub)tree if that is the right word. I.e.
> >>>if ~jones has an applet, it cannot access ~smith files.
> >>>
> >>
> >>This is not the case: an applet is allowed to read a resource at levels
> >>higher than the document base (i.e. where the document containing the
> >>applet resides).
> >>
> >>A Java applet has no knowledge of what "~jones" means. That's entirely
> >>defined by the webserver. Though, it is possible that the webserver does
> >>not allow to access resources of "~smith" (for instance because user
> >>"smith" has restricted access rights of his/her files or folders). In
> >>that case the webserver probably would return a 403 (Forbidden) or a 404
> >>(Not Found) response, and the urlc.connect() below would throw an
> >>IOException, rather than the applet throwing an AccessControlException.
> >
> >
> > Guess I better go protect my files right away WOWOWOWOWOWOWOW.
> > And, also, YIPES !!!
>
> On Unix/Linux systems running a webserver, the URL
>
> http://your.server.com/~yourname/
>
> typically --but not allways-- corresponds to the subdirectory
> 'public_html' in your home directory, e.g.
>
> /usr/home/yourname/public_html/
>
> and not your entire homedir tree:
>
> /usr/home/yourname/
>
> All files in 'public_html' and subdirs are typically readable by the
> webserver (otherwise it cannot serve them to some browser, at the other
> side of the world, for example). For the remaining files in your homedir
> tree you should apply normal access rules, i.e. protecting files from
> access by others if you want don't want to share them, and less strict
> if you do.
So it looks like you are saying that anyone can access any of my files
unless I protect each and every one of them. This is the YIKES scenario.
I better run over and protect them all. But wait, since I have access to
everyone elses files, I can just destroy them first.
> I don't have experience with webservers running on a Windows host, but I
> guess a similar setup is conceivable, i.e. some subfolder containing
> files accessible and served by the webserver, remaining files protected
> by normal access rules.
> --
> Regards,
>
> Roland de Ruiter
> ` ___ ___
> `/__/ w_/ /__/
> / \ /_/ / \
|
| |
|
| |
 |
Roland

|
Posted: 2005-6-14 17:32:00 |
Top |
java-programmer >> AccessControlException
On 14-6-2005 5:26, Lucy wrote:
> "Roland" <email***@***.com> wrote in message
> news:42ae035c$0$84219$email***@***.com...
>
>>On 13-6-2005 23:11, Lucy wrote:
>>
>>
>>>"Roland" <email***@***.com> wrote in message
>>>news:42adf01b$0$83698$email***@***.com...
>>>
>>>
>>>>On 13-6-2005 21:46, Lucy wrote:
>>>>
>>>>
>>>>
>>>>>"Roedy Green" <email***@***.com> wrote in message
>>>>>news:email***@***.com...
>>>>>
>>>>>
>>>>>
>>>>>>On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
>>>>>><email***@***.com> wrote or quoted :
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>I have been blithely reading files via URL from an Applet. They
>>>>>>>worked fine locally, but with Java 1.5 I'm getting
>>>>>>>AccessControlExceptions. I should have been getting these all along.
>>>>>>>
>>>>>>>Any comments on this?
>>>>>>>--
>>>>>>
>>>>>>Is an unsigned Applet supposed to be able to read arbitrary files from
>>>>>>the server it came from with
>>>>>
>>>>>
>>>>>I was under the impression that the unsigned Applet could be able
>>>>>to access (read and write) from the server it came from, but only
>>>>>within the same directory (sub)tree if that is the right word. I.e.
>>>>>if ~jones has an applet, it cannot access ~smith files.
>>>>>
>>>>
>>>>This is not the case: an applet is allowed to read a resource at levels
>>>>higher than the document base (i.e. where the document containing the
>>>>applet resides).
>>>>
>>>>A Java applet has no knowledge of what "~jones" means. That's entirely
>>>>defined by the webserver. Though, it is possible that the webserver does
>>>>not allow to access resources of "~smith" (for instance because user
>>>>"smith" has restricted access rights of his/her files or folders). In
>>>>that case the webserver probably would return a 403 (Forbidden) or a 404
>>>>(Not Found) response, and the urlc.connect() below would throw an
>>>>IOException, rather than the applet throwing an AccessControlException.
>>>
>>>
>>>Guess I better go protect my files right away WOWOWOWOWOWOWOW.
>>>And, also, YIPES !!!
>>
>>On Unix/Linux systems running a webserver, the URL
>>
>> http://your.server.com/~yourname/
>>
>>typically --but not allways-- corresponds to the subdirectory
>>'public_html' in your home directory, e.g.
>>
>> /usr/home/yourname/public_html/
>>
>>and not your entire homedir tree:
>>
>> /usr/home/yourname/
>>
>>All files in 'public_html' and subdirs are typically readable by the
>>webserver (otherwise it cannot serve them to some browser, at the other
>>side of the world, for example). For the remaining files in your homedir
>>tree you should apply normal access rules, i.e. protecting files from
>>access by others if you want don't want to share them, and less strict
>>if you do.
>
>
> So it looks like you are saying that anyone can access any of my files
> unless I protect each and every one of them. This is the YIKES scenario.
> I better run over and protect them all. But wait, since I have access to
> everyone elses files, I can just destroy them first.
Yeah, right on... Eliminate your opponents before they harm you. 8-)
Files that reside on your website (/usr/home/yourname/public_html/)
should be *readable* by others (the webserver in particular), but this
doesn't mean others can --or rather should be allowed to-- replace,
alter or delete them. This is the way you should protect your website
files: readable for others, writable (changeable) only by yourself. For
other files, changeable only by yourself is always recommended, and
readable by others according to the confidentially of each file.
--
Regards,
Roland de Ruiter
` ___ ___
`/__/ w_/ /__/
/ \ /_/ / \
|
| |
|
| |
 |
Roedy Green

|
Posted: 2005-6-15 11:59:00 |
Top |
java-programmer >> AccessControlException
On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
<email***@***.com> wrote or quoted :
>I have been blithely reading files via URL from an Applet. They
>worked fine locally, but with Java 1.5 I'm getting
>AccessControlExceptions. I should have been getting these all along.
I think I have figured out what is going on. Running the applet
locally the applet is only allowed to access its directories and
descendants. Moving the files into a descendant seems to have cleared
up the problem. It a nuisance trying to share files.
Is this:
1. what is supposed to happen
2. a Java bug
3. an Opera bug
4. one of those vaguely defined things.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
|
| |
|
| |
 |
Roedy Green

|
Posted: 2005-6-15 12:06:00 |
Top |
java-programmer >> AccessControlException
On Mon, 13 Jun 2005 04:08:43 GMT, Roedy Green
<email***@***.com> wrote or quoted :
>I have been blithely reading files via URL from an Applet. They
>worked fine locally, but with Java 1.5 I'm getting
>AccessControlExceptions. I should have been getting these all along.
I have discovered by experiment that when an Applet runs locally, it
is only allowed to read files in the same directory or in a
subdirectory of that directory. It can't read files in the parents or
sibling directories, just child directories. I have not performed the
corresponding experiments on websites. I did my tests with the Opera
browser on Win2K.
--
Bush crime family lost/embezzled $3 trillion from Pentagon.
Complicit Bush-friendly media keeps mum. Rumsfeld confesses on video.
http://www.infowars.com/articles/us/mckinney_grills_rumsfeld.htm
Canadian Mind Products, Roedy Green.
See http://mindprod.com/iraq.html photos of Bush's war crimes
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- java with swinghello to all,
I have done a java component in Swing
I have included the java component as plugin and
embedded in applet for web based access. But it is not
visible in other clients.
It is visible in Only the server.
I read javaweb start's JNLP can do that (since I
didnot want to install anything jre like in client )
is it possible.
thank you in advance,
vishnu.
- 2
- Get installed appHi,
I want to write an app but I'm not sure if I should use Java.
The app is a crossed platform.
My questions:
1.Can Java return me the name/position of install app on the OS it
supports?
2. Does Java supports the following OS:
Unix/GTK+ , Unix/Motif and X11 , Mac OS , MGL and OS/2 ?
TIA.
Eran
- 3
- java/121420: Java applet fails to find class
>Number: 121420
>Category: java
>Synopsis: Java applet fails to find class
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-java
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 06 08:10:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Andrew Reilly
>Release: FreeBSD 7.0-STABLE amd64
>Organization:
>Environment:
System: FreeBSD duncan.reilly.home 7.0-STABLE FreeBSD 7.0-STABLE #3: Sat Mar 1 17:44:29 EST 2008 root@duncan:/usr/obj/usr/src/sys/DUNCAN amd64
A 3G Athlon64-X2.
>Description:
An attempt to use a java client from within firefox,
while connecting to a Juniper ssl VPN service fails with
this message in the java log. (The same service works OK
with firefox on a MacOS-X laptop.):
Java Plug-in 1.6.0_03-p4
Using JRE version 1.6.0_03-p4 Java HotSpot(TM) 64-Bit Server VM
User home directory = /usr/home/andrew
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
load: class de.mud.jta.Applet not found.
java.lang.ClassNotFoundException: de.mud.jta.Applet
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:183)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:127)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:626)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:780)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2074)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:709)
at sun.applet.AppletPanel.run(AppletPanel.java:363)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.ConnectException: Invalid argument
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.Socket.connect(Socket.java:519)
at sun.net.NetworkClient.doConnect(NetworkClient.java:155)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:271)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:328)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:284)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:44)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:173)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:170)
... 9 more
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
- 4
- Why does this query take forever?For some reason, I have a rather large (to me) query, with numerous inner
joins, accessing a remote server, and it is taking about twenty times longer
than most queries to the same database.
The query itself is built programmatically within my application, and
example of which is below. I am hoping someone in the group may have some
insight into why this query is so slow, suggesting perhaps a better
structure for it, such that I can go back in and rewrite my code that
creates such queries.
Thanks in advance, Ike
"SELECT DISTINCT
chronology.id,status_id.status,chronology.completed,chronology.completeddate
,chronology.completedtime,activities_id.activity,chronology.activities_activ
ity,chronology.activities_attachment,chronology.activities_available_to_all,
chronology.upcards_firstnamelastname,upcard_id.id,chronology.feedbackrequire
d,chronology.landondate,chronology.hasspecifictime,chronology.datetoperform,
chronology.timetoperform,chronology.duration,chronology.weekends,chronology.
prefix,statusactivitieisid.id,associateresponsible.username,activities_usern
ameid.username,chronology.editFlag FROM
chronology,status,activities,upcards,statusactivities,associates
INNER JOIN status status_id on chronology.status_id=status_id.id
INNER JOIN activities activities_id on
chronology.activities_id=activities_id.id
INNER JOIN upcards upcard_id on chronology.upcard_id=upcard_id.id
INNER JOIN statusactivities statusactivitieisid on
chronology.statusactivitieisid=statusactivitieisid.id
INNER JOIN associates associateresponsible on
chronology.associateresponsible=associateresponsible.id
INNER JOIN associates activities_usernameid on
chronology.activities_usernameid=activities_usernameid.id
WHERE chronology.upcard_id = 18"
- 5
- Phara3omacy news
o C t i q a i I x i i s $9 u 9 (1 Iy 0 h p p i d l r l l s a )
m V m a i I e i m u i m $1 t 05 ( jk 30 r p m i s l l l j s o )
m V q i z a j g j r t a $ f 69 ( l8 10 u p e i p l b l n s x )
Many oth I1 er, Vis nh it our sit Vn e <http://dapi42.taurantome.com>
and Sa Pw ve o 29 ver 5 YL 0%
- 6
- Applet file readinghello every one;
i m making an applicaion by using java Applet, on which i wish to open
a file from users system, but i dont know how to do this;
is any one have any idea about reading files on users system by using
Applet.
- 7
- Vowel Counter ProgramHey,
I am trying to write a basic program that counts how many lowercase
vowels and non-vowels are in a string. I'm trying to use the
StringTokenizer function. Also, I have to prompt the user again by
using a do while loop. The string ends with the string "DONE".
Here's my code. If anyone could help me, please do. Thanks.
import cs1.Keyboard;
import java.util.StringTokenizer;
class vowelCounter;
{
public static void main(String[] args)
{
// Initialize Answer to Zero
int answer = 1;
do // Start the do loop
{
// Declare all variables and set counters to zero
int aCounter = 0;
int eCounter = 0;
int iCounter = 0;
int oCounter = 0;
int uCounter = 0;
int nonVowelCounter = 0;
String line, temp;
int letter;
StringTokenizer tokenizer;
// Prompt the user for String and read string
System.out.print ("Please enter text (Type DONE to quit):
");
line = Keyboard.readString();
while (!line.equals("DONE"))
{
tokenizer = new StringTokenizer (line);
while (tokenizer.hasMoreTokens())
{
temp = tokenizer.nextToken();
letter = temp.length();
for (int i=0; i<=letter; i++)
{
// Increment vowel counters
if (line.charAt(i) == 'a')
aCounter++;
else if (line.charAt(i) == 'e')
eCounter++;
else if (line.charAt(i) == 'i')
iCounter++;
else if (line.charAt(i) == 'o')
oCounter++;
else if (line.charAt(i) == 'u')
uCounter++;
else
nonVowelCounter++;
}
}
line = Keyboard.readString();
}
// Print out number of vowels and non-vowels
System.out.println ("Number of 'a': " +aCounter);
System.out.println ("Number of 'e': " +eCounter);
System.out.println ("Number of 'i': " +iCounter);
System.out.println ("Number of 'o': " +oCounter);
System.out.println ("Number of 'u': " +uCounter);
System.out.println ("Number of non-vowels: "
+nonVowelCounter);
// Prompt the User About Continuing
System.out.print ("Do you want to continue?
(0=exit/1=continue) ");
answer = Keyboard.readInt();
System.out.println ("");
}while (answer == 1);
}
}
- 8
- Can we change enctype dynamically??Hello all,
Can we change enctype in the form tag using javascript
document.formname.enctype = 'variable' variable being
multipart/form-data or application/x-www-form-urlencoded. I can do
this in Netscape7 not in IE6 ??
My problem is when I am in the rendered page of type
mulipart/form-data, I have to call another servlet (which process
regular form fields only). When I do that it breaks.
If I use all my servlets to process enctype=mulipart/form-data jsp's
is there any performance or any kind of issues???
Any help will be appreciated.
Thanks - gsr
- 9
- free E-book linksdear friends,
this link will help full see more number of E-books use this
http://www.apsira.com/etc/usefulllinks.php?keyid=5.1
- 10
- Creating MouseEventsHi,
I'm trying to dispatch interaction with a touch screen as a MouseEvent, but
I can't get java to register an event on components like the drop-down list
from a combo box, or invisble components that accept normal mouse click
events.
Thanks,
Andrew
- 11
- optimizing java compilerHi!
As the -O option of javac does nothing and Sun obviously think it can affort
not to do so, which compiler is known to optimize bytecode well? Jikes?
eclipse? What about AspectJ?
Regards
Timo
- 12
- People Favourite SitesDear Friend,
I have found some websites:
for msn messenger,
http://www.hotmailpk.com/
For
entertainment,spotlight.articles,interviews,dailyupdate;Wrestling;gosips;amazing
pictuers;cookingrecipes;lifestyle;
htttp://www.familyandtwist.com/
for sms messeges, smsjokes,
http://www.smstwist.com/
Visit these websites:
For Myspace.Com users visit:
http://www.myspacepk.com/
To learn a language visit:
http://www.codedcode.com/
To download world's best wallpapers for your computer visit:
http://picture-gallery.dnspk.com/
Thanks
- 13
- Open Source quality better then closed?hi...
i just wondered, does the fact you write a product as open source,
forces you to write better code, in the hopes (fears?) that who ever
may see you code in the future will be impressed (shocked?)
- 14
- Sunspot: Java Virtual Machine Implementation Vulnerability``SUN Java Virtual Machine Implementation Vulnerability
We have found a security vulnerability in the SUN's implementation of
the Java Virtual Machine, which affects the following SDK and JRE
releases:
- SDK and JRE 1.4.1_03 and earlier
- SDK and JRE 1.3.1_08 and earlier
- SDK and JRE 1.2.2_015 and earlier.
SUN was informed about this issue on June the 2nd 2003 and has already
addressed it in their latest SDK/JRE versions. Please, see Sun Alert
Notification numbered 57221 for more information about the patched
SDK/JRE releases. [...]
The described vulnerability allows for the creation of a malicious
applet that could *completely* bypass applet sandbox restrictions. We
developed proof of convept code which successfully exploited this
vulnerability in Netscape 6 and 7 as well as Mozilla web browsers
environment using vulnerable versions of JRE Plugin. [...]''
- http://www.net-security.org/vuln.php?id=3018
Sun's page on the problem:
``A Vulnerability in JRE May Allow an Untrusted Applet to Escalate Privileges''
- http://sunsolve.sun.com/pub-cgi/retrieve.pl?doc=fsalert%2F57221&zone_32=category%3Asecurity
--
__________
|im |yler http://timtyler.org/ email***@***.com Remove lock to reply.
- 15
- jsp:setProperty, java.io.File, and I thoroughly confusedHi,
I'm writing a webapp based on JSP technology. I've been doing
some reading and from what I've read, it isn't possible to use
jsp:setProperty to set a File property. So, I created a BeanInfo class
for the Bean I had the File variable in. I also created a class that
extended PropertyEditorSupport to assign the BeanInfo class to the
Bean. But, those don't appear to get called. I CAN, however with
Tomcat 5.0.28 on Windows XP, simply set a File property with
jsp:setProperty. The Bean ends up looking for the file in the Tomcat
bin directory, and I can thus set a relative path to the file. So, I'm
completely confused. What is going on? Is this expected behavior?
Thanks,
Jason Mazzotta
|
|
|