jQuery in Action, 2nd edition*
The moose likes JBoss/WildFly and the fly likes How to Define web context in JBoss other then using war file?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to Define web context in JBoss other then using war file??" Watch "How to Define web context in JBoss other then using war file??" New topic
Author

How to Define web context in JBoss other then using war file??

Rajan Punchouty
Greenhorn

Joined: Mar 15, 2004
Posts: 21
Hi,
I need to define a context that point to some folder on hard disk. In tomcat i can define it as
<Context path="/images" docBase="C:\\upload" debug="0"/>
How to achieve same thing in JBoss-tomcat installation.
Thanx in Advance.
Rajan Punchouty
Greenhorn

Joined: Mar 15, 2004
Posts: 21
Got it myself.
Add the Context tag in jboss-service.xml in deploy\jbossweb-tomcat41.sar\META-INF.
<Host name="localhost">
<!-- Access logger -->
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="localhost_access" suffix=".log"
pattern="common" directory="${jboss.server.home.dir}/log"/>
<!-- This valve clears any caller identity set by the realm
and provides access to the realm about the existence of an
authenticated caller to allow a web app to run with a realm
that support unauthenticated identities. It also establishes
any run-as principal for the servlet being accessed.
-->
<Valve className="org.jboss.web.tomcat.security.SecurityAssociationValve"/>
<!-- Default context parameters -->
<DefaultContext cookies="true" crossContext="true" override="true"/>
<Context path="/images" docBase="C:/blue/images" debug="0"/>
</Host>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Define web context in JBoss other then using war file??
 
Similar Threads
jboss-service context realm
Setting docbase for a web-application in JBoss 3.0.4 - Tomcat 4.1.12
JNDI Environment Entries
Setting docbase for a web-application in JBoss 3.0.4 - Tomcat 4.1.12
Application folder outside JBoss