java

using spring with ejb

Hi have you used spring and EJB together in a project? It it's good or not. And how, what you used spring and EJB for? thanks ...

Capture generated dynamic content at server side

Is there any way with which I can capture generated dynamic content on the server side and get that file or string object of the same to the servlet. We can generate dynamic content with JSPs, but we dont have access to the generated dynamic content at the server side. As soon as we do the forward container generates the dynamic content...

Can I write Java code in XCode 3.2.1?

I would like to know is there any way to program (write, compile and execute) Java in XCode as I don't see any Java templates. Does that mean that it's not possible? ...

need to call soap ws without wsdl

Hi Guys, I am new bie to web service. This web service is provided siebel guys. I need to call one web service. My client provided me following details. Here is the SOAP. For prod use this as you endpoint: http://myhost%3Amyport/eai%5Fanon%5Fenu/start.swe?SWEExtSource=SecureWebService&amp;SWEExtCmd=Execute&amp;WSSOAP=1 Request: <soa...

What's the recommended way of running Java from PHP 5.2?

I want to call Java from PHP 5.2, running either on a webserver or from a command line script. From PHP 4, this seems to be simple, and just involves installing the PECL Java extension. Example code from the PHP 4 extension: <?php // get instance of Java class java.lang.System in PHP $system = new Java('java.lang.System'); // d...

What's the meaning of printing a thread instance in Java?

For example, System.out.println( Thread.currentThread() ); gives Thread[main,5,main] What does [main,5,main] refer to? I am guessing perhaps one of them is the name, but I want to know what it all means precisely. ...

Java: Display an Email body in Swing

Hi, Is there a simple way to display an email body in a JComponent. Just the body is enough, I will make labels and fields like: from, to, subject, ... It would be very easy if I could do something like this: Message m = ...; //From the java mail lib. (javax.mail.Message) JEmailBodyComponent c = new JEmailBodyComponent(m); frame.add(c...

How to strip insignificant whitespace out of HTML

Hi, I have to compare different versions of HTML pages for formatting and text changes. Unfortunately the guy/company who creates them uses some kind of HTML editor that re-wraps all the HTML every time (and adds tons of whitespace), which makes it hard to diff them. So I am looking for a tool (preferrably a Java library) that can refor...

Java 2D game graphics

Next semester we have a module in making Java applications in a team. The requirement of the module is to make a game. Over the Christmas holidays I've been doing a little practice, but I can't figure out the best way to draw graphics. I'm using the Java Graphics2D object to paint shapes on screen, and calling repaint() 30 times a secon...

Is XPath a better a way to read configuration file than using SAX / DOM parsers?

Is XPath a better way to read configuration file than DOM and SAX? If yes, Why does not log4j uses XPathExpression to read configuration file? If No, What method should I choose so that I do not have to modify the code if my configuration file changes? Update: @kdgregory Normally you are aware of the parameter you are seeking in a ...

Trying to make moving highlighted text type application that highlights text for help with reading pacing.

Programming language: Java Problem: I can make the highlight "snap" from word(s) to word(s), but the best outcome would be the highlight smoothly gliding across a given line and starting on the next line down as it goes out on the right side. Any suggestions? ...

Spring jta-transaction-manager

Using Spring: can jta-transaction-manager use id as name so that I can pass it as REF to my service layer like below? is tx:jta-transaction-manager can only be used for je22 container? I mean for Tomcat, I need to do it manually, like below: <tx:jta-transaction-manager id="name_transactionmanager"/> &lt;bean id="projectService" clas...

spring roo vs appfuse generate service /dao layer

I am looking for feedback from experienced users on spring roo and appfuse. Which do you think does a better job reverse engineering database tables and generating a service layer, dao layer, and jpa entities? If I am not mistaken, spring roo currently cannot reverse engineer a database. ...

using hibernate in NetbeansIDE

hey can anybody give a small example which i can run Netbeans IDE using Hibernate...do Session class works in NetBeansIDE ...

Is there a fix sized queue which removes excessive elemets?

Hi, I need a Queue with a fixed size. When I add an element and the the queue would overflow the fixed size it should automaticly remove the oldest element. Is there an existing implementation for this in Java or do I have to programm my own? Thanks in advance. ...

Cannot edit entities in admin view of Google Apps Java

I am working on a java project on Google app engine and when I go to admin I am not able to edit the entities. I can view them though. I am on windows xp and developing in eclipse. Let me know if you need any more info to help me make these entities editable. http://localhost:8080/%5Fah/admin/datastore?kind=User Edit: I have instal...

How to convert accented letters to regular char in Java

How do I convert &#198; and &#225; into a regular English char with Java ? What I have is something like this : Local TV from Paran&#225;. How to convert it to [Parana] ? ...

Flatten XML using multiple XPath expressions

I'm looking for a generic algorithm which can flatten a XML file into a table, given multiple XPath expressions and all things i've tried failed due to the nature of available XPath engines implementations. Given a XML: <A Name="NameA"> <B Name="NameB1"> <C Name="NameC1"/> <C Name="NameC2"/> <C Name="NameC3"/> </B> <B Name="NameB2">...

DFA Based Regular Expression Engines for Java with Capture

Are there any (free) regular expression engines for Java, that can compile a regular expression to a DFA, and do group capturing while matching the DFA ? I've found dk.brics.automaton and jrexx, which both compile to DFA, but neither seems to be able to do group capture. While the other engines I've found seem to compile to NFA. ...

In Java- "Static Members of the default package cannot be imported"- Can some one explain this statement?

In Java- "Static Members of the default package cannot be imported"- Can some one explain this statement? It would be better if its with an example. I am not sure if it has a really simple answer but then I tried to understand but couldn't figure it out. ...