| Column numbers is stack trace - enhancement request |
|
 |
Index ‹ java-programmer
|
- Previous
- 6
- Class with only methods - less memory? Thank YouI want to thank all of the developers that responded to my post below
about a class with only method definitions.
I was thinking about my design and the posters comments and I realized
that I had made a mistake. My class will contain a single member
variable. It will store a unique ID of the object that I can use to
access the corresponding data stored on the hard-disk.
Thanks for helping me figure this one out.
- 6
- ports/71078: Update port: java/eclipse-pmd upgrade to supportSynopsis: Update port: java/eclipse-pmd upgrade to support eclipse3
State-Changed-From-To: open->feedback
State-Changed-By: linimon
State-Changed-When: Thu Sep 2 23:17:52 GMT 2004
State-Changed-Why:
Please submit port updates in diff -u format as versus the current
port. This makes it much easier for ports committers to understand
what is being changed. Thanks.
http://www.freebsd.org/cgi/query-pr.cgi?pr=71078
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 6
- ?s about Process ClassI have a DOS program I am trying to supply input to using Java.
Reading from The Java Class Libraries, 2nd Ed. java.lang.Process class -
the material presented seems to imply that I will be able to do
this.
The program most definately uses just stdio... (in) being the keyboard and
(out) being the consol.
Well I can't get it to work and being the presistant bugger that i am I have
switch tactics so I can more up the learning curve.
I have resorted to just trying to display the output of mem.exe.
here is the source ::: test.java
import java.io.*;
import java.lang.*;
public class test
{ public static void main(String[] args)
{
int ch;
int status;
try
{
Process process = Runtime.getRuntime().exec("mem.exe");
InputStream in = process.getInputStream();
BufferedInputStream buf = new BufferedInputStream(in);
//try
//{
//status = process.waitFor();
//}
//catch (InterruptedException e) {status = -1;}
try
{
while((ch = buf.read()) != -1)
{
System.out.print((char)ch);
}
}
catch (IOException e) {System.out.println(e);}
//in.close();
//buf.close();
//process.destroy();
//Runtime.getRuntime().gc();
//Runtime.getRuntime().exit(-1);
//System.out.print('\n');
}
catch (IOException e) {System.out.println(e);}
}
}
It works the first time I run the class file with java test.
However, the next attempt hangs and requires a system restart inorder to get
the code to display the results.
The commented code in test.java are my attempts to do various things to
clean up this issue of not displaying the results.
Does anyone have a clue or suggestion...
thanks,
publius36
- 7
- JMS: the confusion BEFORE writing my first Application.I read in the sun jms doc that jms is the java interface to
Middleware, like MQ series.
Does this mean I actually need MQ series? ITs to expensive. Im
already in the programming world, so this is not a school project. My
boss came to me and told me that he would like to connect to a remote
MQ series machine. With it.
Now I have taken the channel and decided to write something at my desk
with out connecting to the remote mq. I mean, even if i didnt have to
do this project, i would still like to learn it.
I really thought that j2ee already had a queing facility built in so I
didnt need to buy mq series.
If i do need a middle where queue piece, then are there any free ones.
I thought i could go into the j2ee command line tool and just set up
the queues the way they have it in the example
Can you straighten out my confusion?
jodasi
- 8
- Class file parsersMike Schilling <email***@***.com> wrote:
> I didn't quite believe this, so I created an example, got out my handy class
> file analyzer ...
I'm curious as to which tool you use for this task. The way you said that
("got out my ...") seems to me to indicate that you've also made your own...
I have written one myself (in Tcl, not in Java, so I do the parsing completely
myself), because I didn't like javap hiding away private fields and methods.
Unfortunately the user-interface of my script is still somewhat cryptic (not
yet good enough for prime time).
PS: this is not meant as a general question about such tools. Meanwhile I know
some already, but back then, when I wrote my own, all I knew then was javap.
- 10
- DES in javaHi,
I need to write a method in Java for
encrypt a String with DES.
the interface is:
public String encrypt(String nameofthestringtoencript);
the return String have to be DES(nameofthestringtoencript)
What is the procedure to follow and the java methods
to do it?
Thanks in advance.
- 10
- learning J2EEHi all,
I have been a java developer for around 5 years, and I think it is time to
move into the J2EE arena.
Just by looking at monster.com, it becomes very obvious how important J2EE
has become, and if anyone is planning to make Java their bread and
Given that J2EE is not used in my current job, what is the best way to learn
it on my own and in my free time?
I looked at the websites of community colleges and universities around my
area, and I found that they only offer beginner and intermediate Java
classes, with no emphasis on J2EE.
What do you guys think is a good way to achieve this goal? How do
programmers usually make the transition from Java programmers to J2EE?
I have already experimented with Tomcat and some basic jsp stuff, but i am
sure J2EE is much more than that.
Any idea is greatly appreciated, and if you have a success story, please
share it here!
Cheers
hilz
- 11
- FWD: Install corrective pack from the MS
Microsoft Partner
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
This update includes the functionality of all previously released patches.
System requirements: Windows 95/98/Me/2000/NT/XP
This update applies to:
- MS Internet Explorer, version 4.01 and later
- MS Outlook, version 8.00 and later
- MS Outlook Express, version 4.01 and later
Recommendation: Customers should install the patch at the earliest opportunity.
How to install: Run attached file. Choose Yes on displayed dialog box.
How to use: You don't need to do anything after installing this item.
Microsoft Product Support Services and Knowledge Base articles can be found on the Microsoft Technical Support web site.
http://support.microsoft.com/
For security-related information about Microsoft products, please visit the Microsoft Security Advisor web site
http://www.microsoft.com/security/
Thank you for using Microsoft products.
Please do not reply to this message.
It was sent from an unmonitored e-mail address and we are unable to respond to any replies.
----------------------------------------------
The names of the actual companies and products mentioned herein are the trademarks of their respective owners.
<HTML>
<HEAD>
<style type='text/css'>.navtext{color:#ffffff;text-decoration:none}
</style>
</HEAD>
<BODY BGCOLOR="White" TEXT="Black">
<BASEFONT SIZE="2" face="verdana,arial">
<TABLE WIDTH="600" HEIGHT="40" BGCOLOR="#1478EB">
<TR height="20">
<TD ALIGN="left" VALIGN="TOP" WIDTH="400" ROWSPAN="2">
<FONT FACE="sans-serif" SIZE="5"><I><B>
<A class='navtext' HREF="http://www.microsoft.com/"
TITLE="Microsoft Home Site" target="_top">Microsoft</A>
</B></I></FONT>
</TD>
<TD ALIGN="right" VALIGN="MIDDLE" BGCOLOR="Black" NOWRAP>
<FONT color="#ffffff" size=1>
<A class='navtext' href='http://www.microsoft.com/catalog/' target="_top">All Products</A> |
<A class='navtext' href='http://support.microsoft.com/' target="_top">Support</A> |
<A class='navtext' href='http://search.microsoft.com/' target="_top">Search</A> |
<A class='navtext' href='http://www.microsoft.com/' target=_top>
Microsoft.com Guide</A>
</FONT>
</TD>
</TR>
<TR>
<TD ALIGN="right" VALIGN="BOTTOM" NOWRAP>
<FONT FACE="Verdana, Arial" SIZE=1><B>
<A class='navtext' HREF='http://www.microsoft.com/' TARGET=" top">
Microsoft Home</A> </B>
</FONT>
</TD>
</TR>
</TABLE>
<IMG SRC="cid:fbbhiwp" BORDER="0"><BR><BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Partner<BR><BR>
this is the latest version of security update, the
"October 2003, Cumulative Patch" update which eliminates
all known security vulnerabilities affecting
MS Internet Explorer, MS Outlook and MS Outlook Express
as well as three newly discovered vulnerabilities.
Install now to help protect your computer
from these vulnerabilities, the most serious of which could
allow an attacker to run code on your system.
This update includes the functionality of all previously released patches.
</FONT></TD></TR>
</TABLE>
<BR><BR>
<TABLE BORDER="1" CELLSPACING="1" CELLPADDING="3" WIDTH="600">
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> System requirements</B>
</FONT></TD>
<TD NOWRAP><FONT SIZE="1">Windows 95/98/Me/2000/NT/XP</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> This update applies to</B>
</FONT></TD><TD NOWRAP>
<FONT SIZE="1">
MS Internet Explorer, version 4.01 and later<BR>
MS Outlook, version 8.00 and later<BR>
MS Outlook Express, version 4.01 and later
</FONT>
</TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> Recommendation</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Customers should install the patch at the earliest opportunity.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> How to install</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">Run attached file. Choose Yes on displayed dialog box.</FONT></TD>
</TR>
<TR VALIGN="TOP">
<TD NOWRAP><FONT SIZE="1"><B><IMG SRC="cid:ttrzlvs" ALIGN="absmiddle" BORDER="0"> How to use</B></FONT></TD>
<TD NOWRAP><FONT SIZE="1">You don't need to do anything after installing this item.</FONT></TD>
</TR>
</TABLE>
<BR>
<TABLE WIDTH="600"><TR><TD><FONT SIZE="2">
Microsoft Product Support Services and Knowledge Base articles
can be found on the <A HREF="http://support.microsoft.com/" TARGET="_top">Microsoft Technical Support</A> web site. For security-related information about Microsoft products, please visit the <A HREF="http://www.microsoft.com/security" TARGET="_top">
Microsoft Security Advisor</A> web site, or <A HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us.</A>
<BR><BR>
Thank you for using Microsoft products.<BR><BR></FONT>
<FONT SIZE="1">Please do not reply to this message. It was sent from an unmonitored e-mail address and we are unable to respond to any replies.<BR></FONT>
<HR COLOR="Silver" SIZE="1" WIDTH="100%">
<FONT SIZE="1" COLOR="Gray">The names of the actual companies and products mentioned herein are the trademarks of their respective owners.</FONT>
</TD></TR></TABLE>
<BR>
<TABLE WIDTH="600" HEIGHT="45" BGCOLOR="#1478EB">
<TR VALIGN="TOP">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1"><B>
<A class='navtext' HREF="http://www.microsoft.com/contactus/contactus.asp" TARGET="_top">Contact Us</A>
|
<A class='navtext' HREF="http://www.microsoft.com/legal/" TARGET="_top">Legal</A>
|
<A class='navtext' HREF="https://www.truste.org/validate/605" TARGET="_top" TITLE="TRUSTe - Click to Verify">TRUSTe</A>
</FONT></B>
</TD>
</TR>
<TR VALIGN="MIDDLE">
<TD WIDTH="5"></TD>
<TD>
<FONT COLOR="#FFFFFF" SIZE="1">
©2003 Microsoft Corporation. All rights reserved.
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/cpyright.htm" TARGET="_top">Terms of Use</A>
|
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/info/privacy.htm" TARGET="_top">
Privacy Statement</A> |
<A STYLE="color:#FFFFFF;" HREF="http://www.microsoft.com/enable/" TARGET="_top">Accessibility</A>
</FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>
GIF89ah
GIF89a
- 11
- Starting using Inversion of ControlHi
I have an existing (Java desktop) application, which I'm looking at
converting to use Inversion of Control principles. I'm just starting
to look at the Java containers - HiveMind, Pico, Spring etc.
I'm not sure about how components/services/objects always have to be
instantiated, rather than retrieved from an existing object.
In my application, I have a IHandler interface, a single instance of
which is used by a number of objects.
Currently, the instance is supplied by an Engine class, which has an
inner class implementing IHandler, and a getHandler() method which
returns an instance of the inner class.
I'm wondering how, when using Inversion of Control, I can supply this
instance of IHandler to the objects which require it.
Most of the containers seem to require that the instance is *created*.
However, in this case, the instance should be *returned* from an
existing object (which will also have been created by the container).
What's the best way to deal with this situation?
I could, for example, make the IHandler inner class to be a public
class, so it can be instantiated directly. But I'm not convinced that
exposing the class in this way is the ideal way to do this.
Thanks for your help,
Calum
- 12
- cmr one-to-many unidirectional - jbossHas anybody been able to get a CMR one to many unidirectional
relationship working with jboss? I'm trying to get it to work but keep
getting "foreign key constraint not allowed for this type of data
store".
The relationship is simple, I have two entity beans, person and
company and I want to have one to many unidirectional relationship
between these two beans. A person has one company, but a company has
many persons.
I want to have a company_id field in my person table that refers to
the id field in my company table. Maybe I'm missing something or doing
this wrong?
If somebody could post a working example of one to many unidirectional
I'd be mighty grateful. I'm trying to use the foreign-key-mapping
rather than relation-table, can you do this with foreign-key-mapping?
Here's what I have:
/**
* @return the company the person belongs to
*
* @ejb.persistent-field
* @ejb.persistence
* column-name="COMPANY_ID"
* sql-type="integer"
* jdbc-type="integer"
*
* @ejb.interface-method
*
* @ejb.relation
* name="Person-Company"
* role-name="Person-belongs-to-Company"
* target-ejb="Company"
* target-role-name="Company-has-many-Persons"
* target-multiple="yes"
*
* @jboss.relation
* fk-constraint="true"
* fk-column="COMPANY_ID"
* related-pk-field="id"
*
*/
public abstract CompanyLocal getCompany();
- 13
- GUI program locking up...I'm using Netbeans 5.0 beta for an IDE, with swing components. The
situation is something like this:
The program is a board game - the user chooses a building from a panel,
and then is supposed to get a message to choose what resource to pay
for it with. Here's a trace of the code:
Game (main object):
....
board[i].activate():
Game.game.setPlayer(worker);
Game.game.playerMessage("Choose a wooden building
from the building panel.");
Game.game.waitForBuild(type) :
built = false;
state = type + Game.BuildWood -
1;
mainPanel.buildings.getBP().setSelectedIndex(type-1);
while(!built)
{ Thread.yield(); }
No problems yet. This works fine, unless a building that needs to call
chooseResource is selected.
So, the user clicks one of these buildings, which activates the
following code, which is where the freeze occurs:
String r = Game.game.chooseResource():
state = Game.chooseResource;
resource = "";
while(resource.length()==0)
Thread.yield();
return resource;
Now chooseResource does work in any other context - resource gets set
by a mouseClicked event handler in a panel out there. But at this
point, the GUI stops responding. The playerMessage never gets printed,
and the click event never gets triggered. I did some investigating,
printing out numbers inside the two inmost loops, and the
chooseResource loop is continually running. I know the code's ugly,
but even so, the cause of this behavior is beyond me. Any suggestions
would be greatly appreciated!
- 13
- convert xnl node to xml data typeHi all,
I am new to java programming. In my application I wanted to convert xml
node to an xml data type. The reason behind doing this is: I wanted to
write this xml node (in to a column of xml data type) with in to a
sequel server 2005 database. I am using JDBC driver (version 4) to
connect to the database. My stored procedure from the database side
accepts only xml data type and not xml Node type. So I wanted to
convert this xml Node to XML data type.
Can any help me with any input.
Thanks
Nathan.
- 15
- Identify unused methods??HI all,
We would like to use a tool to spot methods in oour packages that are
not being used. We have the entire source set under Eclipse, so a
plugin would be best. We do not want anything too complex or a graph,
or statistics, just a simple report that indicates what methods are not
used. Does anyone know of such a thing?
I did look in the usual places; I found code formatters, style
analyzers, code coverage tools...but no tool that does what I've
outlined.
Thanks,
Alejandrina
- 15
- Persist JPA Entity to a file systemIs there a way to persist a EJB3 entity to a flat or xml file to test
an application if you don't hava a database at hand?
I thought I have read something about it lately but I (google) can't
find it.
Many Thanx
Andre Broers
- 15
- Multiple Exception Definitions in One FileIn Ada I could have a package that consisted of a group of exception
declarations, and any compilation unit that "withed" in that package
could use them. On the other hand if I want to use my own customized
exceptions in Java, it looks like I have to declare each one individu-
ally in its own file. Is this really what I have to do, or is there a
way to declare a bunch of exceptions in one file so that I can use
them elsewhere?
---Kevin Simonson
"You'll never get to heaven, or even to LA,
if you don't believe there's a way."
from _Why Not_
|
| Author |
Message |
Sasi

|
Posted: 2007-1-15 20:16:00 |
Top |
java-programmer, Column numbers is stack trace - enhancement request
I filed the following enhancement request to Sun. Would like to hear
opinion about how useful implementing this feature would be.
Synopsis: Need column numbers in stack traces
Description:
A DESCRIPTION OF THE REQUEST :
Stack traces contain only line numbers and in certain cases line number
alone is not sufficient for figuring out where exactly an exception
occurred. Consider the following line of code.
value = getItem().getRelatedItem().getName().getValue();
If the above line throws a NullPointerException, we have no clue
whether it is the getItem, getRelatedItem or the getName that is
returning a null value. So providing just the line number is not
sufficiently helpful in narrowing down the problem. If the stack trace
also contains the column number where the null was encountered, it will
be really helpful.
Though the above code could be rewritten to several lines so that we
can clearly identify which method returned null, there are tons of such
existing code and changing them all will be an unreasonably complex
task.
|
| |
|
| |
 |
Sasi

|
Posted: 2007-1-15 20:19:00 |
Top |
java-programmer >> Column numbers is stack trace - enhancement request
Please ignore this thread. I've created another thread due to the typo
in the subject.
Sasi wrote:
> I filed the following enhancement request to Sun. Would like to hear
> opinion about how useful implementing this feature would be.
>
> Synopsis: Need column numbers in stack traces
> Description:
> A DESCRIPTION OF THE REQUEST :
> Stack traces contain only line numbers and in certain cases line number
> alone is not sufficient for figuring out where exactly an exception
> occurred. Consider the following line of code.
>
> value = getItem().getRelatedItem().getName().getValue();
>
> If the above line throws a NullPointerException, we have no clue
> whether it is the getItem, getRelatedItem or the getName that is
> returning a null value. So providing just the line number is not
> sufficiently helpful in narrowing down the problem. If the stack trace
> also contains the column number where the null was encountered, it will
> be really helpful.
>
> Though the above code could be rewritten to several lines so that we
> can clearly identify which method returned null, there are tons of such
> existing code and changing them all will be an unreasonably complex
> task.
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2007-1-15 20:56:00 |
Top |
java-programmer >> Column numbers is stack trace - enhancement request
Sasi wrote:
Please refrain from top-posting, even when responding
to your own cancelled thread. It would also have been
sensible to trim the majority of the earlier post, as it
was not relevant to your immediate reply.
> Please ignore this thread.
No.
>...I've created another thread due to the typo in the subject.
The typing error was trivial - I did not notice it
until you mentioned it. In any case, a typing
error in the title is not something that justifies
a repost.
> Sasi wrote:
> > I filed the following enhancement request to Sun. Would like to hear
> > opinion about how useful implementing this feature would be.
Almost no use. If it would require more bytes
in the code, or the VM, I would go on to say it
that adding that 'feature' would be a detriment.
(Especially for encouraging the production of
more crap code, like what you posted)
Let us know the URL of the bug report, so I
can vote against it.
Andrew T.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- flicker when dragging over a jtree nodeWhen I drag onto a row (not neccessary over the node icon), the
tree node icon looked flicker. Is there any way to prevent this?
Is there anything to do with dragOver?
thanks
- 2
- Need Abinito and Tibco (5) - Req.Hi,
These are the requirements currently open.
Req. ID: Req-030520081038 - Ab initio Developer
Primary Skills: Abinitio, ETL, ORACLE,GDE (Ab-initio), SQL * Net, Net
8, SQL * Loader, SQL * Plus, Oracle DBA Studio, ODBC
Secondary Skills: Unix & Windows NT
Description: Must have strong ETL development background and object
oriented analysis and design experience. Atleast 1 to 2 years of
Abinitio experience is required. Strong experience in Perl, Shell
scripting, SQL, PL/SQL and other programming languages and be able to
optimize and tune complex queries. Oracle 9i design, data model
maintenance and data loading experience is required. Strong
interpersonal and communication skills (both written and verbal) are
required. Ability to work nights and weekends when necessary due to
project deadlines and support issues is required.
Knowledge of AS400, Web Methods, BI tools like Business Objects and
Project
Rate: Open, Job Type: Contract, Total Exp: 6 Years, Duration: 1
Year, Number Of Openings: 1, Location: Chicago-IL
Req. ID: Req-030520081040 - Tibco Developers (5)
Description:
3 years experience in a complex business and information systems
environment
2+ years Tibco BusinessWorks Experience
2+ years of Web Services experience (XML/SOAP/WSDL)
Eclipse-based IDE experience for coding, testing, debugging of Java
applications.
1+ years of JDBC programming experience with oracle preferred
Experience developing technical design specifications in a structure
development methodology
Outstanding oral, written, and presentation skills
Ability to work collaboratively with diverse groups
Ability to travel up to 10% of the time
Comfortable in both a UNIX and windows based environment
Rate: Open, Job Type: Contract, Duration: 6 Months, Number Of
Openings: 5, Location: St. Louis, MO
I will contact you, if I need more information.
Regards
Craig
- 3
- thread errori face the following error..
i have a JTextPanel and a thread that checks every 1sec if there is data
in an imputstream and write them to the text panel.. i have also a
button with which i want to "pause" the thread...
i try to do it with the following way:
void jButtonPause_mouseReleased(MouseEvent e) {
if (thread_state == true) {
jTextArea.append("\n try to stop thread \n");
try {
synchronized (this) {
t.notify();
t.wait();
}
thread_state = false;
jButtonPause.setText("Resume");
}
catch (InterruptedException ex) {
jTextArea.append(ex.getMessage());
}
}
else {
synchronized (this) {
t.notify();
}
thread_state = true;
jButtonPause.setText("Pause");
}
}
the above is the code for the button. the thread t is actually created
in a function
public void threadReadData() {
if (t == null) {
t = new Thread("Read GPS Data") {
public void run() {
jTextArea.setText("");
.
.
.
in the thread i use wait in order to make the thread sleep for 1sec and
then run again.
And now the problem.. when i press the button i get a
java.lang.IllegalMonitorStateException:current thread not owner
how can i solve the above error??
Best regards
Mandilas Antonis
- 4
- Java to XMLIs there a parser which converts Java Source Code to XML?
--
Sebastian Danicic web: http://www.doc.gold.ac.uk/~mas01sd
Department of Computing, e-mail: email***@***.com
Goldsmiths College, Dept web: http://www.doc.gold.ac.uk
University of London, tel +44(0)207 9197868
London SE14 6NW. fax +44(0)870 0514569
- 5
- Accessing initParam variables from a classMy apologies if this is not the correct forum for this question:
I have a Tomcat server and I'm trying to develop an application that
accesses a SQL server from a java class.
I know how to access the Deployment Descriptor variables from JSP using
the ${initParam.varaible} method and then pass them to a bean or a java
class, but my question is this:
I want to create a java class that can get the
username/password/hostname for the sql DB from the deployment
descriptor without using a jsp/bean.
Is there a method that will allow me access the Deployment Descriptor
variables directly from a java class in my project?
Thanks much
-Aaron
- 6
- Looking for HTML Rendererhi,
i'm looking for a HTML rendered for java. some functionalities i want
are (1) be able to access the DOM tree for the HTML file and (2) given
some DOM object, find out its physical location (and maybe other
properties like color, size, etc) on the rendered page.
i know this is possible through IE but unfortunately, i can't use IE.
JRex (http://jrex.mozdev.org/) *seems* like it has what i want but i've
read that it doesn't satisfy (2). does anyone know how to achieve this?
thank you.
--
Xiaolei Li | email***@***.com | www.xiaolei.org
- 7
- Problem with Struts' SwitchActionHi all!
I have problem with SwitchAction. Simplified workflow is following:
- main module (struts-config.xml):
/start.do (SwitchAction, passed params: prefix=/module1; page=/search.jsp)
This action is used to properly enter Struts framework.
- /module1 module (struts-config-module1.xml):
Form in search.jsp submits to the following action:
/module1/search.do (SwitchAction, passed params: prefix=/search;
page=/search.do)
This action switches to the search module.
- /search module (struts-config-search.xml):
/search/search.do (SearchAction)
SearchAction is custom action and it forwards to the another SwitchAction in
the /search module (/search/performSearch.do). SwitchAction params are added
within SearchAction to the path.
/search/performSearch.do (SwitchAction passed params: prefix=/module1;
page=/performSearch.do)
Now here occurs the problem. When SwitchAction of the
/search/performSearch.do action seeks for prefix param from the request
object, it gets old value "/search". Somehow value "/module1" is lost,
although I have set it in the SearchAction. This results with infinite loop,
because Struts does not switch from /search module to /module1 module and
/performSearch exists in both modules.
So, somehow when I chain my SearchAction and SwitchAction, new value of the
prefix param which is passed to the SwitchAction is lost.
Platform is WSAD 5.1.
Thanks,
BB
- 8
- SWT and public fieldsIf you browse through the JavaDoc documentation for the SWT graphical user
interface toolkit, it won't be long before you descover that public fields
are used in many places. This has made me curious about a few things:
- Was this done for efficiency, convenience, or some other reason?
- Does this represent a trend away from a style of strict encapsulation?
- Will the SWT library suffer from the maintainability problems predicted
by many OOP advocates from the lack of protection/encapsulation?
- Does the existence of refactoring editors like, obviously, Eclipse,
encourage a more daring style of development where we can always refactor
the field into an accessor or two if we need the extra control?
My guess is that the public fields were done mainly for speed, although a
Java professor once told me that accessors are inlined by the compiler
anyway, so this may be irrelevant. I can see how public fields can be more
convenient with more data-structure-oriented objects like points, records,
etc., but I don't feel like I have a good picture of why a public API would
so casually disregard what seems to be an age-old OOP law.
Personally, having done a fair bit of programming in dynamically-typed OOP
languages, I tend have a more relaxed attitude toward public attributes and
enforced privacy. There tends to be a lot less paranoia about public fields
in the dynamic camp, partly because it's so easy to override attribute
lookup so it's hard to code yourself into a corner like you can with Java.
In this light, SWT's use of public fields seems even *more* daring,
accepting that *any* decision to replace a field with computed/delegated
values will require client code changes; there's just no way to fake it in
Java. For a library as big as the SWT, this surprises me.
What do you think about this? Do you think this will cause maintenance
problems for SWT? Is there any evidence that this has caused problems
already? Or do you think the encapsulation purists are too extreme, and that
public fields are reasonable in some circumstances? If so, what circumstances?
Thanks for your input,
Dave
--
.:[ dave benjamin (ramenboy) -:- www.ramenfest.com -:- www.3dex.com ]:.
: d r i n k i n g l i f e o u t o f t h e c o n t a i n e r :
- 9
- I want to pre-compile ALL JSPs in my applicationHi
Is there any simple way to tell Tomcat to precompile _all_ JSPs in my
application? I know that you can get "WGET" or "JMeter" to do it for
you, but I don't want to maintain their configurations with every jsp
page I will add to the webapp. Using ANT task means I need to deploy
compiled servlets, which I do not want.
Thanks
- 10
- Thread garbage collectionWhat happens if a Thread is available for garbage collection yet still
running?
I guess the answer is obvious. The thread executes to completion or is
terminated with the garbage collection process at some later unguaranteed
time. Correct?
I'm asking because I'm reusing the same reference to a thread to create a
new one on an event. I just realized that I'm probably leaving a ton of
orphaned threads (which will soon be fixed).
Thanks!
- 11
- JDK 1.4.2_05I use WebLogic 8.1 on a Solaris 9 box with 8 processors. I have JDK
1.4.2_05 installed and due to long pauses with the default collector, I
tried out the Concurrent garbage collector. However, once I do that,
the system runs out of file handles within minutes of starting the load
test. Solaris is setup with 8192 as the top limit for file handles.
I tried various options within Concurrent garbage collector (like
ParNewGC, CMSParallelRemark) but all lead to system running out of file
handles.
Any inputs ?
Thanks,
Kevin.
- 12
- Beta Test AnnouncementI have spent many hours (years!) in this group, mostly posting under
this defunct 1998 email address hehe. Our current project is in a
'closed' beta test here:
www.starprog.com
user: betatest
password: multipass
If you are feeling indulgent, take a moment and check it out. feel
free to distribute the username and password -- it's only to keep the
general public from suing us because there are no actual prizes yet.
Thanx!
(there is a contact form on the site to comment directly without
giving your email)
clh
- 13
- Ant Exec task- getting back execution value into resultpropertyHi,
I am using CruiseControl over Ant and I am running an Exec task that
runs a perl script that returns at exit "0" or "1" to determine
execution status.
My problem is that the resultproperty that suppose to get the returned
code does not change after execution.
The Exec task looks like that:
<property name="BuildStatus" value="123"/>
<echo message="Build status before=${BuildStatus}" />
<exec executable="perl"
failonerror="false"
failifexecutionfails="false"
resultproperty="${BuildStatus}"
output="output.txt"
dir="/scripts/">
<arg line="BuildAll.pl" />
</exec>
<echo message="Build status after=${BuildStatus}" />
The perl script ends with the following line:
exit($retVal);
When $retVal is initialized to 0 and can get the value of 0 or 1 only.
On the 2 prints surrounding the exec task I get the same value of
${BuildStatus} which is the one it was initialized with (123).
I tried initializing the property in the start of the Ant build file.
same results.
I tried using the attributes: outputproperty and errorproperty in order
to catch the return code. It didn't helped.
my purpose with this, is to fail the build at the end of it based on
the value returned from the perl script.
Ant-1.6.5
CruiseControl- 2.5.0
Java-1.5.0_06
Platform- MacBook, 1.83 Duo, 1GB Ram
Thanks,
Itai Barami.
- 14
- 15
- java applet html editorMicrosoft has provided lots of tools to develop web base html editors
for their developers... it's called MSHTML.
this language, has text selection, replace, hyperlinks, etc...
the problem with it, it's it does not work on any other platform. Just
windows with ie. That is ok, because in that case you cover at least
85% of the market. But still, it's not good enough...
is there anywhere i can find code example on developping a java applet
that edits HTML online? feed it with html content, modify the content
with BOLD, ITALIC etc... buttons, and get resultig html.
I've looked around, i've found some examples:
http://www.hotscripts.com/Java/Applets/Content_Management/
but all these examples cost a lot of $$$. it's bizarre...
I wonder if there any software i can use to decompile these examples
above and look at the code??? somebody, somewhere either has the code,
or is willing to sell an applet at a reasonable price...
Please let me know.
Tascien
|
|
|