What's the best way to do authentication in ssh?

struts2 spring 3hibernate.
Now I wanna do login authentication over some protected resource, page or action. That being said, the page will redirect to login page if you access some protected resource without a login .There are 3 ways I can think of:
1. Use struts interceptor, the weak points are you have to configure for every protected action, and jsp pages can't be applied.
2. Use spring interceptor, the weak points are you still can't get jsp applied and get http session in the interceptor.
3.Use filter coming with Java EE. But the problem is url-pattern only supports wildcards , I just want to assign some certain protected jsp or action specifically, not all.
So who can offer a best practice for that? thanks a lot.
Edited by: fxbird2 on May 31, 2010 6:13 AM

Take a look at Spring Security. BTW, I assume you mean SSL and not SSH.
- Saish

Similar Messages

  • What is the best way to secure and harden a Macbook Pro against unwanted surveillance?

    What is the best way to secure and harden a Macbook Pro against unwanted surveillance? Tor, VPN, Little Snitch, etc. This would be for that latest version of Mavericks.

    djbabybokchoy wrote:
    Nothing specific, just speaking in general. Ex-wives, governments, bad guys...anyone really. I'm just looking to make my Mac a bit more private and secure, especially when on public networks.
    Governments and ex's will/may have recourse to the legal process (or in the case of the Gov they can choose to ignore the legal system if they feel like it) when they want to see something of yours, good luck hardening your Mac against that. The best way to avoid the possibility of snooping over public networks is to avoid them but if you can't then Kappy's suggestion will help.
    Strong passwords (everywhere) and don't use the same password in multiple locations.
    If you really want to secure your home wireless use Mac address connection authentication, do not allow unknown Mac addresses to connect. It's much stronger than a WPA password alone.

  • What is the best way of accessing application module without page binding?

    Hi All
    I am using Jdeveloper 11g R2 (11.1.2.3) & Weblogic 10.3.5.0
    What is the best way of accessing application module without page binding?
    In my application after user authenticated from LDAP
    I need to read some information from database and set my menues.
    Thanks
    Mohsen

    Hi,
    if you don't have a binding the I am not sure the binding context is created. Anyway, try
    BindingContext.getCurrent().findDataControl("name here as ID in DataBindings.cpx") and see if it returns a valid instance
    Frank

  • What is the best way to call SSH commands through Java technologies

    What is the best way to call SSH commands through Java technologies

    I don't think you can specify the password at the prompt using ssh. Plink has the -pw command option for passwords. What I did was except ssh to ask me and write the password programmatically through the outputStream I obtained from my Process object. I looked for "password: ", and then wrote the password with a trailing newline.
    Both plink and ssh will also ask if you trust the host if it is the first time you are connecting to it. So before just writing the password, check if the program wants verification from you: normally supplying "y" or "n". This should only have to happen the first time the client connects. It looks like thisPLINK:
    The server's host key is not cached in the registry. You
    have no guarantee that the server is the computer you
    think it is.
    The server's key fingerprint is:
    1024 f8:43:61:4c:a2:5b:77:be:5b:a7:bb:1f:f7:79:b3:b7
    If you trust this host, enter "y" to add the key to
    PuTTY's cache and carry on connecting.
    If you want to carry on connecting just once, without
    adding the key to the cache, enter "n".
    If you do not trust this host, press Return to abandon the
    connection.
    Store key in cache? (y/n)
    SSH:
    The authenticity of host '127.0.0.1 (127.0.0.1)' can't be established.
    RSA key fingerprint is e1:02:13:c8:52:c2:23:41:9b:5b:58:2c:18:e6:59:af.
    Are you sure you want to continue connecting (yes/no)?What I did was read character by character from the inputStream until I found things of interest ... like "password: ". You only need to search for this in your method which will launch the ssh or plink Process. Once you have verifyed yourself, you can just pass commands to the Process, which is an ssh connection.
    My suggestion is to read() each byte from the Process's inputStream and write it to stdout. Look and see what you need to be looking for so you can interactive with the program correctly. You can't use readLine here becuase when the ssh asks for the password it does not print a newline. I do know for sure, that ssh will simply print, "passowrd: ". Plink will print this as well if the -pw option is not supplied.

  • What is the best way to set up iTunes on our home network so all family members have access to all of our itunes library, even music we don't have on the cloud?

    I have five different people using 10 different apple devices on one itunes account in our family.  We have had trouble sharing.  What is the best way to set up itunes on our home network?  We have purchased music that sits on icloud, but we also have music we have imported from our previous cd library.  Our itunes program keeps crashing and dumping everyone's playlists.  So far we have all been using just the one desktop computer to sync to because we can't figure out how to share the same librarly and playlists on multiple computers in our home so devices can be synced at any location as well as playlists and purchases be made. 

    What is the best way to set up itunes on our home network? 
    One iTunes library per person.  One iTunes account per person.
    If people wish to share songs, they can make copies.
    When the inevitable day comes when the kids get older, you will not have to come back here and post asking how all that stuff can get separated!

  • HT1349 I lost/had my iPhone stolen. Tried using Find My iPhone and it's offline. It was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Tried using Find My iPhone and it's offline. It (Find my iPhone) was set up. What do I do now? Do I report it stolen? What is the best way in getting back my iPhone if any? Thank you in advance.

    Find My iPhone is good for misplaced iPhone but not good for thief and it was never meant to be.
    You chance of getting it back is very small.
    There are a few things you can try.
    Try remote lock/wipe your iPhone through Find My iPhone.
    https://www.icloud.com
    You can report to the police, cell carrier (expensive cell charges for international calls, roaming etc)
    Change all the passwords used in iPhone: Apple ID, E-mail, Bank Account ....
    http://support.apple.com/kb/HT2526

  • What is the best way to read and manipulate large data in excel files and show them in Sharepoint

    Hi ,
    I have a large excel file that has 700,000 records in it. The excel file has a few columns that change every day.
    What is the best way to read the data form the excel file in fastest and most efficient way.
    2 nd Problem,
    I have one excel file that has many rows each row contain some data that has certain keywords.
    What I want is  to segregate the data of rows into respective sheets(tabs ) in the workbook.
    for example in rows have following data 
    1. Alfa
    2beta
    3 gama
    4beta
    5gama
    6gama
    7alfa
    in excel
    I want there to be 3 tabs now with each of the key words alfa beta and gamma.

    Hi,
    I don't really see any better options for SharePoint. SharePoint use other production called 'Office Web App' to allow users to view/edit Microsoft Office documents (word, excel etc.). But the web version of excel doesn't support that much records as well
    as there's size limitations (probably the default max size is 10MB).
    Regarding second problem, I think you need some custom solutions (like a SharePoint timer job/webpart ) to read and present data.
    However, if you can reduce the excel file records to something near 16k (which is supported rows in web version of excel) then you can use SharePoint Excel service to refresh data automatically in the excel file in SharePoint from some external sources.
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com

  • Custom Report : What is the best way ?

    Hi!
    My customer doesn't like native TestStand 's report layout. He would prefer something like the example enclosed to this post.
    What is the best way to achieve this ?
    XSL customizing (seems heavy work) ?
    Using the report generation toolkit  and a Word template ?
    Any other idea ?
    Attachments:
    Report Style.JPG ‏115 KB

    Have you examined all of the examples found in the TestStand help:

  • I have an old 30" apple cinema display (2005) I want to use as a 2nd monitor to a new iMac (2012).  I don't just want mirror image of iMac; what's the best way to do this?

    I have not bought the iMac yet but will do so very soon and just want to make sure I have what I need to get everything setup including adding the old faithful 2005 30" cinema display.  Currently I am driving the old 30" cinema display with a macbook pro also purchased 2005 and happy to say I got a lot of good miles out of this rig.  What's the best way to connect the old 30" monitor as a second display for the new generation iMacs?
    Other Questions
    I can find online new in unopened box a 2012 iMac 27" i7 with 1T Fusion Drive for $1899 no sales tax.  This seems like a pretty good deal since I notice the same is available from Apple refurbished for $100 more plus sales tax.  I know that they say the Fusion drive is a lot faster on 2013 models but some of the speed tests I reviewed online showed the 2012 i7 and 2013 i7 very close on speed for both storage and processing.  Any thoughts?
    I don't like changing batteries so I would buy a separate Apple keyboard with numeric pad since it only comes with wireless keyboard.  I'm a trackpad enthusiast having been using my macbook pro trackpad with current set up; and I am prepared to buy the Apple trackpad and replace batteries every 2 months but I would greatly prefer USB connection and rechargeable trackpact.  I know Logitech makes one so if anyone is using and knows how it compares to Apple's I'm all ears. 

    <http://support.apple.com/kb/HT5891>
    You can use USB for the Apple trackpad.
    <http://www.mobeetechnology.com/the-power-bar.html>

  • I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?

    I am trying to rebuild my iPhoto library and noticed my backup contains aliases (pointers?) and not the actual file. What's the best way to rebuild my library?
    Facts:
    In moving to a new iMac, I copied the iPhoto library to an external HDD assuming that I would point the new iMac to the backed up iPhoto Library
    All worked fine when I pointed the new library but noticed that some folders contained aliases and not the original file. So when I attempt to open that photo it can't find it because the alias is pointing to another drive.
    I do have all original photos from a couple of external HDDs. In the folders titled, "Originals" (from older versions of iPhoto) and "Masters" (from current iPhoto)
    I'm thinking I can create a new folder and drop the original files and make that my new iPhoto library. Is there a better way to rebuild my library? I do not want to create any future aliases.
    Thanks in advance for any help!

    do you have a strongly recommended default "managed" library (the iPhoto preference to "copy imported items to the iPhoto library is in its checked state) or a referenced library - you have unchecked that option?
    It sounds like you have a referenced library and are now experiancing one of the very siginificant drawbacks of a referenced library and one of the many reasons they are strongly not recommended
    Also note that iPhoto '11 may use alises in the originals folder as part of the upgrade
    It is important that we understand exactly what you have and what is not sorking - what error messages you are getting
    You must NEVER make any changes of any sort to the structure of content of the iPhoto library - there are no user servicable parts in it  --  and you can not rebuild yoru librtary - only iPhoto ir iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  can rebuild a library unless you are a SQL programmer and understand the structure that iPhoto uses
    LN

  • What is the best way to open emails and attachments without using wifi?

    For I-phone and I-pad, what is the best way to open emails and attachments without using wifi?  I turned off wifi in my settings but my boss thinks there may be another way and a better way to use something else instead of wifi.  Any help would be appreciated!  Thank you!

    Thanks!  That is a very good question you post.  My boss asked me that and I am assuming that he is having issues with using wifi wherever he is at.  My boss is the kind of person that when he asks something you look into it and ask him no questions...he's the only one asking questions!  But thank you for your response I will tell him the information you told me and hopefully that will help!

  • What is the best way to open a HTTPS connection?

    What is the best way to open a HTTPS connection and retrieve the content as XML? This is how most of the online API is done nowadays, how can this be done on the iphone SDK?
    Thanks

    Have a look at the SeismicXML example that comes with the iPhone SDK. It uses http instead of https but it may work for you.
    You can also look at the NSURLRequest and NSURLConnection classes.
    Enjoy.

  • What is the best way to work with Word documents in The InDesign CS4???

    I work in Microsoft Word 2007 and all my documents have *.doc format.
    What is the best way to work with Word documents in InDesign CS4???
    David Blatner says to avoid copying and pasting text from Word instead of placing it (Ctrl+D).
    How about pasting RTF or Text Document???
    I want to make book's layout in ID CS4 and its main feature is that there is the left page with text and the right - with graphics.
    So, as I understand to place the text on each page I must create for example 70 Word documents and place each item on 70 left pages???
    It loks like wasting time. I sthere another way of making such layout???  What kind????

    It's best to place any text.
    You can have all of your text in one file and use auto-flow to add threaded text frames and pages as required (Hold down the Shift key when you click the loaded text cursor), but it's a little non-standard to have the thread only on one side of the spread from the auto-flow perspective, so you'll have to set up properly.
    This is one case where a master text frame will work to your advantage. On your master page spread, add a text frame to the left page, but not to the right (or at least not threaded to one on the right -- for some other project you might actually want two independent text threads). Hold the loaded cursor over a frame on the left side of a document page and auto-flow. ID will add new spreads as necessary, but only put the text on the left side.
    Peter

  • What is the best way to verify default heap size in Java

    Hi All,
    What is the best way to verify default heap size in Java ? does it vary over JVM to JVM . I was reading this article http://javarevisited.blogspot.sg/2011/05/java-heap-space-memory-size-jvm.html , and it says default size is 128 MB but When I run following code :
    public static void main(String args[]) {
    int MB = 1024*1024;
    System.out.println(Runtime.getRuntime().totalMemory()/MB);
    It print "870" i.e. 870 MB.
    I am bit confused, what is the best way to verify default heap size in any JVM ?
    Edited by: 938864 on Jun 5, 2012 11:16 PM

    938864 wrote:
    Hi Kayaman,
    Sorry but I don't agree with you on verification part, Why not I can verify it ? to me default means value when I don't specify -Xms and -Xmx and by the way I was testing that program on 32 bit JRE 1.6 on Windows. I am also curious significant difference between 128MB and 870MB I saw, do you see anything obviously wrong ?That spec is outdated. Since Java 6 update 18 (Sun/Oracle implementation) the default maximum heap space is calculated based on total memory availability, but never more than 1GB on 32 bits JVMs / client VMs. On a 64 bits server VM the default can go as high as 32gb.
    The best way to verify ANYTHING is to address multiple sources of information and especially those produced by the source, not some page you find on the big bad internet. Even wikipedia is a whole lot better than any random internet site IMO. That's common sense, I can't believe you put much thought into it that you have to ask in a forum.

  • What is the best way to make a HDMI connection?

    I have a 13" Macbook Pro, bought in late 2011, therefore I have the Thunderbolt port. I do not think it has a mini DVI port. Therefore my question is what is the best way to connect this great Mac to a HDTV using an HDMI port on the TV?

    To connect MBP to HDMI monitor or TV via Thunderbolt port, use mini DisplayPort-to-HDMI adapter and HDMI cable. Thunderbolt port is mini-DisplayPort compatible. If you get the adaptor that supports video and audio signal, both will be forwarded to your monitor or TV. Search the Apple store.

Maybe you are looking for