Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JRun vs Tomcat, about the custom action  RSS feed

 
Linda Xu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am reading the JavaServer Page from O'Rielly. In this book, it talked about custom action. But the example it gave is base on Tomecat, it said the developer need to implement a tag handler class and then you need to " create the Tag Library Descriptor file" which basically is a XML file, and then put it in the directory "WEB-INF/tlds".
My problem is: I am using JRUN, there is no WEB-INF/tlds directory in JRun, and I didn't find any XML file in JRun similar to the TLD files in Tomcat.
Can I still implement "custom action" in JRun, how to do the TLD stuff?
Thanks!
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) For JRun, you should put your handler class in WEB-INF directory. The handler class can be packaged, it will start from
WEB-INF.
2) For simplicity the *.tld file can be in the same directory as *.jsp file. However, you can put it any where as long as the URL for it in the jsp file is specified correctly.
It is simple to do custom tags using JRun.
hope this helps.
Ruilin
 
Linda Xu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thank you very much for you infomation.
But there is no WEB-INFO directory in my JRun, should I create it myself? Where to put it? Do I need to do some configuration to let JRun to search from this directory?
Thanks!
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is "web-inf" directory.
When you create your application with JRun, the directory will be created automatically under the root directory of your application.
Regards,
Ruilin
[This message has been edited by ruilin yang (edited June 11, 2001).]
 
Linda Xu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Ruilin
Sorry for the typo.
But I still didn't find any directory names web-inf (or WEB-INF)under my JRun. Could you give me more detail exaple how to create this? I know in Tomcat, it's already there for each application.
Thanks!
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
web-inf will be created in the root directory of your application by JRun when you register your application with JRun server. For example if you have three applications created with JRun, you will have three web-inf directories, each of which will be located within the root directory of the coresponding application.
You need to start JMC (JRun Management Console)of JRun to create (register) your application. This process will map your root directory of your application to an URL and it also create web-inf directory.
I suggest you to look "creating applications" of the on-line manual of JRun under "Configuring Web Applications" section. Otherwise it may be hard for you to get what exactly I say.
Good luck.
Ruilin

[This message has been edited by ruilin yang (edited June 11, 2001).]
 
Linda Xu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Ruilin
Thank you for your information.
But I even didn't find JMC on my machine. By the way, I am using JRun 2.3.3, is JMC available in this version? Do I need to upgrade to JRun 3.x to implement the custom action?
Thanks!
 
ruilin yang
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Linda,
I think you have to down load JRun 3.*. Here is the site: http://allaire.com/
good luck
ruilin
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!