-
1. Re: One deploy dir per user
peterj Sep 4, 2009 1:32 PM (in response to pplupo)Which version of JBoss AS5? For 5.1.0, you can edit the applicationURIs property for the BootstrapProfileFactory bean in the server/xxx/conf/bootstrap/profile.xml file, adding in extra directories:
<property name="applicationURIs"> <list elementClass="java.net.URI"> <value>${jboss.server.home.url}deploy</value> <value>/path/to/other/dir</value> </list> </property>
-
2. Re: One deploy dir per user
pplupo Sep 4, 2009 3:31 PM (in response to pplupo)That's nice, it's almost that. Now, how can I make each dir to map to a different URL?
Like
${jboss.server.home.url}deploy
/path/to/studentA
${jboss.server.home.url}deploy
/path/to/studentB
so the first element is made available at http://domain/studentA and the second at http://domain/studentB? -
3. Re: One deploy dir per user
pplupo Sep 4, 2009 3:33 PM (in response to pplupo)I'm sorry, I forgot to tag like code.
The "${jboss.server.home.url}deploy
/path/to/studentA
${jboss.server.home.url}deploy
/path/to/studentB"
should be:<property name="applicationURIs"> <list elementClass="java.net.URI"> <value>${jboss.server.home.url}deploy</value> <value>/path/to/studentA</value> </list> <list elementClass="java.net.URI"> <value>${jboss.server.home.url}deploy</value> <value>/path/to/studentB</value> </list> </property>
-
4. Re: One deploy dir per user
peterj Sep 4, 2009 3:45 PM (in response to pplupo)Here's one way - give each directory a .war extension:
<property name="applicationURIs"> <list elementClass="java.net.URI"> <value>${jboss.server.home.url}deploy</value> <value>/path/to/studentA.war</value> </list> <list elementClass="java.net.URI"> <value>${jboss.server.home.url}deploy</value> <value>/path/to/studentB.war</value> </list> </property>
-
5. Re: One deploy dir per user
pplupo Sep 4, 2009 5:10 PM (in response to pplupo)But then will they be able to deploy compressed wars or just exploded?
In fact, will they be able to deploy ears? -
6. Re: One deploy dir per user
peterj Sep 4, 2009 5:35 PM (in response to pplupo)No, that of course just provides access to HTML and similar pages.
For deploying WAR, EAR and EJB-JARs you would have to go without the .war extension on the directory. (Actually, thinking about it some more, that won't work anyway, though it woulds work in AS 4.x.)
I don't know of any way of providing a separate context for each student. -
7. Re: One deploy dir per user
pplupo Sep 4, 2009 9:30 PM (in response to pplupo)Thank you, Peter, for trying. I still hope someone will answer this.
-
8. Re: One deploy dir per user
pplupo Sep 5, 2009 3:21 PM (in response to pplupo)The session "User Web Applications" at "http://tomcat.apache.org/tomcat-6.0-doc/config/host.html" is exactly what I'm looking for at JBoss.
-
9. Re: One deploy dir per user
pplupo Sep 10, 2009 11:50 AM (in response to pplupo)On Tomcat there is a config file where one can declare:
<Host name="localhost" ...>
<Listener className="org.apache.catalina.startup.UserConfig"
directoryName="public_html"
homeBase=c:\Homes"
userClass="org.apache.catalina.startup.HomesUserDatabase"/>
where "c:\homes" is where users' home folders are and "public_html" is the folder to be scanned for WAR files.
Then if there is a user called "pplupo", his contents will be found at C:\homes\pplupo\public_html and his applications will be available at http://host:port/~pplupo automatically.
I just want to do something similar with JBoss. Even if it is not that easy, if I have to change multiple files, multiple tags, properties or anything else, but I need to set up an environment like that.
Can anyone help me?