How to run the jsp file

i am writing a simple jsp file
i dont know how to run in the tomcat server
for servlets first i created the dot class files by using the command prompt and then in the tomcat server we go the webapps folder and i copy the class files and due to xml file i run the program
I have added the jsp-api.jar and el-api.jar files in the environment variables so what i do to run the jsp
can anyone can tell me how to do that
here is the program
<%@page contentType="text/html" import="java.util.*" %>
<!--
Date.jsp
-->
<html>
<body>
<p> </p>
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing
="0" width="460" bgcolor="#EEFFCA">
<tr>
<td width="100%"><font size="6" color
="#008000"> Date Example</font></td>
</tr>
<tr>
<td width="100%"><b> Current Date
and time is: <font color="#FF0000">
<%= new java.util.Date() %>
</font></b></td>
</tr>
</table>
</center>
</div>
</body>
</html>

i am getting an http 500 error for running the jsp file
here is the code
<%@ page import="java.util.Date" %>
<% Date now = new Date(); %>
<html>
<body>
<p>Hello, world! It is now <%= now.toString() %>.</p>
</body>
</html>

Similar Messages

  • How to run the batch files

    Hi Experts,
    I am trying to implement automatic cache purging every day at specified time and i created txt file with SApurge All cache() and created bat file with nqcmd -q Analyticsweb -u username -p password -s (txt file location).
    Now i want to run this bat file daily at specified time with out executing manually may i know how to run the batch file at specified time .
    Thanks,

    There is task type as command in workflow manager if you want you can go for that during the load
    nqcmd -d "AnalyticsWeb" -u Administrator -p Administrator -s "D:\PowerCenter8.1.1\server\infa_shared\SrcFiles\1_BIPurgeCache.txt"
    Check these urls
    http://docs.oracle.com/cd/E12103_01/books/AnySched/AnySched_Scripts3.html
    http://deliverbi.blogspot.com/2011/12/purge-all-cache-from-dashboard.html

  • Regarding the running the jsp file

    i am getting an error class names date.jsp are only acceptable is annotation processing is explicitly requested
    i have saved this file by name date.jsp
    and when i run this .jsp file in commant prompt i am getting an error
    so what should i do
    do i need any extra software to install to run the jsp
    i have tomcat and jdk1.6 in my system
    <%@page contentType="text/html" import="java.util.*" %>
    <!--
    Date.jsp
    -->
    <html>
    <body>
    <p> </p>
    <div align="center">
    <center>
    <table border="0" cellpadding="0" cellspacing
    ="0" width="460" bgcolor="#EEFFCA">
    <tr>
    <td width="100%"><font size="6" color
    ="#008000"> Date Example</font></td>
    </tr>
    <tr>
    <td width="100%"><b> Current Date
    and time is:  <font color="#FF0000">
    <%= new java.util.Date() %>
    </font></b></td>
    </tr>
    </table>
    </center>
    </div>
    </body>
    </html>

    and when i run this .jsp file in commant prompt i am getting an error How do you run a jsp file from a command prompt? What command are you using?
    The standard way to run a jsp page is to deploy it onto a server as part of a web application, and then access the page through the browser.
    Tomcat should take care of compiling/running it for you.
    Cheers,
    evnafets

  • How to run a jsp file written in a struts framework using tomcat5.0 server

    hi,
    plz somebody help me.
    how do i run a jsp file which i've written in struts framework .
    and anybody plz tell me the process from installing a tomcat server to setting its path such that my jsp page runs....

    hi,
    this is zoya,I gathered from the name that appears in the post header already. :^)
    an engineering student,and i require
    help.
    plz somebody specify the whole process from
    installing tomcat and how to set its path so that i
    can run a jsp page written in struts using tomcatThere are dozens of tutorials on this. First, you need to get Tomcat running without Struts. There are HOW-TO's, sample apps, the whole shebang over at Jakarta's site. Start there. If you get stuck, there are also tutorials on Servlets (and probably Tomcat in specific) on the Net. Do a Google search.
    Next, download Struts. There is, again, extensive HOW-TO and tutorials on their site as well.
    No one will do your work for you. Make an attempt, then post when you are stuck.
    - Saish

  • How to find the jsp file in iSupplier Portal

    Hi,
    I need to change a jsp page from Oracle iSupplier Portal, I got the url but I can't find the jsp file of that URL, how can I find that file?
    http://sboglx11.alpina.co:8040/OA_HTML/OA.jsp?callType=W&_ri=177&_rc=POSINQUIRIESPL&flowApplicationId=177&flowCode=POS_SUPPLIER_INQUIRIES&pageApplicationId=177&pageCode=POS_AP_INVOICE_DTL_D&whereRegionCode=POS_AP_INVOICE_DTL_D&addBreadCrumb=Y&WPARAMSINVOICE_ID=526856&_ti=1715476161&oapc=7&oas=MtxL7MgOdHAuyU8-iC7c8Q..
    Thanx,
    Ivan Loaiza.

    Hi,
    I have a custom request to add a new table on the page of that url from a custom query. I tried to make changes activating the FND_CUSTOM_OA_DEFINTION's profile, and enter to the 'Personalize Page' link, but on this opcion I couldn't find the way to enter a new query. Now I try to customized directy the jsp file and add a new table on that region asociated with custom query.
    I also try with the AK Developer responsability but I got the following error when I try to open the page "No data found for region (/oracle/apps/pos/regionMap/POS_CUSTOM_IMP)" where "POS_CUSTOM_IMP" is a new region that I created with the AK Developer responsability.
    Thanx,
    Ivan Loaiza

  • How to view the JSP file from JBuilder 2007?

    Hi,
    I want to know that how to preview the JSP page from jbuilder 2007. whenever i am changing the jsp code, i would like to see the reflection in preview page. but i couldn't find that tab in jbuilder. Is JBuilder not supporting the preview feature ?? :-(
    awaiting for your immediate response.
    thanks
    pannar

    it's more likely because you lack even a basic understanding about both JBuilder and JSP.
    If you have even a modicum of intelligence the documentation is enough to get you up and running, but don't expect it to be a how-to document that holds your hand every step of the way through implementing an entire application from scratch.
    And no, we're not going to write something like that for you.

  • How to run the jsp programs

    hi how to develop the html and jsp 's using eclipse IDE what are the steps to follow inorder to develop and run the jsp's using Eclipse IDE

    Eclipse cannot do that. You need an application server for that. Best what you can do is to integrate that application server in Eclipse using a plugin and run the application server from within Eclipse. There are lot of tutorials available about that. You can find them at www.eclipse.org and wiki.eclipse.org.

  • How to run the .jpx file?

    I have made the project using jbuilder in .jpx. how to run my project without jbuilder?

    I tried to running the demo file from JBuilder.
    I have followed the steps, but still error.
    I did the steps bellow:
    cd {my project\classes}
    C:\Program Files\JBuilder6\sampless\IPWorks\telnet\classes>C:\java\bin\java -cp . UnnamedPackage.dep2.TelnetDemo
    the error was:
    Exception in thread "main" java.lang.NoClassDefFoundError:UnnamedPackage\dep2\TelnetDemo
    and then I set CLASSPATH=C:\Program Files\JBuilder\sampless\IPWorks\telnet\classes
    the error is the same.
    when the command was C:\Program Files\JBuilder6\sampless\IPWorks\telnet\classes>C:\java\bin\java TelnetDemo
    the error was:
    Exception in thread "main" java.lang.NoClassDefFoundError: ipworks/IPWorksException
    in the classes dir, there is package cache dir and the inside of this dir there is a file UnnamedPackage.dep2
    So whats wrong with my command?

  • Problem with Jdev11G while running the jsp files

    Hi Experts
    I have a porblem with my jdev 11g
    when i create a new application and create a new jsf page (ex PAGE1.jspx) and run it every thing is fine...
    When i create a second page (ex PAGE2.jspx) and run it then it is displaying the PAGE1.jspx only and
    then i need to manually type the page2 url in browser to access the page2.
    If create n number of pages and run any of the page it is navigating to the PAGE1.jspx only
    I was not having this problem when iam working with jdev 10g .
    Is there and setting i need to change to avoid this or is it the feature of 11g
    Thanks
    Gayaz

    Hi
    there is nothing selected in default property of project properties of veiw controller
    run/Debug/profile section..
    only one check box is checked .i.e (Attempt to run archive file before default).
    When i uncheck that one iam unable to run my application
    It is displaying a popup wiht a message "chose default target to run".
    One thing i noticed is when i run the pages from faces-config.xml by selecting the
    page icon and right click and run .. iam able to see the exact jsp in browser
    when i run the jsp directly iam getting the problem....
    Thanks
    Gayaz

  • How to run the .sql file in sql prompt?

    i want to run the .sql file in sql prompt

    Hi,
    You can navigate to the directory where the .sql files is stored and launch the SQL Prompt.
    After you login, you can run your script like this :
    SQL>@my_script.sql;
    Regards,
    Sandeep

  • New to JSP-How to run a .jsp file

    I Have just begin to learn JSP. I downloaded the JSP developer kit from java.sun.com. However I dont know how to proceed. I have seen references to'the container'. what is it and how do I start it? and the same for the server which I have in the form a batch file. How do I configure the environment? Are there any prerequisites to using this kit wrt software? Please do help me, since I am absolutely clueless
    Regards,
    Sweta

    Hi Sweta,
    Please use any editor like eclipse or netbeans or you create one jsp page(assumes you know jsp).
    and then create two folders web-inf inside which create classes and lib folder and web.xml is created, and meta-inf inside which context.xml is created. And use tomcat container to deploy.
    Apache tomcat is container which would receive the client request from browser that will route to servlet/jsp.
    whereas Apache webserver is different it provides the request to container if it exists then we can replace localhost:8080 by user defined.
    JSP is nothing but Dynamic web page creator which embed java program in html.
    JSPinit initializes and while running converts to servlet and will be processed according to the java code embed and display as per the html tags.
    But you should use struts framework why it is constructed upon MVC architecture and purely object oriented.
    So struts is nothing but the execution calls are drived by configuration xml files.
    If anything you need to know in details, pls msg me to [email protected]
    Thanking you
    Charles v c

  • How to call the Jsp file in JspDynpage

    Hello,
    I am using the following jsp code. I saved it as Thumbnail1.jsp.
    <%@page import ="com.sun.image.codec.jpeg.*" %>
    <%@page import ="java.awt.*" %>
    <%@page import ="java.awt.image.*" %>
    <%@page import ="java.io.*"%>
    <%
        // load image from INFILE
             Image image = Toolkit.getDefaultToolkit().getImage("C:/kasturi/sap1.jpg");
         MediaTracker mediaTracker = new MediaTracker(new Container());
            mediaTracker.addImage(image, 0);
             mediaTracker.waitForID(0);
        // determine thumbnail size from WIDTH and HEIGHT
             int newImageWidth = Integer.parseInt("100");
             int newImageHeight = Integer.parseInt("100");
             double newImageRatio = (double)newImageWidth / (double)newImageHeight;
             int oldImageWidth = image.getWidth(null);
              int oldImageHeight = image.getHeight(null);
              double oldImageRatio = (double)oldImageWidth / (double)oldImageHeight;
              if (newImageRatio > oldImageRatio)
                    newImageWidth = (int)(newImageHeight * oldImageRatio);
          else
              newImageHeight = (int)(newImageWidth / oldImageRatio);
        // draw original image to thumbnail image object and
        // scale it to the new size on-the-fly
             BufferedImage newThumbImage = new BufferedImage(newImageWidth, newImageHeight, BufferedImage.TYPE_INT_RGB);
              Graphics2D graphics2D =newThumbImage.createGraphics();
                 graphics2D.drawImage(image, 0, 0, newImageWidth, newImageHeight, null);
        // save thumbnail image to OUTFILE
               BufferedOutputStream outFile = new BufferedOutputStream(new  FileOutputStream("C:/kasturi/ssa.jpg"));
              JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(outFile);
              JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(newThumbImage);
                encoder.setJPEGEncodeParam(param);
              encoder.encode(newThumbImage);
              outFile.close();
              System.out.println("Successfully Saved.");
    %>
    I want to call this thumnail1.jsp file JspDynpage. Can any help me how to make that?
    Thanks in advance.

    hello,
    <?xml version="1.0" encoding="utf-8"?>
    <application>
      <application-config>
        <property name="SharingReference" value="com.sap.portal.htmlb"/>
      </application-config>
      <components>
        <component name="Test">
          <component-config>
            <property name="ClassName" value="kasturi.Test"/>
            <property name="ComponentType" value="jspnative"/>
            <property name="JSP" value="pagelet/Thumbnail1.jsp"/>
            <property name="SecurityZone" value="high_safety"/>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-config>
          <component-profile/>
        </component>
      </components>
      <services/>
    </application>
    this is my portalapp.xml file. Still i am getting error.
    i don't know the exact error. i think it may be java code problem.
    can you tel me what is that? thanks in advance.
    Message was edited by: kasturi ramalingam

  • How to run a jsp file

    I have installed Tomcat5.5
    when i type locahost:8080 the apache home page cmes up but i need my jsp file to appear when i type local host
    Plz Help me
    Shasi

    C:\Program Files\Apache Group\Tomcat 4.1\webapps\
    change your file with index.jsp
    will give ur result

  • How to run the wav file

    Hi
    im using netbeans
    i write the following code to play wav file
    try {
                    Player p = null;
                    try {
                        p = Manager.createPlayer("myfile.wav");
                    } catch (MediaException ex) {
                        ex.printStackTrace();
                    } catch (IOException ex) {
                        ex.printStackTrace();
                    p.start();
                } catch (MediaException ex) {
                    ex.printStackTrace();
                }i try to put in the directory of the project nothing !! or src directory !!!
    now where to put that wav file to run it on the emulator?
    and what if i want to my program plays any wav file in the phone i mean apply my program to any wav file when i click on it?
    thanks in advance.

    also i try this code
    InputStream is = getClass().getResourceAsStream("/myfile.wav");
                Player player = null;
                try {
                    player = Manager.createPlayer(is, "audio/x-wav");
                } catch (MediaException ex) {
                    ex.printStackTrace();
                } catch (IOException ex) {
                    ex.printStackTrace();
                try {               
                    player.start();
                } catch (MediaException ex) {
                    ex.printStackTrace();
                }

  • How to run the java file from notepate or jedit

    i hope u will solve my probs

    JEdit has a JCompiler plugin to allow compilation and a Console plugin to allow execution.

Maybe you are looking for