[svn] 3048: Always map urls through the rootURL property, even for the non-proxy case.

Revision: 3048
Author: [email protected]
Date: 2008-08-29 15:40:17 -0700 (Fri, 29 Aug 2008)
Log Message:
Always map urls through the rootURL property, even for the non-proxy case. This might
change the behavior slightly if you set rootURL on HTTPService for the non-proxy case
as that would have been ignored in the current code path but it seem less consistent.
If rootURL is not set, it defaults to the swf's URL which should give the same relative
URL semantics we get today by default when rootURL is not set.
blazeDS checkintests pass
Modified Paths:
flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as

Of the second and third scripts, the latter could perhaps be deemed the "most secure"; however, it might block more than you want. If you really want to use one of those, then I'd suggest using the second script. Otherwise, I'd recommend that you take a look here. (I only slightly examined the first script.... I do not understand the language of the comments, and I'm no iptables whiz. )
Also, note that you don't have to use an actual script to set up the rules; rather, you can save the rules you want to a file that will be read by iptables automatically (/etc/iptables/iptables.rules). Here's a modified version of mine:
# /etc/iptables/iptables.rules
# These rules (and the commented instructions) derived from:
# http://ubuntuforums.org/showthread.php?t=159661
*nat
:PREROUTING ACCEPT [163:50538]
:POSTROUTING ACCEPT [40:2451]
:OUTPUT ACCEPT [40:2451]
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:FIREWALL - [0:0]
:TRUSTED - [0:0]
-A INPUT -j FIREWALL
-A FORWARD -j DROP
-A FIREWALL -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FIREWALL -i lo -j ACCEPT
-A FIREWALL -j TRUSTED
-A FIREWALL -j DROP
# put your own exceptions here, like so (replacing <tcp/udp> with either "tcp" or
# "udp" -- minus the quotes -- and <port number> with the port you'd like to open):
# -A TRUSTED -p <tcp/udp> -m <tcp/udp> --dport <port number> -j ACCEPT
COMMIT
Of course, there are benefits to keeping the rules in a script. For instance, you could then easily set the default iptables rules, allow all traffic, etc. Plus, some firewall-related things (such as the various echo commands in the scripts you provided) cannot (to my knowledge) be done by iptables alone.
If you already have a script that sets up the rules you would like to use, you can save yourself the hassle of creating a rules file by following the directions outlined here.
Last edited by ssjlegendx (2008-08-06 20:17:00)

Similar Messages

  • [svn:fx-trunk] 12025: Switching out the old video component for the new video component that uses OSMF .

    Revision: 12025
    Revision: 12025
    Author:   [email protected]
    Date:     2009-11-19 17:48:04 -0800 (Thu, 19 Nov 2009)
    Log Message:
    Switching out the old video component for the new video component that uses OSMF.  Also fixing RSL issue with OSMF because a change in flex-config.xml accidentally got overwritten.  Also fixing a bug caught during the last code review where you would set the volume on the VideoPlayer, but the volumeBar wouldn't be made aware of that change.
    Switching out the video component results in many API changes.  The changes are highlighted below:
    Class name changes:
    - spark.primitives.VideoElement is being renamed to spark.components.VideoDisplay
    - spark.components.mediaClasses.StreamingVideoSource is renamed to park.components.mediaClasses.DynamicStreamingVideoSource
    - spark.components.mediaClasses.StreamItem is renamed to park.components.mediaClasses.DynamicStreamingVideoItem
    VideoDisplay/VideoPlayer event changes:
    The new video component's events are:
    - bytesLoadedChange : org.osmf.events.LoadEvent
    - currentTimeChange : org.osmf.events.TimeEvent
    - durationChange : org.osmf.events.TimeEvent
    - mediaPlayerStateChange : org.osmf.events.MediaPlayerStateChangeEvent
    The old video component's events were:
    - close : spark.events.VideoEvent (removed)
    - complete : spark.events.VideoEvent (replaced with mediaPlayerStateChange)
    - metaDataReceived : spark.events.VideoEvent (replaced with mediaPlayerStateChange)
    - playheadUpdate : spark.events.VideoEvent (replaced with currentTimeChange)
    - progress : flash.events.ProgressEvent (replaced with bytesLoadedChange)
    - ready : spark.events.VideoEvent (replaced with mediaPlayerStateChange)
    VideoDisplay/VideoPlayer property changes:
    Renames:
    - maintainAspectRatio:Boolean has been renamed to scaleMode:String and rather than true/false, it now access 4 values: none, zoom, letterbox, and stretch.  See the enum class org.osmf.display.ScaleMode.
    - playheadTime:Number has been renamed to currentTime:Number
    - playWhenHidden has been renamed to pauseWhenHidden, and it's "tense" has been reversed.  So playWhenHidden = true correlates to pauseWhenHidden = false.  Also, before we would only pause when the video component was explcitly set to visible=false, but now we detect if the video components or any of it's ancestors have been hidden.
    - totalTime:Number has been renamed to duration:Number
    New properties:
    - bytesLoaded:Number This is a new property not available on the old video component
    - bytesTotal:Number This is a new property not available on the old video component
    - loop: Boolean this was a property added a while ago on the old video component but not in the original video player spec
    - mediaPlayerState: this is a new property that details the state of the video component.  See org.osmf.media.MediaPlayerState for all the possible values.
    - seekToFirstFrame:Boolean (pending PARB approval) - This is a new property available on VideoDisplay/VideoPlayer.  When autoPlay = false, if seekToFirstFrame is set to true, then we will connect to the server to start downloading the video, figure out the size of the video and resize appropriately, and show the first frame of the video.  If seekToFirstFrame is false, then no connection to the server is made, there's no implicit size for this video, and the first frame will not be show automatically.  By default the value of this property is true.  In the old video component, when autoPlay = false, we always has the same behavior as seekToFirstFrame = true.  Now it is controllable through this property.  Eventually, (not for Flex 4.0), we will most-likely have support for a thumbnail source or a splash screen so the video's preview will show up without making an unneeded connection to the server.  The property name may change depending on PARB.
    Other changes:
    - autoRewind: The default of autoRewind is now true instead of false
    - enabled: before we paused the video when the video component was explicitly set to enabled = false.  Now we pause the video when the video component or any of it's ancestors have been disabled.
    VideoPlayer-only changes:
    - videoObject:flash.media.Video property is now a new property on VideoPlayer.  It was previously only on VideoDisplay.
    - The skin states for the old VideoPlayer were: connectionError, disabled, disconnected, loading, playing, stopped, connectionErrorAndFullScreen, disabledAndFullScreen, disconnectedAndFullScreen, loadingAndFullScreen, playingAndFullScreen, stoppedAndFullScreen.  The new skin states are: uninitialized, loading, ready, playing, paused, buffering, playbackError, disabled, uninitializedAndFullScreen, loadingAndFullScreen, readyAndFullScreen, playingAndFullScreen, pausedAndFullScreen, bufferingAndFullScreen, playbackErrorAndFullScreen, disabledAndFullScreen
    DynamicStreamingVideoItem property changes:
    - bitRate:Number renamed to bitrate:Number
    DynamicStreamingVideoSource property changes:
    - initialIndex has been added to DynamicSteramingVideoSource
    - live:Boolean has changed to streamType:String which accepts values: live, recorded, any.  See the enum class org.osmf.net.StreamType for more info.
    - serverURI:String renamed to host:Object
    - streamItems:Array has changed types to streamItems:Vector.
    ScrubBar property changes (THESE CHANGES ARE NOT DONE YET, BUT SHOULD BE DONE SOON)
    - bufferedStart will be removed
    - bufferedEnd will be renamed to loadedRangeEnd.  This property name still may change depending on PARB.
    - bufferedArea skin part needs to be renamed.  Probably will be renamed to loadedArea.  PARB still deciding.
    QE notes: -
    Doc notes: -
    Bugs: -
    Reviewer: Kevin
    Tests run: checkintests
    Is noteworthy for integration: Yes
    Modified Paths:
        flex/sdk/trunk/frameworks/flex-config.xml
        flex/sdk/trunk/frameworks/projects/spark/defaults.css
        flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as
        flex/sdk/trunk/frameworks/projects/wireframe/build.xml
        flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/VideoPlayerSkin.mx ml
        flex/sdk/trunk/frameworks/spark-manifest.xml
    Added Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin.mxml
    Removed Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer2.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamItem.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/StreamingVideo Source.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.png
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin.mxml
        flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/VideoPlayerSkin2.mxml

    I've got that same problem: iPod Touch 2nd Gen, Apple Component Cables, and an HD TV.
    The funny thing is, the cable works fine with an iPod Classic (160 GB) but not for the iPod Touch. Can anyone explain why that is?

  • Most times when I import photos from my desktop or dropbox to iPhoto, iPhoto will keep the title I created for the image as the display title under the image. but occasionally it displays the filename instead and I have to go back through and reenter

    most times when I import photos from my desktop or dropbox to iPhoto, iPhoto will keep the title I created for the image as the display title under the image. but occasionally it displays the filename instead and I have to go back through and reenter the title in iPhoto. why the inconsistency? running OS 10.9.5 and using iPhoto 9.5.1

    Try this:  select one of the photos that are showing the wrong title and use the Photos ➙ Batch Change ➙ Title to File Name menu option.
    See if that will put the name that you want under the thumbnail.

  • [svn] 1053: Basic and custom security-constraint samples were added to the team app mainly for the doc team to have a reference .

    Revision: 1053
    Author: [email protected]
    Date: 2008-04-01 11:35:28 -0700 (Tue, 01 Apr 2008)
    Log Message:
    Basic and custom security-constraint samples were added to the team app mainly for the doc team to have a reference. The custom authentication sample uses the new ChannelSet.login and ChannelSet.logout methods.
    Modified Paths:
    blazeds/branches/3.0.x/apps/team/WEB-INF/flex/remoting-config.xml
    blazeds/branches/3.0.x/apps/team/WEB-INF/flex/services-config.xml
    Added Paths:
    blazeds/branches/3.0.x/apps/team/features/security-constraints/
    blazeds/branches/3.0.x/apps/team/features/security-constraints/README.txt
    blazeds/branches/3.0.x/apps/team/features/security-constraints/securityConstraint_Basic.m xml
    blazeds/branches/3.0.x/apps/team/features/security-constraints/securityConstraint_Custom. mxml
    Removed Paths:
    blazeds/branches/3.0.x/apps/team/features/remoting/remoting_AMF_SecurityConstraint_Basic. mxml

    Congrats to Carmelo!
     Windows Phone and Windows Store Apps Technical Guru - February 2015  
    Carmelo La Monica
    Windows Phone 8: control Nokia Maps (Part 3)
    JH: "Part 3 of the series how to work with the Nokia maps control. As the previous articles this one contains a lot of code snippets and some pictures. Good work!"
    Ed Price: "A great topic, a fantastic breakdown of sections with clear descriptions, and a nice mix of code formatting and helpful images! Another stellar article from Carmelo! Great job including the link back at the end to the portal
    article!"
    Ed Price, Azure & Power BI Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • I can record and hear me recording through the computer's built in mic, but can't get the external mic and headphones to work., The preferences are set for the external mic and headphones...

    I can record and hear me recording through the computer's built in mic, but can't get the external mic and headphones to work., The preferences are set for the external mic and headphones...

    What operating system are you using? Is it on a Mac or a PC? Which preferences are set for external mic/headphones, Audition's or the computers?

  • HT1725 My purchases are only playing halfway through the song then they jump to the next song even though the download has been completed "successfully". Does this mean an incomplete download? How do I rectify this? Please help

    My purchases are only playing halfway through the songs then they jump to the next song even though the download has been completed "successfully" Does this mean I have to repurchase and download again?

    Delete and redownload.
    You do not pay for redownloads.  Follow the direction:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Sometimes a web page appears with only text and no picures. It is not always the same site and does not always happen. If I switch to Explorer for the same web site it always works

    Sometimes a web page appears with only text and no picures. It is not always the same site and does not always happen. If I switch to Explorer for the same web site it always works

    Thank you, it worked with just F5. I don't know whether CTRL + F5 would work because the problem has not come back yet!

  • [svn:bz-4.0.0_fixes] 20651: Some MBean tests needed flex.management. jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS 4 .0.0_fixes.

    Revision: 20651
    Revision: 20651
    Author:   [email protected]
    Date:     2011-03-07 12:21:11 -0800 (Mon, 07 Mar 2011)
    Log Message:
    Some MBean tests needed flex.management.jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS 4.0.0_fixes.
    Modified Paths:
        blazeds/branches/4.0.0_fixes/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.validat ors.xml

    Thank you very much!
    I cant believe this little comment has been so helpful!
    But yes it is:
    I explain, despite my efforts to find, googled it, forums, faqs, etc...
    no where it mentionned the manifest.fm file is... INSIDE the .jar!
    Your comment "a zip" made me attempt to open it with winrar, and I found a manifest.fm file inside!
    So far I was editing the one at the "source" of my project and rebuilding it with netbeans.
    I am going to try that now.
    Actually.... :( no its mentionning my main class!
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 10.0-b19 (Sun Microsystems Inc.)
    Main-class: courseworkjava3d.Simple3D
    Class-Path:
    X-COMMENT: Main-Class will be added automatically by buildWell I have no problems uploading you the .jar, it is for a coursework it is not a private project or whatever:
    http://www.uploading.com/files/CM2LKWYU/BetaCourseworkJava3d_Final.jar.html
    Oh and I felt on your comment "dont ask us" as if I was suppose to know... i'm a beginner, I did not know that! And I tried to give you so many infos so you dont lose your time if you want to help, especially as after my own research I found many, many results for this "main class" and I tried a few solutions!
    Edited by: CupofTea on Apr 13, 2008 3:28 AM

  • [svn:bz-trunk] 20650: Some MBean tests needed flex.management. jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS trunk .

    Revision: 20650
    Revision: 20650
    Author:   [email protected]
    Date:     2011-03-07 12:20:03 -0800 (Mon, 07 Mar 2011)
    Log Message:
    Some MBean tests needed flex.management.jmx stuff in the allow classes list for the class deserialization validator so adding it in on BlazeDS trunk.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/WEB-INF/flex/services-config.mods.validators.xml

    Thank you very much!
    I cant believe this little comment has been so helpful!
    But yes it is:
    I explain, despite my efforts to find, googled it, forums, faqs, etc...
    no where it mentionned the manifest.fm file is... INSIDE the .jar!
    Your comment "a zip" made me attempt to open it with winrar, and I found a manifest.fm file inside!
    So far I was editing the one at the "source" of my project and rebuilding it with netbeans.
    I am going to try that now.
    Actually.... :( no its mentionning my main class!
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.0
    Created-By: 10.0-b19 (Sun Microsystems Inc.)
    Main-class: courseworkjava3d.Simple3D
    Class-Path:
    X-COMMENT: Main-Class will be added automatically by buildWell I have no problems uploading you the .jar, it is for a coursework it is not a private project or whatever:
    http://www.uploading.com/files/CM2LKWYU/BetaCourseworkJava3d_Final.jar.html
    Oh and I felt on your comment "dont ask us" as if I was suppose to know... i'm a beginner, I did not know that! And I tried to give you so many infos so you dont lose your time if you want to help, especially as after my own research I found many, many results for this "main class" and I tried a few solutions!
    Edited by: CupofTea on Apr 13, 2008 3:28 AM

  • [svn:osmf:] 13000: Adding the missing readme file for the captioning sample app.

    Revision: 13000
    Revision: 13000
    Author:   [email protected]
    Date:     2009-12-16 10:36:36 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Adding the missing readme file for the captioning sample app.
    Added Paths:
        osmf/trunk/apps/samples/plugins/CaptioningSample/readme.txt

    Carey,
    I have tried london1a1's workaround, and it has not made any difference.
    It seems that london1a1 suggests changing the Camera.h file in this location:
              Users/london1a1/Documents/DW_NAF/PhoneGapLib/PhoneGapLib/Classes/Camera.h
    Whereas you're saying to change the Camera.h file in this location:
              /Applications/Adobe Dreamweaver CS5.5/Configuration/NativeAppFramework/DWPhoneGap/iphone/PhoneGapLib/Classes/Camera.h
    I've tried changing the Camera.h file in both locations.  Neither has made a difference.

  • [svn] 3159: fix to target the correct player in the external library path for the packaged build file

    Revision: 3159
    Author: [email protected]
    Date: 2008-09-09 12:53:37 -0700 (Tue, 09 Sep 2008)
    Log Message:
    fix to target the correct player in the external library path for the packaged build file
    Modified Paths:
    flex/sdk/trunk/frameworks/build_framework.xml

    Hi Gaurang,
    Were you able to resolve your issue?
    Hope the following links help:
    /message/7579461#7579461 [original link is broken]
    Re: Required JAR files:
    Regards,
    Dao

  • [svn:fx-trunk] 11625: The last few cleanups for the OSMF video player.

    Revision: 11625
    Author:   [email protected]
    Date:     2009-11-10 12:03:43 -0800 (Tue, 10 Nov 2009)
    Log Message:
    The last few cleanups for the OSMF video player.  Hooking up the videoObject property in VideoDisplay to return the flash.media.Video object.  Also, when pauseWhenHidden is set to false, we'll detach all the event listeners on the parents because they are no longer needed.
    QE notes: -
    Doc notes: -
    Bugs: -
    Reviewer: Kevin
    Tests run: checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer2.as

    Hi Chris,
    thanks for your tip. I didn't get around to trying it, as I have just solved the problem:
    Unless I misunderstand how things are supposed to work, I think I also might have found a bug (or at a minimum an usability issue):
    When I talked about having relaxed all the local storage settings in my original post, I meant that in the System Preferences / Flash Player / Storage pane I had set "Allow sites to save information on this computer". I also had done some experimention around the "Ask me" and "Settings by Site" options - all without success. I had navigated to that pane by right-clicking on "Global Settings" from the non-working video players.
    However, just now I discovered the following: When I navigate to http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.htm l (the embedded Global Storage Settings Panel) I found that in fact "Allow third-party Flash content to store date on your computer" was disabled all along!
    So effectively, the System Preferences Pane and the Global Settings Manager were not in sync / had conflicting settings and it looks like the Global Settings Manager took precedence. When I enabled local storage in the Global settings manager, things started working immediately.
    This is extremely easily reproducable by the way: Just change some settings in the Global Settings Manager and then right click "Global Settings" within it and the Preference Pane coming up will be in conflict with the settings manager.
    (Even if this is somehow by design, its quite confusing)
    Hope this helps future readers with the same issue. Also, this is an issue in 11.3 Beta 2, so maybe your teams can still fix this for 11.3
    Thanks,
    Jens

  • The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

    Hi,
    Im trying to create a Rest WS with a @GET method that will return me an Emp object. I need the output as a JSON string.
    I have created a dynamic web project and added javax RS jars:
    When im trying to run this, i'm getting the below mentioned error:
    FlushResultHa E org.apache.wink.server.internal.handlers.FlushResultHandler handleResponse The system could not find a javax.ws.rs.ext.MessageBodyWriter or a DataSourceProvider class for the com.rest.assignment.EmpBean type and application/json mediaType.  Ensure that a javax.ws.rs.ext.MessageBodyWriter exists in the JAX-RS application for the type and media type specified.
    RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (500 - Internal Server Error)
    Please help as im stuck with this from long.
    Thanks in advance.
    Below is the code for my service class:
    package com.rest.assignment;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.IOException;
    import java.util.Enumeration;
    import java.util.HashSet;
    import java.util.Properties;
    import java.util.Set;
    import javax.ws.rs.GET;
    import javax.ws.rs.Path;
    import javax.ws.rs.Produces;
    import javax.ws.rs.core.Application;
    import javax.ws.rs.core.MediaType;
    import javax.ws.rs.core.Response;
    @Path("/restService")
    public class RestService extends Application {   
        @GET
        @Path("/getEmpDetails")
        @Produces(MediaType.APPLICATION_JSON)
        public Response getStringResponse()
            EmpBean empBean = new EmpBean();
            String filePath = "C:/Program Files/IBM/workspace/HelloWorld/src/com/rest/resources/EmpData.properties";
            Properties properties = new Properties();
            try {
                properties.load(new FileInputStream(filePath));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
             Enumeration e = properties.propertyNames();
             String result="";
            String[] empDetailsArr;
            while (e.hasMoreElements()) {
              String key = (String) e.nextElement();
              String empDetails = properties.getProperty(key);
              empDetailsArr=empDetails.split(",");    
              empBean.setFirstName(empDetailsArr[0]);
              empBean.setLastName(empDetailsArr[1]);
              empBean.setEmpId(empDetailsArr[2]);
              empBean.setDesignation(empDetailsArr[3]);
              empBean.setSkillSet(empDetailsArr[4]);
              result = empDetailsArr[1];
            //return empBean;
            return Response.ok(empBean).type(MediaType.APPLICATION_JSON_TYPE).build();
        @Override
        public Set<Class<?>> getClasses() {
            Set<Class<?>> classes = new HashSet<Class<?>>();
            classes.add(RestService.class);
            classes.add(EmpBean.class);
            return classes;
    and my empBean goes like this:
    package com.rest.assignment;
    public class EmpBean {
        private String firstName;
        private String lastName;
        private String empId;
        private String designation;
        private String skillSet;
        public String getFirstName() {
            return firstName;
        public void setFirstName(String firstName) {
            this.firstName = firstName;
        public String getLastName() {
            return lastName;
        public void setLastName(String lastName) {
            this.lastName = lastName;
        public String getEmpId() {
            return empId;
        public void setEmpId(String empId) {
            this.empId = empId;
        public String getDesignation() {
            return designation;
        public void setDesignation(String designation) {
            this.designation = designation;
        public String getSkillSet() {
            return skillSet;
        public void setSkillSet(String skillSet) {
            this.skillSet = skillSet;
    Web.xml goes like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_ID" version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
    <display-name>restWS</display-name>
    <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
    <servlet>
      <servlet-name>REST</servlet-name>
      <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
      <init-param>
       <param-name>javax.ws.rs.Application</param-name>
       <param-value>com.rest.assignment.RestService</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
      <servlet-name>REST</servlet-name>
      <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>
    </web-app>
    When i try to return a string from my get method, it gives me a proper response. i get this exception when im trying to return a JSON response.

  • Change the default margin settings for the MS word!

    Hi All,
    BI Publisher version:latest 10.1.3.4
    DB:10.2.0.4
    Oracle Apps:12.0.6
    OS:AIX
    We are facing an issue of which description is as below:
    RTF output is being uploaded through "XML Publisher" Responsibility.
    3.1.9 Header and Footer Margin from Edge Not Preserved in RTF Output
    This issue applies to Versions 10.1.3.3, 10.1.3.3.1, 10.1.3.3.2, 10.1.3.3.3, 10.1.3.4, and 10.1.3.4.1.
    Microsoft Word provides a Page Setup option for specifying the margin for the headers and footers from the edge of the page. This option is available by choosing the File menu, then Page Setup, then the Margins tab, and the From edge box. This margin setting is not retained when the output format is RTF. The output is created with the default margin settings instead. The margin settings do work correctly for other output formats such as HTML, PDF, and Excel.
    So, the "default setting" mentioned here is around 1/2 inch for MS Word which is getting added in the output, even if the margin in template is zero.
    Expected output:
    So what we need to do is -
    1. Check the MS word installation on the application server
    2. Change this default margin setting as top and bottom 0 on the server in the MS word page setup. (I can give you steps to do this in word if required)
    We have tried setting this margin to 0 on client side and generating the output and it makes no difference, so it must be coming from the server.
    We need to know how could we modify the settings and need to know te source and Check the MS word installation on the application server?
    Could anyone please share such an issue faced before!
    Thanks for your time!
    Regards,

    Hi All,
    Moreover,
    Our understanding about the RTF output is this -
    When we generate an RTF report output from Oracle EBS, the word document that is generated is with the settings of MS word that is installed on application server.
    This understanding could be wrong as we have never faced such situation before! We have come to this conclusion because the default settings that we do on client machine do not work.
    And as per the documentation of BI publisher the RTF should always be generated with the default settings of MS word.
    So what you could help us with is this -
    1. See if the MS word application is installed on application server ( if you think this is not application server, but any other server then please check there!)
    2. Change the default margin settings for the MS word.
    Regards,

  • What is the best 'cleaning system' for the Mac?

    What do you recommend as the best 'cleaning system' for the Mac!

    How to maintain a Mac
    Make two or more backups of all your files
    One backup is not enough to be safe. A copy of a backup doesn't count as another backup; all backups must be made directly from the original data.
    Keep at least one backup off site at all times in case of disaster. Backing up to a cloud-data service is one way to accomplish this, but don't rely exclusively on such backups.
    In fact, don’t rely exclusively on any single backup method, such as Time Machine.
    If you get an indication that a backup has failed, don't ignore it.
    Keep your software up to date
    In the App Store or Software Update preference pane (depending on the OS version), you can configure automatic notifications of updates to OS X and other Mac App Store products. Some third-party applications from other sources have a similar feature, if you don’t mind letting them phone home. Otherwise you have to check yourself on a regular basis.
    Keeping up to date is especially important for complex software that modifies the operating system, such as device drivers. Don't install such modifications unless they're absolutely necessary. Remove them when they are no longer needed. Before installing any Apple update, you must check that all system modifications that you use are compatible. Incompatibility with third-party software is by far the most common cause of difficulties with system updates.
    Don't install crapware
    ...such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” “accelerators,” "boosters," “extenders,” “cleaners,” "doctors," "tune-ups," “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, such stuff is useless or worse than useless. Above all, avoid any software that purports to change the look and feel of the user interface.
    It's not much of an exaggeration to say that the whole "utility" software industry for the Mac is a fraud on consumers. The most extreme examples are the "CleanMyMac," "TuneUpMyMac," and “MacKeeper” scams, but there are many others.
    As a rule, you should avoid software that changes the way other software works. Plugins for Photoshop and similar programs are an obvious exception to this rule. Safari extensions, and perhaps the equivalent for other web browsers, are a partial exception. Most are safe, and they're easy to get rid of if they don't work. Some may cause the browser to crash or otherwise malfunction. Some are malicious. Use with caution, and install only well-known extensions from relatively trustworthy sources, such as the Safari Extensions Gallery.
    Only install software that is useful to you, not (as you imagine) to the computer. For example, a word processor is useful for writing. A video editor is useful for making movies. A game is useful for fun. But a "cache cleaner" isn't useful for anything. You didn't buy a computer so you could clean caches.
    Never install any third-party software unless you know how to uninstall it. Otherwise you may create problems that are very hard to solve. Do not rely on "utilities" such as "AppCleaner" and the like that purport to remove software.
    Don't install bad, conflicting, or unnecessary fonts
    Whenever you install new fonts, use the validation feature of the built-in Font Book application to make sure the fonts aren't defective and don't conflict with each other or with others that you already have. See the built-in help and this support article for instructions.
    Deactivate or remove fonts that you don't really need to speed up application launching.
    Avoid malware
    "Malware" is malicious software that circulates on the Internet. This kind of attack on OS X was once so rare that it was hardly a concern, but it's now increasingly common and dangerous.
    There is some built-in protection against malware, but you can’t rely on it—the attackers are always at least one day ahead of the defense. You can’t rely on third-party "anti-virus" products for protection either. What you can rely on is common-sense awareness—not paranoia, which only makes you more vulnerable.
    Never install software from an untrustworthy or unknown source. If in doubt, do some research. Any website that prompts you to install a “codec” or “plugin” that comes from the same site, or an unknown site, is untrustworthy. Software with a corporate brand, such as Adobe Flash Player, must come directly from the developer's website. No intermediary is acceptable, and don’t trust links unless you know how to parse them. Any file that is automatically downloaded from the web, without your having requested it, should go straight into the Trash. A web page that tells you that your computer has a “virus,” or that anything else is wrong with it, is a scam.
    In OS X 10.7.5 or later, downloaded applications and Installer packages that have not been digitally signed by a developer registered with Apple are blocked from loading by default. The block can be overridden, but think carefully before you do so.
    Because of recurring security issues in Java, it’s best to disable it in your web browsers, if it’s installed. Few websites have Java content nowadays, so you won’t be missing much. This action is mandatory if you’re running any version of OS X older than 10.6.8 with the latest Java update. Note: Java has nothing to do with JavaScript, despite the similar names. Don't install Java unless you're sure you need it. Most people don't.
    Don't fill up your disk or SSD
    A common mistake is adding more and more large files to your home folder until you start to get warnings that you're out of space, which may be followed in short order by a startup failure. This is more prone to happen on the newer Macs that come with an internal SSD instead of the traditional hard drive. The drive can be very nearly full before you become aware of the problem.
    While it's not true that you should or must keep any particular percentage of space free, you should monitor your storage use and make sure you're not in immediate danger of using it up. According to Apple documentation, you need at least 9 GB of free space on the startup volume for normal operation.
    If storage space is running low, use a tool such as OmniDiskSweeper to explore the volume and find out what's taking up the most space. Move seldom-used large files to secondary storage.
    Relax, don’t do it
    Besides the above, no routine maintenance is necessary or beneficial for the vast majority of users; specifically not “cleaning caches,” “zapping the PRAM,” "resetting the SMC," “rebuilding the directory,” "defragmenting the drive," “running periodic scripts,” “dumping logs,” "deleting temp files," “scanning for viruses,” "purging memory," "checking for bad blocks," "testing the hardware," or “repairing permissions.” Such measures are either completely pointless or are useful only for solving problems, not for prevention.
    To use a Mac effectively, you have to free yourself from the Windows mindset that every computer needs regular downtime for maintenance such as "defragging" and "registry cleaning." Those concepts do not apply to the Mac platform.
    A well-designed computing device is not something you should have to think about much. It should be an almost transparent medium through which you communicate, work, and play. If you want a machine that needs a lot of attention just to keep going, use a PC, or collect antique cars.
    The very height of futility is running an expensive third-party application called “Disk Warrior” when nothing is wrong, or even when something is wrong and you have backups, which you must have. Disk Warrior is a data-salvage tool, not a maintenance tool, and you will never need it if your backups are adequate. Don’t waste money on it or anything like it.

Maybe you are looking for