Jaas How to specify the config file
Hi
I'm working on a web app based on Sun's App Server 8. I am implementing security using a Jaas LoginModule. I cant figure out how i can specify the config file because if i make the change in the java.security file the server throws all sorts of exceptions....... i'm not sure how i can go about that..
Thanks..
Read the documentation. There are several different files that you can use to specifiy the handler to use for a particular context. One is ${user.home}/.java.login.config
Similar Messages
-
How to specify the database file path when create FDM application
Dear All,
How to specify the database file path (MSSQL) when create FDM application?
Right now, all data file are placed in the D:\ . I want to specify the database files (log and mdf file) in other place. How to do it?
Thanks.Where is the highS2.xml located on the disk? If you add it to your project you should set its Build Action to Content and its Copy To Output Directory to Always in Visual Studio:
Please remember to close your threads by marking helpful posts as answer once your issue has been solved and then start a new thread if you have a new question. -
How to specify the download file name??
Hi guys~~~
I have servlet which can generate a *.pdf file,I found if I didn't setContentType="application/pdf",I can download it!!But the download file name is my servlet file name.If I want to change the download file name,How do I do????
thanx a lot!!!Best regard!Thanx for ur help...But I encounter a new charllenge now...
I use a javascript(window.open("/myservlet")) to open the download file servlet.
Everything is okay.But when I finish downloading the file which window I opened cant close itself automatically.
I am really not understand the header parameter of the HTML header,could someone give me something about this??
Thanx again!!!! -
How to Specify the Log File address as RootDir/Logs/Error.log in Log4j
I have a web application,
How to configure the log4j Rolling file Appender in that.
I want to logs to be redirected to the RootDir/logs/Error.log.
Currently, I m using following configuration:
# This file must live on the classpath of the jvm
# Set root logger level to DEBUG and log to both stdout and rollingFile appenders
# (see below for their definitions)
# The set of possible levels are: DEBUG, INFO, WARN, ERROR and FATAL
log4j.rootLogger=INFO, stdout, R
####### Console appender ######
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
# Pattern to output the caller's file name and line number.
# The pattern: Date Priority (Filename:Line Number) - Message\n
log4j.appender.stdout.layout.ConversionPattern=%d %-5p (%F:%L) - %m%n
#### Second appender writes to a file
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=Error.log
# Control the maximum log file size
log4j.appender.R.MaxFileSize=100KB
# Archive log files (one backup file here)
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %-5p (%F:%L) - %m%n
Thanks for your replies in advance.Please follow the following steps, will work.
To enable log4j logging to a file on lunar pages do the following:
1) Create a servlet class that will initialize log4j. Here is
the code:
package logging;
import org.apache.log4j.PropertyConfigurator;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Log4jInit extends HttpServlet {
public
void init() {
String prefix = getServletContext().getRealPath("/");
String file = getInitParameter("log4j-init-file");
// if the log4j-init-file is not set, then no point in trying
if(file != null) {
PropertyConfigurator.configure(prefix+file);
public
void doGet(HttpServletRequest req, HttpServletResponse res) {
2) In your web.xml file add the following entry:
<servlet>
<servlet-name>log4j-init</servlet-name>
<servlet-class>logging.Log4jInit</servlet-class>
<init-param>
<param-name>log4j-init-file</param-name>
<param-value>WEB-INF/classes/log4j.lcf</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
3) Create a log4j.lcf file located in your WEB-INF/classes directory
as with the following entries:
log4j.rootLogger=debug, R
# yourdirectory below is where your site lives.
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=/home/yourdirectory/public_html/logs/out.log
log4j.appender.R.MaxFileSize=500KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %-5p [%c] %m%n
4) Add logging to your class. Here is an example:
import org.apache.log4j.Logger;
public class Example {
static Logger logger = Logger.getLogger(Example.class);
public void doSomething() {
logger.debug("testing logging");
5) make sure you have the log4j-1.2.8.jar file located in your WEB-INF/lib directory.
That should do it! -
I am trying to deploy an RDL file (5MB) to SQL Azure Reporting server in South Central US using the deploy function in SQL Server Data Tools but facing the following error during deployment to Azure Reporting server.
"There was an exception running the extensions specified in the config file. ---> Maximum request length exceeded."
Is there any limit on the size of RDL files which can be deployed to Azure Reporting server? I have seen some online posts which talk about increasing the maxRequestLength in httpruntime of web.config in Reporting server. But in case of Azure Reporting server
how can be make modification to this configuration?
I have tried to upload it directly to SQL Azure Reporting server from the Management Portal --> Upload Report function which still resulted in error.
Thanks & Regards, DeepThanks for your question. Unfortunately we are in the process of deprecating SQL Reporting services. Full details are available at http://msdn.microsoft.com/en-us/library/gg430130.aspx
Thanks Guy -
[svn:fx-trunk] 8480: update to how the config files will look in svn.
Revision: 8480
Author: [email protected]
Date: 2009-07-09 10:05:55 -0700 (Thu, 09 Jul 2009)
Log Message:
update to how the config files will look in svn. replacing ${build.number} with 0 in the RSL section so that builder will function properly from src since it doesn't know how to handle ${build.number} whereas the compiler did.
qa: no
doc: no
checkintests: pass
Modified Paths:
flex/sdk/trunk/frameworks/air-config.xml
flex/sdk/trunk/frameworks/flex-config.xmlThats good news.
-
How to save pictures with the config file "Write Key.vi"
hi all,
On my front panel I've few controls pictures containing photos (JPG type) . The user can select the photo he wants using the classic file dialog box.
Usally I use the config files VI's to save the control values from one run to another one. In the config files VIs, I use the polymorphic "write Key.vi" wich accept only booean, I32, U32, path, and string dada type, but no picture !
I've tried the "flatten to string" fonction (picture --> flatten to string --> writekey.vi) , no broken wire but the conversion is very very too long and to heavy (20Mo a key!).
another way, would be to write in a xml file, I've also tried but I've always get the 1104 error: No end tag was found for an XML start/end tag pair.
can someone help me.
what is the best way for retrieving controls pictures with photosHi GerdW
Many thanks for your quick answer. Always happy to get advises from fellow programmers.
You suggest to use the "path" input of the "write key.vi" (configuration file utilities) to retrieve photos that a user would have selected in a previous run. Could be a good solution in a number of applications but what I would like to do is like in a excel or word file. Once a photo has been embeded in one xls file for ex., I find it back each time i open this xls file, even if the original photo's file has been deleted or if my application runs on another computer.
xml file looks interesting for that purpose (i mean used as config file). I can easily store in a xml file a labview picture (like a colored rectangle e.g.) but when i try with a photo (wich is a also a picture) labview returns always the error 1104.
How to fixe this error, or maybe there is another way to store photos in a config file without passing through xml,
kind regards. -
Hi,
I have around 300 computers around the country which need the Autocomplete feature turning off for forms.
Obviously it wouldn't be practical to remote onto each machine and change the setting in Options > Privacy > Firefox Will... > Use custom settings for history > Remember search and form history - nor is it practical to use the about:config screen since the address and toolbars are disabled by default to prevent users from browsing to other pages they aren't meant to.
I was wondering if there was a config file or a registry setting where I can change this setting in the backgorund, that way we can push the config files or a registry tweak out the all machines that would change this setting.
Any help would be appreciated greatly.
DanI can see where those answers are going, there must be an easy way to do it using js config files or userChrome.css.though.
I tried doing an entry in userChrome whereby it hides the autocomplete box by overriding the pages stylesheet but the entry only seemed to work on a per domain basis... however the site that the browsers will be using is an intranet and therefore each PC will have a different URL to go to - making it impractical for masses of machines. Not sure if this can be worked upon to apply to every site? -
How to specify a mapping file using annotations?
Hi,
i am trying to deploy a WebService (with annotations) on oc4j 10.1.3.1.0. but all i get is the following exception:
07/03/13 12:41:52 oracle.j2ee.ws.common.tools.api.ValidationException: test.datamodel.SimpleObjectId - Duplicate type name "test.datamodel.SimpleObjectId" for Java type "{http://tdeer.de/services/internal/test/1_0}SimpleObjectId" found. To remove this error do not specify a single typeNamespace for all value types or specify a mapping file. This error could also be caused when an erroneous type has been used more than once.
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.modeler.rmi.RmiModeler.buildModel(RmiModeler.java:247)
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.config.ModelInfo.buildModel(ModelInfo.java:173)
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.Processor.runModeler(Processor.java:72)
07/03/13 12:41:52 at oracle.j2ee.ws.common.metadata.annotation.DeploymentGenerator$DeploymentCompileTool.run(DeploymentGenerator.java:200)
07/03/13 12:41:52 at oracle.j2ee.ws.common.metadata.annotation.DeploymentGenerator.generateDeploymentArtifacts(DeploymentGenerator.java:131)
07/03/13 12:41:52 at oracle.j2ee.ws.common.metadata.annotation.EJBWebServiceAnnotationParser.parseAnnotatedBean(EJBWebServiceAnnotationParser.java:165)
07/03/13 12:41:52 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
07/03/13 12:41:52 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
07/03/13 12:41:52 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
07/03/13 12:41:52 at java.lang.reflect.Method.invoke(Method.java:585)
07/03/13 12:41:52 at oracle.j2ee.ws.server.deployment.oc4j.WebServiceAnnotationListener.parseAnnotatedClass(WebServiceAnnotationListener.java:85)
07/03/13 12:41:52 at com.evermind.server.ejb.AnnotationParser.notifyAnnotationListeners(AnnotationParser.java:201)
07/03/13 12:41:52 at com.evermind.server.ejb.AnnotationParser.parseAnnotations(AnnotationParser.java:73)
07/03/13 12:41:52 at com.evermind.server.ejb.EJBPackageDeployment.parseMetaData(EJBPackageDeployment.java:939)
07/03/13 12:41:52 at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:832)
07/03/13 12:41:52 at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:217)
07/03/13 12:41:52 at com.evermind.server.Application.setConfig(Application.java:413)
07/03/13 12:41:52 at com.evermind.server.Application.setConfig(Application.java:314)
07/03/13 12:41:52 at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1853)
07/03/13 12:41:52 at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:512)
07/03/13 12:41:52 at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:196)
07/03/13 12:41:52 at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
07/03/13 12:41:52 at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
07/03/13 12:41:52 at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
07/03/13 12:41:52 at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
07/03/13 12:41:52 at java.lang.Thread.run(Thread.java:595)
07/03/13 12:41:52 Caused by: oracle.j2ee.ws.common.processor.modeler.rmi.InvalidParameterException: test.datamodel.SimpleObjectId - Duplicate type name "test.datamodel.SimpleObjectId" for Java type "{http://tdeer.de/services/internal/test/1_0}SimpleObjectId" found. To remove this error do not specify a single typeNamespace for all value types or specify a mapping file. This error could also be caused when an erroneous type has been used more than once.
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.modeler.rmi.LiteralTypeModeler.addTypeName(LiteralTypeModeler.java:1249)
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.modeler.rmi.LiteralTypeModeler.processClass(LiteralTypeModeler.java:290)
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.modeler.rmi.LiteralTypeModeler.modelTypeLiteral(LiteralTypeModeler.java:235)
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.modeler.rmi.LiteralTypeModeler.modelTypeLiteral(LiteralTypeModeler.java:181)
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.modeler.rmi.LiteralTypeModeler.modelSubclasses(LiteralTypeModeler.java:1048)
07/03/13 12:41:52 at oracle.j2ee.ws.common.processor.modeler.rmi.RmiModeler.buildModel(RmiModeler.java:210)
07/03/13 12:41:52 ... 25 more
The Stateless-SessionBean has one WebMethod with the following Signature:
public Element getElement(TestObjectId1 pObjectId1, TestObjectId2 pObjectId2) throws RemoteException
TestObjectId1 and TestObjectId2 have the same Superclass, SimpleObjectId.
How to specify a mapping file using annotations?
Thanks
tdeerWe you codegen a Policy annotated WSDL, the policies are get included in the stub. Hence you don't have to specify a separate Policy file.
But if you need to use a separate policy then you need to set them in the AxisDescription object that you use in the ServiceClient and OperationClient.
e.g.
ServiceClient serviceClient = new ServiceClient();
OperationClient operationClient = serviceClient
.createClient(ServiceClient.ANON_OUT_IN_OP);
FileInputStream fis = new FileInputStream("path-to-policy.xml");
Policy servicePolicy = PolicyEngine.getPolicy(fis);
AxisService axisService = serviceClient.getAxisService();
axisService.getPolicyInclude().setPolicy(servicePolicy);
If you need more information please repost this to [email protected] with a [AXIS2] subject prefix. -
Numbers to CSV export script: how to specify the encoding?
Hi,
I'm using the following script to export a Numbers document to CSV:
# Command-line tool to convert an iWork '09 Numbers
# document to CSV.
# Parameters:
# - input: Numbers input file
# - output: CSV output file
# Attik System, Philippe Lang
# Creation date: 31 mai 2012
# Modification date:
on run argv
# We retreive the path of the script
set myPath to (path to me)
tell application "Finder" to set myFolder to folder of myPath
# We get the command line parameters
set input_file to item 1 of argv
set output_file to item 2 of argv
# We retreive the extension of the file
set theInfo to (info for (input_file))
set extname to name extension of (theInfo)
# Paths
set input_file_path to (myFolder as text) & input_file
set output_file_path to (myFolder as text) & output_file
if extname is equal to "numbers" then
tell application "Numbers"
open input_file_path
save document 1 as "LSDocumentTypeCSV" in output_file_path
close every window saving no
end tell
end if
end run
It works fine, except that I don't know how to specify the encoding of the text in the CSV file (Latin1, MacRoman, Unicode). This option is available in the export dialog of Numbers. Any hint on how to do that is welcome. (GUI Scripting?)
Where can I find documentation on the iWork "vocabulary" available? Is there a definitive documentation somewhere? I tried to record an manual export in the script editor, without success. Script is more or less empty.
Thanks!
Philippe LangA further note from Yvan. He's made some revisions to the script sent earlier.
--{code}
--[SCRIPT export to CSV with selected encoding]
I added some features.
(1) Defining the encoding thru the preferences file apply only if
the application is not in use because the file is read only once in a session.
A test urge you to quit Numbers if it is running.
(2) info for is deprecated so it may be removed by Apple tomorrow.
I no longer use it.
(3) just for the fun, I added a piece of code allowing you to select the encoding on the fly.
Thanks to the property chooseEncodingInScript, at this time the script use Unicode (UTF-8)
(4) I'm wondering which tool is used to launch this script,
I don't know the way to pass arguments when I run one.
Yvan KOENIG (VALLAURIS, France)
2012/06/13
property chooseEncodingInScript : false
true = the script will ask you to select the encoding
false = the script use the embedded encoding
on run argv
set input_file to (item 1 of argv) as text
set output_file to (item 2 of argv) as text
set myPath to (path to me) as text
tell application "System Events"
set theProcesses to name of every application process
set myFolder to path of container of (disk item myPath)
set input_file_path to myFolder & input_file
set output_file_path to myFolder & output_file
set extname to name extension of (disk item input_file)
end tell
if extname is "numbers" then
if "Numbers" is in theProcesses then error "Please, quit “Numbers” before running this script !"
if chooseEncodingInScript then
set theList to {"Mac OS Roman", "Unicode (UTF-8)", "Windows Latin 1"}
set maybe to choose from list theList with prompt "Choose the default encoding applying to export as CSV"
if maybe is false then
error number -128
else if item 1 of maybe is item 1 of theList then
30 -- Mac OS Roman
else if item 1 of maybe is item 2 of theList then
4 -- Unicode (UTF-8)
else
12 -- Windows Latin 1
end if
else
4 -- Unicode (UTF-8)
end if
do shell script "defaults write com.apple.iWork.Numbers CSVExportEncoding -int " & result
tell application "Numbers"
open input_file_path
save document 1 as "LSDocumentTypeCSV" in output_file_path
close every window saving no
end tell
end if
end run
--{code}
Regards,
Barry -
How to call the XML file as PrivateResourcePath in JSP
Hi All,
I want to call the layer-config.xml values in JSP dropdown list. How to call the XML file as PrivateResourcePath in JSP... please advise me if any solution.
locaiton: dist/PORTAL-INF/layer-config.xml
<?xml version="1.0" encoding="utf-8" ?>
- <layer-config>
- <system>
<layer>Test</layer>
<internal>true</internal>
</system>
- <system>
<layer>Test1</layer>
<internal>false</internal>
</system>
- <system>
<layer>Test3</layer>
<internal>false</internal>
</system>
</layer-config>
Thanks in advance.Hi,
The below link may help you.
[Accessing image from dist/imgaes folder inside JSPDynpage Component;
Regards,
Suresh Bachimanchi -
How to extract the cobol files into owb
Hi
How to extract the cobol files in owb,I am using OWB9.2.
Ex:I am having 2 records DCEC4000100 9159000050C those values are 5 bytes 'RAVI and 6 bytes '15000'.
Using contorl file i am trying to load these into Oracle,But i am not able into insert these records into Oracle.
Can any tell me how to handle this kind of situation?
Regards,
RupakGood morning Ashok,
Your data is in a SQL*Loader supported datatype, so basically it should not be a problem.
Have you checked the Database Utilities guide (for Oracle9i for instance: http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96652/toc.htm) on how to handle this?
I'll also repeat my previous question, have you ever been able to load data into the database using SQL*Loader (either using ASCII values or any other datatype)?
For the OWB part, have you read "Importing Data Definitions" (typically chapter 4)? More specifically, "Specifying Field Properties" in "About Flat File Sources and Targets"?
In "SQL*Loader Properties" it says the following:
Type Describes the data type of the field for the SQL*Loader. You can use the Flat
File Sample Wizard to import the following data types: CHAR, DATE, DECIMAL
EXTERNAL, FLOAT EXTERNAL, INTEGER EXTERNAL, ZONED , AND ZONED
EXTERNAL. For complete information on SQL*Loader field and data types, refer to
Oracle9i Utilities. Currently, only portable datatypes are supported.
If you check the database utitlities guide (chapter 6 Field List Reference) and look for "SQL*Loader Datatypes", you'll find (packed) decimal under the Nonportable Datatypes. This implies that OWB does not support it.
This does not mean you can't use SQL*Loader, you'll only have to define everything separate from OWB and call it separately as well.
Good luck, Patrick -
In LSMW using BAPI Scenario, how to assign the same file to HEADER and ITEM
Hi,
i got a problem when we are in ASSIGN FILES step how to assign the same file to both HEADER and ITEM Structures?Hi,
When defining the file in specify files step check the option 'Data for Multiple Source Structures'.
Hope it helps.
Thanks,
Mahesh -
So how to specify different answer file for different install images in WDS snap-in?
hello
in WDS snap-in, in properties on server name, on client tab, we can define an answer file for unattended windows installation on WDS clients.
my question is, maybe we have added multiple images in WDS snap-in (win xp image, win 7 , win 2008,...)
now this one answer file applies to all of them ?
so how to specify different answer file for different install images in WDS snap-in?
thanks in advancedUnder the "Client" tab of WDS, you should only use an answer-file with settings relevant for the installation. This would be credentials for the WDS deployment share, international settings used during the setup and possibly also destination drive
details (if you want the installation to take care of partitioning the disk etc). The settings relevant for unattend-files used under "Client" would only be of those in phase 1 (WinPE).
However, if you would like to have specific unattend file for every installation, e.g. Win7, Server 2008, Win 8 etc, you can browse to the image under "Install Images" under the image Groups. There you can select properties for every image and
have a personal unattend-file.
hi Joel
very cool. thanks a lot, that really helped me.
best regards -
Hi Experts,
I am trying to implement automatic cache purging every day at specified time and i created txt file with SApurge All cache() and created bat file with nqcmd -q Analyticsweb -u username -p password -s (txt file location).
Now i want to run this bat file daily at specified time with out executing manually may i know how to run the batch file at specified time .
Thanks,There is task type as command in workflow manager if you want you can go for that during the load
nqcmd -d "AnalyticsWeb" -u Administrator -p Administrator -s "D:\PowerCenter8.1.1\server\infa_shared\SrcFiles\1_BIPurgeCache.txt"
Check these urls
http://docs.oracle.com/cd/E12103_01/books/AnySched/AnySched_Scripts3.html
http://deliverbi.blogspot.com/2011/12/purge-all-cache-from-dashboard.html
Maybe you are looking for
-
Help!!! My ipod nano (3rd gen) won't sync!!
I am very confused and need someone's expert help with my Nano. I began downloading music like crazy. All was working well, suddenly one day, my ipod will no longer work on my computer; not recognized. I try everything I can think of, finally reso
-
Itunes HD movie download: -50 error message
hi there! last nite i purchased an HD movie from Itunes on my mac. when i woke up this morning, the download had timed out. 2.29G of 2.54G had been downloaded... so close!?!? there was a '-50 unknown error' message on my screen saying that maybe my i
-
Pre - Low battery alarm and battery status don't match.....
I am a Volunteer here, not employed by HP. You too can become an HP Expert! Details HERE! If my post has helped you, click the Kudos Thumbs up! If it solved your issue, Click the "Accept as Solution" button so others can benefit from the question you
-
Special characters through gateway !
Hi, I've a portlet. In Edit->preferences, I've a textarea where user can enter <HTML> content. If user enters " " for a extra space and hit finish, it is replaced by junk character like "__" . Response.Type="text/html". I'm using GDK.
-
Ipod is corrupted!! Tried everything?
"Itunes has detected an iPod that appears to be corrupted. You may need to restore this ipod before it can be used with itunes. You may also try diconnecting and reconnecting the iPod." Well I did what the program told me to. I reset it, tried reconn