This week's giveaway is in the Testing forum.
We're giving away four copies of TDD for a Shopping Website LiveProject and have Steven Solomon on-line!
See this thread for details.
Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Chiaw Huat Lee

Greenhorn
+ Follow
since Oct 24, 2004
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 Chiaw Huat Lee

Hi,

Any of you guys that know..some free converter tools that will help me to convert Chinese char to unicode type UTF-16?
Button button = new Button("\u6E05\u9664 :");

Thanks.
16 years ago
Hi,

I have this problem on displaying chinese char on my awt button.
Not sure whether I'm doing it correctly but, when I run my applet (which contain the frame that contain the button), it will NOT be able to display it (Using Sun JVM).
But, if I'm using Microsoft JVM, it will able to display it.
Btw, the Font type that I use is Dialog. Did try on other Font type that been supported by the browser (IE), M JVM and Sun JVM like, SimSun, SansSerif,etc...
Below is the code on how I do it.
.....
Font font = new Font("Dialog", Font.PLAIN, 12);

Button addButton = new Button();
addButton.setFont(font);
addButton.setLabel("\u6E05\u9664");

.....

As far as I know is, diff browser will have diff Font type that been supported by them.For example, IE only support Font type of SinSun, SinHei,NSinSun, and Microsoft Sans Serif....and I have try all the font type, still can't able to work it out. Hope you guys can share with me, what are the things that I miss out. Thank you.

Btw, I am forced to use awt. So, please don't suggest me to use Swing components. Thanks.
16 years ago
Hi,

I having a problem to enable this VSS plugin in my Eclipse 3.0.1.The problem that I having now is when I try to 'set my VSS setting' (Team-->Share Project-->VSS Configuration Wizard)...It said " Unable to find any valid VSS installtion.
Are you sure that the VSS installation is not currupt?"
Basically, the VSS that I have is installed is in another machine(a file server).Even if I created a shortcut to that particular drive/dir of the VSS into my local setting, it still can't let me to click on FINISH.
At the end, it still prompt me the same error as I mentioned earlier.

Some of you might wonder why I installed the VSS in another server.Well, because we only bought 1 license for it.Others that 1 to use it, need to created a shortcut for it, then...they can access it from their local machine.
Any idea to solve this?
Hi,

Well,of course yes.Most of the company that I know are using Sun One App Server as their choice for their critical mid-size web application.
Should have no problem.
But, some of them prefer to use open-source technology app server like JBoss.
17 years ago
I think most likely is because the port that you're using for your Sun AppServer is been used.That is why in your friend computer...it is working fine.
You can check whether the port number that your Sun AppServer is using is been used by other s/w or the system.
Well,this is 1 of the thing that you can try of.
You can use fport to check for you.Just simply type 'fport' in google search.
Hope it help.
17 years ago
Hi there.

Well, try this:

1. Create a hsqldb-ds.xml inside the deploy directory of your JBOSS folder.
This will be your datasource file...which will tell the jboss for your
application A is using which database.Example of this file can be see at
your jboss/docs/examples/jca.Basically, you can name it whatever name that
you want...as long it end with -ds.xml.

2.Once you done that, you need to configure the jboss...that I assume you have
done it previouslly.

3.Make sure in your ear file contain a folder call META-INF and inside this
folder, it have a file call application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application
1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">
<application>
<!--<module>
<ejb>EJB.jar</ejb>
</module>-->
<module>
<web>
<web-uri>yourWarFileName.war</web-uri>
<context-root>/contextName</context-root>
</web>
</module>
</application>

As you can see, this application.xml file will tell the jboss that, for a
particular application, in will use which war file (which contain your web application) and how to access it through your browser(http://localhost ortNumber/contextName).
Sorry for my bad English...
Hope it help.
17 years ago
Try this:

1. Set your JAVA_HOME = location of your j2sdk-1.4
2. Set your RESIN_HOME = location of your resin dir.

Start resin httpd.exe again.
If you're in Unix platform, then start httpd.sh.

Hope this help.
17 years ago
Hi,

I have a J2EE web application that I managed to deploy it using the EAServer Manager.But,I don't know why I still can't run the application.
Maybe there are a step that I miss out...so,I just type the step that I did.

Step 1:Zip-up my classes.zip and rename it as abc.war.

Step 2:Run the Jaguar Server.Then,Open up the EAServer Manager.Login as jagadmin.

Step 3:Then,I go to the Web Applications node, from there,I click on Deploy.
I browse my local machine and look for the abc.war.Then,deploy it.

Step 4:Then,I set the context path to be :abc

Step 5:Then,I go to the Installed Web Applications...and I choose Install
Web Application.Then,from there I point this 1 to the abc.war that
I manage to deployed previously.

Step 6:Restart the EAServer.

Step 7:Try to run :http://myPCName:8088/abc...PAGE COULD NOT BE FOUND ERROR.

My http port is 8088.
Inside my abc.war,the structure is:
index.jsp
WEB-INF/classes --> all my java classes is here.
WEB-INF/lib
WEB-INF/web.xml

Hope someone can help me.Thanks.
17 years ago
Hi,

<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>


You can remove the tag debug.The load-on-startup tag means...when this web.xml been load at the very first time, the 'detail' param will be load
first (if you change the number to 1).

Hope it helps.
17 years ago
Hi,

Well,there's others client/ui side framework...which are better than Struts.
Try look at Facado (www.nexusedge.com) and Thinlet(http://thinlet.sourceforge.net/).

Hope it helps.
17 years ago
Hi there,

Can you try to create a folder call META-INF just under your myApplication folder...and then, put the application.xml inside it.

Hope it works...
17 years ago
Well,if I'm not mistaken,you need to modified the standardjaws.xml,standardjbosscmp-jdbc.xml and login-config.xml.This files are located inside the conf folder.

Maybe with example, it will be easier for you to understand.
---------------------------------------------------------------------------
My mysql-ds.xml(which is created and put it inside the deploy folder):

<datasource>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost/icbm</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name></user-name>
<password></password>
<security-domain>MysqlDbRealm</security-domain>
</local-tx-datasource>
</datasource>

---------------------------------------------------------------------------
Then,u need to make some changes to the standardjaws.xml:
All you need to do is changes the current <datasource>x</datasource>
and the <type-mapping>y</type-mapping>...where x = jndi-name inside the mysql-ds.xml and the y = db type that you're using.For this, is using MySql.

<jaws>
<datasource>java:/MySqlDS</datasource>
<type-mapping>mySql</type-mapping>
<debug>false</debug>

<default-entity>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>true</tuned-updates>
<read-only>false</read-only>
....
.....
.....
</jaws>
---------------------------------------------------------------------------
Then,u need to make some changes to the standardjbossccmp.xml:
What are the things that you need to change?Well,will be exactly the same as above.

<jbosscmp-jdbc>

<defaults>
<datasource>java:/MySqlDS</datasource>
<datasource-mapping>mySql</datasource-mapping>

<create-table>true</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
...
...
...
----------------------------------------------------------------------------
Then, you need to add this few lines to your login-config.xml, which will tell the jboss to look/used the correct datasource for different applications that you have deployed in JBOSS.
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName"></module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>

----------------------------------------------------------------------------

P/s:Sorry for my bad English and hopes this will help you to deploy your application.
17 years ago
Hi,
If I'm not mistaken, you need to have a file called application.xml in your project/classes/META-INF.

<application>
<display-name>xXx</display-name>
<module>
<web>
<web-uri>xXx.war</web-uri>
<context-root>/xxx</context-root>
</web>
</module>
</application>

So,if you want your application to be access as http://ip:8080/xxx, then the application.xml will exactly the same as above.Get the idea?Like, for example if I want it to be http://ip:8080/tutorial then my <context-root> will be /tutorial.

The <web-uri> tag will be your war file name.Remember,is case sensitive.
---------------------------------------------------------------------------
And then, you need to add another web.xml inside your WEB-INF(project/classes/) folder.
<web-app>
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
---------------------------------------------------------------------------
Once you done that,zip it up and rename it as .ear file.Then, deploy it.
For your info,jboss will not save the context in any xml file.What it will do is, it will create a tmp folder for your deployed application inside the server/default of your jboss folder.

It is different to Apache Tomcat in which, it allowed you to directly point the context path to your project folder and you can rename the context path directly in their server.xml.
---------------------------------------------------------------------------

P/s:Sorry for my bad english.Hope this comment will help you.
17 years ago
Well,if I'm not mistaken,you need to modified the standardjaws.xml,standardjbosscmp-jdbc.xml and login-config.xml.This files are located inside the conf folder.

Maybe with example, it will be easier for you to understand.
---------------------------------------------------------------------------
My mysql-ds.xml(which is created and put it inside the deploy folder):

<datasource>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost/icbm</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name></user-name>
<password></password>
<security-domain>MysqlDbRealm</security-domain>
</local-tx-datasource>
</datasource>

---------------------------------------------------------------------------
Then,u need to make some changes to the standardjaws.xml:
All you need to do is changes the current <datasource>x</datasource>
and the <type-mapping>y</type-mapping>...where x = jndi-name inside the mysql-ds.xml and the y = db type that you're using.For this, is using MySql.

<jaws>
<datasource>java:/MySqlDS</datasource>
<type-mapping>mySql</type-mapping>
<debug>false</debug>

<default-entity>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>true</tuned-updates>
<read-only>false</read-only>
....
.....
.....
</jaws>
---------------------------------------------------------------------------
Then,u need to make some changes to the standardjbossccmp.xml:
What are the things that you need to change?Well,will be exactly the same as above.

<jbosscmp-jdbc>

<defaults>
<datasource>java:/MySqlDS</datasource>
<datasource-mapping>mySql</datasource-mapping>

<create-table>true</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
...
...
...
----------------------------------------------------------------------------
Then, you need to add this few lines to your login-config.xml, which will tell the jboss to look/used the correct datasource for different applications that you have deployed in JBOSS.
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName"></module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>

----------------------------------------------------------------------------

P/s:Sorry for my bad English and hopes this will help you to deploy your application.
17 years ago
Well,if I'm not mistaken,you need to modified the standardjaws.xml,standardjbosscmp-jdbc.xml and login-config.xml.This files are located inside the conf folder.

Maybe with example, it will be easier for you to understand.
---------------------------------------------------------------------------
My mysql-ds.xml(which is created and put it inside the deploy folder):

<datasource>
<local-tx-datasource>
<jndi-name>MySqlDS</jndi-name>
<connection-url>jdbc:mysql://localhost/icbm</connection-url>
<driver-class>org.gjt.mm.mysql.Driver</driver-class>
<user-name></user-name>
<password></password>
<security-domain>MysqlDbRealm</security-domain>
</local-tx-datasource>
</datasource>

---------------------------------------------------------------------------
Then,u need to make some changes to the standardjaws.xml:
All you need to do is changes the current <datasource>x</datasource>
and the <type-mapping>y</type-mapping>...where x = jndi-name inside the mysql-ds.xml and the y = db type that you're using.For this, is using MySql.

<jaws>
<datasource>java:/MySqlDS</datasource>
<type-mapping>mySql</type-mapping>
<debug>false</debug>

<default-entity>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>true</tuned-updates>
<read-only>false</read-only>
....
.....
.....
</jaws>
---------------------------------------------------------------------------
Then,u need to make some changes to the standardjbossccmp.xml:
What are the things that you need to change?Well,will be exactly the same as above.

<jbosscmp-jdbc>

<defaults>
<datasource>java:/MySqlDS</datasource>
<datasource-mapping>mySql</datasource-mapping>

<create-table>true</create-table>
<remove-table>false</remove-table>
<read-only>false</read-only>
<read-time-out>300000</read-time-out>
<row-locking>false</row-locking>
...
...
...
----------------------------------------------------------------------------
Then, you need to add this few lines to your login-config.xml, which will tell the jboss to look/used the correct datasource for different applications that you have deployed in JBOSS.
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule"
flag = "required">
<module-option name = "principal">sa</module-option>
<module-option name = "userName"></module-option>
<module-option name = "password"></module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=MySqlDS</module-option>
</login-module>
</authentication>
</application-policy>

----------------------------------------------------------------------------

P/s:Sorry for my bad English and hopes this will help you to deploy your application.
17 years ago