Is there a portable way to define POJO webservice (JAX-WS 2.0)in Java EE 5?

I would like to use JAX-WS 2.0 annotations to define POJO web services in Java EE 5 server. Implementing the service goes nicely, until I try to deploy it to the app server. It seems this step is application server specific: for Sun implementation I need sun-jaxws.xml, for Geronimo I need to define the service implementation as a servlet in web.xml (http://cwiki.apache.org/GMOxDOC20/simple-web-service-with-jax-ws.html) etc.
Is it really so that if I want to support generic Java EE 5 servers, I can't use JAX-WS 2.0, because deployment is server specific? Of course I could provide Sun implementation with the application, and use it explicitly, but I would prefer not to bundle any Java EE components with my application.

I found out that deployment is specified in different JSR (109). I quickly browsed through that specification and found out that basically everything except @WebService annotation is optional. So should a Java EE 5 compliant server publish the service automatically, just by adding that @WebService annotation? That didn't seem to be the case at least in Geronimo 2.0.2.

Similar Messages

  • Is there a way to define 2 different areas using boundaries in a Java app?

    Hi,
    Im tryig to create a game for kids were they can learn how to write! In one of the games there will be a template of a letter, for example A, the A wii be hollow inside so that the kids can folow the outline! But if they go over a line i want the program to display a message telling them this and having to restart drawing from the mouse!
    I know how to draw the lines fron the mouse i just dont kno if it is possible to define different areas according to the shape of a letter??
    Hope you can help
    RSH

    This code will get you a java.awt.Shape representing the outline of any String.
    import java.awt.Shape;
    import java.awt.Graphics2D;
    import java.awt.Font;
    import java.awt.font.FontRenderContext;
    //Whatever other code you need
    //Getting shape of text, put somewhere you can get a Graphics from
    FontRenderContext context = g2d.getFontRenderContext();        //where g2d is a Graphics2D
    Font anyFont = new Font("Arial", Font.BOLD, 20);
    String myText  = "ABCDEFG";
    TextLayout textShaper = new TextLayout(myText, anyFont, context);
    Shape outline = textShaper.getOutline(null);           
    //you can pass a AffineTransform to getOutline( ) if you want some kind of transformation, probably be best
    //if you used it to move (translate) the text outline so you can check to see if it contains the mouse pointer.With the Shape representing the outline of the text, you can call contains( ) on it, passing it a Point2D or the x and y locations of the mouse in double precision which returns true if the Shape contains the mouse.
    I'm pretty sure that it should work.

  • Is there any simple way to create ods files (OpenOffice Calc)?

    Is there any simple way to create ods files (OpenOffice Calc) using ResultSet (from java.sql)?

    Mabe, you can create CVS files (plain text) Ej...
    ====test.cvs=====
    1, "aaa"
    2, "bbb"
    3, "ccc"
    ===============
    Using a "BufferedWriter"

  • Easiest way to launch a link to the default browser from java?

    Is there an easy way to launch a link in the default browser from java? Ideally I would have a graphic in a cell that when clicked on would open a new window/tab in the default browser. This would be done in SWT, but it might be similar to swing, awt, etc. Any ideas?

    If you are using Java 1.5 or earlier, I found the browser launch code found here to work fairly well: http://www.centerkey.com/java/browser

  • Is there a way to define a layer for dynamic objects?

    Hi all. Basically, I'm creating a number of dynamic text field objects in my Actionscript, but it looks like its being rendered on the wrong layer. I've written the actionscript in the first frame of my 3rd layer (which is masked), but the objects that are rendered dont appear to be affected by the masking effect (that does work with static objects). Is there a way to define programatically which layer an object is rendered in? Something like layerNo.stage.addChild(object)?

    first, you have the command 'addChildAt(child, index)'
    thought i'm not sure if that would solve your problem.  in order to mask dynamic text you have to embed its fond, by setting the textfield's property 'embedFonts' to true.

  • Is there a way to define https proxy settings

    Other than system property setting, using jsse is there a way to define proxy settings. I am using Https connectivity.
    Thanks in advance.

    I'm not too sure I can follow your question. jsse is an extension used for j2se (included from 1.4.2 and up) and therefor has nothing to do with the Java EE SDK.
    But to answer your question a little: just use the java.net.Proxy class. The moment when you need to use https you can then use URL.openConnection() which can optionally take a proxy class as argument. So, for example:
    Proxy proxy = new Proxy(Proxy.Type.HTTP, new INetSocketAddress("proxy.intranet.lan", 3128));
    URL site = new URL("https://sunsolve.sun.com");
    HttpsURLConnection wcon = (HttpsURLConnection) site.openConnection(proxy);And then you can do with the connection object whatever you want, it'll fully utilize the proxy. For more information on this I suggest to check up on the API documentation.

  • Keyboard support - Is there a way to define unrecognised keys

    I have creative prodikeys keyboard. Java seems to only support a known set of keys. There has to be a way to define new ones. I having trouble believing that it cant be done.

    Thanks Gianni Ceresa. On my config I needed a slightly different syntax, changing TAB to [9]. This is what I ended up changing in ~/.sqldeveloper/system4.1.0.18.37/o.ide.12.2.1.0.42.150219.1051/settings.xml:
                  <Item class="oracle.javatools.util.Pair">
                      <first class="java.lang.String">Ide.NEXT_EDITORFRAME_CMD_ID</first>
                      <second class="oracle.ide.keyboard.KeyStrokes">
                         <data>
                            <Item class="javax.swing.KeyStroke">control [9]</Item>
                         </data>
                      </second>
                   </Item>
                   <Item class="oracle.javatools.util.Pair">
                      <first class="java.lang.String">Ide.PREV_EDITORFRAME_CMD_ID</first>
                      <second class="oracle.ide.keyboard.KeyStrokes">
                         <data>
                            <Item class="javax.swing.KeyStroke">shift control [9]</Item>
                         </data>
                      </second>
                   </Item>
    But now nothing happens when I press Ctrl-Tab, until I press Tab again (with ctrl still held) when I get this popup menu:
    I can tab back and forth on the list to choose the doc I want -- but this is not the immediate & responsive interaction that I'm looking to replicate - quickly flicking between tabs that are open, just as one would with eg. Chrome.

  • Is there a way to define the ideal size of the java heap memory?

    Hello all!
    Is there a way to define the ideal size the java heap memory? I'm using a server with (IR,FR,WA) installed and i'm using the Windows Server 2008 R2 with 32GB of ram memory. I have other server with the same configuration using essbase. How can i set the heap memory? I have around 250 users (not simultaneous).
    Regards,
    Rafael Melo
    Edited by: Rafael Melo on Aug 17, 2012 5:40 AM

    For 2008 which is 64 bit you can have
    For FR in windows registry
    HKEY_LOCAL_MACHINE\SOFTWARE\Hyperion Solutions\Hyperion Reports\HyS9FRReport
    Xms and Xmx can have 1536 each.
    For workspace
    Start “Start Workspace Agent UI” service and open Configuration Management
    Console (CMC) via http://localhost:55000/cmc/index.jsp
    for
    Workspace Agent / Common Services Java Heap size you can have
    Xms and Xmx as 1024 each.

  • Is there a way to define RAM usage of Preview?

    Hello,
    i use Mountain Lion now, but i found an annoying difference comparing to Snow Leo.
    I am an Architect and i have to view and occasionally annotate tens of PDF Drawings a day. The files can be in certain cases quite large (10+ MB). On Snow Leo, viewing a PDF Drawing was smooth and fast independent from the file size, but in exchange it took much RAM, sometimes over 4GB (i have 8GB of RAM).
    Nowadays, on Lion and Mountain Lion, Preview became annoyingly slow when i opened a PDF Drawing. Scrolling, zooming by pinching is also very slow and laggy.
    My question is, if there is a way to extend the memory usage cap of Preview to make it work with PDF Drawings smooth and fast as before.
    Maybe i am wrong, and the 2 things have nothing to do with each other, so if there is any other solution, i would be more than happy to read it here.
    My config is:
    MacBook pro 15" mid 2009
    2,66 GHz dual core
    8gb ram DDR3 1067 MHz
    Thanks in advance:
    Leslie

    Then I'd say it is a hard drive problem as Apple uses the Slow 5400RPM models be default.
    There have been many posts on this forum about Slow PFD scrolling/viewing with no real solution that I remember.
    Take a look at the "More Like This" section to the right on this page.

  • Looking for a better way to observe POJO changes

    Let's say you have a POJO like Employee, and you want to make changes to the fields in the POJO observable. What's the best way to do this? The listeners should be able to register for change events, without necessarily subscribing to every property.
    I could create an ObservableEmployeeHelper that takes an employee and wraps each of the fields in Simple*Property objects, and then fires notifications whenever any of those properties change. But it would be nice for the listeners to be able to pick and choose what they want to listen to -- something like this:
    addListener(EmployeeEvent.ALL, new ChangeListener<ObservableEmployeeHelper>(){...});or
    addListener(EmployeeEvent.SALARY_CHANGE, new ChangeListener<ObservableEmployeeHelper>(){...});The other problem is that the ListCell and TableCell's really don't know how to deal with a change to the POJO instead of to the a single observable attribute. For example, if Employee has a status field (ON_HOLIDAY, ON_SICK_LEAVE, ON_SITE, WORKING_FROM HOME) and you want to display an icon next to the user's name indicating this status. It's difficult to do in way that automatically updates the icon in a list whenever you change the status. My hack for this to attach a listener to the Employee observable status property and watch for changes. But this can lead quickly to memory leaks if not done well.
    And currently if you put the Observable POJOs into an ObservableList, you won't get notified if a particular POJO changes, only if the entire list changes.
    Is there an easier way to watch for changes to any field in a POJO?
    It would be nice if there was an @Observable annotation that you could just add to the fields of your POJO and some kind of mixin that you could add to the class that would propagate changes, register listeners, etc.
    Edited by: mfortner on Aug 6, 2012 5:00 PM

    I think you'll need to build somekind of custom solution for this.
    I've done this for my own program so I can monitor changes in any of the properties using just one listener. This helps me to do two things:
    1) Monitor when an object has changed (if any of its properties was changed), and register the object for future storage (unless modified again within a specific timeout)
    2) Monitor when an object was accessed (if a specific set of properties was read), and schedule the object for enrichment (fetching additional data in the background)
    Using properties for this is great because a lot of action can simply be done in the background and as soon as the information is available the UI will update. For example, when the Photo property is accessed the first time by binding it to an ImageView, the Photo won't have loaded yet (it's null). The access is noticed though, and so a background thread loads the Photo from the database. When this process is finished, it updates the Photo property -- thanks to the binding to ImageView, the Photo will be updated automatically in the UI.
    The advantage of course is that I donot need to fetch these things myself anymore -- the program will do this automatically... and for only those objects that actually were accessed (the rest will remain in a minimal state until actually used).
    Same for the automated storage. I just bind a property to the UI, or multiple of them, and when any of them is changed, a process starts that waits for 3 seconds before storing the object. If any more changes occured in the mean time, the timer resets.

  • "Portable" way to do message passing between threads?

    (I posted this on the Apple Developer Forums already, but since that forum is only accessible to registered and paid iPhone developers, I thought it would be nice to put it here as well so as to get some more potential eyeballs on it. I apologize if this kind of "cross-posting" is not kosher/is frowned upon around here.)
    Hey everybody,
    "Long-time listener, first-time caller," heh.
    I've been working for the past 2-3 months on my very first iPhone app. Actually, what I've been working on is a framework that I plan to use in an iPhone app of my own but which I am also trying to write for the "lowest-common-denominator" so that I (and others) can use it in other apps written for both Mac and iPhone.
    Not only is this my first time writing an iPhone app, it is my first time writing for any Apple platform. In fact, it is my first time using Objective-C, period. I cannot stress this enough: I am a "n00b." So go easy on me. I also have not worked with threading before this, either, on any platform, so the learning curve for me here is rather significant, I'm afraid. I am NOT afraid of either taking the time to learn something properly OR of rolling up my shirtsleeves and working. However, on account of my experiences so far, I am finding myself (not to flame or anything!) quickly becoming frustrated by and disillusioned with not so much Objective-C itself, but the Foundation frameworks.
    So with that said, read on, if you dare...
    The basic idea behind my project is that the framework I am writing will present an API to developers which will allow them to write client apps that interact with a particular network appliance or network-aware embedded system. I already have my basic set of classes up and functioning, and the framework works to my satisfaction both on MacOS and iPhoneOS. The platforms I am targeting are MacOS X Tiger 10.4 and later, and iPhoneOS, and up until this point, I've managed to keep a codebase that works on all of the above.
    What I wanted to do next was add some multithreaded goodness to the mix. (Woe is me.) I have asynchronous network socket I/O working within the main thread, and it, in fact, works a treat. In my test app on the phone, I've managed to keep the UI nice and responsive by using the main thread's runloop efficiently. But even though TCP async I/O works fine within the main thread, I want to be able to split out and offload the processing of any data received by the app from the appliance to its own thread. (It is possible, and even desirable, for an application using this framework to be connected to multiple appliances simultaneously.)
    My idea, in order to try to keep things as simple and as clean as possible, was to implement a wrapper class that presented my other main class as an "actor." So, rather than instantiating my main class, one would create an instance of the wrapper class which would in turn control a single instance of my main class and spawn its own thread that the network connection and all data processing for that particular connection would run within.
    (I hope I'm making sense so far...)
    Out of the gate, writing a subclass of NSThread sounds like the logical design choice for an "actor-type" thread, but because I was trying to maintain Tiger compatibility, I stuck with +detachNewThreadSelector:etc.
    Once I decided to pursue the actor model, though, the main problem presented itself: how to best pass messages between the main thread and all of the "actor" threads that might be spawned?
    I stumbled upon -performSelector:onThread:withObject:, and knew instantly that this was exactly what I was looking for. Unfortunately, it doesn't exist on Tiger; only its much more limited little brother -performSelectorOnMainThread:withObject: does. So I kept looking.
    All of the pre-Leopard documentation, tutorials, and sample code that I read indicated that to pass messages between threads, I needed to basically pretend that the threads were separate processes and use the expensive Distributed Objects mechanism to get messages back and forth. Unfortunately, even if that WAS a desirable option, iPhoneOS does not have any support for DO! Grrr...
    Finally, I thought I found the answer when I ran into a third-party solution: the InterThreadMessaging library from Toby Paterson (available @ http://homepage.mac.com/djv/FileSharing3.html). In this library, the author basically implemented his own version of -performSelector:onThread:withObject: called -performSelector:withObject:inThread:. Sounds close enough, right? And actually, it is pretty darn close. It's made to do exactly what it sounds like, and it does it in a platform-neutral way that works on pre-Leopard systems as well as iPhoneOS, using Mach ports instead of DO.
    (...wellll, ALMOST. I discovered after I built a small test app around it that it actually isn't "iPhone-clean." The author used an NSMapTable struct and the NSMap*() functions, which don't exist in iPhoneOS, and he also implemented the handlePortMessage delegate method, but although iPhoneOS has NSPort, it DOESN'T have NSPortMessage. GAAARGH. So I took the time to replace the NSMapTable stuff with NSValue-wrapped objects inside of an NSMutableDictionary, and replaced the handlePortMessage method implementation with a handleMachMessage method, which took some doing because I had to figure out the structure of a Mach message, NO thanks to ANY of the available documentation...)
    Once I started using it, though, I quickly discovered that this implementation wasn't up to snuff. My "actor" class and my main thread will be passing a ton of messages to each other constantly whenever there is network activity, and with InterThreadMessaging, I found that whenever activity started to ramp up, it would collapse on itself. This mostly took the form of deadlocks. I found a note that someone else wrote after experiencing something similar with this library (quoted from DustinVoss @ http://www.cocoadev.com/index.pl?InterThreadMessaging):
    "It is possible to deadlock this library if thread A posts a notification on thread B, and the notification on B causes a selector or notification to be posted on thread A. Possibly under other circumstances. I have resolved this in my own code by creating an inter-thread communication lock. When a thread wants to communicate, it tries the lock to see if another thread is already using the InterThreadMessaging library, and if it can't get the lock, it posts a message to its own run-loop to try again later. This is not a good solution, but it seems to work well enough."
    So I tried implementing what he described using a global NSLock, and it did help with some of the deadlocks. But not all. I believe the culprit here is the Mach ports system itself (from the NSPortMessage documentation for -sendBeforeDate:):
    "If the message cannot be sent immediately, the sending thread blocks until either the message is sent or aDate is reached. Sent messages are queued to minimize blocking, but failure can occur if multiple messages are sent to a port faster than the portís owner can receive them, causing the queue to fill up."
    InterThreadMessaging in fact calls -sendBeforeDate: and exposes the deadline option, so I tried setting a really short time-to-live on the Mach messages and then intercepted any NSPortTimeoutExceptions that were thrown; upon catching said exceptions, I would then re-queue up the message to be sent again. It worked, but Performance. Was. A. Dog. At least the message queue wouldn't be full indefinitely anymore, causing the main thread to block, but during the whole time that these messages were expiring because the queue was full and then being re-queued, either the main thread was trying to send more messages or the actor thread was trying to send more messages. And as far as I can tell, the Mach ports queue is global (at the very least, there is seemingly only one per process). The message would get through with this model...eventually.
    JUST IN CASE the problem happened to be something I screwed up as I was rewriting portions of the InterThreadMessaging library so that it would compile and work on the iPhone SDK, I substituted in the original version of the library in my Mac test app to see if any of these problems became non-issues. I found that both versions of the library -- mine and the original -- performed identically. So that wasn't it.
    Finally, in frustration I said, "screw it, I'm going to try it the Leopard way," and replaced all of the method calls I was making to InterThreadMessaging's -performSelector:withObject:inThread: with calls to Foundation's native -performSelector:onThread:withObject: instead, changing nothing else within my code in the process. And wouldn't you know: IT WORKED GREAT. Performance was (and is) fantastic, about on-par with the non-threaded version when only dealing with a single connection/instance of my class.
    So, in the end, I was able to do nothing to salvage the InterThreadMessaging implementation of cross-thread method calling, and as far as I can tell, I'm out of (good) options. And thus my mind is filled with questions:
    How is the Leopard -performSelector:onThread: method implemented? I'm guessing not using Mach ports, given that I didn't have the same blocking & deadlocking problems I had with InterThreadMessaging. Is it possible to re-implement this Leopard+ method in a similar manner as a category to NSObject under Tiger? Or is it possible, perhaps, to increase the size of the Mach ports queue so that InterThreadMessaging works at a sane level of performance? Or -- I'm getting desperate here -- is there any way that I could trick -performSelectorOnMainThread: to target a different thread instead? (I am assuming here that -performSelectorOnMainThread is implemented under-the-hood much like the new -performSelector:onThread: is implemented, but with a hard-coded NSThread pointer built-in to the code, and that the new method just exposes a more flexible interface to what is basically the same code. I'm probably wrong...) Is there another third-party library out there that I've missed that fits my requirements for being able to do message-passing between threads in an efficient and portable manner?
    I refuse to believe that there is no way for me to maintain compatibility with all of the platforms I wish to support without having to resort to making preprocessor #ifdef spaghetti out of my code. And there SURELY has to be a better way of doing cross-thread message passing in Tiger without using Distributed Objects, for Pete's sake! Is this really how people did it for years-on-end since the dawn of NeXT up until the advent of Leopard? And if there really, genuinely wasn't another alternative, then what is up with the lack of DO in iPhoneOS?? Does Apple seriously intend for developers who have good, solid, tested and working code to just chuck it all and start over? What if there was some aspect of DO that previous implementations relied upon that cannot be recreated with simple -performSelector:onThread: calls? (I don't know what those aspects would be...just a hypothetical.) I mean, I can understand needing to write new stuff from scratch for your UI given how radically different the interface is between the Mac and iPhone, but having to reimplement back-end guts such as something as elemental as threads...really?!
    I do laud the inclusion of the new method in Leopard as well as the new ability to subclass NSThread itself. But for those of us that need to support Tiger for one reason or another, some of these restrictions and omissions within iPhoneOS seem like rather pointless (and frustrating) roadblocks.
    As I hope is obvious here, I have tried to do my homework before throwing up my hands and pestering y'all. If you have the patience to deal with me, please tell me what I am missing.
    Thanks for taking the time to read,
    -- Nathan

    Thanks again for your patience. Comments below.
    etresoft wrote:
    It is pretty unusual that anyone would want to call perfomrSelector on any thread other than the main thread.
    What I described in my original post was not a worker thread, but an "actor."
    It is hard for me to answer this question because there are so many options available to do "message passing". The fact that you think there are so few tells me that you really aren't sure what you need to use.
    I didn't say there were few options for message passing. I said there were few options for message passing that fit my criteria, which are that any potential solutions should both A) work efficiently and with good performance, and B) be available both pre-Leopard AND on the iPhone. -performSelector: ain't available before Leopard. Distributed Objects is overkill. Kernel Mach messages apparently have a high overhead, too, as my experience with the third-party library I wrote about in my original message shows.
    ...consider notifications.
    I thought notifications couldn't be posted across threads, either. How do I post a notification to another thread's default notification center or notification queue from a different thread?
    The notification center is owned by the process. Each run loop can listen for just the notifications it wants. You don't "pass" or "send" notifications, you run then up the flagpole for all to see.
    I am aware of how to use notifications. The documentation for NSNotificationCenter clearly states that "In a multithreaded application, notifications are always delivered in the thread in which the notification was posted, which may not be the same thread in which an observer registered itself."
    So, again, I don't see how one thread can post a notification in such a way that the observer's registered method is executed in another thread (posting notifications "across threads"). This probably isn't a big deal if you are using mutexes (assuming you don't actually care which thread carries out the task associated with the notification posting), but as I said before, this is not what I'm after.
    I don't know what you are really after.
    Allow me to attempt to explain a second time, in a more concise fashion.
    My app will have multiple, persistent TCP connections open, one connection per remote device. The user will be able to select a task to execute on a particular device that we have a connection open to, and get back from the application real-time updates as to the progress or results of the execution of that task. In certain cases, the length of the task is infinite; it will keep executing forever and sending back results to my application which will update its display of the results every second that ticks by until the user STOPS that particular task.
    This can be done simply using async I/O in the main runloop, sure. But if I were going to thread this so that I could be processing the results I've received back from one *or more* remote devices while also doing something else, given that I will only have one (persistent) connection open to any given remote device that I'm interacting with (that is to say, I won't be opening up a separate TCP session for every single task I want to execute on a single device simultaneously), it makes sense _to me_ to implement this as I've described: with every connection to each remote device getting its own thread that lasts for the lifetime of the TCP session (which could be the entire time the application is running, times however many devices the user wishes to be connected to while in the app). I won't be spawning a new thread for every task the user wishes to ask a remote device to do.
    This is why (I think) I need bi-directional messaging between the main thread and each of these threads dedicated to a given remote device that we have an active session with/connection to. The main thread needs to be able to tell remote device X (which already has a running thread dedicated to it) to do task A, and then get real-time feedback from that remote device so that the main thread can be displaying it to the user as it is coming back. Same with remote device Y running task B, simultaneously. At any time during the execution of these tasks, the user needs to be able to tell my app to stop one of these tasks, and the main thread needs to send that message to one of the remote devices via that device's dedicated thread.
    This is why I am talking about this in terms of the "actor model," and not the "worker thread model," because the former model seems to fit what I want to do.
    -- Nathan

  • What's the best way to define some values based on the URL?

    Let's say for example I want all my URLs for servlets to take the form:
    http://mysite.com/module/action?arguments
    What's the most scalable way to handle mapping the values in place of "module" and "action"? For example, I might have a "forum" module and have an action to "deleteThread", called like so:
    http://mysite.com/forum/deleteThread?id=321
    I know I can just parse it myself, but is there a better way to handle this via some settings in web.xml or similar? All my requests go through a Front Controller which needs to know which module and action have been requested so that it can run the appropriate action controller.
    Cheers,
    Chris

    At the risk of repeat-posting, I'll clarify. Say I create a file named routing.xml which defines some routes like this:
    <routing-config>
      <route>
        <name>Standard rule</name>
        <description>
          This route maps the first two parts in the path with the module and action
        </description>
        <url-pattern>/:module/:action.do</url-pattern>
      </route>
      <route>
        <name>Default Index</name>
        <description>
          Allows the module to be specified without the action for "Index" actions.
        </description>
        <url-pattern>/:module.do</url-pattern>
        <request-parameters>
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
      <route>
        <name>Homepage</name>
        <description>
          Loads the Home page
        </description>
        <url-pattern>/</url-pattern>
        <request-parameters>
          <parameter key="module" value="Home" />
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
    </routing-config>The bits like ":module" which be represented by the actual name of the module in the URL. Does anyone know if something like this already exists? :)
    I wrote this exact same thing in PHP5 just a few weeks ago but I really don't have the motivation to write it all over again in Java :P On a side-note, things like this usually come with helpers for turning unclean URIs into clean URIs.

  • Is there an easy way to replace spry menus with jQuery menu system?

    I just learned that Adobe is no longer using spry or that spry does not work on mobile devices. My entire site (built in CS5.5 moved to CS6) is built with 3 different spry menu systems. I have been told about jQuery, and many other menu system options. I work in design view and can copy and paste code, read code etc...but cant write it to save my life.  I cannot seen to understsand how a different menu software system will integrate with DW especially when I use design view. My question is, is there an easy way to change my spry menu's? I have 2 spry menu bars, spry tabbed menus on EVERY page and a spry accordian menu that repeats on all pages. I am working with a template I built, so hopefully it is an easy fix.
    Any walkthrough help would be greatly appreciated. Below is the code for my template minus the div set up.
    </style>
    <script src="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <script src="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
    <script src="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/SpryAssets/SpryAccordion.js" type="text/javascript"></script>
    <link href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <link href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
    <link href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
    <!-- TemplateBeginEditable name="head" -->
    <!-- TemplateEndEditable -->
    </head>
    <body>
    <div id="container">
      <div id="search">
        <form action="http://www.cft-aft.org" method="get" onSubmit="Gsitesearch(this)">
    Search our website:<br />
    <input name="q" type="hidden" />
    <input name="qfront" type="text" style="width: 150px" /> <input type="submit" value="Search" />
    </form>
      </div>
      <div id="top_nav_bar">
        <ul id="FT" class="MenuBarHorizontal">
          <li><a href="../index.html">Home</a></li>
          <li><a href="#" class="MenuBarItemSubmenu">Quick Links</a>
            <ul>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/quicklinkpdf/cftfinal2010_1.pdf" target="_blank">CFT CBA</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/quicklinkpdf/acpsopfinagree2010.pdf" target="_blank">CFOP (previously ACPSOP) CBA</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/quicklinkpdf/cftsalaryschedule.pdf" target="_blank">CFT Salary Schedule</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/strs_sers" target="_blank">STRS - SERS</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/healthcare" target="_blank">Health Care</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/newsliners" target="_blank">CFT Newsliners</a></li>
            </ul>
          </li>
          <li><a href="../buildingreps.html" target="_blank" class="MenuBarItemSubmenu">For BR's</a>
            <ul>
              <li><a href="../pdf_br/handbook13.14.pdf" target="_blank">2013-14 Handbook</a></li>
              <li><a href="../pdf_br/grievance.pdf" target="_blank">Grievance Form</a></li>
              <li><a href="../br_forms/assault.doc" target="_blank">Assault Form</a></li>
              <li><a href="../br_forms/notifyassault.dot" target="_blank">Notification of Assault Form</a></li>
              <li><a href="../br_forms/assaultleaverequest.dot" target="_blank">Request for Assault Leave</a></li>
              <li><a href="../br_forms/prsnlpropdmg.dot" target="_blank">Personal Property Damage Report</a></li>
              <li><a href="../br_forms/tchrselectionpanel.doc" target="_blank">Teacher Selection Panel Form</a></li>
              <li><a href="../br_forms/chptmtgsign.doc" target="_blank">Chapter Meeting Sign In Sheet</a></li>
              <li><a href="../br_forms/chptrmtgrept.doc">Chapter Meeting Report</a></li>
            </ul>
          </li>
          <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/contact.html" target="blank" class="MenuBarItemSubmenu">Contact Us</a>
            <ul>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/cft_acpsop_office" target="_blank">Office Information</a></li>
              <li><a href="Staff" _mce_href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/cft_acpsop_office">Staff">f ile:///C|/Users/kelly/Desktop/website2/cft.acpsop/cft_acpsop_office">Staff Contacts</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/pdf_contact/directions.pdf" target="_blank">Directions</a></li>
            </ul>
          </li>
        </ul>
    <div align="center"></div>
      </div>
      <div id="fb">Content <a href="https://www.facebook.com/pages/Cincinnati-Federation-of-Teachers-Official/235429363160967" target="_blank"><img src="../images/facebooklogosm.gif" width="24" height="24" align="middle" /></a></div>
      <div id="header"><img src="file:///C|/Users/kelly/Desktop/PS images for web/banner.jpg" width="980" height="155" /></div>
      <div id="mid_nav_bar">
        <ul id="MenuBar2" class="MenuBarHorizontal">
          <li><a href="../unionbusiness.html" target="new" class="MenuBarItemSubmenu">Union Business</a>
            <ul>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/about" target="_blank">About Us</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/dues" target="_blank">Dues Structure</a></li>
              <li><a href="#" target="_blank">C.O.P.E</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/internal_comm" target="_blank">Internal Committees</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/joint_comm" target="_blank">Joint Committees</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">CFOP</a>
            <ul>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/acpsop" target="_blank">About ACPSOP</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/focus_newsletter" target="_blank">ACPSOP Newsletter</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/tuition_reim" target="_blank">Tuition Reimbursement</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/www.ohsers.org" target="_blank">SERS Updates</a></li>
              <li><a href="http://www.cincinnati-oh.gov/cityhr/pages/-4279-/" target="_blank">Civil Service Commission</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">CFT-R</a>
            <ul>
              <li><a href="#">About CFT-R</a></li>
              <li><a href="#">CFT-R Officers</a></li>
              <li><a href="#">CFT-R Meeting Schedule</a></li>
            </ul>
          </li>
          <li><a href="#" class="MenuBarItemSubmenu">Professional Issues</a>
            <ul>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/tes" target="_blank">Teacher Evaluation System</a></li>
              <li><a href="#" target="_blank">Common Core</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/cit" target="_blank">Career In Teaching</a></li>
              <li><a href="http://staffnet.cps-k12.org/Staffnet/ProfDevFund/" target="_blank">PD Fund</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/rttt" target="_blank">RttT</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/fft" target="_blank">Fund for Teachers</a></li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/resources" target="_blank">Resources</a></li>
            </ul>
          </li>
          <li><a class="MenuBarItemSubmenu" href="#">Affilliates</a>
            <ul>
                <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/www.aft.org" target="_blank">AFT</a>            </li>
              <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/www.oft-aft.org" target="_blank">OFT</a></li>
              <li><a href="http://www.cincinnatiaflcio.org/" target="_blank">AFL-CIO</a></li>
              <li><a href="http://ohio.gov/" target="_blank">State of Ohio</a></li>
              <li><a href="http://www.ode.state.oh.us" target="_blank">OH Dept of Ed (ODE)</a></li>
            </ul>
          </li>
          <li><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/forms" target="_blank">Forms/Documents</a>      </li>
        </ul>
      </div>
      <div id="left_fill"></div>
      <div id="news_zone"><!-- TemplateBeginEditable name="EditRegion3" -->
        <div id="TabbedPanels1" class="TabbedPanels">
          <ul class="TabbedPanelsTabGroup">
            <li class="TabbedPanelsTab" tabindex="0">Hot Topics</li>
            <li class="TabbedPanelsTab" tabindex="0">News Zone</li>
          </ul>
          <div class="TabbedPanelsContentGroup">
            <div class="TabbedPanelsContent">Content </div>
            <div class="TabbedPanelsContent">Content 2</div>
          </div>
        </div>
      <!-- TemplateEndEditable --></div>
      <div id="events">
        <div id="Accordion1" class="Accordion" tabindex="0">
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Events</div>
            <div class="AccordionPanelContent">Content 1</div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Announcements</div>
            <div class="AccordionPanelContent">Content 2</div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Meeting Dates</div>
            <div class="AccordionPanelContent">Content 3</div>
          </div>
        </div>
    </div>
      <div id="right_fill"></div>
      <div id="blue_line"></div>
      <div id="button_bar">
        <table width="880" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr valign="middle">
            <td height="96" align="center"><a href="mailto:[email protected]" target="_blank"><img src="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/images/kifbutton.jpg" width="242" height="72" border="0" align="middle" /></a></td>
            <td align="center"><a href="http://hq-afl.salsalabs.com/o/4013/c/505/getLocal.jsp" target="_blank"><img src="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/images/legislature.jpg" width="242" height="72" border="0" align="middle" /></a></td>
            <td align="center"><a href="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/get_involved.html"><img src="file:///C|/Users/kelly/Desktop/website2/cft.acpsop/images/getinvolved.jpg" width="242" height="72" border="0" align="middle" /></a></td>
          </tr>
        </table>
      </div>
      <div id="footer"><img src="../images/footer.jpg" width="980" height="75" /></div>
    </div>
    <script type="text/javascript">
    var MenuBar1 = new Spry.Widget.MenuBar("FT", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
    var Accordion1 = new Spry.Widget.Accordion("Accordion1");
    </script>
    </body>
    </html>
    Thanks in advance
    Kelly

    These  links point to files OUTSIDE your local site.  Did you define your site in DW?
    file:///C|/Users/kelly/Desktop/website2
    Nancy O.

  • Is there is a way to export the themes from iDVD to DVD Studio Pro?

    OK...so here's what I'm trying to find out: is there is a way to export the themes from iDVD to DVD Studio Pro? Or can I build the project in DVDSTPRO and import it to iDVD to build and burn?
    I've read several threads here and haven't come across my specific question. If I missed it, please copy me a link. Otherwise, I'd like to use the templates/themes in iDVD with my FCP project.
    I was thinking about importing the project from FCP to iDVD. Then, I thought about the markers etc....
    So, if anyone had an idea, tip or link, I'm all for it!
    Thanks!
    ron

    Importing iDVD Projects and Themes
    DVD Studio Pro 4 can import projects from iDVD 3 and iDVD 4. You can import an iDVD theme by using the theme in a project within iDVD and importing the project into DVD Studio Pro. When creating the project within iDVD, you do not need to use the final assets or make a complete project.
    Note: DVD Studio Pro will not import projects from iDVD 1, iDVD 2, and iDVD 5. In general, iDVD needs to be installed on the same system as DVD Studio Pro. An exception is if you import an iDVD 4 archive project.
    To import an iDVD project or archived project into DVD Studio Pro:
    1 Do one of the following:
    • Choose File > Open.
    • Press Command-O.
    2 Locate and select the iDVD project or iDVD 4 archive project in the Open dialog, then click Open.
    DVD Studio Pro imports the iDVD project.
    About the iDVD Project Import
    When DVD Studio Pro imports an iDVD 3 or iDVD 4 project or iDVD 4 archive project, it has standard locations it looks for to find the assets and themes used in the project. This is especially important if the project uses custom themes.
    The standard locations that DVD Studio Pro uses are (in this order):
    • iDVD project bundle: This is the file created when you save the project.
    • [user]/Library/iDVD/Favorites: This folder is located in your home folder.
    • [root]/Library/iDVD/Favorites: This folder is located at the root of your disk.
    • /Network/Library/iDVD/Favorites: This folder is on a network system specifically
    configured by your system administrator for this purpose. (This is not the same as having a server networked into your computer.)
    • iDVD application bundle: This is the iDVD application file that contains the default theme elements.
    Note: When you create an archive project in iDVD 4, you can choose to include the themes and encoded files. For the best portability, you should include both options. This results in a larger archive file, but ensures you can take the file to any DVD Studio Pro system and import it without missing assets. If you do not choose to include the themes and encoded files in the archive file, those assets must be available in one of the standard locations.
    If your project will have automatically-created chapter index (scene selection) menus based on markers embedded in the video, it can be easier to create these within iDVD prior to importing the project into DVD Studio Pro. This ensures the chapter index menus use the selected theme’s background and include arrow buttons to navigate between the menus.
    Important: To ensure all iDVD menu elements import correctly into DVD Studio Pro, you must navigate to each chapter index menu within iDVD before saving the project. This is also true for any menus you add to your iDVD project by clicking the Folder button.
    Issues With Importing iDVD Projects
    There are some issues to be aware of when you import iDVD projects:
    • If you import an iDVD project with DVD-ROM content, DVD Studio Pro does not update the settings in the Disc Inspector’s General tab to reflect the DVD-ROM content. You must manually select the DVD-ROM layout and choose the folder to include.
    • When you create a slideshow in iDVD, you can add arrow buttons to each still to provide viewers with an additional method of jumping to the previous and next stills. These arrow buttons are not imported when you import an iDVD project into DVD Studio Pro. The viewer must use the Previous and Next buttons on the DVD player’s remote control to jump between stills.
    • The button highlights used in iDVD may look different when imported into DVD Studio Pro. In most cases, the text in the buttons is set to be included in the highlight. Additionally, buttons that use an underline in iDVD will not have an underline when imported into DVD Studio Pro.
    • When you import an iDVD project, you may find that the button that is highlighted by default on some menus changes. During the project import, DVD Studio Pro numbers the buttons on each menu and highlights button 1 by default. You can assign any button on a menu to be the default button in the Menu tab in the Menu Inspector.
    • If you import an iDVD project that contains a drop zone configured as a slideshow and has multiple slides assigned to it, DVD Studio Pro only shows the slideshow’s first slide in the drop zone.
    Source: +DVD Studio Pro User Manual+

  • Is there a better way to add int arrays together?

    I'm working on a project that will add arrays of integer together...all element are nonnegative integers
    For example
    A = [0 1 2 3]
    I need to find an algorithm to find 2A= A + A, 3A = A+A+A....., hA = A +...A ( h times)
    For 2A, the result array will look like this
    2A = [ 0 1 2 3 1 2 3 4 2 3 4 5 3 4 5 6]
    Then using Array.sort(2A) i will have 2A= [ 0 1 1 2 2 2 3 3 3 3 4 4 4 5 5 6].
    Lastly I will write another code to get rid of repetitions to get the desired array 2A = [ 0 1 2 3 4 5 6]
    public static int[] hA(int[] a, int h){
       // mon = null;
       //mon = MonitorFactory.start("myFirstMonitor");
           if (h==1) return a;
           if (h==2){          
                  int[] b = new int[(a.length)*(a.length)];
               int count = 0;
               int maxa = a.length,maxb=b.length;
               for (int i = 0 ; i < maxa; i++)
               for (int j=0 ; j <maxa; j++)
                 b[count]=a[i]+a[j];
                    count++;
                return b;
               else
               return hA(a,h-1);     
           }I still don't know how to write recursive code to get it to find 3A, 4A....hA....
    is there any better way to do this?

    sorry for not defining it better
    2A ={ a + a' | a,a' E A}
    that means for A = { 0 1 3} , 2A ={ 0 1 2 3 4 6}
    but to get to [ 0 1 2 3 4 6], i don't know of any better way to achieve it.
    Also to find 3A = { a+a'+a'' |a,a',a'' E A}
    that means for A = { 0 1 3} ,3A={ 0 1 2 3 4 5 6 7 9}
    the idea is simple but to put into java code is not...at least for me

Maybe you are looking for

  • How can I do a clean install of Mac Mail client? ...

    ... without doing a clean reinstall of the entire OS? I've been wrestling with my Mac Mail client all day and am pretty sure I've got a corrupted file somewhere, either in the app or in the Home<Library folder somewhere. I've been using the mail app

  • Error when creating  connection to oracle db using Designer

    Hi guys, Iu2019m trying to create a new connection to an oracledb but keep getting the error u201Cdbd_oci file, specified procedure could not be foundu201D. Following is the installed software; u2022     Oracle 10g u2022     Oracle client 10g running

  • Photos not visible in iPhoto 6

    I'm a Mac newbie, and haven't been able to figure out the following situation. I transfered all of my .JPG files from my PC to the 'iPhoto Library' using my home network. Problem: I can't seem to see any of my pictures using iPhoto or other applicati

  • [resolved] cdrtools removed from AUR?

    Does anyone know why cdrtools (3.00 - the real belios version) was removed from the AUR, despite the fact that it was current? Last edited by IgnorantGuru (2011-01-11 14:37:35)

  • Missing image after publishing

    I published almost 50 courses in the earlier version if the presenter and never had this issue before. Now when I try in the latest version (6.2), something strange happens. The logo in the published files goes missing, while it still exists in the p