JSP/javascript question. Guru's please help.

Need help.
I know we can assign value of a JSP variable to a javascript variable. e.g. strJScriptvar = <%=strJSPvar%>;
Is there a way we can go the other way, i.e. assigning a javascript variable value to a JSP variable?
e.g. will it be valid <%strJSPvar=%>=strJScriptvar;
If not, is there a direct way of assigning the value.
Any help will be heavily appreciated.
Thanks,
Indrasish.

Yeah, that's it. Remember that JSPs are compiled into servlets then sent as HTML to your browser. Once the page is sent to your browser, there is nothing else the "JSP" part of it can do. It's already been processed, done it's thing, and sent the results to your browser.
Make sense?

Similar Messages

  • Support ,​ ​ This is Thamer mohammad  ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .​ ​ Best wishes

    Support ,​
    This is Thamer mohammad
    ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .​
    Best wishes

    These boards aren't Apple Support; nobody here can reset the questions. Click here, phone Apple, and ask for the Account Security team, or fill out and submit this form.
    (90021)

  • I forgot my security questions can you please help me?

    i forgot my security question can you please help me?

    See Here > Apple ID: Contacting Apple for help with Apple ID account security
              Ask to speak with the Account Security Team...
    Or Email Here  >  Apple  Support  iTunes Store  Contact
    More Info >  Apple ID: All about Apple ID security questions
    Note:
    You can only set up and/or change a Rescue Email BEFORE you forget the questions/answers.

  • HT5312 Dear Apple Support ,  I can't remember my security question answers , so Please help me to Create new Security Question for my Account .  Best wishes

    Dear Apple Support , I can't remember my security question answers , so Please help me to Create new Security Question for my Account .  Best wishes
    <Email Edited by Host>

    Welcome to the user to User Technical Support Forum provided by Apple.
    Please do not post personal information on a Public Forum.
    I have requested the Hosts remove it for you
    For your issue...
    See Here > Apple ID: Contacting Apple for help with Apple ID account security
              Ask to speak with the Account Security Team...
    Or Email Here  >  Apple  Support  iTunes Store  Contact
    More Info >  Apple ID: All about Apple ID security questions
    Note:
    You can only set up and/or change a Rescue Email Before you forget the questions/answers.

  • Dear Apple Support ,  This is amany alnajjar ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .

    Dear Apple Support ,
    This is amany alnajjar ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .

    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • Dear Apple Support ,  This is FAHAD ALGORWAN ,I can't remember my security question answers , so Please help me to Create new Security Qu

    Dear Apple Support ,  This is FAHAD ALGORWAN ,I can't remember my security
    > question answers , so Please help me to Create new Security Qu

    Please do not make multiple posts. One is enough. These are user forums, so you are not speaking to Apple here.
    The Best Alternatives for Security Questions and Rescue Mail
        a. Send Apple an email request at: Apple - Support - iTunes Store - Contact Us.
        b. Call Apple Support in your country: Customer Service: Contact Apple support.
        c. Rescue email address and how to reset Apple ID security questions.

  • Dear Apple Support , This is ***Abdurrahman*** ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account . Best wishes,

    Dear Apple Support ,
    This is ***Abdurrahman*** ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .
    Best wishes,

    The people on these boards aren't Apple Support and can't do that for you. You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (102461)

  • I can't remember my security question answers , so Please help me to Create new Security Question for my Account .

    rt ,
    This is ***majed*** ,I can't remember my security question answers , so Please help me to Create new Security Question for my Account .
    Best wishes,

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then the steps half-way down this page give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact iTunes Support / Apple in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • I can't remember my security question answers , so please help me to Create new Security Question for my Account : ********  , Best wishes

    I can't remember my security question answers , so please help me to Create new Security Question for my Account : **********
    , Best wishes
    <Personal Information Edited by Host>

    We are fellow users here on these user-to-user forums, you're not talking to iTunes Support nor Apple - I've asked the hosts to remove your email address from your post (it's not a good idea to post personal info on any public forum).
    If you have a rescue email address (which is not the same thing as an alternate email address) on your account then the steps half-way down this page will give you a reset link on your account : http://support.apple.com/kb/HT5312
    If you don't have a rescue email address (you won't be able to add one until you can answer your questions) then you will need to contact Support in your country to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down the HT5312 link above to add a rescue email address for potential future use

  • Jsp database access using odbc - please help

    Hi friends,
    I�m trying a very simple database access program in jsp data base access using odbc. Odbc has to be used because thin driver or other drivers may not be available in every system of our college and as you know it's not that easy to make changes to those systems. My problem is so simple. I always get an exception in my program.
    My jsp content is as simple as:
    <%@ page import="java.lang.*,java.sql.*,java.io.*,registerbean" %>
    <jsp:useBean id="db" class="registerbean" scope="session"/>
    <%
    String str="insert into reg values('" + db.getName() + "','" + db.getUname() + "','" + db.getPass() + "'," + db.getAge() + ",'" + db.getSex() + "','" + db.getAdd() + "','" + db.getUgcourse() + "','" + db.getUgqual() + "'," + db.getPer() + ",'" + db.getIadd() + "')";
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:yogaesh","scott","tiger");
    Statement stmt=con.createStatement();
    stmt.executeUpdate(str);
    }catch(Exception e1){out.println(str);};
    %>
    the table reg has the structure:
    Name Null? Type
    CNAME VARCHAR2(20)
    UNAME VARCHAR2(20)
    CPSWD VARCHAR2(20)
    CONFPASS VARCHAR2(20)
    CAGE NUMBER
    CSEX VARCHAR2(5)
    CADD VARCHAR2(100)
    COURSE NUMBER
    CQUAL VARCHAR2(10)
    CPER NUMBER
    IADD VARCHAR2(100)
    The registerbean.java file is as below: (This seems to work fine because I tried printing the values using <%= %> tag and it worked out fine and moreover the query string is intact.)
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    public class registerbean
    private String name,uname,pass,cpass,age,sex,add,ugcourse,ugqual,per,iadd,otherugqual,ccode;
    public void setName(String a)
    name=a;
    public void setUname(String a)
    uname=a;
    public void setPass(String a)
    pass=a;
    public void setCpass(String a)
    cpass=a;
    public void setAge(String a)
    age=a;
    public void setSex(String a)
    sex=a;
    public void setAdd(String a)
    add=a;
    public void setOtherugqual(String a)
    otherugqual=a;
    public void setCcode(String a)
    ccode=a;
    public void setUgcourse(String a)
    ugcourse=a;
    public void setUgqual(String a)
    ugqual=a;
    public void setPer(String a)
    per=a;
    public void setIadd(String a)
    iadd=a;
    public String getName()
    return(name);
    public String getUname()
    return(uname);
    public String getPass()
    return(pass);
    public String getCpass()
    return(cpass);
    public String getAge()
    return(age);
    public String getCcode()
    return(ccode);
    public String getSex()
    return(sex);
    public String getAdd()
    return(add);
    public String getUgcourse()
    return(ugcourse);
    public String getUgqual()
    return(ugqual);
    public String getPer()
    return(per);
    public String getIadd()
    return(iadd);
    public String getOtherugqual()
    return(otherugqual);
    I initially thought the problem was with str but then str seems to be perfect and I get a string of the form �insert into reg values('c','c','c',98,'Male','c','B.Tech, Applied Artificial Neural Networks','HSC',9898,'h')� which I verified through a javascript debugger. The session scope used is to get values through the db bean from another jsp file. The problem is in the executeUpdate() line of this code. I even tried changing the updation table, but in vain. What could be done to rectify this? Please help me out and please do remember that I have no option but to use odbc.
    Thanks in advance.
    R. Yogaesh.

    I didn't verify the type of exception and i'm now going to do that, but then when the string is as perfect as needed, what is the need for a prepared statement? What is the basic difference between the two? And basically what is the problem with this piece of code which creates an exception? Please reply as soon as possible.
    Thankyou very much.
    R. Yogaesh.

  • Myfaces t:columns question...please help me...

    Hi guys,
    i've tried lots of solutions,but i think i've find right solution to solve my question.
    I have to create a datatable with a fixed number of columns and other dynamic columns.
    I've rendered it using t:columns of Myfaces and it works fine.
    It's a piece of jsp page
              <t:dataTable
        value="#{biosamplesTable.biosamples}"
        var="biosampleItem"
         binding="#{biosamplesTable.biosampleDataTable}"  >
        <h:column >
            <f:facet name="header">
                <h:outputText value="Organism" />
            </f:facet>
           <h:selectOneMenu value="#{biosampleItem.organism}">
                <f:selectItems value="#{getDropList.selectOrganism}"/>
           </h:selectOneMenu>
    etc..etc..   
            <t:columns value="#{biosamplesTable.columns}" var="col">
             <f:facet name="header">
                      <h:outputText value="Nuova" />
            </f:facet>
            <h:inputText value="#{biosampleItem.column}" />
        </t:columns>
         <h:column>
            <f:facet name="header">
                <h:outputText value="Actions" />
            </f:facet>
            <h:commandButton
            value="Invia dati biosample" actionListener="#{biosamplesTable.editBiosample}" id="editBiosample">
            </h:commandButton>
        </h:column>
    </t:dataTable>     
    </h:form>     
    }     My only question is:
    I'm able to retrieve the h:column values for each row,i do it in editBiosample method
    public void editBiosample(ActionEvent event) throws SQLException {
              setBiosampleItem((Biosample) getBiosampleDataTable().getRowData());
              try {
                   if (conn != null) {
                        Experiment exp = (Experiment) ViewUtils.eval("#{experiment}");
                        PreparedStatement pst3 = null;
                        pst3 = conn
                                  .prepareStatement("INSERT INTO  campione(id_,organismo,protocollotrattamento,metodoestrazione,tipoamplificazione,protocolloibridazione,protocollomarcatura)      VALUES(?,?,?,?,?,?,?)");
                        pst3.setInt(1, exp.getAutoKey());
                        pst3.setString(2, getBiosampleItem().getOrganism());
                        pst3.setString(3, getBiosampleItem().getTreatmentProtocol());
                        etc...
              pst3.executeUpdate();
              pst3.close();
              catch (Exception e) {
                   e.printStackTrace();
         }now i have to retrieve the h:columns values for each row,how can i do it?
    Please help me,i've started so but there is some error,each values is null!!
    For generating columns i've used..
    public List getColumns() throws Exception {
         if (load2 == 0) {
         for (int i = 0; i < 3; i++) {
              UIOutput input = new UIInput();
            ValueBinding myItem =
                FacesContext
                    .getCurrentInstance()
                        .getApplication()
                            .createValueBinding("#{biosampleItem[" + i + "]}");
            input.setValueBinding("value", myItem);
            UIColumn column = new UIColumn();
            column.getChildren().add(input);
              columns.add(column);
              load2=1;
         else this.columns=columns;
         // Reload after every request.
         return columns;
    }what's wrong?
    Please help me,i need to solve my problem...
    thanks in advance...
    Message was edited by:
    giubat
    Message was edited by:
    giubat

    Ok, you have more than one frame and when you make your dialog, it is only modal on one frame.
    Not sure how to make a workaround for that. That would proably require that when another frame got the focus, it should check if any of the frames has a modal dialog visible, and if that is the case, it should move the dialog to the front (dialog.toFront()).

  • IPhone 3g broken ,Genuis Bar Questions.  ****LONG**** PLEASE HELP

    Well i guess ill say the whole story. I bought my iPhone on August 6th and i had a plane to catch that day to Cali. So i synced it all up with my mac mini. My dad also got one and he went to Brazil (which is why im in Cali) While ive been here ive been syncing my iPhone with her windows computer to put apps on. Everything has been great until this week. Im calling it **** week. Ever since i updated to 2.0.2 its had no service most everywhere, apps and safari quit and when safari doesnt it runs extrememly slow and typing lag is worse then ever. I figured whatever maybe once i go back home it will start working again. Well thats not the case. Last night i was downloading apps and one of them got stuck when it was almost done installing. So synced it with my computer and it took it off.. well it still showed that it was installing. So i restarted my iPhone and it got stuck at the Apple logo(which is a common problem i know about the big thread also) so i restarted it and everytime it would go back to the Apple logo. I tried restoring it and everytime i plug it into my computer its makes my computer run extrememly slow and itunes wont come up. Then when i unplug it itunes pops up and everythings running normally. So after about 6 hours straight of trying to fix it, its now not turning on at all. Even when i plug it into a power outlet and computer. So basically i have a broken iPhone and its worthless. I have an appointment but im wondering if its even worth it.
    Genuis bar questions:
    1. Does the accoutn holder have to be present? Im on the account but not the account holder. My dad said to try.
    2. Will they try and hold my iphone? I cant leave it there because i have to leave that day.
    3. Would they just give me a new one? I would love that and not have to go through all this trouble
    Please help im stuck withotu a phone in the worst possible time.

    Jaden Hawk wrote:
    Genuis bar questions:
    1. Does the accoutn holder have to be present? Im on the account but not the account holder. My >dad said to try.
    No.
    2. Will they try and hold my iphone? I cant leave it there because i have to leave that day.
    No.
    3. Would they just give me a new one? I would love that and not have to go through all this trouble
    If there is a hardware problem with the iPhone they will replace it for you.
    You may want to update and restore the iPhone.
    http://docs.info.apple.com/article.html?artnum=305744
    Jason

  • I've got nothing(gray screen, question mark folder) Please Help!

    This problem is on my girlfriend’s computer, about the same as mine, PB G4 800mhz 768mb RAM, 10.4.x
    I am a competent user and this one has me worried…
    Problem
    Last night she goes to the computer sends an IM checks her e mail, watch some tv, goes back to the computer to look something up on line and its frozen, I do not recall if the mouse was visible but I don’t think there was a beach ball. She asks me what to do I said just give it a few minutes maybe it will process through what ever it is and be back to normal. We both forget to take a look at it before bed.
    This morning computer is still frozen/non-responsive and the fans are running... Shut down by holding down the power key. I try to re-start by pressing power key, screen lights up with gray background wait wait then the folder icon comes up with the question mark in it. This gets me worried.
    What I have tried
    I have tried to get it into target disc mode with my powerbook(computer B), I start up computer A holding down the T key and the screen goes to that moving firewire icon but the hard drive does not show up on my computer B.
    I tried unplugging it, removing the battery and re setting the pram
    I tried to run the hard ware test CD, but when I hold C to boot to the CD it spins up the disc and the little hardware test folder is in the middle of the screen but then it does not load any further. I had to shut down holding the power button. Computer would not eject CD so I had to start up and use unix eject cd command, this worked.
    I tried target disc mode again.
    I tried just a plain start up again.
    I do not have the 10.4 CD at my house so I have not tried to start from that yet, but I can borrow one from grandparents this evening after work, but I am worried since it will not start from the hardware test CD that it will not start from the system CD.
    I believe I have computer A backed up from either last week or the week before( I thought about doing it this weekend but did not get to it  ), she is not backed up daily as I am. Though she said there is quite a bit of important work from this past week.
    I have no idea what to do next or what the source of the problem could be(software or hardware). I fear the worst, but hope that you can share an idea that will turn out for the best!
    Please help me fix this computer, I can play with it some when I go home for lunch and then I need to get it fixed if possible this evening because she needs some important class work and grad school applications from it!
    Jerome

    So is the next step to try and re-format the drive and then use super duper to copy the back up over to that drive and then run disc utility and disc warrior on it? Which specs should I select for the re format, do they have to be the same as what is on my back up drive?
    Yes, reformatting the drive is the next step. Use your Panther installer discs, choose Mac OS Extended format, and check the box to install OS 9 drivers, just in case. The "Verified" SMART status is somewhat less reliable than a "Failing" status would have been: "Failing" definitely means trouble was detected, but "Verified" could just mean nothing seemed to be wrong right at the moment when you happened to ask. So if there's any trouble reformatting the drive, replace it: you shouldn't entrust anything important to it. If all goes smoothly with the reformat, the drive probably really is OK.
    What you can do with your backup depends on how you created it. If the backup is a bootable clone made with Carbon Copy Cloner or SuperDuper, you can clone it back to the reformatted drive the same way you created it in the first place, then add the extra files that were created or modified after you made the backup. If you just Finder-copied the drive to another drive, the backup isn't bootable, and copying it back onto the reformatted drive won't make that one bootable either: OS X isn't Finder-copyable. In that case, I really shouldn't advise you on reconstructing the former contents of the drive from your backup — my only experience of backing up OS X disks is by cloning, which eliminates all the hassles of making sure user accounts, passwords, permissions, etc. are transferred correctly to the backup, and then transferred correctly back to the original disk in a restore. Nearly four years after my adoption of OS X, I confess I'm still far more mystified by many aspects of it than I ever was by the old-time Mac OS.
    Message was edited by: eww

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

  • Severe Error when running sample jsp on Tomcat.. Please Help me!!

    I am trying to run a sample jsp that is provided in netbeans(5.5) on the bundled tomcat server (5.5.17) and i get the following error:
    SEVERE: Error initializing endpoint
    java.net.SocketException: Invalid argument: listen failed
    at java.net.PlainSocketImpl.socketListen(Native Method)
    at java.net.PlainSocketImpl.listen(PlainSocketImpl.java:374)
    at java.net.ServerSocket.bind(ServerSocket.java:320)
    at java.net.ServerSocket.<init>(ServerSocket.java:185)
    at java.net.ServerSocket.<init>(ServerSocket.java:141)
    at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:292)
    at org.apache.coyote.http11.Http11BaseProtocol.init(Http11BaseProtocol.java:138)
    at org.apache.catalina.connector.Connector.initialize(Connector.java:1016)
    at org.apache.catalina.core.StandardService.initialize(StandardService.java:580)
    at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:791)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:503)
    at org.apache.catalina.startup.Catalina.load(Catalina.java:523)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:266)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
    I've been trying to figure out why i get this error for a few days now, could someone please help me..
    thanks :)

    What machine are you trying to run it under? Is it a machine with a firewall or strict network settings?

  • HT5312 I forgot my Secret Question's answers please help me out!

    I forgot my secret Question's Answers I want to buy some app from Apple but it asks me my secret Questions answer that I forgot, please help me out!
    Thanks and Regards,
    emam

    Didn't the link to contact the iTunes Store staff in the 'Additional Information' section of that article work for you? If you don't already have a valid rescue email address, only Apple itself can assist with recovering lost answers.
    (88586)

Maybe you are looking for