JSP, HTML, CLASS, JAVASCRIPTS TO EXE OR PACKAGES

Sir / Madam,
I am a student, I am learning by myself. Plz help me.
Can we create a package or exe which contains all JSP , HTML and their corresponding Images and Javascripts. Then extract in the server.
ie: Server should not contain source code. It should in the form of EXE or other forms.
Expecting Early replay.
Thank You,
Rengaraj

hI renga_murali, well here is my openion about your thread. Hope you will get what you are looking for exactly.
JAR files = collection of class files
WAR files = collection of class, JSP, XML files
EAR files = collection of JAR, WAR, and EJBs
There are no structural differences between the files; they are all archived using zip/jar compression. However, they are intended for different purposes.
Jar files (files with a .jar extension) are intended to hold generic libraries of Java classes, resources, auxiliary files, etc.
War files (files with a .war extension) are intended to contain complete Web applications. In this context, a Web application is defined as a single group of files, classes, resources, .jar files that can be packaged and accessed as one servlet context.
Ear files (files with a .ear extension) are intended to contain complete enterprise applications. In this context, an enterprise application is defined as a collection of .jar files, resources, classes, and multiple Web applications.
Each type of file (.jar, .war, .ear) is processed uniquely by application servers, servlet containers, EJB containers, etc.
ALSO REFER :
Creating a JAR File : http://java.sun.com/docs/books/tutorial/jar/basics/build.html
Creating a WAR File :
http://access1.sun.com/techarticles/simple.WAR.html
Creating a EAR File :
http://access1.sun.com/techarticles/DissectingEARs/DissectingEARs.html
Threads :
http://forum.java.sun.com/thread.jspa?threadID=483657&messageID=2258904
http://forum.java.sun.com/thread.jspa?threadID=455102&messageID=2075155
Explaination :
http://www.cezwright.com/tools/java/jar_war_ear.htm

Similar Messages

  • Can I package an app using just html and javascript and not flash ?

    Hi :
    Sorry for the question, but I'm a little confused. 
    I know I can use javascript with adobe air, I made some test and works great, but I'm not sure if my app will work in an iphone after I build the package.
    Thanks in advanced.

    No, that's not supported in this version of PFI.  From the Developer Guide: "You cannot write HTML- and JavaScript-based AIR applications for the mobile device profile."

  • Jsp&html urgent

    hello ,
    Im writing a page that uses the ahref attribute to navigate bw two JSP pages and the pages do some queries . i need to process the queries based on the value which the user clicks Can anybody help mw out to pass values in Ahref syntax and capturing it in the next Jsp page
    Thankx

    hello ,
    Im writing a page that uses the ahref attribute to
    navigate bw two JSP pages and the pages do some
    queries . i need to process the queries based on the
    value which the user clicks Can anybody help mw out
    to pass values in Ahref syntax and capturing it in
    the next Jsp page
    ThankxPal,
    u mean u'l hav a link(ie <a href attrib....>) in both the jsp pages..n those queries if done for accessin a database cud b dne bettre using a bean....anyways
    Pls b comprehensive about ur requirements...
    This is whut i thought of :take this code ..hope it'l b of some use..
    empbean.jsp:
    <Html>
         <Body><Center>
         <jsp:useBean id="eb" class="employee.EmpBean" />
         <jsp:setProperty name="eb" property="ename" value="coolx"/>
         <jsp:setProperty name="eb" property="ejob" value='"chief architect"/>
         <H1>
         The Employee Name is set to :
         <jsp:getProperty name="eb" property="ename" />
         <Hr>
         The Employee Job is set to :
         <jsp:getProperty name="eb" property="ejob" />
         </H1>
         </Center></Body>
    </Html>
    2. empbean.java
    package employee;
    public class EmpBean
         private String ename;
         private String ejob;
         public void setEname(String nm)
              ename=nm;
         public String getEname()
              return(ename);
         public void setEjob(String jb)
              ejob=jb;
         public String getEjob()
              return(ejob);
    Hope u kno about beans..if dont , in short a special class with zero parameter constructor and havin accessor and mutator methods to access the bean properties..
    Here this jsp page creates a bean object and passes on the parameters to the bean through bean properties tag..

  • How do you make JSF draw frame in browser w/o JSP & HTML ?

    Hi all,
    I already have small web application which uses HTML & JSP and I want to convert it to JSF based application.
    I've read O'Reilly JSF books written by Hans Bergsten and in Chapter 15 he states that you can use pure Java classes only (without JSP & HTML) in your web application.
    My web application contains some frames. Since I only want to use pure Java classes using JSF what component should I use to draw frame ?
    I use MyFaces implementation of JSF.
    Any advice would be greatly appreciated.
    Best Regards,
    Setya

    I don't know anything about myFaces, but as far as I know, there is no component to draw frames. The JSF book you read is correct to a degree... It's possible to write completely with JSF tags, but it can be cumbersome sometimes.
    To output frame tags using a JSF tag, you can use one of two methods.
    First, you can use the outputText tag with escape attribute set to false.
    <h:outputText value="<FRAMESET blah blah blah>" escape="false" />The second way is to just wrap HTML in f:verbatim tags.
    <f:verbatim><FRAMESET blah blah blah></f:verbatim>If using the second method, be careful not to have any other JSF tags inside the f:verbatim tags.
    Hope this helps,
    CowKing

  • How to convert a class file to exe file and how to cteate a class file to d

    how to convert a class file to exe file

    Hi Bhaskarq,
    Hi,
    It is not at all possible.
    But it is a really worst method.
    Please go through it.
    This is a very common question asked in the comp.lang.java newsgroup. Its often useful to have an
    executable application when deploying your
    applications to a specific platform, but remember to
    make your .class files available for users running
    Unix/Macintosh/other platforms.
    Microsoft provide a free system development kit (SDK),
    for Java, which includes the jexegen tool. This
    will convert class files into a .EXE form. The only
    disadvantage is that users need a Microsoft Java
    Virtual Machine (JVM) installed. If your target
    platform is Win32, you can either redistribute the
    virtual
    machine, or raise the level of your system
    requirements, to include Windows 98, or Windows 95
    with
    Internet Explorer 4. Systems matching these
    requirements will already have a copy of the Microsoft
    Java Virtual Machine installed.
    Note : You must specify all of the class files your
    application needs (except for standard java packges)
    as a parameter, so if you have third party libraries,
    you'll need to include them as well. You can use wildcards * though, and you don't need the original source code.
    Also please see this Forum which will give a good idea
    http://forum.java.sun.com/thread.jsp?forum=31&thread=149733
    I hope this will help you.
    Thanks
    Bakrudeen
    Technical Support Engineer
    Sun MicroSystems Inc, India

  • How to pass a jsp variable into javascript??

    <p><%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
    <p><%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
    <p><html>
    <p><c:set var="binrmapi" value="http://localhost/paas-api/bingorooms.action;jsessionid=XXXXXX?userId=TEST2&sessionId=1&key=1" />
    <p><c:import var="testbinrm" url="${fn:replace(binrmapi, 'XXXXXX', jsessionid)}"/>
    <p><c:set var="tuples" value="${fn:split(testbinrm, '><')}" />
    <p>Time until next game
    <p><c:forEach var="tuple" items="${tuples}">
    <p><c:if test="${fn:contains(tuple, 'row ')}">
    <p> <p><code>
    <p> <c:set var="values" value="${fn:split(tuple, '=\"')}" />
    <p> <font color="blue">
    <p> <c:out value="${values[17]}" />
    <p><c:set var="remainingtime" value="${values[17]}" />
    <p> </font>
    <p> </code>
    <p></c:if>
    <p></c:forEach>
    <p><form name="counter"><input type="text" size="8" name="d2"></form>
    <p><script>
    <p>var milisec=0
    <p>var seconds=eval("document.myForm.remaining").value;
    <p>function display(){
    <p> if (milisec<=0){
    <p> milisec=9
    <p> seconds-=1
    <p>}
    <p>if (seconds<=-1){
    <p> milisec=0
    <p> seconds+=1
    <p> }
    <br>else
    <p> milisec-=1
    <p> document.counter.d2.value=seconds+"."+milisec
    setTimeout("display()",100)
    <p>}
    <p>display()
    <p></script>
    <p></body>
    <p></html>
    <p>This is my code that i was working on, in the jsp part of the script, i get a api call and save a value of time in the variable remainingtime.. and in the javascript, i try to have a countdown clock counting down the remaining time.. but i guess it doesnt work.. how can i get that working? thanks alot
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001
    Message was edited by:
    hamham3001

    Re: How to pass a jsp variable into javascript??Here is the sameple one, hope it will solves your problem.
    <html>
    <body>
    <form name=f>
    <%!
    String str = "A String"
    %>
    <script>
    var avariable = <%=str%>
    <script>
    </form>
    </body>
    </html>
    Let me know if you face any problem

  • How to manipulate static string / text in HTML through Javascript

    Hi,
    Sorry I know this is not the perfect place to ask about HTML. But I need help somehow.
    In simple i am creating a website in JSP and using Javascripts.
    The problem is I have a HTML form where the user have to enter Login Id and Password. If user enters correct data then he is taken o relevant page.
    But if the user enters data (say some invalid character, where it can be handled by Javascript), then it should give feedback as Incorrect Id and Password in that page only but not by alert() statement i.e a statement with red font should get visible.
    Eg: In Yahoo the user taken to new page if he enters Wrong Id and Password
    In Gmail , the feedback is given on that page only.
    I hope u all understand.
    Thanks.

    If the action attribute of your login form say login.html is set to a servet, and say your servlet is responsible for the validation of Login Id and password, then you could use a RequestDispatcher object in your servlet.
    Use ServletContext.getRequestDispatcher(java.lang.String) to obtain the RequestDispatcher object and then invoke include() method on it.
    So, if Login ID and password do not match, then any message, will be included in the same login form, login.html
    Use google to find more information.

  • Using ExecutorService class from java.util.concurrent package

    Dear java programmers,
    I have a question regarding the ExecutorService class from java.util.concurrent package.
    I want to parse hundreds of files and for this purpose I'm implementing a thread pool. The way I use the ExecutorService class is summarized below:
    ExecutorService executor = Executors.newFixedThreadPool(10);
            for (int i = 0; i < 1000; i++){
                System.out.println("Parsing file No "+i);
                executor.submit(new Dock(i));
            executor.shutdown();
            try {
                executor.awaitTermination(30, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();However, the code snippet above creates all the 1000 threads (Dock objects) at once and loads them to the executor, and thus I'm worrying about memory leak. I haven't tested it on 1000 files yet but just on 50 small ones, and even if the program prints out "Parsing file No "+i 50 times at once, it executes normally the threads in the background.
    I guess the write way would be to keep the number of active/idle threads in the executor constant (lets say 20 if the thread pool's size is 10) and submit a new one whenever a thread has been finished or terminated. But for this to happen the program should be notified someway whenever a thread is done. Can anybody help me do that?
    thanks in advance,
    Tom

    Ok I found a feasible solution myself although I'm not sure if this is the optimum.
    Here's what I did:
            ExecutorService executor = Executors.newFixedThreadPool(10);
            Future<String> future0, future1, future2, future3, future4, future5, future6, future7, future8, future9;
            Future[] futureArray = {future0 = null, future1 = null, future2 = null, future3 = null, future4 = null, future5 = null,
            future6 = null, future7 = null, future8 = null, future9 = null};
            for (int i = 0; i < 10; i++){
                futureArray[i] = executor.submit(new Dock(i));
            }I created the ExecutorService object which encapsulates the thread pool and then created 10 Future objects (java.util.concurrent.Future) and added them into an Array.
    For java.util.concurrent.Future and Callable Interface usage refer to:
    [http://www.swingwiki.org/best:use_worker_thread_for_long_operations]
    [http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Java/Chapter10/concurrencyTools.html]
    I used a Future[] Array to make the code neater. So after that I submitted -and in this way filled up- the first 10 threads to the thread pool.
            int i = 9;
            while (i < 1000){
                for (int j = 0; j < 10; j++){
                    if (futureArray[j].isDone() && i < 999){
                        try{
                            i++;
                            futureArray[j] = executor.submit(new Dock(i));
                        } catch (ExecutionException ex) {
                            ex.printStackTrace();
                        } catch (InterruptedException ex) {
                            ex.printStackTrace();
                try {
                    Thread.sleep(100); // wait a while
                } catch(InterruptedException iex) { /* ignore */ }
            executor.shutdown();
            try {
                executor.awaitTermination(60, TimeUnit.SECONDS);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            executor.shutdownNow();
        }Each of the future[0-9] objects represents a thread in the thread pool. So essentially I'm check which of these 10 threads has been finished (using the java.util.concurrent.Future.isDone() method) and if yes I replenish that empty future[0-9] object with a new one.

  • How to use JOptionPane in jsp, instead of javascript message alert box?

    HI,
    How to use JOptionPane in jsp,
    instead of javascript "message alert box"?
    I hate javascript,
    I'd like to only use java in jsp. don't use javascript.
    javascript is client side,
    jsp is server side. i know that.
    how to... instead of javascript box?
    how to use ... message box in webpage?
    don't use applet,,,, don't use javascript,,,
    hm...zzzZzz
    I hate javascript..T.T
    <SCRIPT language=JavaScript>
    alert("hate javascript");
    </SCRIPT>
    ===>>>>
    In this way,,
    JOptionPane.showOptionDialog(null,"I love java")
    I'd like to only use jsp and java and html...in webpage.
    don't use javascript....
    Why? don't sun provide message box in jsp, instead of javascrip box?
    Why?
    Edited by: seong-ki on Nov 4, 2007 8:38 PM

    Drugs are bad, m'kay?

  • Loading HTML with javascript from SDCard

    Hi - my first post so please be kind
    My handset is a BES connected 8100 running v4.2.1.66.
    I've only recently discovered how to load files from the local media card using the file:///SDCard/example.html semantics, but I'm very frustrated I cannot seem to load scripts embedded in these files, that will load and run normally when the file is retrieved using http.
    Is there some magic extension I need to give my files to enable processing of scripts from local files?  I've tried the obvious file extensions without luck (htm, html, wml, jsp, asp).
    It seems to me that for local files the handset is setting the MIME type from the extension alone, given the error you get when you load a file with an unknown extension - "The returned page had no content type, and therefore cannot be processed."
    Can anybody help me shed any light on this behavior and how to get around my lack of javascript on locally loaded files?
    Feel free to slap me if this is a know bug in the software I'm running, or has been answered 50 times.
    Many thanks; Andrew.

    Under which folder we can put the html and javascript files. I have installed balackberry sdk4.6(i.e;
    Research In Motion\BlackBerry JDE 4.6.1).
    Objective:To open and see a local html file  in blackberry browser.

  • JSP variable in javascript

    Can I use a jsp variable in javascript? If so, how? It would be used in an "if" statement:
    function get This() {
    if (document.form.tfName.checked==true) || (<%jsp>) {
      then do this...}
    }

    My problem is I am grabbing a persistant value from a
    value object: the value of a checkbox as
    <%=InformationVO.isChecked()%>If (==true) i want javascript to enable a button on
    load. If not disable it. Plus I hav javascript on
    the page that controls this while the page is open.
    Just don't know how to incorporate the two scenarios
    s for:
    1.checking the value to ernable/disable the sumbit on
    load with the value of the VO
    2. using javascript to control the enable/disable
    while page is laodedYou want something like this?
    <%
    boolean enableButton = InformationVO.isChecked();
    %>
    <html>
    <head>
    <script language="javascript">
    // load event, enables or displables button depending on the InformationVO.isChecked value.
    function doMyLoadEvent(){
         if(<%=enableButton%>){
              // enable mySubmitButton object
         }else{
              // disable mySubmitButton object
    // submits the form
    function submitForm(){
         var frm = document.forms[0];
           frm.action = "path to your servlet goes here";
           frm.submit();     
    </script>
    </head>
    <body onload="javascript:doMyLoadEvent()">
    Woopdy doo!
    <form method="post" action="" name="">
    <input type="button" name="mySubmitButton" value="Submit" onclick="javascript:submitForm()">
    </form>
    </body>
    </html>

  • JSP methods from javascript

    is it possible to call a method -written within the jsp page- from a javascript. ie, i want to execute a method when an event occurs,,such as selecting an option from a list box.
    pls help me

    hi,
    JSP is a server side.
    javascript is a client side..
    dont confuse to mingle,,,,,
    if you want to trigger an event when >selecting an option from a list box.
    try with javascript code itself
    ex:
    first.jsp
    <html>
    <head>
    <script language="javascript">
    function callme()
    alert ( "[email protected]" );
    </script>
    </head>
    <body>
    <%
    //add your jsp code where ever you want
    %>
    <input type="button" value="click" name="b" onClick="callme()">
    </body>
    </html>see in that above example is an jsp file which contains javascript and trigger some events....
    if this is not your ?
    please tell clearly
    or post your code and describe in another way
    regards
    vijay.dr

  • JSP Linking in javascript

    Hi,
    I have downloaded the masthead portal archive and imported it into my NDS. I have added a couple of extra jsps and a javascript file. What I'm trying to do is have a popup window launch from my first jsp to hold my 2nd jsp via javascript. e.g.
    The javascript calls: window.open("FFDialog.jsp","Dialog","width:200px;height:100px;toolbar:no;directories:no;status:no;menubar:no;scrollbars:no;resizable:no;modal:yes");
    The popup opens, but doesn't contain my jsp (which is really just a basic html/js file).
    I think its because my jsp sits under dist->PORTAL-INF->jsp and the javascript under dist->scripts hence FFDialog.jsp isn't in the same location. What needs to be the path in my window.open?
    Cheers!

    Hi Jo,
             In your jsp ,from where you are calling javascript function to call other jsp, write below code
             to get the app path.
    <%String webpath = componentRequest.getWebResourcePath()+"/"; %>
            Now the variable have the root path for your application , So suppose your 2nd jsp page is
    inside a director called jsp so now you use:-
    window.open("<%=webpath%>jsp/FFDialog.jsp", "Dialog","width:200px;height:100px;
    toolbar:no;directories:no;status:no;menubar:no;scrollbars:no;resizable:no;modal:yes");
           Same way if you have your css file inside a directory called css use below code:-
    <LINK href="<%=webpath%>css/style1.css" type=text/css rel=stylesheet>
        Regards,
        Piyush

  • Error in JSP : Ambiguous class

    In application i am getting following error :-
    Error in JSP, Ambiguous class: java.beans.Statement and java.sql.Statement
    here java.beans package is not imported still it gives error.
    if i write java.sql.Statement then it works fine.
    Code is as follows :-
    <%@ page
    language="java"
    import="java.sql.*"
    %>
    <%
    String a="Hello World";
    out.println(a);
    Statement st = null;
    %>
    Regards
    Rahul

    Hi Rahul,
    Someone had a similar question in another java newsgroup and there
    someone explained that "java.beans.*" is added to the imports in the
    generated Java file by the jsp container. Thus it seems to be an
    implicit import so as you already figured out you need to write the full
    path name to make it unambigous.
    Regards,
    /Helena
    Rahul wrote:
    In application i am getting following error :-
    Error in JSP, Ambiguous class: java.beans.Statement and java.sql.Statement
    here java.beans package is not imported still it gives error.
    if i write java.sql.Statement then it works fine.
    Code is as follows :-
    <%@ page
    language="java"
    import="java.sql.*"
    %>
    <%
    String a="Hello World";
    out.println(a);
    Statement st = null;
    %>
    Regards
    Rahul

  • Error in compiling: file javax\servlet\jsp\PageContext.class not found

    Hi,
    i'm getting an error when I'm trying to compile an java file. The error is as follows:
    cannot access javax.servlet.jsp.PageContext
    file javax\servlet\jsp\PageContext.class not found
    Isn't the javax package included in jdk? I've installed jdk 1.3.1_03 and j2re1.4.0_02. Shouldn't this PageContext.class be automatically loaded when i've installed jdk?
    I'm getting desperated! I've tried almost everything: i've changed the classpath, moved the directory of the java file I'm trying to compile over and over but i'm getting no success!
    Any help is very welcome!
    Thankx,
    Nuno.

    hmmm... i had a look and it seems that what you are trying to "import" is actually in a package... instead of import try:
    package javax.servlet.jsp;you may need to go download this "package" and complile it in the directory you are working in.
    my advice: try the above statement (which does compile for me), if it doesn't work, you will need to find the source code for this package and compile it just like you do any other source code.
    hope this helps.

Maybe you are looking for

  • How do I add a 'close this window' button to a page please?

    I have tried using the only snippet I can find and it looks good but just does not work. Any ideas would be greatly appreciated. Thanks Jim

  • Ipod Not getting recognized by itunes

    My itunes is not letting my ipod show up. It says "Please reinstall itunes to install ipod software." It says my software is not installed correctly. And I've installed ITunes and my IPod Update SO many times..it's really annoying!!!! Can i fix it? O

  • Does anyone know how to remove books/ePub files from iTunes

    Hi. I need help. I read a lot of book from my iPad. I have no problem gelting my books from iTunes to iPad. Problem is, now there is lot lot of books in iTunes, and tis difficult to figure out which i havnet read. So how do i remove them from iTunes.

  • How do I enable Firefox (3.0.19) to open office documents as read-write vs. read-only?

    When opeing any office type document (open office for example) from a webpage/collab folder it always opens as read-only. Is there a setting or attribute to change the behavior to open it as read-write? I have read-write privileges to the (tmp) direc

  • How does lion operate with time machine?

    Before downloading Lion, I have an external hardrive which updates automatically via Time Capsule. On Lion does Versions do the same thing and/or is there any problem between operating Time Capsule and Versions at the same time?