Win a copy of Terraform in Action this week in the Cloud forum!

Yashnoo lyo

Ranch Hand
+ Follow
since Feb 17, 2003
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 Yashnoo lyo

Hi friends:
I want to edit a test.properties file using class java.util.Properties. My file is:



After I run my application,all the comment is lost!
My code is:




After I run my code,the test.properties change to this:


Where is my comments!? They are deleted by java.util.Properties!
All my comments information lost! why Properties class don't save comment? ;-(
15 years ago
Hi friends:

I have two webapps,webapp1 and webapp2. I bind an object to webapp1's jndi tree ,and I want to get the object from webapp2.How to do it? They are different web context. I mean that how to get another context from local webapp? I use tomcat. I couldn't get the object in this way:

in webapp2,tomcat report exception:"you don't bound the webapp2 in context"
If it can,how to do?
Thks! :roll:
15 years ago
JSP
Hi everyone:

Could I get a sessionfactory of another webapp's? (I use Tomcat5) I have two web applications,WebApp1 and WebApp2. They use hibernate but using different databases. Webapp1 use hibernate1.cfg.xml as the following:





webapp2 use hibernate2.cfg.xml in another application:



Now , I want to operate the sessionfactory1 in webapp2
How to do it? I mean that it is possible to get the sessionfactory1 in webapp2? I want to bind the sessionfactory1 to jndi tree,then how to get the sessionfactory1 in my second webapp2?
Thks!
:roll:
Hi friends:

I am developing WebService with axis. I want to publish a webservice in server.So I write a method:

See the above code ,the User Object!
After publish this method to web, when client invoke this method,Axis will serialize the User object and deserialize the User object for us. I don't have to declared anything in deploy.wsdd.
But if I change the method to the following :

I new an User object in this method, now Axis couldnd't deserialize the User object! It report an exception when client invoke this method:

So I add typeMapping in deploy.wsdd,But it is not useful ,Axis report that exception too. :-(

What's different between the two web service method?
Why Axis couldn't deserialize the User Object in the second method? Thks! :roll:
15 years ago
Hi friends:

Does JMS could send images? I use JMS Point to Point pattern. I want to send some picture from client to JMS server. I want to know if it is possible. I use the following code, but it couldn't work. The Picture that I receieved can't be opened. My code is:


Client:

Server side:

I can receieve the test.jpg file but it is broked . I mean that the test.jpg can't be opened. Is there any error in my code? Thks!
Hi friends:

I want to display a large number to jsp reading from database(Oracle).The number is "1111111111". The number in database is "1111111111" excactly and it is Float (126) . But after it displayed to jsp,it become "1111111112" ?! why JVM auto format Float number? The number "1111111112" is not what I want to see. I use NumberFormat class to format it,but no luck ;-(

My code is:


If I input number 300000000,it will display 3E. no! Why it couldn't display correctly? How to format large number for display correctly? Thks!! :roll:
[ January 13, 2005: Message edited by: Bear Bibeault ]
16 years ago
JTest can generate constructor test method but can't generate user define test method.
Because I need test case class source,not only the test report(like html report).So I need have to search other test tool.
17 years ago
Oh,JTest can do it! But it is not free. Is there any free auto test tool? :roll:
17 years ago
Hi everyone:

If I test my program using junit,I need have to write many test methods and input many parameters. If I don't want to do it myself,is there any java tools could help me do this complicated work?
I mean that can any tools generate test methods for junit? Thks! :roll:
17 years ago
I come across the same problem. Why? Could some one solve this problem?
java code:

Exception:



Help!

Originally posted by Nathaniel Stoddard:
MBeans are referenced by the name used when bound. I suggest you check out the JMX tutorial on java.sun.com.



Thanks for your reply. But I don't find any about reference a MBean. I mean that this code:


I don't know how to get my MBeanServer in this code. What is the AgentID(the param)?
Help :roll:
17 years ago
Hi everyone:

Did someone use the JMX in web server? I registe a MBean in servlet while Tomcat startup.And I want to get this MBean in my one servlet. But I don't know how to get the MBeanserver that I need. My code is:

Registe MBean --->



Get MBean --->


But the problem is that there are many MBean registed while tomcat startup. I don't know which is that I need. I see the javadoc ,it says:


the findMBeanServer can find my MBean.But what is agentId (the param)? Someone used this before?
I have two class in this example:

SystemVar.java


SystemVarMBean.java

I mean that how to get my registed MBean?
Please help! Thks!! :roll:
17 years ago
Hi everyone:

I want to use MySQL as my Database.But I come across a problem. MySQL have some data types like


I know data type varchar is java String only. What java data type should I use according MySQL? For example : What is long binary in Java ? Is it Blob? Thks :roll:

Originally posted by Leandro Melo:
Didn't understand your question, can you be more clear?
Anyway, seems to me your not using xdoclet tags correctly.



I mean that I can't create home and remote interface using xdoclet.After I run it,it don't create any EJB interface file. Why?

Help!
:roll:
17 years ago
Hi everyone:

I want to use XDoclet create EJB interface like home interface,Remote interface.But I can't do it using the example. Someone using XDoclet please help me
My Build.xml is
My EJB code is simple:

When I run the build.xml it output:

It is successful indeed.But I can't get anything?! Where is the home and remote interface file? Why xdoclet don't create anything for me?
Help! :roll:
17 years ago