saamondino
Posts: 33
|
Posted: 08/03/2007, 6:21 AM |
|
Hi,
I need to use a class java (Conversion of numbers to letters) and seeing the philosophy of CCS a little, I suppose that I can:
1) To build a Servlet.
2) I copy the class.java in ..\miproyecto\CCSBuild\src\com\codecharge\misrutinas
3) To build a .jar and include in the classpath.
Can somebody guide me? , the truth that I don't find information and to begin to prove me would take a lot of time.
Best Regards.
Sergio.
|
|
|
eserver220
Posts: 41
|
Posted: 08/05/2007, 10:44 PM |
|
Change notes 2 to
2) I copy the class.java in ..\miproyecto\CCSBuild\src\com\codecharge
Do not make your own directory misrutinas, for there is a "import com.codecharge.*" with
each jsp page generated by the IDE.
Best Regards!
|
|
|
saamondino
Posts: 33
|
Posted: 08/06/2007, 2:33 AM |
|
Hi,
Thank you to respond.
I have test this, and. . . It works Fine.
But ..., My classes are blended with classes of Codecharge, good, in the same directory .
it would be interesting to be able to create my calses in ..\miproyecto\CCSBuild\src\com\ar\MyCompany, this separates my classes on one side and the classes generated by codecharge in ..\miproyecto\CCSBuild\src\com\codecharge.
To achieve this, I should play the build. xml or not?
Best Regards.
Sergio.
|
|
|
negociant
Posts: 31
|
Posted: 08/06/2007, 2:40 AM |
|
You can play with build.xml, but note CCS regenerate classes.
So this time your class can be deleted...
I think better way is to create own library, pack it into jar and use in CCS project.
Just 1 important think put this jar to tomcat's commons or to project runtime libs.
|
|
|
saamondino
Posts: 33
|
Posted: 08/06/2007, 3:17 AM |
|
Hi negociant,
I think that to build a jar (like you suggest ), it is the decision but guessed right.
You has experience in building jar libs?.
Are you able to mark me some rules?. details please.
thank you !!!
Sergio.
|
|
|
negociant
Posts: 31
|
Posted: 08/06/2007, 3:28 AM |
|
It's easy :).
Did you have expirience with another java IDE?
E.G. eclipse.
It allow to create jar aoutamaticly.
Try this :
Create new java project. Add neede packages and classes.
Create needed functionality.
Then right click on project at project explorer and choose export.
Simple dialog helps you select content and create jar.
This jar you can use anywhere. (In CCS project too).
Note 1: if you use some libraryes it sholud be int calsspath for this eclipse project (as external jar/libs)
Note 2: Eclipse is much better in java code development then CCS, but it not allow any generation .
So i propose use eclipse for development your own functionality and use CCS for generation web interface. It's very powerful solution.
|
|
|
saamondino
Posts: 33
|
Posted: 08/07/2007, 2:28 AM |
|
Thank you! ! !
I have proven to create a simple file .jar , and
a) Only, copy to <$TOMCAT_HOME>/common/lib Directory (available for All Project). Work Fine.
b) Only, Include .jar file to Deploy in runtime-Libs (in the last case the jar is available for this project only). Work Fine.
This is the solution! ! ! . Is more clear all.
Best Regards.
Sergio.
|
|
|
eserver220
Posts: 41
|
Posted: 08/08/2007, 9:33 PM |
|
I think you can add an include page to implement that.
After you make a jar and add the jar file path to CLASSPATH, you can write
"import com.XXX.*" into that Include page. Then add that Include Page to the very page which you would like to use your custom lib.
Best Regards!
|
|
|