aspose file tools*
The moose likes JForum and the fly likes running jforum witht another directory structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "running jforum witht another directory structure" Watch "running jforum witht another directory structure" New topic
Author

running jforum witht another directory structure

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hey,

i would like to run jforum witht another directory structure in oder to integrate it in an existing web-app later. So i have this directory structure in my root (forum) folder:


.settings
WebContent
    images
    META-INF
    src
        net
                jforum
    templates
    Web-Inf
        classes
        config
        lib
        web.xml
        ...
    index.htm
.classpath
.project


my web.xml is unchanged. In fact, i have keeped the same directory structure from the webContent root down. the .class files are generated in >Web-Inf >classes , so i think every thing is ok.
But When in run the forum (http://localhost:8080/forum/index.htm) i get the error "the ressource forum/index.htm ist not available".
I use a mysql database and tomcat 5.0.

Can you help me please?
thanks.



[originally posted on jforum.net by webparcours]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Not quite sure what you are trying to do here. This looks like a development layout and not a webapp layout.

That said, JForum can be integrated with other apps but it's directory structure and WEB-INF files need to stay located off the main webapp directory. E.g, with TC this is either a directory under the webapps directory or as specified in the deployment xml.

FWIW, I think you'll probably want to have a layout without the src under the WebContent directory. I'd suggest something like:

src/java/jforum/<jforum src tree> => Compiles to WebContent/Web-inf/classes
src/java/myapp/<my app src tree> => Compiles to WebContent/Web-inf/classes
WebContent
<jforum directories>
<my app directories>
WEB-INF
web.xml (merger of myapp and jforum)
<jforum directories>
lib
<jforum jars>
<myapp jars>

Then use the Tomcat deployment XML to point the webapp doc root to the WebContent directory. With TC 5.5. this mean creating an xml file with the webapp name (e.g. forums or myapp) in your conf/Catalina/localhost (or host name) that looks like:



This will tell TC that the URI /myapp will find it's content in the WebContent directory. The reloadable attribute will make TC reload the application anytime the class files change.

Note: If 5.0 may use a different syntax for doing this... they changed thing either in 5.0 or 5.5... check the docs if you are not using 5.5.
[originally posted on jforum.net by monroe]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: running jforum witht another directory structure