How to open JSP session from a java application or an applet?

Hi,
My problem is a bit challenging (at least for me) and its not about JSP but it is about a web application..
I couldnt find a better place to post this question I am sorry if this is not the right place to post it..
I need to enable users log into my website by checking username and password and reading and checking the data from a usb device located in client computer.
I can read from the device thorough JNI using the third party DLL file for the device... I have no problem with that..
Since I need to make native calls I am planning to develop a java application so I let the users open the application using web start.. Once my application is running on client side after reading the device and getting login password information (assuming login information correct), How can I open a web session for the that spesific user and a web browser and let the user browse the web site on his/her own session?
I would appreciate any guidance..
Thanks..

add the values in the header using...
response.addHeader("userNmae","XXXX");use it in all ur pages like say..
if(!request.getHeader("userName")!=null && request.getParameter("userName").equlas(""))
String username=request.getParameter("userName");
}

Similar Messages

  • How to open browser window from standalone Java Application???

    Is it possible to start Internet Explorer from non-applet application?

    Something like that could maybe help:
    Runtime.getRuntime.exec("iexplore http://www.google.com");
    but it's not platform independent + I couldn't let it work in that way. It only worked with Runtime.getRuntime.exec("c:\\windows\\....\\iexplore.exe http://www.google.com");
    But it's surely not platform independent.
    So the answer is in fact 'I don't know'.
    And if you ask why am I writing all that then, the answer is 'I don't know' too.
    And if you ask why...

  • Open default browser from a java application

    How is possible to make a java application that open an html file in the default browser ?
    Thankyou
    [email protected]

    You can do that by running the command "start <url>", for example using Runtime.exec().
    Runtime.getRuntime().exec("start http://java.sun.com");Jesper

  • How to run jsp pages  from webdynpro java

    Hi experts
         I want to run the jsp pages present in a webserver like tomcat or weblogic servers from webdynpro.Is there any way to run a jsp from webdynpro environment?
    Thanks and regards
    venkat kalyan

    hi Venkat,
    Check out this threads. They might be helpful
    Re: web dynpro jsp
    Re: Opening a jsp from another server(Weblogic) from webdynpro running on WAS
    Regards,
    Gopi

  • Opening an URL from a JAVA application

    hi,
    iam new to Java.
    Currently iam designing a simle GUI which takes input(URL) from user in a test field and has a button.Upon clicking button i want to open the webPage specified by that URL in a default webBrowser.
    How can i do that(opening webPage)?
    advanced thanks for your help.
    vd.rach

    getting an error on that line as follows: "unreported
    exception; must be caught or declared to be thrown".exec() throws IOException so catch it.
    try {
    Runtime.getRuntime.exec(...);
    catch(IOException e) {
    System.err("Cannot launch the browser: " + e.getMessage());
    }On the side note: I found javaworld's [url http://www.javaworld.com/javatips/jw-javatip66_p.html]solution most useful in serving this purpose in a project, even though its a little bit platform specific.

  • How to upload an attachment from webdynpro java application.

    Hi,
    Please assist me to create a View in WEBDYNPRO JAVA, which speaks about how to upload an attachment and save it in SAP
    Regards,
    Suri

    Well , first of all, I think you should search the SDN with keyword such as "upload files ".
    Here is the link of an article about upload and download files in WD.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/9076a593-2b08-2d10-2890-9a7078246ec4
    Hope that can help you.
    Regards
    Carfield

  • How to open a url from a desktop application

    Hi this may seem like a very easy question but all the topics online point to the following code....
    var url = "http://www.adobe,com";
        var urlReq = new air.URLRequest(url);
        air.navigateToURL(urlReq);
    However when I try to use this I keep getting an 1120 error saying that a definition for air could not be found.
    Can someone please give me some fast direction?

    I tried your suggestion...
    Then after hitting myself in the head multiple times I came to say thanks
    I really appreciate the help.

  • How to execute *.BAT file from  the Java Application

    Hello to all.
    I wants to run *.BAT file form my applicaion.
    Can u give the code of that two-four line,please
    Wating four your replay.
    Yours Friend
    Bhavin Shah.....

    pr = rt.exec("cmd.exe /c start " + yourProgramName)The exec() method executes the command you specify in the argument and returns a process. In this example, it's telling Windows to run "yourProgramName".
    HTH

  • How to execute a jsp instruction from a java class?

    How to execute a jsp instruction from a java class?
    Any help please.
    Thank's

    I'll detail my problem:
    Supposing that I have a jsp file called: start.jsp
    In the start.jsp I instanciated an object called global from the class Global ( for example ).
    Then, I called a custom taglib:
    <ix:mytag/>
    In the suitable tld file: the mytag is defined:
    <tag>
    <tag class>Tag1<.....
    The java file Tag1 has method:
    doStartTag(){
    // here is the problem
    global.doSomeFunctions();
    Okay, the problem is that the object gobal is not defined in the class Tag1. what to do?
    I think that I have to pass the object global as a parameter to the class Tag1. How to do that?
    Actually, the problem was to insert the follwoing in the doStartTag method:
    doStartTag(){
    pageContext.getOut().print("<%= hello world %>");
    The output is <%= hello world %> not hello world.
    Okay, the new problem is how to pass an object as a parameter to a class called from a tld file.
    Any help please.
    Thank's too much

  • How to store jsp session data of different user in util.hashmap

    how to store jsp session data of different user in java.util.hashmap
    and access the data of all user on the server side
    The same example is given in professional jsp but its not working.
    I can use getIds() of httpsessioncontext but it's depricated

    Hi
    I'm trying to make an example.
    With the following codes you can get the date from the session.
    request.getSession().getAttribute("sessionname")
    To store it in a hashmap you could do it like this ->
    Hashmap hm = new Hashmap();
    hm.put(Object key, request.getSession().getAttribute("sessionname"));
    I hope you understand it if not just write it!
    Cyrill

  • How to open "All Tabs" from previously shown pages history?

    Hi,
    How to open "All Tabs" from previously shown pages history. I am not asking about "Reopen from last session". I am asking about how to open all tabs from previous webpage links from a past date from history, currently its allowing me to select each page link manually by clicking it.
    Thank you!

    Select the first item you wish to open, scroll down to the last, Shift-click that one & all those between should be selected too. Double-click on them & they should all start to open... or you can copy & then drag/paste into a new or existing bookmarks folder.

  • How to open web pages from japplet??

    Hi
    Does anybody know how to open web pages from java japplet??
    Any help is apreciated!
    zick

    the getAppletContext() method of the Applet class will get you an AppletContext, with which you can call the ShowDocument(URL url) or ShowDocument(URL url, String target) method...
    check it out at http://java.sun.com/j2se/1.4/docs/api/java/applet/AppletContext.html
    have a good one :)
    Jay

  • How do i Hyperlink to a web page from a java application?

    How do i Hyperlink to a web page from a java application using internet explorer as my default web browser?

    It's very simple.You can start any Application with the class Runtime. The command is an array consisting of the path of .exe and the file to be open.
    String [] cmd={path of IE+Filename.exe,"URL of your website"}
    try
    Runtime.getRuntime().exec(cmd);
    catch (Exception e)
    System.err.println(e.toString());
    }

  • How to call pdf forms developed in ABAP from WD Java application?

    Hi
    I have a web dynpro ABAP application that that is responsible for generating PDF forms for all other applications (WD ABAP and WD Java).
    How can I call the pdf forms generated by the WD ABAP application from WD Java application in a separate window?
    These forms are to be called on click of a "Print" button. Also, these forms are non interactive.
    Kindly let me know if you need any other information.
    Regards
    Vineet Vikram
    Edited by: vineet vikram on Jun 24, 2009 7:28 AM

    in addtion to Nikhil's response. you can write following code on action of print button:
        IWDWindow window = wdComponentAPI.
            getWindowManager().createExternalWindow(
                  "<ABAP Application URL>",
                  "<Title for window>",
                  false);
       window.open();
    to Close the application, you can use the window close or u can fire an event to close current window.
    Abhinav

  • Opening a document from a Java app

    I need to open a document from my Java app. It is a .rtf file and I would like it to open with the system associated application for rtf files. How should I do that?
    I have tried to figure out the Runtime.exec(), but it doesn't do what I need. I have been able to open Notepad or WordPad (oh, yes, I am on a Win XT system) by specifying them in the exec function, but I can't find info on how to let the system choose the program.
    Thanks for your help.
    Wayne

    Take a look at the JDIC project
    https://jdic.dev.java.net/
    In particular the org.jdesktop.jdic.filetypes.AssociationService class
    https://jdic.dev.java.net/nonav/documentation/javadoc/0.9/index.html

Maybe you are looking for