Problem  in merging java script and java code

hi,
i want to merge java and javascript code but it is giving some surprising results.
this is my code:
<script language = "javascript">
<%
String query_result= "1";
String buttontype="";
buttontype=(String)session.getAttribute("buttontype");
query_result = (String) session.getAttribute("query_result");
out.println(query_result);
if(buttontype!=null&&(buttontype.equals("submit")))
out.println(buttontype);
%>
alert(<%=ka%>)
</script>
<%
%>
now if i'll move "<script language = "javascript">" to:
<%
String query_result= "1";
String buttontype="";
buttontype=(String)session.getAttribute("buttontype");
query_result = (String) session.getAttribute("query_result");
out.println(query_result);*/
if(buttontype!=null&&(buttontype.equals("submit")))
out.println(buttontype);
%>
<script language = "javascript">
alert(<%=query_result%>)
</script>
<%
%>
then it prints correctly and gives alert "1" but if i'll change query_result="manish" then it is not giving alert also
i don't know wht is happening
plz help me out
manish

hi pgeuen,
Thanx for ur reply
now its working i have changed my jsp exp. tag to
alert("\"<%=ka%>\"")
and it is displaying correctly.
and if i'll give the scripting tags in "if block"then it will work but till now i didn't get why i was not getting any output when the scripting tags covers the whole jsp code. i think we can mix java script and jsp in any way.
well thanx a lot.
manish

Similar Messages

  • What're the differences between JSP, Java Script, and Java Applet?

    I am confused by the concepts: JSP (Java Server Page), Java Script, and Java Applet? What are their main differences?

    I don't know about differences, but one of their main similarities is that each of them has a page in Wikipedia.
    JSP
    JavaScript
    [Java applet|http://en.wikipedia.org/wiki/Java_applet]
    There. That should give you enough information.

  • What is java script and how do I enable it?

    What is java script and how do I enable it

    JavaScript is enabled by default for Adobe Reader for iOS, and I don't see that there's a way to disable it. It is currently used within a document to control the behavior of form fields, such as automatic formatting and calculations. Only a small subset of what's available in the desktop version is available in the mobile versions.

  • Java Mail and Java Activator

    I have problems to deploy the API's Java Mail and Java Activator
    into Oracle 8.1.5 on a NT4 server.
    When deploying the classes in the API's that has names beginning
    with "com/sun/java..." everything works fine, but when trying to
    deploy the classes starting with "javax..." I get error:
    "ORA-01031 Unsufficient privileges."
    The error occurs during the creation of the classes.
    Does someone know why?
    I have tried to unjar the jar-files, and rejar them again with
    no compression, but this does not help.
    /Lars-Eric
    null

    Hi Mark
    I wish to send email messages from stored procedure. I looked at
    the "Java Stored Procedures Developer's Guide" but I am still
    confused. I wrote a Java program (importing "javax.mail" package)
    and then I called "loadjava": it did not work
    I read this reply, but I do not understand exactly what you mean.
    I am quite new to Oracle, and there are "tons" of things which I
    do not understand.
    Would you please explain me what I have to do to send email from
    a stored procedure?
    Thanks in advance, Carlo
    email: [email protected]
    PS: Sorry for my bad English
    mark tomlinson (guest) wrote:
    : In addition to loading JavaMail as sys in the database. You
    also
    : need to load the "invocation framework" that JavaMail depends
    on
    : (there is a link on the Javasoft JavaMail site to download the
    : code).
    : When you load java code as SYS you can pass the -s and -g
    public
    : options to loadjava to make sure that public synonyms are
    created
    : and that the loaded classes are runnable by all schemas:
    null

  • Differnet Charting behaviour between Java 7 and Java 8

    Hi I've developed an application with charts in Java FX and Java 7. Everything works fine, but now I've tested it with Java 8. There I can see, that something must have changed in the way a chart wil be painted.
    The following code will describe the problem. Execute it with Java 7 and Java 8 and you will see what I mean.
    package linechartsample;
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.chart.AreaChart;
    import javafx.scene.chart.LineChart;
    import javafx.scene.chart.NumberAxis;
    import javafx.scene.chart.XYChart;
    import javafx.stage.Stage;
    public class LineChartSample extends Application {
    @Override
    public void start(Stage stage) {
    stage.setTitle("Line Chart Sample");
    final NumberAxis xAxis = new NumberAxis();
    final NumberAxis yAxis = new NumberAxis();
    xAxis.setLabel("Month");
    final LineChart<Number, Number> lineChart = new LineChart<Number, Number>(
    xAxis, yAxis);
    lineChart.setTitle("Stock Monitoring");
    lineChart.setCreateSymbols(false);
    XYChart.Series series1 = new XYChart.Series();
    series1.setName("Portfolio 1");
    series1.getData().add(new AreaChart.Data(1, 10));
    series1.getData().add(new AreaChart.Data(2, 20));
    series1.getData().add(new AreaChart.Data(3, 10));
    series1.getData().add(new AreaChart.Data(2, 5));
    series1.getData().add(new AreaChart.Data(1, 10));
    Scene scene = new Scene(lineChart, 800, 600);
    lineChart.getData().addAll(series1);
    StringBuilder builder = new StringBuilder();
    // builder.append("-fx-stroke: ");
    // builder.append("#");
    // builder.append(Integer.toHexString(115));
    // builder.append(Integer.toHexString(115));
    // builder.append(Integer.toHexString(115));
    // builder.append(Integer.toHexString(100));
    builder.append("-fx-fill: ");
    builder.append("#");
    builder.append(Integer.toHexString(215));
    builder.append(Integer.toHexString(115));
    builder.append(Integer.toHexString(115));
    builder.append(Integer.toHexString(100));
    series1.getNode().setStyle(builder.toString());
    stage.setScene(scene);
    stage.show();
    public static void main(String[] args) {
    launch(args);
    What happens here in Java 8???
    Additionally I've tried to draw a simple AreaChart with a series of negative values. In Java 7 the area between the line and the X-Axis will be filled. In java 8 the area between the line and the bottom of the chart will be filled. Are there any new properties which have to set to draw it in the correct way? I've checked it with the stackedAreaChart. Here everything is fin in Java7 and Java8.
    Can somebody explain me that change in the behaviour of the charts in JavaFX 8?? Or is this a Bug??
    Kind regards

    Your code is really weird. 
    Applying a fill to the line path in a line chart is a strange thing to do.  Usually a line chart is for drawing lines not filled areas.  For filled areas, JavaFX has an AreaChart.
    Setting multiple y values for a given x value in a series is also a very strange thing to do.  Usually for a LineChart plot, the x values in the series are unique.
    I haven't tried your code on Java 7 as I don't have Java 7 installed and your code doesn't really seem like a valid test case to me anyway.  That your code got you a result you wanted in Java 7 would be more a fluke than anything else, I would guess.
    For your area chart question, please ask that as a separate question with reproducible source code and test case.
    If you really think there are bugs or regressions in JavaFX, then report them in the bug tracker after running your tests on the latest development JDK at: https://jdk8.java.net/download.html

  • Help Needed in Creating Java Class and Java Stored Procedures

    Hi,
    Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
    I have seen the Documents. But i couldn't able to understand it correctly.
    I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
    Is that possible to Create a Java class in the oracle Database itself ?.
    Where are the files located for the existing Java Class ?..
    Help Needed Please.
    Thanks,
    Murali.v

    Hi Murali,
    Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
    Configure deployment to a database to upload the java file instead of class
    The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
    Hope this helps,
    Sunil..

  • Java io and Java nio, which is faster to binary io?

    Anybody can advise me about java io and java nio ?
    I want to write the faster code to read and write binary files.
    I'm going to read/write
    - individual elements (int, double, etc)
    - arraylists
    - objects
    Also I'm going (or I'd want) to use seek functions.
    Thanks

    Anybody can advise me about java io and java nio ?
    I want to write the faster code to read and write binary files.Which is "faster" depends on exactly how you're using them. For example, a MappedByteBuffer is usually faster for random access than a RandomAccessFile, unless your files are so large (and your accesses so random) than you're constantly loading from disk. And it's not at all faster for linear uni-directional access than a simple FileInputStream.
    So, rather than expecting some random stranger telling you that one is faster than the other without knowing your project, perhaps you should tell us exactly how you plan to use IO, and why you think that one approach may be faster than the other.

  • Java platform and Java Deployment should be updated but there is no other version, always the warning to update but thats not possible

    Java Platform 7u9 and Java Deployment Kit plug-ins are yellow and asked to be updated.
    The problem is that there is no other version than I have already installed.
    Even if I try to instal this latest version again I've get the message that I already have the latest version.
    The same problem was with Flashplayer where I installed the latest version but three days Firefox asked to update the plugin.
    The last one is now ok but Java Platform and Java Deployment Kit is hopeless.
    Why it ask for an update if there is none?
    What should or can I do? I always be careful and patch my pc if necesserry.
    All my friends who are working with Firefox have the same problem.
    Can anybody tell me whats going on here?
    greetings, Mimi321

    Hi
    There is still an issue for me. When i check to see if add-ons are up to date it identifies "Java(TM) Platform SE 7 U9" as out-of-date and gives me an orange "Update" action. When i hit this it takes me to the Java website giving me "Recommended Version 7 Update 9". This is the one i've already got so i cannot get rid of the orange Update action buttons.
    Furthermore, if i try the link earlier in this thread to test to see which version of Java i should be using it says "Congratulations! You have the recommended Java installed (Version 7 Update 9)" so i'm not sure what this talk of version 7.10 is about?

  • Whats is difference between Java JRE  and  Java SDK

    Hi,
    what is the difference between Java JRE and Java SDK...
    i think both of them have the same set of files to be installed...
    I am not able to understand where they differ

    The JRE (Java runtime Environment) contains just the stuff necessary to run Java and the SDK (System Development Kit) contains the extra stuff necessary (and also helpful) to develop in Java.

  • Java SE and Java EE

    I am a IT graduate and I still need some clarification on the relationship between Java SE and Java EE API. Does EE include SE?
    For application development, I know I can use only SE without the EE, but can I use EE alone without SE?
    Any good articles addressing my questions?
    Thank you very much
    R

    Java EE in fact extends java SE, its primarily aim is to simplify developing multitier enterprise applications (Java SE provides all the necessary basic libraries etc.)
    Because Java EE is an extension of Java SE, you cant use EE without SE - without SE there is no EE.

  • About Java mapping and java proxy

    Hi
    Iam new to Xi and basically iam an ABAPER.When iam dooing mappinps or proxies i cant able to understand the java pari cant (javamapping and java proxies) .I need some notes on java mapping and java proxy which is easy to do.And why do we use this java mapping or java proxy particularly when we r having abap mappipng and abap proxy.
    thanks in advance

    Hi,
    refer
    Java Mapping
    SAP Network Blog: Java Mapping (Part I)
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    Java Mapping in XI
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=java+mapping&adv=false&sortby=cm_rnd_rankvalue#
    Runtime Environment (Java Mappings) (SAP Library - Partner Connectivity Kit)
    http://help.sap.com/saphelp_nw04/helpdata/en/bd/c91241c738f423e10000000a155106/frameset.htm
    Java Mapping (SAP Library - Partner Connectivity Kit)
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    SAP Network Blog: Testing and Debugging Java Mapping
    /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    SAP Network Blog: Implementing a Java Mapping in SAP PI
    /people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
    "JAVA MAPPING", an alternate way of reading a CSV file
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    SAP Network Blog: XI Java Mapping Helper (DOM)
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    Java Proxy
    Java Proxy Objects (SAP Library - SAP Exchange Infrastructure)
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/7d5e3c754e476ee10000000a11405a/frameset.htm
    Accessing Active Directory through Java Proxy on SAP Exchange Infrastructure 3.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10716e9f-23d7-2a10-8c8c-d2665615f8fc
    Thanks
    Swarup

  • JAVA beans and JAVA related services require Oracle client to be installed?

    Can you please advice whether an application server that make use of JAVA beans and JAVA related services require Oracle client to be installed? For an example if the solution build based on Java and JBOSS to be used as application server, do we still require oracle client to be installed and configure the tnsnames in order to communicate to database server?

    SHANOJ wrote:
    Can you please advice whether an application server that make use of JAVA beans and JAVA related services require Oracle client to be installed? For an example if the solution build based on Java and JBOSS to be used as application server, do we still require oracle client to be installed and configure the tnsnames in order to communicate to database server?Oracle client is not required when JDBC is used to connect to the remote DB

  • Java SE5 and Java EE5 difference

    What is the difference between Java SE5 and Java EE5? Also difference btwn SDK and JDK? I am confused about these basic concepts.
    Thanks
    Geet

    Java Platform, Enterprise Edition is a related specification which includes all of the classes in Java SE, plus a number which are more useful to programs which run on servers as opposed to workstations.
    Java EE includes several API specifications, such as JDBC, RMI, e-mail, JMS, web services, XML, etc, and defines how to coordinate them. Java EE also features some specifications unique to Java EE for components. These include Enterprise JavaBeans, servlets, portlets (following the Java Portlet specification), JavaServer Pages and several web service technologies.

  • Drop java class and java source

    Hi,
    When I query user_objects I get some java class and java source objects
    select * from user_objects where object_type like 'JAVA %';
    How do I drop these java source and java class objects from the database
    I tried using the following command
    drop java class /4a524d89_AutoTransliteratorPk
    drop java source AutoTransliteratorPkg
    But I get error ORA-29501: invalid or missing Java source, class, or resource name
    Please someone help me in dropping these objects
    thanks
    saaz

    was the java source all caps or was it exactly AutoTransliteratorPkg. If its exactly AutoTransliteratorPkg then try this
    drop java source "AutoTransliteratorPkg"

  • IMPDP to import  JAVA CLASS  and JAVA SOURCE from .DMP file

    hi,
    I have a schema X, In that schema some of the *"JAVA CLASS" and "JAVA SOURCE"* objects are missing ..
    The procedures ,functions..etc objects were updated at X schema..
    I have 1 dmp file of Y schema , containing the missing "JAVA CLASS" and "JAVA SOURCE" s.. Can I import the the same to the schema X using IMPDP
    i tried using INCLUDE clause but it is not working
    eg:
    impdp john1/john1@me11g22 directory=datadump dumpfile=DEVF2WAR.DMP remap_schema=devf2war:john INCLUDE="JAVA CLASS","JAVA CLASS"but error..
    ORA-39001: invalid argument value
    ORA-39041: Filter  "INCLUDE" either identifies all object types or no object types.regards,
    jp

    Hello,
    You should type JAVA_CLASS and JAVA_SOURCE (use underscore instead of space).
    impdp john1/john1@me11g22 directory=datadump dumpfile=DEVF2WAR.DMP remap_schema=devf2war:john INCLUDE="JAVA_CLASS","JAVA_CLASS"Best Regards,
    Gokhan Atil
    If this question is answered, please mark appropriate posts as correct/helpful and the thread as closed. Thanks

Maybe you are looking for

  • Mac Word 2008 - hyperlink message "Word cannot open the specified file"

    I'm using WordMac 2008 version 12.2.5 and after following detailed instructions on how to hyperlink chapters in a Table of Contents to their respective chapters in a book, I can only get the message "Word cannot open the specified file". Any ideas wh

  • Confusion in editing a rule file

    Hi, We have changed a member "Payment" to "High Payment" in our outline. So to avoid data load issue, we have updated our rule file to replace "Payment" with "High Payment". But the issue here is we also has some other members like "Tax Payment", "Fo

  • Ranger File Manager, Cut and Paste

    I have two terminals with ranger, is it possible to cut a file in the first window and to paste it in the other?

  • Can't Run iTunes After The 6.0.3 Update

    Hello, When I start iTunes, it crashes and it gives the following error: http://img526.imageshack.us/img526/9245/itunes7hx.png The error is in Turkish language, i couldn't translate it but it's the same Windows XP error message.. I tried reinstalling

  • Im having iMovie errors, anyone else?

    Audio mute error, import audio from third party app, error, the library view doesn't show complete camera roll & more.