| comments when decompiling |
|
 |
Index ‹ java-programmer
|
- Previous
- 5
- simple beginners questionHello,
I just got the SUN Java IDE. (Netbeans IDE 3.5.1)
Very very nice, and I worked myself through the tutorial (about making a
colorswitch).
Now, When I compile it gives no errors at all. So far so good.
But when I want to execute, it askes to "set project main class".
The only option it displays is the default project. But the "okay" button
won't highlight.
I cannot select anything else, nor can I roam directories to select
anything.
Can someone please help me out.
I feel kinda silly not even knowing how to start a kind of hello-world
applet. ;-)
best regards,
martin
- 5
- Random Access On a TableHi,
I've got a problem with 2 open Dataset:
That's I had opened a table running an SQL command like this "SELECT *
FROM XXX WHERE YYY=ZZZ" and i want to access to another table with the
keys came from previous ResultSet; BUT I dont want to run an SQL
command ; I'm looking for a command like
setnearest(keylist,keylist,...) then I want read the second table with
a while loop ( ex. (while !eof(second_table))).
Is there a way for me ;)
Thx in advance;
- 6
- Differences between getImage and createImage and using ToolkitHello,
What are the differences between getImage and createImage,
and what if I want using toolKit - (getImage and createImage are static,
and I didn't find a way to create an Image object from a function of
toolkit).
I need a sample code, please.
Thanks :)
- 6
- JAXB unmarshalling - missing referenced objectsHi
I've come upon a problem which I just can't figure out.
So, here's a little about the context. An enterprise-application is
running on a Java EE-server. Some POJOs are annotated as Java
Persistence entities aswell as JAXB-annotations to create wanted XML-
representation for them. All annotations are added manually (meaning
no auto-generated classes/factory). A Servlet acts as an interface
against an Ajax-enabled webpage. The script in the web-page retrieves
xml-representation from the servlet and should also send xml back on
the same form for persisting on the server. The script returns the xml
in string-representation.
And here's the problem. Marshalling to xml works just as it should.
The script returns an xml in the exact same form, but the
unmarshalling of it does not produce what is expected. An object for
the main class is created, however any referenced objects are not
created. Primitive fields are generated correctly. No error is thrown.
Simplified, this is how it looks:
---List.java---
@XmlRootElement(name="list")
@XmlType(name="ListType")
@Enitity //JPA
public class List implements Serializable {
private Long id;
private weekNumber;
private Set<Element> elements;
@XmlAttribute(name="weeknumber", required=true)
public void getWeekNumber() {
//...
}
@XmlAttribute(name="id", required=true)
public void getId() {
//...
}
@XmlElementWrapper(name="elements", nillable=false)
@XmlElementRef
@ManyToMany( //JPA
//...
)
public void getElements() {
//...
}
}
---Element.java---
@XmlRootElement(name="element")
@XmlType(name="ElementType")
public class Element implements Serializable {
//...
private Long id;
@XmlAttribute(name="id", required=true)
public void getId() {
//...
}
//...
}
---xml---
<?xml .....>
<ns2:list ..... weeknumber="3" id="21">
<elements>
<ns2:element ... id="42">
...
</ns2:element>
<ns2:element ... id="43">
...
</ns2:element>
...
</elements>
</ns2:list>
In this example, a List-object would be created by the unmarshaller,
however the referenced elements of class Element will not. And I have
no idea why! The package contains a jaxb.index with all class names,
and I also added an ObjectFactory, but the result was the same. Here's
the unmarshalling:
private <T> T recieve(Class<T> classType, String xml) {
JAXBElement<T> obj = null;
try {
JAXBContext jc =
JAXBContext.newInstance(classType.getPackage().getName());
Unmarshaller um = jc.createUnmarshaller();
obj = (JAXBElement<T>)um.unmarshal(new StreamSource(new
StringReader(xml)));
} catch(JAXBException jex) {
jex.printStackTrace();
}
return obj.getValue();
}
I hope someone has something wise to say about this. I've really
twisted my brain to try to figure it out!
Thanks.
- 7
- Apache Project Xalan XML/XSLT Processor Is Good, But Its Extension Not Work on Netscape/IEFirst, let me say I couldn't find a group discuss
XML/XSLT. So I only choose the closest groups to
post this message.
Here is part of my *.xsl file
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan"
xmlns:my-javascript-ext="my-ext1"
extension-element-prefixes="my-javascript-ext"
version="1.0">
<xalan:component prefix="my-javascript-ext" elements="whichever"
functions="hello">
<xalan:script lang="javascript">
function hello(w) {
return ("Hello " + w + "!");
}
</xalan:script>
</xalan:component>
....
<xsl:if test="function-available('my-javascript-ext:hello')">
<xsl:value-of select="my-javascript-ext:hello('World')" />
<br></br>
</xsl:if>
....
And this is part of my *.xml file:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<?xml-stylesheet type="text/xsl" href="http://myHostName/XML/myfile.xsl" ?>
....
This is working greate for an XML file iff (if only if) I type
java org.apache.xalan.xslt.Process -in myfile.xml -xsl myfile.xsl
or
java org.apache.xalan.xslt.Process -in myfile.xml
That is wonderful, when I set CLASSPATH with
/usr/local/xalan/bin/xalan.jar:/usr/local/xalan/bin/bsf.jar:/usr/local/xalan/bin/js.jar
So I can make my own extension to call my JavaScript functions and/or
Java Class methods inside a XSL file with XALAN Processor.
But unfortunaely this will NOT work on Netscape, Firefox, IE browsers,
even all these browser support XML/XSLT.
Anyone has some idea how should I make Apache Project XALAN's extension
work on a browser?
Thank Q!
- 7
- Read-only methods for webservices with JavaBeansHello,
unfortunately i wrote this thread before in german, so i will do this
in english again.
Here we've got a standalone application which stores several data on
an SQL Server. In the last time we added a webservice to display and
sometimes modify several information from this data via webpages
(JSP). Many functions are already implemented and working fine. We
have webservicemethods returning objects stored in javabeans. To get
the data out of the beans, we have to use some get methods. Some data
is "READ-ONLY", so we don't want any set method there. The problem is:
If we don't write some "dummy" Set-Methods, wscompile will not
generate the needed get-Methods. We find that writing dummy-methods is
not a very fine way.
Is there another easy posibility to make the getMethods available for
the client without writing dummy set methods like this?
// That's what we don't need but have to write in order to make
wscompile ready to produce the getMethod
public void setName(String value) {}
// That's what we need only
public String getName()
{
return name;
}
Greetings and thnx a lot!
Andreas
- 7
- stdout being redirected to an open file?All,
Does anyone know why text sent to stdout might intermittently get sent
to an open file? I have some code which writes data to a file and logs
its activity using log4j. On Friday, the log statements began to
intermittently appear in the file. I know the following things are
true:
* The code did not change
* The configuration did not change
* The log4j Logger is mapped only to a ConsoleAppender, i.e. log
statements are written only to stdout
* The name of the file is always unique
Here is the code:
//Create a unique filename for the order
filename = "Order " + orderId;
//Create the file
logger.info("Creating file " + fileName);
File file = new File(fileName);
FileWriter fw = new FileWriter(file);
logger.info("Writing File Content ");
fw.write(fileContent + System.getProperty("line.separator"));
logger.info("Closing File ");
fw.close();
It smells to me of an O/S or app server problem in which the file
handle for the open file is being provided for calls to stdout. Has
anyone ever seen this?
Thanks,
Brian
- 9
- Chennai - Java/J2EE Urgent RequirementGreetings,
One of the leading software development company is looking for
java/j2ee professional urgently. Interested candidates forward your
resume immediately to email***@***.com
You will be receiving call as soon as you send your resume.
All the best
TimesTickets.Com Team
- 9
- new to java, need helpSirs/Madam
I encounter the problem on date field.
Sometimes, when there is no date, then it will return the null object. When
I want to check by
aDate.toString() = "" or null, it throws exception.
How can I ensure they return the value or not.
Please help
- 9
- Layout in J2ME, MIDP 2.0Hi,
I wrote a little Midlet and want to have a StringItem and a TextField
next to each other, i.e. they should be in the same row. After
considering MID Profile I coded my Midlet as listed below.
So in my understanding they should be in the same row. The only
condition, which I cannot be sure of is "this Item has a LAYOUT_LEFT,
LAYOUT_CENTER, or LAYOUT_RIGHT directive that differs from the Form's
current alignment." (MIDP, class Form).
But how can I set the directive of a Form? Or did I misunderstand sth?
Why are the two items not in ONE row?
Thanks in advance!
Best regards, Franz
---BEGIN CODE---
public class Layout extends MIDlet implements CommandListener {
private Display display;
private Form form;
private Command EXIT;
public Layout() {
display = Display.getDisplay(this);
}
public void startApp() {
form = new Form("LayoutTest");
EXIT = new Command("Exit", Command.SCREEN, 1);
StringItem s1 = new StringItem("", "Eingabe:");
TextField tf1 = new TextField("", "", 20, TextField.ANY);
tf1.setLayout(TextField.LAYOUT_2);
form.append(s1);
form.append(tf1);
form.addCommand(EXIT);
form.setCommandListener(this);
display.setCurrent(form);
}
public void pauseApp() {
}
public void destroyApp(boolean unconditional) {
}
public void commandAction(Command command, Displayable
displayable) {
if(command == EXIT) {
destroyApp(false);
notifyDestroyed();
}
}
}
---END CODE---
- 10
- how does ANT work?On Fri, 11 Jul 2003, Roedy Green <email***@***.com> wrote:
> Does ANT work by parsing any changed file to discover the
> dependencies?
Depends on the task you are talking about. For most tasks, including
<javac> it does not. <javac> simply compares the timestamps of *.java
and *.class and compiles those files with outdated .class files.
<depend> in turn parses the compiled .class files to discover
dependencies, then compares the timestamps of .class files to the
.java files and deletes all .class files that are older then the .java
files of any class they depend upon. <javac>'s timestamp checking
after that is going to succeed then.
There are third party tasks like <javamake> - see Ant's external tools
page - that can do that in one step and are more sophisticated.
> Can it be relied on to recompile everything that needs it if a
> static final changes?
No.
And a static final primitive will be inlined by the compiler so even
<depend> will not detect the change (as it wouldn't detect the
dependency) - not sure whether <javamake> would.
> Is ANT smart enough to avoid loading the compiler over and over for
> each file; i.e. does it invoke it only once for the whole shot?
It will invoke the compiler exactly once per <javac> task (that
actually needs to compile at least one file).
Stefan
- 12
- Squeeze tabs closer together in JTabbedPane??Is there a way to squeeze the tabs closer together in a JTabbedPane? I
noticed there is some free space in the tab itself to the right of the
text in the tab. Don't want to overhaul the look of the GUI. Just want
to move the tabs closer together. An option I thought of, don't know
if it's the best, is to make the tab text image icons and show the
icons instead of text. Don't know if this will free up space.
- 14
- struts templates - template is inserted in wrong placeJust wondering if anyone else has run into this issue. I am using
templates in struts and I use the same template for every form. I
insert a page in one spot on my template file and it works fine on my
machine. When I upload it to the server, it suddenly starts inserting
the page about a quarter of the way down the template instead of where
it is defined to go. Has anyone else experienced this?
- 14
- Tomcat 4.1.29 connectors on Linux problem ?
Hallo,
I have very strange problem with apache/mod-jk/tomcat installation
on Linux. I have installed very simple test servlet HelloWorld.class.
Well when I try to do some easy stability test and I call this
servlet from the same IE browser session more times I bring whole
tomcat to the state when it is not responding any more, even other
servlets from other sessions are not served. I have allready tried to
change acceptCount= and connectionTimeout= (even 0,-1) in server.xml
but without any satisfactionary results. Only the complete restart of
tomcat helps afterwards (!).
Thanks
Jan Kopinec
<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
debug="0"/>
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
debug="0"/>
<Service name="Tomcat-Apache">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8009" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="300" debug="0" connectionTimeout="5000"
useURIValidationHack="false"
protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
<!--
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="8080" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="300" debug="0" connectionTimeout="5000"
useURIValidationHack="false" disableUploadTimeout="true" />
-->
<Engine name="Standalone" debug="0" defaultHost="localhost">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="/var/log/jakarta/" prefix="apache_log." suffix=".txt"
timestamp="true"/>
<Host name="localhost" debug="0" appBase="/home/tomcat"
unpackWARs="true" autoDeploy="true">
<Context path="/test" docBase="test" debug="0"
reloadable="false" crossContext="true">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="/var/log/jakarta/" prefix="localhost_test_log."
suffix=".txt"
timestamp="true"/>
<ResourceLink name="linkToGlobalResource"
global="simpleValue"
type="java.lang.Integer"/>
</Context>
</Host>
</Engine>
</Service>
</Server>
- 14
- Running Ant from BATCH FILESHi
Does anyone know is it possible to conditionally continue with a batch
file depending on the result of an ant script.
I want to only continue with the batch file if the ant command was
succesfull - otherwise abort the script for user to see the error.
Thanks in Advance.
|
| Author |
Message |
arenaTR

|
Posted: 2003-8-21 0:23:00 |
Top |
java-programmer, comments when decompiling
Another newbie question:
When I decompile Java bytecode, will my comments come back through?
Makes sense that they woudln't, but I just wanted to check.
|
| |
|
| |
 |
Brad BARCLAY

|
Posted: 2003-8-21 1:13:00 |
Top |
java-programmer >> comments when decompiling
arenaTR wrote:
> Another newbie question:
>
> When I decompile Java bytecode, will my comments come back through?
>
> Makes sense that they woudln't, but I just wanted to check.
No. Comments don't get processed by the compiler -- they are
completely ignored, and thus don't make their way into the class files.
Brad BARCLAY
--
=-=-=-=-=-=-=-=-=
From the OS/2 WARP v4.5 Desktop of Brad BARCLAY.
The jSyncManager Project: http://www.jsyncmanager.org
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Check for site is up in programHi,
can any body guide me how to check whether the site i am using in my
Java application is up or not. Depending on that i would like to take
appropriate action.
thanks in advance,
atul
- 2
- Persistent Cookies vs. session cookiesHi all (please excuse the crosspost but I can't find an HTTP group as such)
I am trying to find out the difference between persistent cookies and
session cookies. I have found plenty of documentation saying what the
differences are from the user point of view, but I want to know how the
server and browser distinguish between the two types in terms of HTTP
protocol.
I have read RFC 2965 and the Java servlet programming documentation and I
can't find any information as to how I should specify (or detect) whether a
specific cookie is persistent or session.
Any clues please?
Andy
- 3
- JavaMail sending problem and solutionI had chronic problems with sending email via smtp. I could sign in
via a mail client and send to a remote user just fine, but JavaMail
refused to send to any but local users, citing a 550 relaying problem.
All of the references I could find on the web told me to talk to my
mail admin, but I'm he and I also knew that if my mail client could do
it, so could I.
This solution requires that you log into the mail server as a normal
email user - you will have to create an (or use an existing) account.
You turn on smtp authorization by setting the a property you pass in
to get a session: the property is mail.smtp.auth and you set it to
"true". Then you create an Authenticator that returns a
PasswordAuthentication with your username and password in it.
Here's an excerpt of working code:
Authenticator authenticator = new Authenticator() {
public PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(FROM, PASSWORD);
}
};
Session mailSession = Session.getInstance(getMailProperties(),
authenticator);
Message email = new MimeMessage(mailSession);
try {
email.setFrom(new InternetAddress(FROM));
email.setSentDate(new Date());
email.setRecipients(Message.RecipientType.TO,
stringsToInternetAddresses(to));
email.setRecipients(Message.RecipientType.CC,
stringsToInternetAddresses(cc));
email.setRecipients(Message.RecipientType.BCC,
stringsToInternetAddresses(bcc));
email.setSubject(subject);
email.setText(body);
Transport.send(email);
retval = true;
} catch (Exception e) {
}
My getMailProperties includes the following:
mail.smtp.host=some.mail.host.com
mail.smtp.auth=true
I just post this here for posterity so maybe someone else doesn't go
through the hell I did to figure this out :)
- 4
- The beauty of TCP/IPI wrote:
> >I think Roedy's logic is that streams of large amounts of data are most
> >likely to be done via TCP rather than UDP, and therefore there exists
> >some correlation between TCP and more efficient applications
Roedy Green <email***@***.com> wrote:
> I was not trying to make any such statement.
I'm still not convinced. You say you're not making any such statement,
yet you go on to make such a statement.
> I was trying to point
> out that UDP and TCP/IP stream performance depend on different
> characteristics of the connection.
But they don't. Both UDP and TCP have latency and bandwidth. Latency
depends on the sum of the processing at each node and communication
times between hops, and bandwidth depends on the width of the narrowest
communication channel or the speed of the slowest processing node. Some
applications depend mainly on latency, and some on bandwidth; so the two
will perform differently, regardless of the choice of TCP or UDP.
The TCP/UDP choice is almost completely orthogonal to the question of
bandwidth or latency. The ONLY difference is that under TCP,
transmission errors can cause future data to be buffered at the target
node, and buffers have limited size... so in a path with very high
latency and occasional errors, TCP can fail to meet the bandwidth
potential of UDP over a similar path. Of course, the up-side is
reliable messaging, which is not available with UDP.
So...
> Either you have a continuous
> stream of data or you have intermittent packets.
Yes.
> Even if you were to
> use TCP/IP for exchanging intermittent packets, it will behave from a
> performance point of view like UDP.
There is no such thing as performing "like UDP". It can perform like a
continuous stream, or like intermittent packets with frequent round-
trips... but neither is more or less UDP.
As I said before, since many applications of UDP are for streaming large
amounts of data with no round trips (e.g., video streaming, multicast
broadcasting, ) and many applications of TCP are for intermitten
communication with frequent round-trips (e.g., telnet, ssh, ftp control,
most smtp and pop3 and imap, etc.), most people with experience in
network protocols will think that you've got it quite backwards. You
haven't really got it backward; there's really no significant
relationship at all.
> I thought I was stating something almost too obvious to mention, but
> apparently it is not.
I think your talk about TCP and UDP is confusing people. That's all.
Latency and bandwidth is not at issue.
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
- 5
- NIO slow (no buffering?)Hi!
I probably yet don't understand some fundamental things about NIO. The
following code is painfully slow (8sec. for a 6MiB file):
final FileChannel in = new FileInputStream( f ).getChannel();
final ByteBuffer token = ByteBuffer.allocate( 4 );
while( in.position() < in.size() )
{
in.read( token );
final String s = new String( token.array() );
token.flip();
}
What am I doing wrong?
- 6
- Java 1.4 on a FreeBSD 7Hi,
Did anyone manage to install Java 2 JDK 1.4.2 in a FreeBSD 7?
I really need a payment service form SecureTrading, and it doesn't work on
version 1.5.
Any ideas?
Cheers,
Gabriel Engel
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 7
- Learn Java Programming Language Onlinehttp://learnjava.awardspace.com
This site includes JAVA lessons from the beginning to advanced level.
So this site appropiates for the beginner or non-basic of Java
language.
Guidelines:
1.Introduction 2.Fundamental Programming Concept 3.Decisions
4.Applets&Graphics 5.Introduction to Classes 6.Methods
7.Arrays&Vectors 8.Inheritance&Interfaces 9.Streams and Exceptions
10.Event Handling
- 8
- BDK for J2SDK 1.4 onwardsDoes anybody know about BDK for J2SDK 1.4 onwards?
If yes please let me know the website or downloads
Regards
MAnjiri
- 9
- Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novellhttp://www.web20developers.com
http://www.web20developers.com/index.php?option=com_content&task=view...
Ajallerix : AJAX, simple, fast Web image gallery demo ; at Novell
AJAX - microlink pattern tutorial : A microlink is a link that opens up
content below it.
Ajax BBC News RSS Reader : demo by Nigel Crawley
AJAX Chat in Python with Dojo : at AquaAjax
Ajax Chess : multiplayer chess
Ajax examples at BackBase : examples demonstrating several aspects of
the Backbase technology.
Ajax examples at Rico : Inner HTML, JavaScript updater etc.
Ajax examples using ColdFusionMX, SQLServer, SOAP : Contact Manager,
NOAA 7 Day Forecast code and demos.
Ajax Feed TV : News feed
Ajax inline dictionary : Highlight any text on this site then right
click. A tooltip containing the definition of the selected word should
show up.
Ajaxload : Ajax loading gif generator.
Ajax Login Demo : Creating a secure login system using XMLHttpRequest
Ajax Newsletter Signup : A newsletter signup form that shows Thank You
on the same page.
ajaxProject : Project Management applicaiton with rich UI
Ajax Rater : A star rating system that uses Ajax.
AJAX-S : An Ajax-based slideshow system.
AJAX Spell Checker : spell check text / form content.
Ajax Toolbox : Tools for the Ajax Developer
Amazon Catalog Tree : Amazon Catalog Tree
Amazon Zuggest : Amazon product suggestion (like google suggest)
Askeet by symfony : Digg-like AJAX interactions; open source
Backbase - Ajax Demos : Ajax demos at BackBase
Basic Ajax Examples : Ping, track changes, drop down, Google suggest
hack etc at Clearnova
Behaviour : Fading lists, Sortable lists, Dropout boxen, Shaky lists
chat.app : ajax chat
Chihuahua Word Puzzle : daily word puzzles
Coloir : Ajax Slideshow
DHTML arcade/action games : a collection that demonstrate the power of
DHTML
DomAPI : Windows Desktop, Outlook-like, RSS Reader
Drag and Drop Shopping Cart Demo : at CyberDummy
Easy AJAX inline text edit 2.0 : edit a piece of text inline
Gmail Style Check Username AJAX Demo : at CyberDummy
Google Web Toolkit Example Projects : Hello World, Dynamic Table,
Desktop App Clone etc
GreyBox : Pop up window using idea of light box.
FiftyFourEleven: Ajax Examples
IntuiCat - ajax Catalogue : Ajax-based Catalogue Demo
jsLINB programming demos : LINB(Lazy INternet and Browser)
JSlog : Ajax logging tool.
JS/UIX Unix Shell : JS/UIX is an UN*X-like OS for standard
web-browsers, written entirely in JavaScript.
Lace : free web chat application
Lightbox : simple, unobtrusive script used to overlay images on the
current page.
Leightbox : Light Box with inline div's instead of AJAX calls.
Live Quote Demo : Simple way of creating an updating stock quote table
in ajax.
Magnetic Poetry : drag and drop poetry
Metatron Chat Engine : PHP/MySQL/JavaScript powered chat engine
Monket Calendar : online calendar
Multi List Drag Drop Demo : at CyberDummy
NetDirector : open and extensible framework for managing configurations
of common open source network services.
nexImage : Image processing demo
Opera Platform : Enabling AJAX applications on mobile phones
Orbeon examples : various examples illustrating the capabilities of
OPS, from the OPS Tutorial examples to XForms examples
OVO Suite : Online Virtual Office : virtual office limited demo
phpFreeChat : php Free Chat
S5: A Simple Standards-Based Slide Show System : S5 is a slide show
format based entirely on XHTML, CSS, and JavaScript.
script.aculo.us Reflector : image reflector script that uses uses
opacity-based fades
Slider Bar Demo : at CyberDummy
SmallestAjax : Smallest Ajax example in the world?
Spell Check demo : by Primal Grasp
Super Maryo World : Japanese game demo
Tacos : Tacos provides a library of useful Tapestry components. This
application provides some examples to get you started.
theList : to-do list / bug-tracker
ThickBox : ThickBox is a Lightbox than can show html pages as well as
images.
Tooltip.js : Tooltip.js is a simple class to make it possible to add
tooltips to your page.
Treehouse Chat : ajax chat
Tudu Lists : open-source to-do lists
WeBoggle : Ajax Boggle
XHTML live Chat : ajax chat
YahooSearchAsYouType : Yahoo search as you type
ZK Demo : demo programs for various components
- 10
- import="ShoppingBasket,Product,java.util.*" Error in JSP pagevivienne wykes wrote:
> Hi There,
> I am trying do a shopping cart tutorial and have the following error when
> compiling my shop products.jsp file.
>
>
>
> shop_0002dproducts$jsp.java [3:1] '.' expected
> import ShoppingBasket;
>
>
> <%@ page language="java" contentType="text/html"
> import="ShoppingBasket,Product,java.util.*"
> errorPage="errorpage.jsp" %>
>
>
> I am not sure if it has to do with mutiple imports of the ShoppingBasket
> and Product classes.....
> Would it be better to put these two classes into a package ? The classes
> compile ok but have a problem with the above import.
> Thanks
>
> Jim Ascroft
Stop asking the same question over and over again. You've gotten an answer
already.
--
Kind regards,
Christophe Vanfleteren
- 11
- izpack 3.8Does anyone know where I might be able to find the free izpack
installer version 3.8?
Thanks!
Its totally free, and if the author ever sees this,,,, THANKS BUD!
This thing kicks ass, but 3.9, has a bug that makes it not work for my
purposes....
- 12
- Thinking in terms of Objects.Hello all,
I come from a background of Unix C-shell, WIN .bat programming and am
entirely new to the concepts of Object-Oriented programming.
I'm having a hard time geting the concept of 'objects', 'classes',
'why to use them', 'when to use them' etc. I have bought couple of
books on OOPS, but they dont tell me why I should use objects and not
the regular 'functions' or whats the diff. between the two.
I'm sure a lot of people out there would've had a similarly
frustrating experience when making the switch from Structural to
Object-oriented, like the switch from C to C++ or the first time OOPS
was introduced in Visual Basic or Perl. I'm interested to know about
your experiences during the transistion and what you had to do?
Also, for starters, I've made couple of home-grown definitions of what
I think are OOPS fundamentals. Could you please tell me if I'm on the
right track?
1. Objects are glorified functions:
Ojects are just like functions, as in, you have a code-block you think
might have to be repeated over and over again in your program. Might
as well write it once and keeping using it. Objects are these
code-blocks.
2. Objects are user-defined data-types:
Objects are just like int, float, double etc., but you get to define
them!
User defines what sort of data and its attributes an object has holds.
I know they are defined in a gazillion different ways but, is this a
good way to start? Did I miss any other fundamental concepts of
Objects?
Another thumb-rule I'm thinking of implementing till I get a hang of
the Objects: Always try to objectify every darn piece of executable
statement as a first resort.
Your comments, please.
Also, any books/URLs you'd recommend for the absolute beginner in
Objects( with reference to Java, especially).
Thanks for your time,
Reddy
- 13
- Java and avoiding software piracy?On Jul 23, 10:40 pm, Joe Attacki <email***@***.com> wrote:
> On Jul 23, 9:04 pm, email***@***.com wrote:> No, I make a point, he calls me names, I call it an insult.
>
> Whoa, wait, what!? My head asplode.
>
> The post you marked as "insult deleted" contained simply some links to
> other discussions on Google Groups that invalidate your point, then
> simply said "Wrong again!"
>
> Where in that post did I call you names?
The very fact that you even tried to "invalidate" me, and then
proceeded to attack me by calling me "wrong". In fact you implied a
second such, since you said "again", implying there was at least one
additional occasion of incompetence on my part.
Publicly alleging incompetence on my part is unwelcome and will not be
tolerated. Don't do it again.
Furthermore, a few token on-topic posts years ago followed by
thousands of vicious attack posts since then in at least two major
flame wars does not change your stats much. Instead of 100% attacki
and off-topic you may be merely 99.9% attacki and off-topic, which is
still way more than anyone else posting to this froup. You also lurked
for a very long time, appeared to blast invective at various people
(chiefly me), lurked for another very long time, and again decloaked
with armed phasers and torpedoes. As far as I can tell you are an
Orion pirate lurking alongside a heavily-trafficked space lane waiting
for opportune moments to strike, rather than a constructive
participant of this group. So please go away.
- 14
- BufferedInputStream vs BufferedReaderHas anyone done any experiments on which is preferable -- putting your
buffering at the BufferedInputStream level or the BufferedReader level
when you have a Reader?
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
- 15
- JSP Import CSV into databaseI'm looking to implement a feature into a JSP web app which will allow users
to import a CSV file into a database. My thoughts are that the process would
involve the following steps:
1) Transfer the CSV file from client to web server.
2) Have a simple Java application check folder location intermittently for
new files in upload folder on website
3) If a new file has been uploaded then parse the CSV into a collection of
JavaBeans
4) Use JDBC to import each JavaBean into table
My questions are the following:
- Is this the best way to achieve this (bearing in mind each row will need
to be validated)?
- What is the most appropriate method of tranferring a file to a JSP web
server?
- How should I transfer the JavaBean data to the SQL database - import each
bean one-by-one?
Any advice would be appreciated.
|
|
|