How to use multiple configuration files in a web Application
Hi,
I am using JDev 11 TP3,JBoss4.2.1,Trindad 1.2.4.
In my project I have to use a set of (Login) pages over several other projects.
So I stored those pages (& backing beans) at an external location.
Now while editing the deployment profile of the web application I included the login pages from external location using "Contributors".
This way I was able to bring all the resources in the war. But the Faces-config.xml which contains the managed-bean registration of the login pages does not get included.
1. Either I could change the name of the external faces-config and register it in the current project by includeing it. OR
2. I could mention the managed-bean info in the current project's faces-config.
I want to use option 1.
How may I do it??
Hi,
if you package the managed beans in JAR files and add the faces-config.xml in the META-INF directory of it then it automatically registers at runtime
Frank
Similar Messages
-
How to install a war file as a Web Application Bundle (WAB) in CQ 5.5?
How to install a war file as a Web Application Bundle (WAB) using CQSE and embedded OSGi Felix container? OSGi R4.2 specification specified Web application bundles which allows deploying war files as WABs insie OSGi containers. How do we do this in Felix container embedded in CQ 5.5?
i m sorry, i intentionally wanted to post it in EJB forum, mistakenly i posted it in Servlets forum, anyways, if anyone of u know the ans, plz share it with me too.
Thanx
Nisha -
How to use multiple video files??
hi all,
i am using flex 4 ...
now i have designed video player..
i used single flv file for execution..
how to use more flv files in tis program???
i have included program also..
can any one reply for this...
thanks in advance...
regards,
saran r
video.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="init()" height="700" >
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.core.UIComponent;
import flash.events.NetStatusEvent;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;
private var nc:NetConnection;
private var stream:NetStream;
public var videoDuration:Number;
public var nsClient:Object = new Object();
private var videoComp:Video = new Video();
private var meta:Object = new Object();
private var timer:Timer = new Timer(100);
private var uiComp:UIComponent = new UIComponent();
private function init():void
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
nc.connect("rtmp://localhost/saran");
this.addElement(uiComp);
uiComp.addChild(videoComp);
timer.addEventListener(TimerEvent.TIMER,timerHandler);
timer.start();
private function netStatusHandler(event:NetStatusEvent):void
trace("Code ===>>> "+event.info.code);
if(event.info.code == "NetConnection.Connect.Success")
connectStream(nc);
private function connectStream(nc:NetConnection):void {
stream = new NetStream(nc);
videoComp.attachNetStream(stream);
stream.play("Terminator")
// stream.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
stream.client = nsClient//new CustomClient();
nsClient.onMetaData = metadataHandler;
trace("stream ===>>> "+stream.currentFPS);
//responder = new Responder(onResult);
// nc.call("getStreamLength", responder, "bikes" );
private function metadataHandler(metadataObj:Object):void
meta = metadataObj;
videoComp.width = metadataObj.width;
videoComp.height = metadataObj.height;
//positionBar.move(videoComp.x, ((videoComp.y + videoComp.height)+20));
//positionBar.width = videoComp.width;
trace("Duration ====>>>> "+meta.duration);
private function timerHandler(event:TimerEvent):void
//trace("Timer called.........."+stream.time);
//positionBar.setProgress(stream.time, meta.duration);
]]>
</fx:Script>
</s:Application>I have the same question but I am using two pc's
-
Using multiple configuration files in Awesome's rc.lua?
I'm fairly new to awesome. I have managed to configure rc.lua to my liking but have been troubled by the fact that I need to go through the entire configuration file when I would like to update just a hotkey or menu item. This leaves room for errors and mistakes that could break my config.
Ideally, I would like to be able to insert pieces of code from other files into my rc.lua. I realize this is already being done through things like vicious, but am wondering what the best way to do this would be for small snippets?
For example, I would like to have one file for hotkeys, one file for my menu items, one file for my widget configuration. I've done a little bit of reading on lua and believe dofile('filename") should work but would appreciate examples from other people who have done something similar.
Thanks in advance
Multirequire("keys")
Then create a file named keys.lua
Was that what you wanted? -
How to use custom HTML page in flex web application with out using iframe
Hi all,
I have to import a custom HTML page (that has got links to another html pages) inside my flex web application and i dont want to use IFrame. Can you please suggest me with best example.
Please help me out as i'm new to flex.
Thanks,
Swetha.Hi, there:
Best thing to do is to start with the default login.html page, and then modify it. The login screen is fairly complex and it's easy to just miss a JS function you need to call. To get to default page, you would need to do one deploy (to simulator or whatever), and then look for login.html page in the temporary Xcode or Android project generated from the deployment. It should be under the "deploy" directory in your JDev workspace.
You can also see all the framework JS files and CSS files that way as well.
We have had customers implementing custom login screen so we know it can work, but they all had to start with the default login screen and then modify it.
Thanks,
Joe Huang -
How to use multiple datasource in spring and hibernate
HI all,
I want to use multiple data source for my web application.Please suggest me the mapping of xml files viz.
applicationContext-resource.xml,applicationContext-hibernate.xml and applicationContext-service.xml
SHoud i create separate session factory and transaction manager for both the datasource?
Here is my applicationContext-resource.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.x.x:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_lt_staging"/>
<property name="password" value="dw_lt_staging"/>
</bean>
<bean id="dataSourceAnalytics"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.y.y:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_analytics"/>
<property name="password" value="dw_analytics"/>
</bean>
</beans>Thanks in advance.HI all,
I want to use multiple data source for my web application.Please suggest me the mapping of xml files viz.
applicationContext-resource.xml,applicationContext-hibernate.xml and applicationContext-service.xml
SHoud i create separate session factory and transaction manager for both the datasource?
Here is my applicationContext-resource.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.x.x:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_lt_staging"/>
<property name="password" value="dw_lt_staging"/>
</bean>
<bean id="dataSourceAnalytics"
class="org.apache.commons.dbcp.BasicDataSource">
<property name="url" value="jdbc:oracle:thin:@192.168.y.y:1521:orcl"/>
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="username" value="dw_analytics"/>
<property name="password" value="dw_analytics"/>
</bean>
</beans>Thanks in advance. -
How to use multiple table in single control file?
Hi,
How to use multiple table and data file in sigle control file? I have a four table and four csv file i mean data file for that. I am running concurrent program to load the data from csv file to custom table. based on my input data file name, it has to take automatically from one control file.
Can anyone share with me how can i acheive this?
ThanksHi,
Can't we acehive like below. I don't this exactly corrcect.
OPTIONS (SKIP=1)
LOAD DATA
INFILE << file name 1 >>
APPEND INTO TABLE XXCZ_VA_SAMPLE1
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
PARENT_ITEM "TRIM(BOTH FROM :PARENT_ITEM)"
LOAD DATA
INFILE << file name 2 >>
APPEND INTO TABLE XXCZ_VA_SAMPLE2
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
ITEM_NUMBER "TRIM(BOTH FROM :ITEM_NUMBER)"
)Edited by: orasuriya on Sep 14, 2009 3:03 AM -
"dtutil", how to tell which configuration file for packages using after deployment?
Hello All,
Trying to achieve this feature,
Using DOS command to automatic my deployment process--glad I found dtutil. However, it doesnt give you any chance to identify which configuration file to be used by SSIS packages after deployment.
Deployment Method: file deployment
Configuration sued: XML file and SQL Table. IN XML file, it tells which DB connection for packages to look up the configuration table.
Who can share some thoughts on this?
DerekIt is NOT about sequence.
It is about how to point which configuration file to be used by deployed packages as during the "dtutil.exe"
deployment, you dont have chance to identify which physical location confg files to be used.
Derek
That you do only at the time of execution of packages. By default it uses configuration settings created at design time within the package. If you want to override it, you can use \Configfile switch of dtexec for that. You can also set explicit values for
properties using /SET switch
http://technet.microsoft.com/en-us/library/ms162810(v=sql.105).aspx
See this to understand how configs are applied in runtime
http://technet.microsoft.com/en-us/library/ms141682(v=sql.105).aspx
and this to understand behaviour difference in ssis 2008
http://technet.microsoft.com/en-us/library/bb500430(v=sql.105).aspx
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Hi!
Question about the problem mentioned in subject.
I have configured that JNLP opens with 1.5 version, both versions are enabled in Java Control Panel Runtime Settings but when I try to start a desktop java console says:
Java Web Start 1.5.0_22
Using JRE version 1.6.0_07 Java HotSpot(TM) Client VM
And the opening of the desktop creates an exception:
Java Web Start - Invalid Argument Error
TooManyArgumentsException[ Too many arguments supplied: {C:\WINDOWS\Temporary, Internet, Files\Content.IE5\....
I'm trying to open my desktop with 1.5 version and other programs with 1.6 version. What is it that I still need to do? I'm kind of confused with this. Some of my collagues have succeeded with this and some doesn't, with the same configuration.
So the question is, how to use multiple JREs with IE8 so that one application uses 1.5 version and others 1.6 version?
Br,
Katri
Edited by: ka**** on 09-Mar-2011 01:16
Edited by: ka**** on 09-Mar-2011 03:16ka**** wrote:
..Question about the problem mentioned in subject.No "Using multiple JREs (1.5.0_20 and 1.6.0_07) with Internet Explorer 8" is a statement. To transform it to a question would be something like "How to use multiple JREs (1.5.0_20 and 1.6.0_07) with Internet Explorer 8?".
Once you can come up with an actual question, I might look at this more closely. -
How can i wrote configuration file in Log4j
iam new log4j .i have seen one small programme in log4j examples folder ..i e. shown below
Sort.java
=====
package examples;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.Priority;
Example code for log4j to viewed in conjunction with the {@link
examples.SortAlgo SortAlgo} class.
<p>This program expects a configuration file name as its first
argument, and the size of the array to sort as the second and last
argument. See its <b>source
code</b> for more details.
<p>Play around with different values in the configuration file and
watch the changing behavior.
<p>Example configuration files can be found in <a
href="doc-files/sort1.properties">sort1.properties</a>, <a
href="doc-files/sort2.properties">sort2.properties</a>, <a
href="doc-files/sort3.properties">sort3.properties</a> and <a
href="doc-files/sort4.properties">sort4.properties</a> are supplied with the
package.
<p>If you are also interested in logging performance, then have
look at the {@link org.apache.log4j.performance.Logging} class.
@author Ceki Gülcü */
public class Sort {
static Logger logger = Logger.getLogger(Sort.class.getName());
public static void main(String[] args) {
if(args.length != 2) {
usage("Incorrect number of parameters.");
int arraySize = -1;
try {
arraySize = Integer.valueOf(args[1]).intValue();
if(arraySize <= 0)
usage("Negative array size.");
catch(java.lang.NumberFormatException e) {
usage("Could not number format ["+args[1]+"].");
PropertyConfigurator.configure(args[0]);
int[] intArray = new int[arraySize];
logger.info("Populating an array of " + arraySize + " elements in" +" reverse order.");
for(int i = arraySize -1 ; i >= 0; i--) {
intArray[i] = arraySize - i - 1;
SortAlgo sa1 = new SortAlgo(intArray);
sa1.bubbleSort();
sa1.dump();
// We intentionally initilize sa2 with null.
SortAlgo sa2 = new SortAlgo(null);
logger.info("The next log statement should be an error message.");
sa2.dump();
logger.info("Exiting main method.");
static void usage(String errMsg) {
System.err.println(errMsg);
System.err.println("\nUsage: java org.apache.examples.Sort " + "configFile ARRAY_SIZE\n"+
"where configFile is a configuration file\n"+" ARRAY_SIZE is a positive integer.\n");
System.exit(1);
and
SortAlgo.java
==========
package examples;
import org.apache.log4j.Category;
import org.apache.log4j.NDC;
Example code for log4j to viewed in conjunction with the {@link
examples.Sort Sort} class.
<p>SortAlgo uses the bubble sort algorithm to sort an integer
array. See also its <b>source
code</b>.
@author Ceki Gülcü */
public class SortAlgo {
final static String className = SortAlgo.class.getName();
final static Category CAT = Category.getInstance(className);
final static Category OUTER = Category.getInstance(className + ".OUTER");
final static Category INNER = Category.getInstance(className + ".INNER");
final static Category DUMP = Category.getInstance(className + ".DUMP");
final static Category SWAP = Category.getInstance(className + ".SWAP");
int[] intArray;
SortAlgo(int[] intArray) {
this.intArray = intArray;
void bubbleSort() {
CAT.info( "Entered the sort method.");
for(int i = intArray.length -1; i >= 0 ; i--) {
NDC.push("i=" + i);
OUTER.debug("in outer loop.");
for(int j = 0; j < i; j++) {
NDC.push("j=" + j);
// It is poor practice to ship code with log staments in tight loops.
// We do it anyway in this example.
INNER.debug( "in inner loop.");
if(intArray[j] > intArray[j+1])
swap(j, j+1);
NDC.pop();
NDC.pop();
void dump() {
if(! (this.intArray instanceof int[])) {
DUMP.error("Tried to dump an uninitialized array.");
return;
DUMP.info("Dump of integer array:");
for(int i = 0; i < this.intArray.length; i++) {
DUMP.info("Element [" + i + "]=" + this.intArray);
void swap(int l, int r) {
// It is poor practice to ship code with log staments in tight
// loops or code called potentially millions of times.
SWAP.debug( "Swapping intArray["+l+"]=" + intArray[l] +
" and intArray["+r+"]=" + intArray[r]);
int temp = this.intArray[l];
this.intArray[l] = this.intArray[r];
this.intArray[r] = temp;
This program expects a configuration file name as its first
argument, and the size of the array to sort as the second and last
argument. See its <b>source
code</b> for more details.
please help me how can write that configuration file
thanksHi bala,
check that log4j manual I pointed to in yer previous thread.
This is a pot-boiler config file... Copy it into some file say "props.conf" and use it.
# Set root logger level to DEBUG and its only appender to A1.
log4j.rootLogger=DEBUG, A1
# A1 is set to be a ConsoleAppender.
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%nCheers, -
How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?
Hi All,
Hope to you a very happy new year,
I have two differnt LAP 1300 and 1200 in my network and I need to add theme to the WLC,
I successed to add one of theme by the option 60 in the DHCP pool at the Core SW,
So my quetion is below:
How to use multiple VCI strings for lap 1300 and 1200 (option 60) in one pool?
Thanks in Advanced,
Ahmed,To add to Scott's post. Option 60 would be useful if you needed to put certain types of AP on specific controllers. Otherwise, no real need to use it for the most part.
Though, I do recall an issue a few years ago that some windows machines had issues getting DHCP if option 43 is being returned.
Now, on an IOS switch, you can only configure one option 60 per DHCP scope
HTH,
Steve
Please remember to rate useful posts, and mark questions as answered -
How to use multiple tape drive for single filesystem on single client.
Hello All.
I want to backup single filesystem with multiple tape drive.
Incase of Symantec veritas netbackup "NEW_STREAM" for multi-stream backup.
Backup client has a single backup filesystem like /data1 directory with 4 LTO6 drives.
/data1 directory doesn't have a sub-direcotry, just present a files.
If /data1 directory has a sub-directory like /data1/aaa, /data1/bbb, /data1/ccc , Is it possible to use multiple drives?
Please anybody answer the questions.
Thanks advanced.See how to use multiple tape drive from single client when I want to backup single filesystem?
-
How to use multiple ipods on one account
I have an Ipod classic and just bought my sons two nano's how do I use these on the same account without changing my account info?
Take a look here:
How to use multiple iPods with one computer
Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Discussions page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums, in the User Tips Library and in the Apple Knowledge Base before you post a question.
Regards. -
How to use multiple selection parameters in the data model
Hi, after have looked all the previous threads about how to use multiple selection parameters , I still have a problem;
I'm using Oracle BI Publisher 10.1.3.3.2 and I'm tried to define more than one multiple selection parameters inside the data template;
Inside a simple SQL queries they work perfectly....but inside the data template I have errors.
My data template is the following (it's very simple...I am just testing how the parameters work):
<dataTemplate name="Test" defaultPackage="bip_departments_2_parameters">
<parameters>
<parameter name="p_dep_2_param" include_in_output="false" datatype="character"/>
<parameter name="p_loc_1_param" include_in_output="false" datatype="character"/>
</parameters>
<dataTrigger name="beforeReport" source="bip_departments_2_parameters.beforeReportTrigger"/>
<dataQuery>
<sqlStatement name="Q2">
<![CDATA[
select deptno, dname,loc
from dept
&p_where_clause
]]>
</sqlStatement>
</dataQuery>
<dataStructure>
<group name="G_DEPT" source="Q2">
<element name="deptno" value="deptno"/>
<element name="dname" value="dname"/>
<element name="loc" value="loc"/>
</group>
</dataStructure>
</dataTemplate>
The 2 parameters are based on these LOV:
1) select distinct dname from dept (p_dep_2_param)
2) select distinct loc from dept (p_loc_1_param)
and both of them have checked the "Multiple selection" and "Can select all" boxes
The package I created, in order to use the lexical refence is:
CREATE OR REPLACE package SCOTT.bip_departments_2_parameters
as
p_dep_2_param varchar2(14);
p_loc_1_param varchar2(20);
p_where_clause varchar2(100);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
CREATE OR REPLACE package body SCOTT.bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
if (p_dep_2_param is not null) --and (p_loc_1_param is not null)
then
p_where_clause := 'where (dname in (' || replace (p_dep_1_param, '''') || ') and loc in (' || replace (p_loc_1_param, '''') || '))';
else
p_where_clause := 'where 1=1';
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
As you see, I tried to have only one p_where_clause (with more than one parameter inside)....but it doesn't work...
Using only the first parameter (based on deptno (which is number), the p_where_clause is: p_where_clause := 'where (deptno in (' || replace (p_dep_2_param, '''') || '))';
it works perfectly....
Now I don't know if the problem is the datatype, but I noticed that with a single parameter (deptno is number), the lexical refence (inside the data template) works.....with a varchar parameter it doesn't work....
So my questions are these:
1) how can I define the p_where_clause (inside the package) with a single varchar parameter (for example, the department location name)
2) how can I define the p_where_clause using more than one parameter (for example, the department location name and the department name) not number.
Thanks in advance for any suggestion
AlexAlex,
the missing thing in your example is the fact, that if only one value is selected, the parameter has exact this value like BOSTON. If you choose more than one value, the parameter includes the *'*, so that it looks like *'BOSTON','NEW YORK'*. So you need to check in the package, if there's a *,* in the parameter or not. If yes there's more than one value, if not it's only one value or it's null.
So change your package to (you need to expand your variables)
create or replace package bip_departments_2_parameters
as
p_dep_2_param varchar2(1000);
p_loc_1_param varchar2(1000);
p_where_clause varchar2(1000);
function beforereporttrigger
return boolean;
end bip_departments_2_parameters;
create or replace package body bip_departments_2_parameters
as
function beforereporttrigger
return boolean
is
l_return boolean := true;
begin
p_where_clause := ' ';
if p_dep_2_param is not null then
if instr(p_dep_2_param,',')>0 then
p_where_clause := 'WHERE DNAME in ('||p_dep_2_param||')';
else
p_where_clause := 'WHERE DNAME = '''||p_dep_2_param||'''';
end if;
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || ' AND LOC IN ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || ' AND LOC = '''||p_loc_1_param||'''';
end if;
end if;
else
if p_loc_1_param is not null then
if instr(p_loc_1_param,',')>0 then
p_where_clause := p_where_clause || 'WHERE LOC in ('||p_loc_1_param||')';
else
p_where_clause := p_where_clause || 'WHERE LOC = '''||p_loc_1_param||'''';
end if;
end if;
end if;
return (l_return);
end beforereporttrigger;
end bip_departments_2_parameters;
I've written a similar example at http://www.oracle.com/global/de/community/bip/tipps/Dynamische_Queries/index.html ... but it's in german.
Regards
Rainer -
I have multiple iPods & iPhones & I'd like to share my library with them all. How do I do this??? How can I share content outside of purchased iTunes?
See this for some tips: How to use multiple iPods, iPads, or iPhones with one computer, http://support.apple.com/kb/HT1495
Maybe you are looking for
-
Is Adobe Premiere Elements 10 compatible with OS X Yosemite?
I have Adobe Premiere Elements 10 that I use on my IMAC. I recently updated my operating system to OS X Yosemite and when I go to use the add menus portion of the the program it consistently crashes. I have uninstalled and reinstalled Adobe Premier
-
Why does my computer keep disconnecting from my wifi?
Why does my computer keep disconnecting from my wifi?
-
We have created some SWCVs. But some can be seen whereas some others cannot be seen! The source and target systems are the same and all are JDBC sender to ABAP proxy receiver scenarios to the same client of ECC. Only the products are different. Can s
-
WebLogic Workshop 10.3. takes up 1.2GB of RAM
Hi, Does anybody know if there is any way to reduce the RAM usage by WebLogic Workshop 10.3. It takes up 1.2GB of RAM on my machine (no collaboration and other custom project). Is there a way to reduce the memory usage by switching off something in W
-
Downloading the report out put for wchich split conatiner is used
hi friends i used split container for my report out put .here iam displaying two alvs in the two parts of the conainer. i put some heading on the container in one box, is it possible to download all the out put into one excel file.