JSP and Windows registry

Hi,
To put it in a simple manner, I have a plain jsp page with two radio buttons. Also I have a program (dll) that can read/write a certain value in the Windows registry. I need to put this two pieces together so the radio button selection depend on the value in the registry and then, according to the selection, the value to be reset in the registry.
How can I do that?
Thanks for your time,
MGalois

Use the JNDI service provider for Windows Registries. See link at http://java.sun.com/products/jndi/serviceproviders.html

Similar Messages

  • JSP and windows application

    I have a windows application (convert.exe sitting on my C: drive) that I want to call it and place it on my JSP page in specific co-ordinates. How can I do this? Please help. Thanks in advance.

    If you rely upon the system default encoding at some point of your applciation when you convert a byte stream to a character stream, then the behaviour of the application will depend on the platform default encoding, which can be different on those boxes.

  • 11gR2 and Windows registry

    In previous versions if I created in install and called it Ora10g, the registry would reflect that. Now with R2 it seems that it automatically adds to the entry. I tried an install and specified Ora11g and it installed it under KEY_OraClient11g_Home1. I'd like to keep it like my previous version installs and just leave it Ora11g. Is this possible or am I stuck with this naming system?

    Check out this MOS Note: 11gR2 Install (Non-RAC): Understanding New Changes With All New 11.2 Installer [ID 884232.1]
    Basically, it has been removed from the interview portion of the installer but you can specify it on the command line if you wish.
    For example on Windows:
    D:\ORACLE11R2\DATABASE>SETUP.EXE ORACLE_HOME_NAME="ORA11G"Edited by: Centinul on Apr 12, 2010 11:15 AM

  • Automatic discovery not working if empty WebSphere Application Server folders in Windows registry

    We were trying to discover WebSphere 8.5.5 servers in our environment but the JEE MP couldn't find them. The discovery wrote this kind of error to the Windows Log:
    The process started at 8:56:25 AM failed to create System.Discovery.Data. Errors found in output:
    C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files 9\73626\Microsoft.JEE.WebSphere.Install.Discover.vbs(196, 1) Microsoft VBScript runtime error: Object not a collection
    Command executed: "C:\Windows\system32\cscript.exe" /nologo "Microsoft.JEE.WebSphere.Install.Discover.vbs" {10FEBF68-F318-4F09-8E6B-4567D66E2559} {014E39AA-B032-13EC-E5F1-3B880E645FFC} ServerName {D7E586A0-5480-9B71-F731-D3F15B3627FD} "8"
    Working Directory: C:\Program Files\Microsoft Monitoring Agent\Agent\Health Service State\Monitoring Host Temporary Files 9\73626\
    One or more workflows were affected by this.
    Workflow name: Microsoft.JEE.WebSphere.8.Windows.Installation.Discovery
    Instance name: ServerName
    Instance ID: {014E39AA-B032-13EC-E5F1-3B880E645FFC}
    Management group: SOKSCOM2012
    I investigated the discovery vbs script and Windows registry and found out that one of the users had empty WebSphere Application Server folder under Software/IBM in Windows registry. This was probably left after uninstallation of WAS. After I removed the
    empty registry entry then the auto-discovery found WAS instances.
    Would it be possible to enhance the discovery vbs script to exclude empty USER/Software/IBM/WebSphere Application Server key folder in the next version?

    I have contacted IIS forum support.
    Please review the link: http://forums.iis.net/p/1213109/2079229.aspx?Re+Windows+Server+2012+Printing+using+UNC+path+not+working
    Their final response:
    Printing from ASP.NET using System.Drawing.Printing itself is a horrible approach, as this namespace was designed for Windows Forms only. The designers did not take everything about ASP.NET in mind, so any issue can happen. That can answer why the HP model
    works while the Samsung fails, as the HP one just "happens
    to work",
    http://msdn.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx
    Similarly, System.Printing was designed just for WPF.
    About which printing API to use in ASP.NET/IIS, there is no clear answer so far. Thus, your only resource is Microsoft support, who can perform further analysis (with their dedicate utilities and of course Windows source code) and might come across a solution
    to help you out. This is not a trivial scenario.

  • I have an active subscription but everytime I open the program it says trial expired.  I have installed, reinstalled, and installed again.  I have also installed the windows registry patch.

    I have an active subscription but everytime I open the program it says trial expired.  I have installed, reinstalled, and installed again.  I have also installed the windows registry patch.
    It wouldn't install for nearly 5 times I tried to do this.  Now it's finally installed again but it won't budge past the trial version.  I click BUY NOW but then it says "error you already have a subscription" then it times out and just stays on the Trial Expired page.

    Hey kushlar,
    Please log out from your Adobe application and login again.
    Once you launch Acrobat and get error saying trial expired, you will find an option saying 'license this software'.
    Select this option and enter your credentials.
    Now check and let me know.
    Regards,
    Anubha

  • I18N  jsp application on linux and windows

    This is regarding the damage of polish messages from struts application
    deployed on Tomcat on Linux and Windows XP .
    I get polish messages from SAP that to be displayed in JSP page.
    I have set ISO8859_2 in JSP page for charset.
    <%@ page contentType="text/html;charset=ISO8859_2" %>
    I have set encoding attribute in web.xml as below
    <?xml version="1.0" encoding="ISO-8859-2"?>
    This is working on Windows XP.
    But I get Question marks and differents characters for polish messages from
    application deployed on Linux
    prosz? sprawdzi? Wpis.
    Please help if I need to do anything in tomcat server or in OS .. __.____._

    http://forum.java.sun.com/thread.jspa?threadID=5263693&messageID=10098736#10098736

  • Problem with Sessions and window.open

    Hi,
    Hi everyone,
    Help Please!!!
    I am working with Sevlet session objects and HTML forms and windows. I have an HTML form for the user to supply a username and password. Once the user clicks submit I need to open another browser window that has no toolbar, no location, no status bar, etc. The user should also be able to go back to that login screen and login again and open a 2nd, 3rd, etc. instance of the application. My problem is that each application is being asigned the same sessionId. I believe it is being asigned to the main login window and thus to the other child windows it opens. Is there a way to work around this? Do I need to make the user open another browser window to login? I need to be able to let the user open multiple instances of the application with unique session ids for each.
    Any insight is GREATLY appreciated on this topic. Anything you can tell me about sessions (Java), IE, window.open would help greatly!
    THANK YOU IN ADVANCE!!!
    MA

    To achieve this, you must introduce another level of
    abstraction to the Servlet specifications. When you
    work with JSP/Servlets you use mostly the HttpSession
    to handle user related tasks, and the aplication
    context, for things that are common to all users. But
    inside the HttpSession scope, you want to create
    containers that have 'smaller' scope and are uniquely
    identified.
    A ipothetical scenario :Let's say that you must have
    multiple connections to several databases, on each
    database user rights beeing diferrent, and you must be
    able to track user actions globaly, and eventualy
    capture a 'Close Application event' and close all db.
    connections.
    1. when the user first accesses the login frame create
    the HttpSession. In the HttpSession object, store a
    Hastable (let's call it 'ConnectionTable'). Each
    object in the Hashtable must identify uniqely a
    database connection. Now, to create unique identifiers
    ids, make the keys in the hashtable java.lang.Long
    objects, created using System.getCurrentTimeMillis().
    This guaranties there will be no possible confusion.
    From each new open window, on each request to the
    server, along with the usefull parameters, send the
    connection identifier. When proccessing the request,
    select the object from the Hastable wich corresponds
    to the ID.
    2. Now, the values in the ConnectionTable, must act as
    the containers that I mentioned in the first
    paragraph. The simplest way to do this is to have
    again a Hashtable derived class to do the job, wich
    exploses methods similar to HttpSession: setAttibute (
    Object key, Object value) and getAttibute ( Object
    key, Object value). This container may use internally
    a Hashtable to store object, and explose only the
    getAttribute and setAttribute methods for clarity. Any
    way, this is a problem of implementation. Let's call
    this class CustomSession.
    Now, a textual activity diagram:
    1 user accesses the main page, you start a new
    HttpSession; In the HttpSession object, store the
    ConnectionTable object.
    2. the user enters the userID and pwd and adatabase
    name, and a new window is opened. Let's supose the
    data entered is valid.
    3. when you process the login data, you create a new
    CustomSession object. you put in it whatever you would
    put in your HttpSession. You generate a unique
    identifier using System.CurrentTimeMillis(). Put the
    CustomSession object in the ConnectionTable, using the
    generated id as key. Send the response.
    ..... later on .....
    100. the user asks for a particular action to be
    performed - e.g. a row deletion. The page contains a
    form with text field where the user introduces the
    row number, a submit button and a hidden input with
    the ID.
    101. you process the data. Get the ID from the request
    object, get the ConnectionTable from the session, get
    the CustomSession using the ID as key, do whatever
    your logic was doing, but obtaining the objects from
    the CustomSession instead of HttpSession
    NicNic,
    Very slick idea. I think that it could work and it seems that there would be not security issues because the id that you would store on the client side is the Unique Identifier and not the actual Session Id. Do you forsee any security issues for this implementation?

  • IPhone 5 iOS 6.1.4 and Windows 7 x64 USB Driver Issues

    Been pulling my hair out with this one for the last week or so and haven't had any luck finding anything on the forums or the web regarding a solution short of a full reinstall of Windows 7 which I am not prepared to do at this time; so hoping someone here can shine some light on this for me
    I have a iPhone 5 that is updated to iOS 6.1.4 and a recently built Windows 7 64-bit machine. All of my other USB devices function fine (keyboard, mouse, Xbox 360 wireless receiver for Windows, and a Seagate 2TB external USB drive). I've downloaded the most recent version of iTunes, installed successfully and then attempt to plug in my phone to sync. I get the standard Windows *ding* that I've attached a device and 1 of 2 things happens (I haven't been able to determine what causes one reaction to happen versus the other): Windows will successfully install the 'Apple USB Mobile Device Driver' successfully and it will appear under my USB devices in Device Manager. However - iTunes will not recognize the phone and I cannot see it in Windows either. In the 'Devices and Printers' snap-in my iPhone will appear under 'Unspecified Devices' as the 'Apple USB Mobile Device'. The iTunes diagnostics fail to find a connected device so the tests fail. As soon as I unplug the device, the strangest thing happens: Windows will start trying to install a device driver and after a few seconds it will fail stating that the "MTP Device Driver" installation failed because the device was unplugged. iTunes also thrown an error "iTunes cannot connect to this iPhone" throwing error code 0XE8000065 (I've also seen error code 0XE8000085 as well)
    After some finagling, I've managed to get Windows to recognize the device under 'Portable Devices' in Device Manager as an "MTP USB Device" using the generic driver. At this point, I've tried updating the driver and manually specifying the Apple USB driver located in the C:\Program Files(x86)\Common Files\Apple\Mobile Device Drivers which updates successfully but then changes the device to "Apple USB Mobile Device" and moves it under the USB Devices in Device Manager; and Windows nor iTunes can see it even still.
    I've tried removing iTunes several times and ensuring that all remnants of the installation are gone (registry and folders on the installation drive) and have disconnected all my USB devices short of the keyboard and mouse and still I get the same results. At this point, I'm afraid that a re-install of Windows is going to be the solution; but it's a drastic one (I have a SSD drive where Windows is installed along with all of my games for faster load times/better performance and do not want to have to redownload\reinstall all of them) and I'm not prepared to undertake it at this time, which is why I'm posting here
    I've used a utility called USBDeview that sees my phone is connected - so I know from a functional standpoint that my USB ports are good and working. I also know the cable is good too - my daughter's PC (Windows 7 32-bit with NO iTunes) immediately sees the device when I plug it in, installs the drivers, recognizes it as an iPhone and I can then see/browse it in Windows Explorer like I would normally expect. My work PC (Windows 7 64bit, NO iTunes) sees the device just fine as well. I would immensely appreciate anyone that has seen this issue or has any additional solutions I can try.
    It's also worth mentioning that I've never used Kapersky antivirus so the UPPERFILTERS value in the registry that I've seen as a solution on some forums is not present on my machine. I'm using Microsoft Security Essentials as my antivirus (no flaming please lol - it meets my needs and is extremely lightweight, which is why I'm using it on a gaming rig) and it's not indicating any issues. I've also tried running iTunes as an administrator (even though my account is a local admin on the machine) and that does not have any effect either.
    If there is anything I left out, please let me know; and I thank you in advance!

    AphexTwin wrote:
    - no Apple input?
    Of course not.  Didn't you bother to read the TOU of this forum?  This is a USER TO USER technical support forum.  Apple doesn't post here.

  • Java API to read the Encrypted Values from Windows Registry settings

    Is there any Java API to read the Encrypted Values from Windows Registry settings ?
    My Java Application invokes a 3rd party Tool that writes the key/value to windows registry settings under : “HKLM\Software\<3rdparty>\dataValue”.
    This entry is in BINARY and encrypted with 3DES, using crypto API from Microsoft.
    3rd party software to encrypt the data stored in registry it
    either uses C++ code: and uses the call “CryptProtectData” and “CryptUnProtectData” or
    If it is a .NET (C#) it uses the call “Protect” or “UnProtect” from class “ProtectData” of WinCrypt.h from the library “Crypt32.lib.
    Note: The data is encrypted using auto-generated machinekey and there is no public key shared to decrypt the Encrypted data.
    Since the data is encrypted using auto-generated machinekey the same can be decrypted from a .Net / C++ application using CryptUnprotectData or UnProtect() API of WinCrypt.h from the library “Crypt32.lib.
    To know more about Auto-Generated MachineKey in Windows refer the links below
    http://aspnetresources.com/tools/machineKey
    http://msdn.microsoft.com/en-us/library/ms998288.aspx
    I need to find a way in Java to find the equivalent API to decrypt (CryptUnprotectData) and Microsoft will automatically use the correct key.
    But i couldn't find any informato related to Java APIs to enrypt or decrypt data using auto-generated machinekey.
    Is there a way to read the encrypted data from Windows regsitry settings that is encrypted using the Auto-Generated Machine Key ?
    Kindly let me know if Java provides any such API or mechanism for this.

    If the symmetric key is "auto-generated" and is not being stored anywhere on the machine, it implies that the key is being regenerated based on known values on the machine. This is the same principle in generating 3DES keys using PBE (password-based-encryption). I would review the documentation on the C# side, figure out the algorithm or "seed" values being used by the algorithm, and then attempt to use the JCE to derive the 3DES key using PBE; you will need to provide the known values as parameters to the PBE key-generation function in JCE. Once derived, it can be used to decrypt the ciphertext from the Regiistry in exactly the same way as the CAPI/CNG framework.
    An alternate way for Java to use this key, is to write a JNI library that will call the native Windows code to do the decryption; then the Java program does not need to know details about the key.
    That said, there is a risk that if your code can derive the key based on known seeds, then so can an attacker. I don't know what your applicatiion is doing, but if this is anything related to compliance for some data-security regulation like PCI-DSS, then you will fail the audit (for being unable to prove you have adequate controls on the symmetric key) if a knowledgable QSA probes this design.
    Arshad Noor
    StrongAuth, Inc.

  • Where ODBC Connector is defined in Windows registry?

    Good day!
    I have an app which use ODBC Connector, and it don't works as well. When I trying to access ODBC programmatically, I get an error from ODBC Driver Manager, smth like: " Data source not found and no driver specified, the default "
    (my OS language is different, so it's not verbatim).
    I changed MySQL ODBC Connector many times, I tried different versions and tried specify driver in registry manualy (in branch HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI). Also, I had tried to track how does it work step by step, and I  stop at odbc32.dll. As I think it is ODBC Driver Manager which can't find smth necessary, but what?

    This is more of a Windows Registry issue than a LabVIEW issue, does anyone know a good place to get support for that.  My Google-Fu is failing me .  All attempts to search for anything relating to Windows Registry and Icons tends to lead to changing the default icons in Windwos (My Computer, Recycle Bin, etc.).
    Unless there is a way for me to add the .ICO as a resource within the .exe that defaults to the file somehow.  I'm not seeing anything within LabVIEW to facilitate this, however...

  • Thumbnails not working in windows 7 and windows 7 RC

    When I used to view my security camera video card in Vista I would get a thumbnail view of each 10 second video produced.. This made it easy to skip through each video produced and pick out the ones that I thought would be best to check. This would be watched after about a week or so of videos. Now in Windows 7 and windows 7 RC I cannot seem to find this thumbnail view. All I can see is the media player film type .AVI icon for each video. Is there any way of turning the thumbnail function back on. I have tried all the registry fix changes that have been suggested and they don't work. I have downloaded different codec programs and they don't work. The icon/thumbnail box is unchecked in folder views and that doesn't work. Is there an answer to my problem. Does any one know if Microsoft are working on a change to get thumbnails to work with .AVI files. Hope you can help.

    Hi guys,
    I found a solution for this issue on windows 7 64 bits !
    I'm on the 7100 I couldn't get thumbnail preview for my .MOV or .mp4 files. Sometime I could get one or 2 thumb out of 30 in the folder.
    I changed and added a few key to the registry to fix this preview thing:
    IN REGEDIT:
    _ HKEY_CLASSES_ROOT\.mov\shellex\
    where I only had 2 key inside the shellex.
    _I looked inside the mpeg shellex ( because mpeg would generate good thumbnails:
    HKEY_CLASSES_ROOT\.mov\shellex\
    where it had 3 keys
    _SO what I tried was to copy those 3 key and replace my .mov shellex 3 key with those.
    this is what you can do:
    -open regedit
    -right click on:   HKEY_CLASSES_ROOT\.mov\shellex\
    then export it ( it will be your backup in case it doesn't work or you mess up something you will just have to click on it to instal it again.
    Then, 
    - remove the "HKEY_CLASSES_ROOT\.mov\shellex\ "KEY
    -open notepad
    -paste the following in your notepad file:
    -----------------------don't paste this line-------------------------
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\.mov\shellex]
    [HKEY_CLASSES_ROOT\.mov\shellex\{3D1975AF-0FC3-463d-8965-4DC6B5A840F4}]
    @=""
    [HKEY_CLASSES_ROOT\.mov\shellex\{BB2E617C-0920-11d1-9A0B-00C04FC2D6C1}]
    @="{c5a40261-cd64-4ccf-84cb-c394da41d590}"
    [HKEY_CLASSES_ROOT\.mov\shellex\{E357FCCD-A995-4576-B01F-234630154E96}]
    @="{9DBD2C50-62AD-11D0-B806-00C04FD706EC}"
    -----------------------don't paste this line-------------------------
    -save it under whatevername.reg ( be sure to use "all file" kind of type file.)
    -double click on the reg file you just saves you just saved , it will reinstal the shellex inside the .mov key here:
    HKEY_CLASSES_ROOT\.mov
    with the right keys and stuff.
    -close regedit
    -open a folder containing your .MOV, refresh the files several times to be sure, it should be working.

  • Print directly to the printer option in the Windows registry

    I need to find the location for the option to "Print directly to the printer" in the Windows registry.  I am trying to create a GPO to enable this option at login and I can't find the location for it.  Is this possible to do?  If not, is there another way to enable this at startup for all users?  We are running Adobe Acrobat X on Windows 7 Enterprise 32-bit.
    Thanks

    I guess that those of use responding don't know enough about the process you are trying to implement to be of help. Printing to network drives has been an issue for folks for a long time and a lot seems to depend on the network. That is probably of zero help and all I can suggest is just to hang on for someone who hopefully has an idea. If we can get a better handle on what you are trying to do, we might be able to make suggestions. However, I think our answers are not going to be there for the registry issue.

  • Home Sharing Loading Forever and Windows 8

    So I thought I'd leave this here since I scoured this site via Google for answers and couldn't find anything that helped.
    I could not get iTunes Home Sharing to work on my Windows 8 PC (64-bit) in the last few months. My AppleTV would just sit there and attempt to load the video file forever, making very little progress (if any). I knew the movies played previously and if I loaded them on my wife's MacBook Pro, they'd play fine over AirPlay (something my Windows 8 PC couldn't do either). The AppleTV could see my Home Share (via the Computers app) and my iTunes could see my AppleTV (the airplay icon was visible). My AppleTV could also stream just fine from Netflix, the iTunes Store, and it could do mirroring from iPhones and a MacBook just fine as well. I tried turning Home Sharing on and off. I did both kinds of resets (settings and factory). I unplugged it form the wall. Still no luck. From all this, I could tell my AppleTV was not the issue.
    I disabled Windows Firewall (after attempting to clear every possible port iTunes might use through the rules). I added every process to Windows Defender. I disabled IPv6 via Network Settings and the Registry. I made sure Bonjour was enabled (after disabling it and re-enabling it). I checked that iTunes was completely updated (along with the AppleTV). I had every update for Windows 8 installed. I tried older versions of iTunes without luck. I tried turning on and off Home Sharing. I changed the name of my computer. I changed the name of my iTunes library.
    I went back to every hardware change I'd made recently. I tried my older wifi usb dongle. No luck. I zeroed in on my new ASUS RT-AC56U router as a possible culprit. I updated its firmware. I changed the network names. I disabled any QoS it may have had running along with any firewalls or protections. I even tried a custom Merlin firmware that others here had suggested made everything work again. I tried running on 2.4 GHz and then 5 GHz, then with one disabled and then the other. I eventually got a family member to let me borrow an Apple Airport Extreme to test with and I still couldn't get any Home Sharing streaming to work. At that point, I had pretty much ruled out any networking hardware as the cause.
    So that left something still causing hangups on my Windows 8 PC. It really left me with no other choice aside from attempting a clean install of Windows. All my music, iTunes movies, and iTunes TV shows were on separate hard drives so I bit the bullet and wiped my system drive clean. However, it still wasn't working upon re-installing Windows 8 and the newest version of iTunes.
    The only thing I could figure at this point was that I had upgraded to Windows 8 (from 7) sometime last fall. So maybe Windows 8 itself was the culprit?  I knew that Home Sharing was working when I first installed Windows 8. I can't recall exactly when nothing would play but I definitely know that I was able to do Home Sharing streaming initially. But it did get progressively worse since then. Movies would play for half their length and then stop to load. Eventually, nothing would load. But when I tried previous versions of iTunes, I still couldn't get Home Sharing to work. So something deep in Windows 8 had changed that iTunes hasn't adjusted for yet and was preventing Home Sharing from working.
    So I did the last thing available to me: I dug out an old copy of Windows 7 and did a wipe and clean install. Lo and behold: Home Sharing is working right off the bat. Very short load times, I could skip ahead, Airplay and Home Sharing working as intended. I went back and re-added everything piece by piece to make sure none of them were going to set me back with video playback.
    -Switched out the Airport Extreme for my own router (after setting it up like new...again). My test videos still played! Check.
    -Went back to my newer USB wifi dongle. Check.
    -Added more non-HD videos to the Home Share. Check.
    -Added 720p HD videos to the Home Share. Check.
    -Added 1080p videos to the Home Share. Check.
    -Windows Firewall is currently active but I'm still Home Sharing just fine.
    I'm back up and running on Windows 7 and Home Sharing is working just like I remembered it. I know this isn't much solace to anyone encountering this and trying every fix imaginable from Google. I know I didn't want to flatten and re-install my OS (in fact, downgrading it) to get it working. But something with how recent iTunes or Windows updates are interacting were just completely ruining my home watching experience. It's just so bizarre that it worked in Windows 8 at first but then progressively got worse. And a fresh install of Windows 8 and iTunes didn't set it back to the way it was. It has to be some recent changes between the two that interfered with the process and that neither company has addressed it yet.
    I know this will probably get buried among the thousands of other help threads but I hope it does manage to assist someone in getting a better handle on this problem should they face it. And maybe someone from Apple will take another look at Home Sharing in iTunes for Windows 8.

    In case anyone is interested, last night I installed Paralells, Windows, Overdrive Media Console on Windows, and then was able to download my book in WMA format. I was hoping parallels would allow me to crossover sync to iTunes on the Mac and have Overdrive recognize that I had iTunes open, but I had to choose Windows or Mac when connecting my phone through the USB and had to choose Windows in order for it to successfully transfer. I was able to get it to work it is now synced to iTunes in Windows. The nice thing was that it pulled in all my music/apps that I had set up in the Mac side, so I didn't have to go through that exercise again. I tested it on my old phone. Now I need to decide if I want to set up my current phone on Windows or Mac, it seems that once synched it only opens the device in windows, I haven't figured out how to force the choice between mac or window again. If I do windows, I can't take advantage of the cloud or iphoto/imovie directly. I'm totally new to mac, but I think I'll have to import my photos manually.

  • Creating a new key in Windows Registry

    Hello all,
    Have been trying to use JNIRegistry for creation of a new key in Windows' Registry, and it doesn't work.
    Would appreciate if anyone has an example of how to do it.
    thank you,
    Rami A.

    I presume your refering to:
    http://www.trustice.com/java/jnireg/
    Obviously JNIRegistry is not a standard part of Java as its OS specific.
    Why are you attempting to create a key in the registry with java?
    I would recommend you have a look at java.util.prefs.Preferences which
    uses the registry under Windows OS but also handles other os's in a way
    that is native to that os.
    If you have a burning need to use JNIReg, then can you please post the
    code that you used? A quick look at the docs for it tells me that you
    need to create a RegistryKey object for the place where you wish to
    create the key and then use createSubKey().
    Also the documentation mentions that the Key Class is a mirror of how
    the "Windows Registry API" works, and then says to have a gander at the
    "Windows Registry API" if you have any questions. I would suggest
    having a gander at www.msdn.com. Also try this link:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnovba01/html/RegistryMadeEasy.asp
    James.

  • Deploying a WAR file containing .jsp and servlets (also uses JNI)

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

Maybe you are looking for