Is it Possible in JSP

Hi!
i want to do a mini program in jsp page..
Actually i want to create 3 text box ..[CALCULATOR]
1 for giving frist number and another for giving 2nd number and 3rd for result..everything is to be done in same page..
i have tried ...but cant get result..pls give me suggestion..

manikandanmca wrote:
Hi!
i want to do a mini program in jsp page..
Actually i want to create 3 text box ..[CALCULATOR]
1 for giving frist number and another for giving 2nd number and 3rd for result..everything is to be done in same page..Sure, it is possible.
i have tried ...but cant get result..pls give me suggestion..Please post an SSCCE of what you've tried so that we can spot on the error.

Similar Messages

  • Is it possible for jsp(tomcat container)  access ejb deployed in sun app se

    if it's possible ,how to implement

    Hi,
    Yes it is possible for a JSP in tomcat container to lookup EJB in sun app server.
    Please refer following article for guidelines. If you need further help please revert back.
    http://www.onjava.com/pub/a/onjava/2003/02/12/ejb_tomcat.html?page=2
    HTH
    VJ

  • Is It Possible: Pass JSP Fragment To Tag, Parsing EL

    I just couldn't find if this was possible so can someone point me in the right direction.
    I've got a tag that is going to output some HTML. What I would like to do is to have that tag fetch a local JSP and have the tag print the contents of this tag out, processing any EL in that page using variables in the PageContext. Is this possible?
    E.g. Something along these lines?
    public int doStartTag() throws JspException {
      try {
        pageContext.setAttribute("config", ConfigServlet.getXmlConfig());
        InputStream inputStream = this.getClass()
          .getResourceAsStream("menu.jsp");  // How do I get the JSP???
        String jspBody = convertStreamToString(inputStream);
        pageContext.getOut().print(jspBody);
      } catch (IOException e) {
        LOGGER.error(e, e);
      return SKIP_BODY;
    }

    How we handle a similar requirement is with a bean or tag that gets the data as XML and then we use the x tags to apply an xslt to it.
    <%@taglib uri="/WEB-INF/sw.tld"  prefix="sw"%>
    <%@taglib uri="http://java.sun.com/jstl/xml"   prefix="x"%>
    <c:import var="xslDoc" url="/xslt/some.xsl"/>
    <sw:events sqlID="EventsByDate"   var="ListOfEvents" />
    <x:transform doc="${ListOfEvents}" xslt="${xslDoc}">
      <x:param name="someParameterInTheXSLT" value="someValue"/>
    </x:transform>

  • Is it possible to JSP Application get information from login server?

    Hi,
    Here, we gonna create a aplication using Portal for autentication and autorization.
    We gonna develop JSP pages to navigate into our application and we'll put them into portal.
    My question is, is it possible to the jsp's, created by us, to get information from the user loged on, so it can generate html's for each users?
    If so, how to do that?
    I know i can give access to the JSP's for each user, by creating portal objects for each of them, i'd like to know if the
    thanks everyone!

    No, if Firefox is set to delete browsing history when it closes, that data wouldn't be passed to the Sync server.

  • Possible Bug: jsp:plugin (Oct. 11g release)

    I'm trying to set the mayscript="true" property of Applet using <jsp:plugin type="applet"..., however in editor it is okay (shows in the intellisense popup) however at compilation, flags this attribute as an error.
    Any ideas?

    Liya,
    Could you possibly test it with 903 -preview. Or else if you have a simple test case I can test it for you.
    There have lot of fixes between 1022 and JDev RC2 and 903. Since it does reproduce in JDev RC2
    I am quite positive that it would reproduce on a later version of OC4J.
    ( The OC4J in JDev RC2 is a much later version than 1022)
    thanks,
    -Prasad

  • So far as possible configurable .jsp/sql application

    Hi together!
    Hope you can help me...
    I like to develop an jsp/sql application, which is so far as possible configurable.
    I mean, it should be possible to choose which database should be connected,
    which table should be displayed.
    Which fields at the front-end are editable, which Buttons should be displayed and so ...
    What for possibilities are there to build such a parametrisable application?
    Thanks...

    there are many possiblities, one way in which i have done something similar in the past is to use XML as definition. for example if you have a user role stored in an xml doc and the user logged in is of that role then your xml doc can also hold values such as the db name, table name, sql query that is applicable to that user.
    Make sense? if you have more specific questions post them here...
    hope this helps.

  • How can I use multiple row insert or update into DB in JSP?

    Hi all,
    pls help for my question.
    "How can I use multiple rows insert or update into DB in JSP?"
    I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
    With thanks,

    That isn't true. Different SQL databases have
    different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
    I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
    and there are also a lot of different ways of talking to
    SQL databases that are possible in JSP, from using
    plain old java.sql.* in scriptlets to using the
    jstlsql taglib. I've done maintenance on both, and
    they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
    Well, sure. As long as you only want to update rows
    with the same value in column 2. I had the impression
    he wanted to update a whole table. If he only meant
    update all rows with the same value in a given column
    with the same value, that's trivial. All updates do
    that. But as far as I know there's know way to update
    more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
    Unless you're using MySQL, for instance. I only have
    experience with MySQL and M$ SQL Server, so I don't
    know what PostgreSQL, Oracle, Sybase, DB2 and all the
    rest are capable of, but I know for sure that MySQL
    can insert multiple rows while SQL Server can't (or at
    least I've never seen the syntax for doing it if it
    does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
    Don't assume that all SQL databases are the same.
    They're not, and it can really screw you up badly if
    you assume you can deploy a project you've developed
    with one database in an environment where you have to
    use a different one. Even different versions of the
    same database can have huge differences. I recommend
    you get a copy of the O'Reilly book, SQL in a
    Nutshell. It covers the most common DBMSes and does a
    good job of pointing out the differences.Yes, I understand that.
    It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
    I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
    The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing.

  • How to convert the source code in JSP,HTML&BEANS into executable files?

    Sir,
    We are developing one s/w product in JSP,HTML&BEANS.Now we are in the implementation phase.During the time of Installation,without copying our source code in the customer's site I want to copy the executable files of the entire source codes? Is it possible in JSP,HTML&BEANS?

    In theory you can do it even with JSP but the you will be unable to run it on the standard JSP engine. :-)
    From other hand, all critical logic should be in the Java Beans or at least in custom tags but not in the JSP code. Then you can protect that code and leave JSP open because there is nothing to steal or break.

  • JSP Combo box question

    How can I make a combo box have the ability to add new items in its list? I have an existing combo box that gets its value from an SQL query. How can I let users have the ability to add to that list? If this is not possible with JSP combo boxes, any suggestions as to what field I may use? Thanks

    Hello Russ9754!
    Might be abit late, but I just read this thread.
    Anyway...I think I have what you are looking for.
    This code creates a dropdown box with the alternatives of your choice. If none of the options is good enough for the user, he/she can choose "other" and enter a more suitable choice in a pop-up javascriptprompt.
    <FORM NAME="formName">
    <SELECT NAME="country" onChange="countryOnChange();">
    <OPTION VALUE="Albania" selected>- = Albania = -</OPTION>
    <OPTION VALUE="Finland">- = Finland = -</OPTION>
    <OPTION VALUE="USA">- = USA = -</OPTION>
    <OPTION VALUE="Other"> Other... </
    OPTION>
    </SELECT>
    </FORM>
    <SCRIPT>
    function countryOnChange(){
    sel = document.formName.country.selectedIndex;
    val = document.formName.country.options[sel].
    value;
    len = document.formName.country.length;
    if (val == "Other"){
    var newcountry = prompt("Enter your country.", "");
    if (newcountry == null) { return; }
    document.formName.country.options[sel].text = newcountry;
    document.formName.country.options[sel].value = newcountry;
    document.formName.country.length = len +1;
    document.formName.country.options[len].text = "Other...";
    document.formName.country.options[len].value = "Other";
    </SCRIPT>

  • Class Cast Exception in JSP of the component

    Hi,
      I am trying to call a web service from the JSP of the component.I have written the java code as a scriplets in the JSP. The problem i am facing is Class Cast Exception. The code is as follows
    String strKey = "wsclients/proxies/sap.com/CCMSContentBroker/com.sap.ccmscontentbroker.CCMSContentProxy";
    java.lang.Object obj ;
    obj = context.lookup(strKey);
    str1 = obj.getClass().getName();
    ContentBroker objCB= null; 
    objCB = (ContentBroker)obj; // getting error here
    ContentBroker is an web service interface. The same code is working if i write it in the component but not in the scriplet of the JSP.
    Can't we do the type cast in the JSP ?
    Cant we call the web services in the JSP?
    How to eliminate this Class cast Exception in my code?
    Thanks and Regards,
    Saravanan

    Hi Harini,
             Thanks for your reply. I have checked all the import statements in the JSP.The problem is in the Type casting of object <b>obj</b> to ContentBroker variable <b>objCB</b>.
    Are u saying typr casting is not possible in JSP or organising imports in the JSP.
    These are my imports statements in the JSP
    <%@ page import = "java.util.ResourceBundle" %>
    <%@ page import = "com.sapportals.htmlb.*" %>
    <%@ page import = "com.intel.ccmt.ccmscontentbroker.* "%>
    <%@ page import = "com.intel.ccmt.ccmscontentbroker.types.* "%>
    <%@ page import = "com.sapportals.portal.prt.contentconversion.XSLConverter" %>
    <%@ page import = "com.sapportals.portal.prt.component.IPortalComponentRequest" %>
    <%@ page import="java.io.File" %>
    <%@ page import="javax.naming.Context" %>
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="javax.naming.NamingException" %>
    <%@ page import="java.util.StringTokenizer"%>
    Can u help me on rectifying this class cast Exception ?
    Thanks and Regards,
    Saravanan

  • How to download BLOB through JSP

    I am able to successfully insert BLOB in a table(ofcourse, Oracle db)..Now my problem is: If a user logs on to a web page and asks to download the .exe file,then, I should select that .exe file from the table(BLOB column) and should be able to download on his desktop..Is it possible thru' JSP??? I am able to download some jpg's but, they are corrupted after downloading..Can anybody help me on this?? Thanks in advance
    GOpikrishna.

    Try UploadBean JSP component. It includes JSP samples to upload files from a browser to a folder on server or into a database.
    http://www.javazoom.net/jzservlets/uploadbean/uploadbean.html
    I hope it helps.

  • How do i display every 10 Records in my JSP page??

    Hi..
    I have developed one web-page which shows ALL employee records fetched from a employee table and display them in my JSP page.
    It has contain more than 1000's of records. I need to display first 10 Records in my page. There should be some 4 links below the records display which get me to see next 10 records or previous 10 records or first 10 records or Last 10 records.
    IS it possible in JSP??
    This is my sample code for your ref:
    <jsp:useBean id="empOperation" class="com.venki.gen.EmployeeOperation" />
    <html>
    <head>
         <title>Stardeveloper : DataAccess JSP Tag</title>
         <style>
         p, td { font-family:Tahoma,Sans-Serif; font-size:8pt;
              padding-left:15; }
         </style>
    </head>
    <body>
    <p align="center"><u>DataAccess JSP Tag</u></p>
    <%
         EmployeeList empList[] = null;
         empList = empOperation.getEmployees(empName);
    %>
    <table align="center" border="0" width="90%" cellspacing="2" cellpadding="2">
    <tr bgcolor="#CCDDEE">
         <td>EMPNO</td>
         <td>EMP Name</td>
         <td>DESIGNATION</td>
    </tr>
    <%if(empList!=null)
         for(int i=0; i<empList.length; i++)
          EmployeeList emp = empList;%>
         <tr bgcolor="#F7F7F7">
         <td><%= emp.getEmpNo() %></td>
         <td><%= emp.getEmpName() %></td>
         <td><%= emp.getEmpDesignation()%></td>
         </tr>
         <% }%>
    </table>
    </body>
    </html>
    It would be extremely useful,if i know the technique how to display every 10 Records thru JSP.
    Waiting for You people valuable reply and code!
    Regards
    venki

    I do it by pages. i.e. http://example.com/page.jsp?page=1 would show records 1-10, ?page=2 would show records 11-20
    let's pretend each record is identified by one field in the database, `id`
    then the SQL query you'd use to grab the records could be..
    SELECT * FROM `your_table` WHERE `id` >= (page*10) and <= (page*10+10)or this might even work:
    SELECT * FROM `your_table` ORDER BY `id` ASC LIMIT (page*10),10(all examples untested as I'm at work :P)

  • Timer task (Time Schduling ) in JSP for hit/browse another site page

    Hi All ,
    I want to develope a JSP application which is run the perticular link in every 30 min.
    means i want to set the scheduling of 30 min which is browese(run) my another server link like http://nileshpatel.com/abc.jsp
    How can i do it OR Time Scheduling is possible in JSP?
    Thanks
    Nilesh Patel

    Yeah, I couldn't get it to work on the onLoad funtion either but it is probably a nested quote problem. Put it in a function and call that function from the onLoad event.
    <html>
    <head>
      <script type="text/javascript">
        function resubmit() {
          setTimeout("top.location.href='test.html'",3000);
          return true;
      </script>
    </head>
    <body onLoad="resubmit();">
    </body>Problems: This will only work if the user has the page with the above code opened when the 30min passes by. If they go to some other page, it won't work. If the user goes surfing around multiple pages with this code on it, the 30 minutes will be reset at each point the user gets to a new page.
    You are better off writing a normal Java application with a timer that runs as a service. Every 30 minutes it would trigger a browser to open the web page.

  • Multi-dimensional Arrays in JSP

    Hello,
    i am writing my first lines of JSP Code and need some help. what is up with Multi-dimensional Arrays in JSP? Is it possible in JSP? I tried to realise it like in JavaScript, without success.
    So, please help me :)
    Mark

    Hello,
    i am writing my first lines of JSP Code and need some
    help. what is up with Multi-dimensional Arrays in
    JSP? Is it possible in JSP? I tried to realise it
    like in JavaScript, without success.
    So, please help me :)
    Mark

  • Dynamic HTML elements with JSP?

    I need to have a row in a HTML page which contains of a combox and two text fields.
    Depending on what I select in the combox I have to insert another row (which contains another combox and two text fields) or I have to remove one or both text fields from the current row.
    Is that possible with JSP?
    Many thanks

    You can certainly accomplish what you're asking for in a jsp. One of the tricks you can use to solve your problem would be to pass variables back into the page using the Get method and catching the values using the request.getParameter() technique. One quick tip, you should wrap any request.getParameter() elements with a try catch, if you try to grab a parameter that hasn't been defined yet (and this is perfectly acceptable) you'll get a null returned.
    I hope this helps

Maybe you are looking for

  • Why is it so hard to get reqular updates to Service Requests

    I have a number of Service requests that have been running for a long while with no updates. That is despite my posting requests for updates and hanging for extended periods of time on the "chat" facility (usually in vain as no-one picks up the chat

  • Error while simulating the payroll

    Hi, While simulating the payroll, the log displays"Error while deriving the currency from table T001P & Error during initialization of payroll" Please help me to overcome this problem Thanks Shadeesh.G

  • Need iPhoto 8 or 9 for older iMac

    Installed a copy of Snow Leopard on my mother-in-law's 2007 computer, but had to wipe the HD, which as corrupted to do so.  I already tried to use her older bundled software to custom install the iPhoto software, but no luck.  The install program giv

  • Error on BED,AED,SED in MIGO

    Hi experts, When i am working on MIGO and if i enter the Excise values on item level ( BED,SED,ECS) i am getting a DUMP error. I have asked all the ABAPers and they are unaware of it. I am not sure if it is a ABAP enhancement problem or MM problem. T

  • How to make Image/size/resolution agree with metadata resolution?

    After scanning the help file a bit and searching thru this forum a bit with `metadata resolution' as search criteria, I'm still pretty confused about how it is supposed to work.. I may have never actually found the right part of the help file. Cuttin