Sebastiaan Kortleven

Ranch Hand
+ Follow
since Mar 12, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sebastiaan Kortleven

/me bangs head on desk...

thanks!!!
15 years ago
JSP
Hi all,

I'm about to go bananas. I'm trying to write a simple JSP with a bean and I keep getting this error (I'm using Tomcat 5.5.17):



This is my bean:



And this is the interesting part of my JSP page



The path the .class file is in is $CATALINA_HOME\webapps\ROOT\am\WEB-INF\classes\be\ictservices\aansluitingsmodule\dto


What am I doing wrong?

Thanks!
15 years ago
JSP
Hi all,

I'm asked to build an application that allows ppl to enter information about a customer (other companies), and then generate several PDF's from that information (so that all the info only needs to be entered once). A lot of those documents need the same information (name, address,...) so this would speed up the process of creating the docs.
I know about creating/editing pdf's, JSP's, database logic, ... but I'm stuck with the essential part: what will my data model look like?

This is the problem: each customer has some general information (name, address,..) so that can go easily into a Customer Class. But what with all of the other information that is needed to fill out those documents.
Currently there are about 7 documents that need all kinds of information. Some is shared between documents, some isn't. Most of the information are Strings, but some are Booleans or Integers. It's pretty obvious that in the future more documents will be needed, or that existing documents will change.
I could keep all of the needed document fields in an external XML file that can be edited, and keep all of the data in a Map in the Customer class. But that's not very pretty...

Any suggestions?

Thanks!
15 years ago
16 years ago
and what seems to be the problem?
16 years ago
Hi all,

I'm new to WS and would like to deploy an application I'm developing though this technology.
When I run the jar file all works just fine, but launching it through web start gives me an classnotexception, although all the necessary jars are being dl'ed..

Here's my JNLP file:


And this is what my manifest looks like (of aqt.jar)



The resulting error looks like this:


The org/apache/commons/collections/SequencedHashMap class is located in lib/commons-collections-2.1.1.jar

What am I doing wrong?
16 years ago
There's no such method as myFrame.print(); You'll have to write the code yourself.. it's not that hard.. check out the printing API...

The code looks a lot like the code in a paint method..
16 years ago
Put the jtable on a jscrollpane to get the headers to be visible:

myPanel.add(new JScrollPane(myTable));
16 years ago
Hi all,

I've been reading up on many-to-many associations on the web and in Hibernate in Action, but I couldn't find the answer to my problem.

I've got an Object of my own class Query, I would like to add some security to this object, so I've created a User object. Each query can have several users that can access it, and each user can have several queries it can run..

This is the part of the query mapping file:


When I create a Query Object, I fill the users-set with UserQuery objects, but when I save the query (session.saveOrUpdate(query)), I get an exception:



Is it possible to save a many-to-many on cascade, or should you do it manually.. if it's possible.. what am I doing wrong?

Thanks in advance!!
Hello all,

I've got my own Query object which consists of several WhereItem objects, which can consist of a Subquery object which consists of a Query object (not the same as the original), and so on..

So:

Query -> WhereItem -> Subquery -> Query -> ...

When saving the main Query, I woul like all the rest to be saved too..
I've set the cascade option to all for all collections, but I still get a TransientObjectException..

What am I doing wrong?

Here's part of the exception:


Here are the relevant parts of the mapping files:

you'r checking to see if amount equals $100.000 (eg), but amount is a jcombobox, so you should check to see if amount.getSelectedItem() equals $100.000 (same for the other comboboxes)
16 years ago
As a default the JComboBox will call the toString method of the objects.. so you could write your own toString method and have it return the value of the variable..
You could also create your own ListCellRenderer...
16 years ago
Here's a pretty straightforward example of how printing works:

http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-Printing.html
16 years ago
pennies = pennies++; should be just pennies++; (same with --)

pennies = pennies++; will not change the value of pennies
16 years ago
perimeter shouldn't be a variable of your main class.. just create a method in your Rectangle class called getPerimeter or something, and show that to the user instead of the perimeter variable you'r using now..
16 years ago