Tags:

How to pass arguments to .jsp file when using javax.servlet.RequestDispatcher.include()?


I’m using the Model/View/Controller style of building web apps by routing an incoming HttpRequest to a Controller Servlet written in Java and then when the Servlet is finished, having it render back a …

Tags: jar java terminal

How to create a .jar file using the terminal

Tags: , ,


I’m trying to create a .jar file using the mac terminal but am having bit of trouble. I followed the steps here but was unsuccessful. I got this error message: Failed to load Main-Class manifest …

How to increase the slow scroll speed on a JScrollPane?

Tags: , , , ,


I am adding a JPanel in a JScrollPane in my project. All is working fine, but there is one problem about mouse scroll using the mouse-Wheel in JPanel. It’s speed is very slow on scrolling. How to …

How to connect in java as SYS to Oracle?

Tags: , , ,


I receive this error: java.sql.SQLException: ORA-28009: connection as SYS should be as SYSDBA or SYSOPER How to fix? (I need to be SYS). Thanks.

Tags:

A fatal error has been detected by the Java Runtime Environment. EXCEPTION_ACCESS_VIOLATION


I have java 1.6, maven 2, activeMQ 5.5 and functional tests with testng. When I launch it in Idea then OK, but when I try to launch them with maven from console then process suspends after trying to …

Adding a listener to a variable in Java/JavaFX which gets called on variable change

Tags: , ,


I know that there are listeners in JavaFX, and i’m sure Java. But I’m confused as how to implement them. I have a boolean variable that is changed throughout my program. Everytime the boolean is …

Tags:

How to deep copy a Hibernate entity while using a newly generated entity identifier


I’m using a relational DB using a single column pk with a few nested tables. I need to add a simple archiving to my project. The archiving only happens when the application reaches a particular state, …

Tags:

adding JScrollBar to a JPanel with GridBagLayout


My whole purpose of this is to get something looking like this: I want my skills list to scroll similar to freezing the top row of your spreadsheet in excel. Here is the code for my top row. //###…

How could a LinkedHashMap fail to find an entry produced by an iterator?

Tags: , ,


Under what circumstances given a correct implementation of hashCode and equals() can the following code return false? myLinkedHashMap.containsKey(myLinkedHashMap.keySet().iterator().next())

Tags:

How to persist @ManyToMany relation – duplicate entry or detached entity


I want to persist my entity with ManyToMany relation. But i have some problem during persisting process. My entities : @Entity @Table(name = “USER”) public class User implements Serializable { …