hi there,
trying to access a value from a map in a c:out tag but the following doesn't appear to be displaying any value. Here's the code:
<c:out value=" letterForm.criteria.map['letterForm.criteria.type']" />
anyone have any ideas how to get the value from a map other than using the following code as it seems a bit inefficient as we ...
I am writing a program in java that models a carnot engine and I want to calculate the work done and I need to use integration. I have been looking around on google and haven't found quite what I am looking for, have any suggestions?
...
Hi All,
I am stuck up with a problem while using Regular Expression.
My requirement is : split a long string into maximum size of 125 letters and then insert a line break in between them.
while splitting, it shouldn't split between the words. in short, i want to split a string into small strings whose length is 125 or at the end of word...
I have created JToolBar (Java Swing). I have set a Background image on frame which contains JToolBar. I want my JToolBar to be transparent so that the image kept on frame should be visible. I am using setOpaque(false) but it is not having any effect on my toolbar.. Has anyone delt with this before? My Code is as follows
import javax.swi...
Hi All,
We are having a .sh file which executes curl command we need to do the same curl execution of .sh file in java. We are facing problem in replicating the same behavior of .sh execution in java.
...
Hello. I know this question was answered before, but I cant still handle it with my code.
Please can someone pointing out how can I fix it on this particular code. Id like to call trace(); but dont know where to call new trace. I tried different stuff from here but it does not work for me. Thank you!
package matr;
import java.util.Scan...
I need to do some refactoring in Java, and I need to maintain some degree of binary compatibility. In this case I want to remove some legacy interfaces, that are not used anywhere anymore and which require a rather big (and also deprecated) external dependency.
I have class C that implements interface I, and I have code that calls a met...
I have never understood what is the ideal way to name a project, package, class. I do it in a random way which doesn't look professional at all. I know the class name should start with a capital alphabet. But what I don't really have trouble with is finding the names that are suitable and look professional. lets consider this example. If...
I have many html forms referring to many persistence classes.
All the html forms are generated by one single class HTMLForm by passing in the respective HTMLFields instances:
public class HTMLForm<T>{
HTMLForm(HTMLFields[] f, Class<T> classt){
this.stupidSunWontAllowTnewInstance = classt;
// ... whatever GWT jazz ....
}
public...
Hello All...
I have one table that has composite key 'rid' and 'sid'.
For that i have made following beans to map with hibernate annotations :
WBList.java
============
@Entity
@IdClass(WBListPK.class)
public class WBList {
private int rid;
private int sid;
private String wb;
@Id
@JoinColumn(name="rid")
public ...
Hi all,
I have a generic class, says :
MyClass<T>
Inside a method of this class, I would like to test the type of T, for example :
void MyMethod()
{
if (T == String)
...
if (T == int)
...
}
how can I do that ?
Thanks for your help
...
I have two Strings:
String a="org.test.A";
String b="org.test.B";
I get a class by Reflection
Class aClass = Class.forName(a);
I want aClass extends b, like:
Class okClass=aClass.extends(b);//how to implement this?
how to implement this?
how to get okClass?
thanks!
...
I just want to know that what is the MIME type i need to give if i am generating text file from xml using xslt?
...
First, I'm working as a Java programmer, and my first taks is to test the DAO and Services layers for a module from a project, but I didn't receive so many details about this thing.
Any info for doing this? I know i need to use mock testing.
P.S. This is my first job and I have 2 weeks as a worker :D, so I know very little about testin...
Given an entity with a list of components:
class Entity{
Long id;
String name;
List<Component> components = new ArrayList<Component>();
}
class Component{ Object value; }
Configuration:
<hibernate-mapping>
<class name="Entity" table="entity">
<id name="id" access="field" column="id"/>
<property name="...
I want to generate a text format file using XML and XSLT using Java.
I know how to generate PDF format, but I have no idea about generating text format, i.e. what packages are needed, what are the changes needed in XSLT?
If anybody can provide the sample for this it would be a great help for me.
...
I am using Java. Inside a Java program I am writing a SQL query:
string query = "select * from tableA" ;
However sometimes the query is really large. In those cases I want to write the query in different lines e.g.:
string query = "select blah1, blah2
blah3, blah4
blah5, blah6
...
Hello.
I have a web-service with method signature like this:
public RetType doIt(String description){
return null;
}
After wsdl is generated I see that (in wsdl) method doIt have argument name arg0. Is there a way in code-first approach to specify argument name to be shown in wsdl appropriately like in java class method signature?
...
Hi, I cant imagine how to create this method:
I can find numbers<10 with if loop and store them with count++; But thats all.
Id like to see the algorithm in any lang(I can do some C++,java), so I can use it.
Go through each row and record a count of numbers less than 10.
Store that aside, go to next row, do same thing, compare, throw o...
Hello. I am using Jython 2.5.1 with JSR-223 (i.e. javax.script package) and I expect the last line of the Python script to be returned. For example, after evaluating this script:
class Multiplier:
def multiply(self, x, y):
return x * y
Multiplier().multiply(5, 7)
I should get back 35, but I get null instead. In other hand it w...