• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

integration into another web app

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So from reading another post https://coderanch.com/t/576000 am i to understand that i can not integrate the classes, templates images, *.xml into my web app myWebsite.war that is deployed in jboss?

What I understand is that i need to deploy myWebsite.war AND jforum.war in jboss, then use the SSO features to handle login issues. is this correct or am i making sense? :-)


Edit: also does SystemGlobals.properties ever get used? even if i delete jforum-custom.conf from the dir, it is recreated when i change my cofig from the Admin Panel
[originally posted on jforum.net by CJackal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't need two different aplications. All you have to do is to respect the directory structure, merge the web.xml file, and change anything you want.

SystemGlobals.properities is always used. jforum-custom.conf, as the name implies, is just a customization file for it

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Rafael! I did get it integrated, not sure why I was having problems with this before...

Great job on this project, by the way!!
[originally posted on jforum.net by CJackal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Tomcat 4.1, I have merged the web.xml files and i am following the directory structure.

I have the following directory structure:

\myapp\htdocs\app1
\myapp\htdocs\app2
\myapp\htdocs\JForum-2.1.6

The web.xml file is in the root of htdocs, so my server.xml file has the following context within:

<Context className="org.apache.catalina.core.StandardContext" cachingAllowed="true" charsetMapperClass="org.apache.catalina.util.CharsetMapper" cookies="true" crossContext="false" debug="0" displayName="JForum - Powering Communities" docBase="C:\Program Files\eclipse\workspace\KLi_PC40_LMSD20\htdocs" mapperClass="org.apache.catalina.core.StandardContextMapper" path="/JForum-2.1.6" privileged="false" reloadable="false" swallowOutput="false" useNaming="true" workDir="C:\Program Files\eclipse\workspace\KLi_PC40_LMSD20\work\org\apache\jsp" wrapperClass="org.apache.catalina.core.StandardWrapper">
</Context>

I need to have the docBase be the root location of all apps so that i am able to have all of my applications working in the same application space.

Any thoughts on how i might work through this? Is there something i need to do with the server.xml context. If i am to change the context to have the docBase point to the root of the JForum directory things work fine, otherwise i get the following error:

The requested resource (/JForum-2.1.6/JForum-2.1.6/forums/list.page) is not available.

It appears as though this error stems from the web.xml in the htdocs/WEB-INF file not being recognized as when i point to the root of the JForum directory and it uses the web.xml in the JForum web-inf things seem to work fine.

Any thoughts?

Thanks.
[originally posted on jforum.net by susan grandy]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Susan, I am actually using JBOSS rather than Tomcat, however, they should work very similarly. Also, I do not use an IDE like Eclipse, I write freehand using a text editor (TextPad). I am not sure if I can be much help, but I will try. (perhaps I don't fully understand your situation)

I didn't have to do anything with .xml files for JBOSS, and I do not believe you have to in order to integrate your app with jforum. The only .xml file I DID have to change was my web.xml in web-inf. Make sure that the web.xml is found in the folder web-inf and not another sub-directory of web-inf.

Each application should have it's own web container and web.xml, rather than "sharing" web containers and web.xml, which it looks like you may be doing.

Also, I did not put the JForum directory in my app. Here is what my directory looks like.
\myApp.war\templates\ <-- JForum templates
\myApp.war\images\avatar <-- JForum avatars
\myApp.war\myOtherDirs
\myApp.war\WEB-INF\web.xml <-- merged mine w/ jforum .xml
\myApp.war\WEB-INF\lib\JForum-2.1.jar <-- JForum classes
\myApp.war\.... you get the idea?

to call myApp from my browser, the URL looks like this: http://localhost:8080/myApp/

So, in doing it this way, the forum works only for myApp. It is not shared with any other application in my deploy directory, nor is it stand-alone.

If you wanted to make it a standalone application, simply copy jforum to your deploy(JBOSS) directory webapps for Tomcat and rename it to JForum for simplicity. Then you should be able to call it like this http://localhost:8080/JForum/

I hope this helps.
[originally posted on jforum.net by CJackal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok, cool. Yeah, i do not want to call it standalone..that i have working fine in my webapps. i was just trying to get it working in the same app directory first before loading the other servlets. I get what you are saying and not sure that construct will work for me as it sounds like you have the root of the JForum directory contents merged right into your app directory contents.
Thanks for the response!!
Susan
[originally posted on jforum.net by susan grandy]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you are right Susan. I have integrated it directly, which may not work for ya

Good luck on your project!
[originally posted on jforum.net by CJackal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just thought of something...have you used ANT and built a .jar file of the JForum classes? you put that jar in a common lib directory, this way, all your apps will have access to the base jforum code, and if you integrate the templates, avatars, smilies and other jforum directories into each app you wish to use jforum with, as i have, you can customize the templates for each app.

Not sure if that helps... just a thought.
[originally posted on jforum.net by CJackal]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic