URGENT-CREATE A HTML FILE WITH AN STRING INPUT FROM THE RUNNING JSP

I am designing a web page where the user enters a page after entering his/her login and password.The User should now be provided with a display page containing the servers that he has permissions for access.The servers that he has permissions are maintained in a database(a normal text file in UNIX).
Till now the program has been complete for displaying the servers that are available to him.
I need to create a HTML form containing these servers names in a check box so that when the user clicks thcheck box against the server name it should go to the server and get the password for the required server.
THe intention from me is to create a HTML file that dynamically takes values from the running JSP means the server names as a string value to its input and then i can continue
Please guide me in creating a HTML form based on the string output from the running JSP
FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
DataInputStream in1 = new DataInputStream(fs);
int fl=0;
while (in1.available() !=0)
String str1=in1.readLine();
StringTokenizer st1 = new StringTokenizer(str1);
String usernam=st1.nextToken();
if (usernam.equals(uname))
String ip=st1.nextToken();
String host=st1.nextToken();
fl=1;
out.println("<tr><td>                                                                                              "+ host + "</td><td> " + ip +"</td></tr>");
if (fl == 0)
out.println("YOU HAVE NO SEVRER IN YOUR PROFILE !");
in1.close();
The host string here is the server name
the ip is the ip address of the server
Need to input these values to another HTML page that contains the check box list of the servers .
once these are clicked i think i can pass on this to another JSP and retreive passwords
Please guide me in this

FileInputStream fs = new FileInputStream("/root/Auth_Application/User_Access_List");
                                DataInputStream in1 = new DataInputStream(fs);
                                int fl=0;
                                while (in1.available() !=0)
                                String str1=in1.readLine();
                                StringTokenizer st1 = new StringTokenizer(str1);
                                String usernam=st1.nextToken();
                                if (usernam.equals(uname))
                                String ip=st1.nextToken();
                                String host=st1.nextToken();
                                fl=1;
                                out.println("<tr><td>                                                                                              "+ host + "</td><td>          " + ip +"</td></tr>");
                                if (fl == 0)
                                out.println("YOU HAVE NO SERVER IN YOUR PROFILE !");
                                in1.close();I feel sorry for the inconvenience that is caused as i am new to using these forums.
I have here used a simple program to retreive the names of the servers that the users have acess to..
I have here read the servername and server ip stored from a file in UNIX in the running JSP.Now i need to pass these string variables to HTML file and display it in a Check box format.the strings host and ip have to be passed to the input of the HTML file so that they can further be processed once they are clicked using another JSP.
Can anybody please help me in Passing these strings from the running JSP and display it in a check box format

Similar Messages

  • Help Editing code from a published html file with flash detection enabled from flash

    hi guys ive publish a html file with flash detection enabled from flash
    heres the code from the publish html:
    <!-- saved from url=(0013)about:internet -->
    <html lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>main</title>
    <script language="javascript"> AC_FL_RunContent = 0; </script>
    <script language="javascript"> DetectFlashVer = 0; </script>
    <script src="AC_RunActiveContent.js" language="javascript"></script>
    <script language="JavaScript" type="text/javascript">
    <!--
    // Globals
    // Major version of Flash required
    var requiredMajorVersion = 9;
    // Minor version of Flash required
    var requiredMinorVersion = 0;
    // Revision of Flash required
    var requiredRevision = 45;
    // -->
    </script>
    </head>
    <body bgcolor="#ffffff">
    <!--url's used in the movie-->
    <!--text used in the movie-->
    <script language="JavaScript" type="text/javascript">
    <!--
    if (AC_FL_RunContent == 0 || DetectFlashVer == 0) {
         alert("This page requires AC_RunActiveContent.js.");
    } else {
         var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
         if(hasRightVersion) {  // if we've detected an acceptable version
              // embed the flash movie
              AC_FL_RunContent(
                   'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
                   'width', '800',
                   'height', '600',
                   'src', 'main',
                   'quality', 'high',
                   'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
                   'align', 'middle',
                   'play', 'true',
                   'loop', 'true',
                   'scale', 'showall',
                   'wmode', 'window',
                   'devicefont', 'false',
                   'id', 'main',
                   'bgcolor', '#ffffff',
                   'name', 'main',
                   'menu', 'true',
                   'allowScriptAccess','sameDomain',
                   'allowFullScreen','false',
                   'movie', 'main',
                   'salign', ''
                   ); //end AC code
         } else {  // flash is too old or we can't detect the plugin
              var alternateContent = 'Alternate HTML content should be placed here.'
                   + 'This content requires the Adobe Flash Player.'
                   + '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
              document.write(alternateContent);  // insert non-flash content
    // -->
    </script>
    <noscript>
         // Provide alternate content for browsers that do not support scripting
         // or for those that have scripting disabled.
           Alternate HTML content should be placed here. This content requires the Adobe Flash Player.
           <a href="http://www.macromedia.com/go/getflash/">Get Flash</a>
    </noscript>
    </body>
    </html>
    now since the default codes places my flash movie on upper left corner, ive made my own tables with the flash on it, how or where do i place this code to the upper codes?
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th valign="middle" scope="col"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <th height="600" bgcolor="#333333" scope="col"><script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','800','height','600','src','main','quality','high','pluginspage','http://www.adobe.com /shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','main' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="800" height="600">
              <param name="movie" value="main.swf">
              <param name="quality" value="high">
              <embed src="main.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="800" height="600"></embed>
            </object></noscript></th>
          </tr>
        </table></th>
      </tr>
      <tr>
        <td height="30" bgcolor="#990000"><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <th scope="col"><table width="800" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <th scope="col"><div align="left" class="style1">Copyright 2009 St. Paul of the Cross Parish. All Rights reserved.</div></th>
                <th width="400" scope="col"><div align="right" class="style1">Usage outside our permissions guidelines requires our prior written consent.</div></th>
              </tr>
            </table></th>
          </tr>
        </table></td>
      </tr>
    </table>
    Tnx in advance!

    Hi
    Can you tell me which version of dreamweaver you are using (and flash pro, if you have it), as the code you provided has element of a number of different versions (e.g. your js flash files are reasonably new, but your flash inserted into the html body is old, but with the cs3 version of flash player indicated!). Also the detect flash file is no longer required.
    PZ

  • In Labview, is there an easy way to implement a string input from the operator with a dialog box?

    I have a production test system that I want the operator to enter the serial number through a dialog box. As I've currently done it, there's a string control on the front panel to enter the serial number, but the program will run without it. Any helpful hints would be greatly appreciated.

    make a special vi with only the string as a control and a second string as an indicator connected to it. This string might be hidden after you connect this indicator to the connector. In the vi-properties select dialog and off you go.
    greetings from the Netherlands

  • Create a flat file with multiple characters for enclosures

    Hello,
    we use OWB 11g2 (11.2.02).
    Now we try to create a flat file with multiple characters for enclosures. The manual wrote:
    "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays commonenclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures."
    But it will not work. The OWB use the first character from the left enclosure definition as left enclosure and the second one as right enclosure !?!
    Did anyone know this behavior? Is there a solution for this problem?
    Thanks and regards
    Norbert

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • How to create a csv file with NCS attributes?

    Hi
    i installed Cisco Prime NCS and trying to perform bulk update of device credentials with csv file.
    How to create a csv file with all required attributes?
    This is part of NCS online help talking about this topic:
    Bulk Update Devices—To update the device credentials in a bulk, select Bulk Update Devices from the Select a command drop-down list. The Bulk Update Devices page appears.You can choose a CSV file.
    Note        The CSV file contains a list of devices to be updated, one device per line. Each line is a comma separated list of device attributes. The first line describes the attributes included. The IP address attribute is mandatory.
    Bellow is test csv file i created but does not work:
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    The error i am getting while importing this file:
    Missing mandatory field [ip_address] on header line:10.64.160.31,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    Assistance appreciated.

    It looks like the IP address field is incorrectly set.,
    It should be as follows
    {Device IP},{Device Subnet Mask}, etc etc
    so a practical example of the aboove could be (i dont know if this is completely correct after the IP address / Subnet Mask)
    10.64.160.31,255.255.255.0,v2c,2,10,snmpcomm,ssh,zeus,password,password,enablepwd,enablepwd,60
    below is a link to the documentation
    http://www.cisco.com/en/US/docs/wireless/ncs/1.0/configuration/guide/ctrlcfg.html#wp1840245
    HTH
    Darren

  • How do you create a jar file with txt and classes?

    Hey, I'm trying to create code to create a jar file with a text file, but I can't figure out how to add the text file. Here is what I have so far:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
            }It creates the .jar file with the correct manifest but I can't get it to write the test.txt or anything else into the jar file.
    -Gandolf
    Edited by: GanMatt on Jun 18, 2009 8:18 AM
    Edited by: GanMatt on Jun 18, 2009 8:19 AM

    Alright, my question has changed. Here's the code:
    try {
                // Name of jar file to write
                String archiveFile = "test.jar";
                Manifest jman = new Manifest();
                try {
                    // Create a manifest from a file
                    //InputStream fis = new FileInputStream("manifestfile");
                    //Manifest manifest = new Manifest(fis);
                    // Construct a string version of a manifest
                    StringBuffer sbuf = new StringBuffer();
                    sbuf.append("Manifest-Version: 1.0\n");
                    sbuf.append("Ant-Version: Apache Ant 1.7.1\n");
                    sbuf.append("Created-By: 1.5.0_19-137 (Apple Inc.)\n");
                    sbuf.append("Main-Class: Main\n");
                    sbuf.append("Class-Path: lib/swing-layout-1.0.3.jar\n");
                    sbuf.append("X-COMMENT: Main-Class will be added automatically by build\n");
                    // Convert the string to a input stream
                    InputStream is = new ByteArrayInputStream(sbuf.toString().getBytes("UTF-8"));
                    // Create the manifest
                    jman = new Manifest(is);
                } catch (IOException e) {
                FileOutputStream stream = new FileOutputStream(archiveFile, true);// archive file is jar file name
                JarOutputStream out = new JarOutputStream(stream, jman);
                out.putNextEntry(new JarEntry("test.txt"));
                out.write("Hi".getBytes());
                out.flush();
                out.closeEntry();
                out.close();
            } catch (Exception ex) {
                JOptionPane.showMessageDialog(this,ex.toString(),"BUG!",JOptionPane.INFORMATION_MESSAGE);
            }It creates the jar file with the txt file inside it, but I can't write "Hi" inside of the text file. Any ideas?
    -Gandolf

  • Can't create dynamic html elements with jsp????? important

    Hi All,
    I am having problem creating dynamic html elements with jsp tags, i have tried to use EL and java scriplet, both of them don't work.
    i am trying to create dynamic menu in my "rightMenu.jspf", based on, if user has logged in or not.
    some like this!
    <jsp:if test ="${validUser == null}">
    some simple text menu here
    </jsp:if>
    but it is not working. it simply loading all and images with in statement, regardless of whether user has logged in or not. i think some how if statement is not working properly.
    "validUser" is a session bean, which is not creating at this point, it will created when user will log in successfully. and also this session bean does not exist at the page, where i am trying to check that .
    Is there any way to create dynamic values in jsp. It is really important, is there any body who help me in this matter. i would be really grateful.
    zaman

    hi jaspre,
    thanks for replying me. you know what, is it not something wrong with web.xml file. i remember once, i deleted some from there, a property with "*.jsp". i can't remember what exactly was it though.
    all if statements works on files ending with extension ".jsp" but don't work only on with extension ".jspf". there must be to do with this.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>ValidateServlet</servlet-name>
    <servlet-class>ValidateServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ValidateServlet</servlet-name>
    <url-pattern>/ValidateServlet</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>pollAndCometEnabled</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    main.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if any one can figure it out. i would be grateful.
    zaman

  • I can't open a HTML file with flash linked

    I have Flash CS3.  I have created a flash file.  If I click on the SWF file I have no problems opening it.  It plays.  It looks nice.  I'm the man.
    However, now when I try to publish it, the HTML file will not work.  It says "windows cannot find this file, please ensure you have typed the location correctly".
    I am double clicking directly on the file and not typing anything, in fact I was considering checking on Ebay to see if I could upgrade my PC to have eyes.
    The feature has worked previously, which leads me to the conclusion that something else has changed.  I have tried using the publish setting, I have also tried using Dreamweaver to embed the file, and have also tried manually inserting the necessary code after seeing some on a website.
    All of these things produce the same result, windows cannot (or will not) find the necessary file.
    It's an odd one, and very frustrating, can anyone help me at all?
    Cheers in advance,
    Eoin

    Nope this doesn't work.  I wasn't using the default names previously but I can't see that it should make a difference, although Flash can be quirky.
    I tried putting them in a new location to no avail.
    Attached is a screenshot of the error message.

  • How to create a pdf file with CS5

    Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts.  Can someone please help me with this ?  The "help" button in CS5 doesn't seem to cover this question.  Nor do the FAQs.
    Thank you very much.

    Save As... Photoshop PDF.

  • To create 3 diff files with same content but with diff names in same target

    Hi SapAll.
    i have got a a requirement where pi need to create 3 different files with same content but with different names under same target from a single Idoc.
    its an IDOC to 3 File Inteface.
    can any body help me in providing the differnt solutions for this without use of any script executions.
    will be waiitng for response.
    regards.
    Varma

    > i want to use only one communication channel to produce 3 different file names with same content ,so here i should use only one message mapping in 3 operation mappings .
    This is not possible to produce 3 different file names with single CC. You have to use 3 different CCs. unless you have going to use some other trick e.g some script to rename the file etc..
    As I suggested in my previous reply use Multi-Mapping Or create 3 different Interface Mappings (by using the same MM).
    Note: You have to create 3 different Inbound Message Interfaces (you can use the same Inbound Message Type) otherwise while creating the 3 Interface Determination it won't allow because of same Outbound & Inbound Message Interface. It will simply say Interface alreday exists..
    So, just use the Multi-Mapping which is best solution in my opinion, because the benefit of using multi-mapping are:
    1. You have to create only single Message Mapping
    2. Single Interface Mapping
    3. Single Receiver Determination
    4. Single Interface Determination
    5. 3 Receiver CCs (3 you have to use in any case)
    6. Performance wise it is good (read the blog's last 2 para)
    7. And last but not the least easy to maintain the scenario.

  • Hi i have a learning HTML file with a data file include a swf files how can i open it in my ipad?

    hi i have a learning HTML file with a data file include a swf files how can i open it in my ipad?

    iPad do not support flash natively.
    Look in the app store, some browsers do support flash with limited functionality.

  • How to save HTML file with images present in the server to local machine

    Hi all
    In my application i have a option for the user to save HTML files with images present in the server. The HTML file is getting saved but the images are not being saved.
    The code i am using is below :-
    l
                        File fname = new File(filePath);
                        if(!fname.exists())                return;
                        FileInputStream istr = null;
                        OutputStream ostr = null;
                        response.setContentType("application/"+format);
                        response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
                        try { 
                             istr = new FileInputStream(fname);
                             ostr = response.getOutputStream();
                             int curByte=-1;
                             while( (curByte=istr.read()) !=-1)
                                  ostr.write(curByte);
                             ostr.flush();
    Can anyone suggest what i need to do
    regards

    The client should probably parse the html that comes down, and look for <img> links, and request those of the server as well.

  • Having problems: can't open an html file with textedit to change code

    Hi. I have been trying to open up both my index.html and my Welcome.html files with textedit in order to change the HTML codes for them - but it doesn't seem to work. When I open them using text edit I still get a discomboblutaed form of the web page and no html codes. HOWEVER when I open them with Word I can get at the HTML code. Will changing the code in Word work or must I use textedit to do it? ULtimately does anyone know how to fix the fact that your web URL always gets redirected to the home page because of the index file. For Instance, my web site is www.zanzibarhotelbeach.com but when you type that in it redirects to the opening page www.zanzibarhotelbeach.com/Home.html which is a problem for when you want to submit your web site to be found on the net. Any help would be MUCH appreciated! Cheers!

    Give TextWrangler a try. It's a free editor by the makers of BBEdit and is very well suited for editing HTML.
    But as far as your URL in the window, unless you have URL forwarding with masking you will always get the page name at the end of the URL in the browser's window. That's just how it works. With masking you will only get www.zanzibarhotelbeach.com in every window of the site. BUT visitors will only be able to bookmark the first page of your site. My tutorial site, http://toadstutorials.info/ is set up that way.
    This thread discusses how the different domain name forwarding works:
    http://discussions.apple.com/thread.jspa?threadID=1164519&tstart=0
    OT

  • I'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    i'm so confused!! I just want to create interactive pdf files (with video and flash files), but this free trial version is confusing!! help!?!

    Thanks for your suggestions. I checked to see if the options you suggested were set incorrectly but they were set to sync all. This led me to think the problem was actually in the iphone. I re-initialized the iphone and did not allow the system to restore any of the previous settings. In essence, I forced the phone to reset to factory settings. Then my video podcasts started syncing. All is well now. I did notice that I had seven podcasts selected that were "HD" presentations, and as such, are not compatible with the iphone. I don't know if this had anything to do with my earlier situation, but now I'm getting the video podcasts automatically. I'm happy. It wasn't much fun forcing the iphone to forget all of my preferences and I'm still customizing the phone now several days later. I think I have everything working and back to normal except I haven't identified any of my email accounts as of yet. Thanks for your help.

  • Problem saving HTML files with Windows 7

    I just got a new computer with Windows 7 and I installed my (old) Macromedia Dreamweaver MX.
    Everything seemed to be working normally until I hit "ctrl + s" to save my HTML file.
    It gave me this error message:
    Access to J:\Websites\MyWebsite\public_html\index.html was denied
    I then tried to save by going to File --> Save, and that didn't help either and gave me the same error message above.
    Can anyone help me out so that I can save my HTML files? I don't have the money at the moment to either upgrade or buy the newest version of Dreamweaver.
    Thank you.
    Cassie
    ([email protected])

    For Win7 PRO or greater
    http://www.microsoft.com/windows/virtual-pc/download.aspx
    Also... you MAY have a permissions problem... did you right click the EXE and choose running as Administrator?
    Other Win7 reading
    Win7 Help http://social.technet.microsoft.com/Forums/en-US/category/w7itpro/
    Win7 Configuration Article http://windowssecrets.com:80/comp/100218
    Win7 Monitor http://windowssecrets.com:80/comp/100304
    Win7 Optimizing http://www.blackviper.com/Windows_7/servicecfg.htm
    Win7 Adobe Notes http://kb2.adobe.com/cps/508/cpsid_50853.html#tech
    Win7 Adobe Update Server Problem http://forums.adobe.com/thread/586346?tstart=0
    Win7 Photoshop http://forums.adobe.com/thread/511916?tstart=0
    Processes http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
    Compatibility http://www.microsoft.com/windows/compatibility/windows-7/en-us/Default.aspx
    Win7 God Mode http://forums.adobe.com/thread/595255?tstart=0

Maybe you are looking for