Hello,
I need to “un-read” characters from an InputStreamReader. For that purpose I wanted to use mark and reset but markSupported returns false for the InputStreamReader class, since it doesn’t maintain an internal buffer and/or queue of characters.
I know about BufferedInputStream and PushbackInputStream but neither is appropriate he...
What is the difference between wsgen and java2wsdl tools ?
...
I would like to check on which actionEvent has occurred with 'ActionEvent e' and 'e.getSource'. Can I use a switch case for this?
public void actionPerformed(ActionEvent e){
switch(e.getSource()){
case radius:
double r = validate(radius.getText());
break;
case height:
double h = validate(height.getText());
break;
...
Hi all,
I have few questions regarding java portlets ( JSR 286).
My requirement is to integrate a php web site to main site of client using java portlets ( one of the options given by client).
Do we have to implement portlets for each page in target web site?
Do we have to implement separate portlets for images,css and javascript files...
i have a java method that is part of an web service interface and that takes a byte array parameter like this
public int computeSomeThind(byte[] data) {
if(data != null) {
// ... do what ever
} else {
return -1;
}
}
When a generate the wsdl with axis 1.3 the data parameter will appear as not nullable. Is there a way to d...
Hello all,
I am trying to implement this demo on my local machine. http://bit.ly/4g4o1r
I have placed these 3 files in a folder:
LittleShootApplet.class
appletLoader.js
filepath.html
I have pointed my browser to that location but I keep getting applet missing code parameter even though it does?!
APPLET tag missing CODE parameter.
j...
I need this for calling a C function from Java class (JNI) and I know that there are options to do this using "Microsoft Visual C++ compiler". (explained here)
But I am interested to know if something similar can be done using TC or TCC.
I don't have a copy of "Microsoft Visual C++" and not sure if cl.exe is available without having to...
I want to update a .class file in the jar with new one. What is the easies way for it, especially in eclipse ?
...
Is there a way to reference one of the method parameters from the method documentation body?
Something like:
/**
* When {@paramref a} is null, we rely on b for the discombobulation.
*
* @param a this is one of the parameters
* @param b another param
*/
void foo(String a, int b)
{...}
...
I’m building a J2EE web application which uses Oracle SSO with an OID back-end as the means for authenticating users.
If a user wants to use the application, first he must provide a valid login/password at SSO's login page.
When the user is done using the application, he may click on the logout button; behind the scenes, the action ass...
J2EE has ServletRequest.getParameterValues().
On non-EE platforms, URL.getQuery() simply returns a string.
What's the normal way to properly parse the query string in a URL when not on J2EE?
...
I'm looking into implementing one of our internal applications as a portal using portlets, as it has many functionalities and not all of them are required by all users.
I've looking at the Apache protals site and I saw that there are two projects - Jetspeed 2 and Pluto.
Although Jetspeed is described as portal and Pluto as a portlet co...
I have recently implemented an Action that toggles the enabled status of a business function. Whenever the user invokes the action I set a boolean flag: "willEnable" to determine whether the next invocation will enable or disable the function. Likewise I update the action name, short description and icon to reflect the new state. Then...
I'm writing a 'Sudoku' program, and I need to write a method to check whether a number, the user wants to insert in a certain cell is already contained by the row, column or region. My code looks like this(I'm only checking the row for the number at this point, setNumber returns a boolean value indicating whether the number can be insert...
I have a xsl file where i need to use parameters from an external source. I am using Java and my code looks something like this:
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer xsltTransformer = transformerFactory.newTransformer(xsltSource);
xsltTransformer.setParameter(parameterName, parameterValue...
Simple question.
I have a new list and an old list. In Java is there a standard way/library that allows me to compare these two lists and determine which items have been updated/deleted or are completely new? E.g. I should end up with three lists - Deleted items (items in old but not in new), Updated items (items in both), New items (it...
I have a situation where I'm receiving an enum from an external system, and for which I need to return an enum of our own. The two enums have the exact same literal values in them:
// externalEnum is guaranteed not to be null
public static MyEnum enumToEnum(final Enum<? extends Enum<?>> externalEnum)
{
if( externalEnum instanceof M...
I have a query that works in plain SQL but is not working on JPA and can't figure out why. As you can guess from the title I have a clue but I don't know how to "fix" it.
Here's the actual important code:
@Id
@Basic(optional = false)
@Column(name = "id", nullable = false)
private Integer id;
@Basic(optional = false)
@Column(name ...
What does term 'web-component' mean in Java EE? Give me some examples from different Java EE technologies (jsp, jsf, ejb..)
UPD: can I say that every custom tag in jsp is a web-component and that tags in jsf are web-components? or only servlets and whole jsp-pages are web components? is deployed session bean a web component?
...
As I understand it should be natively available in Jackrabbit 1.6 (I've found this blog entry http://dev.day.com/microsling/content/blogs/main/jrnativehttp.html) but I can not find any example configuration.
...