How to run TagLibrary program

Hi frnds,
i am working on Jsp Tag Small example ..I wrote one JSP file,One .tld file and one .java files .That java file is compiled properly.While running that program i am getting error as below:
1..org.apache.jasper.JasperException: /Date.jsp(7,7) Unable to load tag handler class "tagexamples.PageVisitTag" for tag "test:pageVisit"
Here with i sent my File Structure and Source file also :
1.Date.jsp
<%@ page language="java" import ="java.util.Date" %>
<%@ page import="tagexamples.*" %>.
<html>
<title>Simple Date Tag</title>
     <body>
          <%@ taglib uri="/pageVisit.tld" prefix ="test" %>
          <h2> <test:pageVisit /></h2>
          <h2> Current System Date is <%= new Date().toString() %></h2>
     </body>
</html>
2.pageVisit.tld
<?xml version="1.0" encoding ="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "=//Sun.Microsystems,Inc.//DTD Jsp Tag Library 1.1//EN"
          "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
     <tlibversion>1.0</tlibversion>
     <jspversion>1.1</jspversion>
     <shortname>date</shortname>
     <info>
          A simple tag Library for example
     </info>
     <tag>
          <name>pageVisit</name>
          <tagclass>tagexamples.PageVisitTag</tagclass>
          <bodycontent>empty</bodycontent>
          <info>
               This tag Output the LastTime u have viisted the page in the Last MOnth..
               This tag Ocntains empty Body and no attributes
          </info>
     </tag>
</taglib>
3.PageVisitTag.java
package tagexamples;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.util.Date;
import java.io.IOException;
public class PageVisitTag extends TagSupport
     public int doStartTag() throws JspTagException
          Cookie info = null;
          String msg = "This is the First time u have Visited this page" ;
          //Get all Cookine s that Came from the Request
          Cookie[] cookies = ((HttpServletRequest)pageContext.getRequest()).getCookies();
          for (int i=0;i< cookies.length;i++)
               info = cookies;
               if(info.getName().equals("MyCookie"))
                    found = true;
                    break;
          }//for
          String newValue =""+System.currentTimeMillis();
          if(!found)
               //Create a new Cookie and set its age
               info = new Cookie ("MyCookie",newValue);
               info.setMaxAge(60*1);
               info.setPath("/");
               ((HttpServletResponse)pageContext.getResponse()).addCookie(info);
          }else {
               long conv = new Long(info.getValue()).longValue();
               msg = "U Last visited this site on "+new Date(conv);
               //Set the new value of the Cookie and adddd it to the Response
               info.setValue(newValue);
               info.setMaxAge(10*24*60*60); //keep the cookie for One Month
               //Set the Path so that the Cookie is available everywhere on the Server
               info.setPath("/");
               ((HttpServletResponse)pageContext.getResponse()).addCookie(info);
          } //else
          try{
               JspWriter out = pageContext.getOut();
               out.write(msg);
               }catch(IOException e){
                    throw new JspTagException("JspWriter not There :"+e);
               return SKIP_BODY;
     }//doStartTag ends
     public int doEndTag() throws JspTagException {
          if(!found){
               //Don't Compare current and Cookie time this time
               return SKIP_PAGE;
          }else {
               return EVAL_PAGE;
     }//doEnd Tag ends
          boolean found = false;
     } //Class ends
while running the above files in Tomcat it giving above error:
i am running by:
http://localhost/TagExamples/Date.jsp
and
I kept files in the below Structre order.
My file Structure is :
D:\jakarta-tomcat-5.0.16\webapps\TagExamples\WEB-INF\classess\tagexamples\PageVisitTag.java
D:\jakarta-tomcat-5.0.16\webapps\TagExamples\Date.jsp
D:\jakarta-tomcat-5.0.16\webapps\TagExamples\pageVisit.tld
Just tell me is it Correct ..? and what is the Problem in COding and how to run a Tag Library
If anybody know the Solution just reply .send me the mail
[email protected]
with regards,
Ramesh P
98459 35822

Do (dir if on windows, ls if on *nix) and you will probably see an A directory in the A directory.  That came from your last compilation attempt.  Remove it and everything in it.  Now,
cd ..
javac A/Convertible.java
java A.Convertible

Similar Messages

  • How to run labview program in debugging mode in windows 95 version

    Respected all,
    I am facing probelm while running probe.vi.
    I received this command "connection to acquisition board was not found" when i run labview program.
    I  am using labview 5.1, fieldpoint FP 1000, NI-DAQ 6.5, Field point explorer version 1.6, Measurement and Automation Explorer 1.0.1.
    I would kindly request you please help me how to run my program probe.vi in debugging mode in windows 95 version, so that i can locate where error occurs.
    Thanking You
    Yours faithfully
    M.Vijay

    Respected Norbert,
    Thank you very much to for your help.
    Norbert : Possible reasons are e.g. wrong IDs for measurement devices. If the error is connect to the FieldPoint, it is possible that it isn't configured correctly.
     I am using Field point explorer 1.6, The Field point instrument FP 1000 and RS-232 port is using. It is confirmed that the field point instrument is working properly by LED light indication test.
    Norbert: It sound like you are using DAQ devices (like PCI MIO 6952E) in the application. Are you sure that you select the correct device ID for this?
    I am asking you to know, If i using Labview and  Fieldpoint instrument FP 1000 to monitor my parameter interms of All, Channel 0, Channel 1, Channel 2, Channel 3, Channel 4, Channel 5, Channel 6, Channel 7 for my measurement.
    But now i need to solve the command connection to acquisition board was not found, The expert say this command is due to there was no AT-AO-10 Analog Output board was present in CPU.
    I do not find AT-AO-10 Analog Output board in my CPU, Previously the instrument was worked perfectly by other person who assembled everthing to measure temperature.
    The only aswer know send by previous person is if my task does not imply the use of a DAQ you probably have to locate where the DAQ driver is called and exclude it from the program. try to run the program in debugging mode so that you can locate where the error occurs.
    I do not know how to proceed his instruction. So i would kindly request you to please help me to solve my probelm.
    I also removed AT-AO-10 software from device manager >> Data Acquisition system >>  AT-AO-10 just now.
    I also find GPIB version 1.30, when i remove in add or remove program, it say that Error removing the GPIB.
    I am eagerly waiting for your help.
    Thanking You
    Yours faithfully
    M.vijay

  • How to run the program in back ground with out selection screen ?

    Hi,
    I want to run the program in back ground but don't have selection screen. How to run this program in back ground
    as program has no selection screen.
    Waiting for quick response.
    Best Regards,
    Padhy
    Moderator message: basic, please search for available information/documentation.
    Edited by: Thomas Zloch on Feb 21, 2011 12:43 PM

    Hi,
    Go to transaction SE38 --> Execute --> Background.
    If your program contains selection screen, you have to pass your input values as variants.

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • How to run native program with Java program?

    Hello
    I've got following problem. I'd like to write file browser which would work for Linux and
    Windows. Most of this program would be independent of the system but running programs not. How to run Linux program from Java program (or applet) and how to do it in Windows?.
    Cheers

    Try this:
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("ls -l");
    InputStream stream = proc.getInputStream();
    InputStreamReader isr = new InputStreamReader(stream);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while ( (line = br.readLine()) != null) .....
    "if the program you launch produces output or expects input, ensure that you process the input and output streams" (http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html)

  • How to run Struts program with the help of tomcat

    Hello Everybody
    This is Adesh.I am a newcomer of java and facing a problem with struts, so if any one know how to set the path of struts and how to run struts program, so plz inform me.
    THX in Advance.............................................

    struts-config.xml
    <struts-config>
    <action-mappings>
         <action path  = "/welcome"
                    type  = "Welcome"
                    scope="session">
                <forward name="success" path=".welcome"/>
                <forward name="failure" path=".base.error"/>
         </action>
    </action-mappings>
        <plug-in className="org.apache.struts.tiles.TilesPlugin">
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
            <set-property property="definitions-debug" value="1"/>
            <set-property property="definitions-parser-details" value="0"/>
            <set-property property="definitions-parser-validate" value="true"/>
        </plug-in>
    </struts-config>tiles-defs.xml
    <tiles-definitions>
         <definition name = ".base" path = "/include/template.jsp">
              <put name = "title" value = "${title}"/>
              <put name = "header" value = "/include/top.jsp"/>
              <put name = "body" value = "${body}"/>
              <put name = "footer" value = "/include/footer.jsp"/>
         </definition>
    </tiles-definitions>web.xml
    <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
    <init-param>
                <param-name>definitions-config</param-name>
                <param-value>/WEB-INF/tiles-defs.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
    <servlet>
            <servlet-name>init</servlet-name>
            <servlet-class>Init</servlet-class>
            <load-on-startup>2</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
      <jsp-config>
        <taglib>
            <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/wall.tld</taglib-uri>
            <taglib-location>/WEB-INF/wall.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/c.tld</taglib-uri>
            <taglib-location>/WEB-INF/c.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fn.tld</taglib-uri>
            <taglib-location>/WEB-INF/fn.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fmt.tld</taglib-uri>
            <taglib-location>/WEB-INF/fmt.tld</taglib-location>
        </taglib>
    </jsp-config>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/SQLServerDB</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    </web-app>This should help....

  • How to run Java program as Daemon Server in linux

    How to run Java program as Daemon Server in linux
    i would like to run the java program on system start up in a redhat linux system
    can any one provide rc.status file

    http://wrapper.tanukisoftware.org/

  • How to run a program as an administrator from within a non-elevated command prompt?

    I have a project that is going to be running on a kiosk, and the user that is running the kiosk software is going to be restricted.  I have an alternate administrator account, but I cannot seem to figure out how to open my program running as this administrator
    user.  I have tried to use runas, like so:
    runas /user:admin kiosk.exe
    However, when I try to run this command, it asks me for the password of the administrator account and my program doesn't open correctly.  It fails to open at all.  If I change the run as to a start command, then the program executes fine so its
    not a problem with my software.
    Is there a way to pass a password parameter to runas so that it will not prompt for the password every time?  If there is not, can someone think of another way for me to elevate my process to administrator without being logged in as one through the
    command prompt?

    Hi KevinGEAR,
    You want to allow the others without the administrator`s level to run this software and  meanwhile the administrator is not logged in, right?
    Here is an alternative solution :
    1.To work with this solution, a built-in administrator account should be enabled and meanwhile you can create a standard account. The built-in administrator account is different from the administrator account you created.
    To enable built-in administrator account:
    Ways to Enable / Disable the Built-In Windows 7 Admin Account
    http://social.technet.microsoft.com/wiki/contents/articles/3040.enable-disable-the-local-hidden-built-in-administrator-account-in-windows-7.aspx
    2. Use the following code
    runas /user:ComputerName\Administrator /savecred "Full path to program's exe file"
    Here is a link for reference:
    Elevated Program Shortcut - Create for Standard User
    http://www.sevenforums.com/tutorials/193743-elevated-program-shortcut-create-standard-user.html
    NOTE: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites.
    Best Regards

  • How to run the Program given in JavaMail 1.4 Demos (folderlist.java)

    Hi All,
    in the distribution of JavaMail 1.4, some programs are given, i want to run folderlist.java. But i m unable to run it? Can somebody tell me how to run it?
    i tried like this:
    java folderlist -T IMAP -H email.abcdef.com -U user -P password
    java folderlist -T POP -H email.abcdef.com -U user -P password
    But it is not working giving some error like :
    Exception in thread "main" javax.mail.NoSuchProviderException: No provider for POP
    at javax.mail.Session.getProvider(Session.java:455)
    at javax.mail.Session.getStore(Session.java:530)
    at javax.mail.Session.getStore(Session.java:510)
    at folderlist.main(folderlist.java:117)

    Hi bshannon,
    I had tried with the protocol names you given, but same is the result, can u tell me i m giving only protocol, host, user, password.
    Is this sufficient to connect or i need to supply all the params like url , root, verbose, pattern, etc.
    I m getting the access to server in other programs. Since our server doesn't support imap. so i tried like this
    E:\downloads\javamail-1.4\demo>java folderlist -P pop3 -H email.abc.com -U username -P password
    Exception in thread "main" javax.mail.NoSuchProviderException: Invalid protocol: null
            at javax.mail.Session.getProvider(Session.java:431)
            at javax.mail.Session.getStore(Session.java:530)
            at javax.mail.Session.getStore(Session.java:510)
            at javax.mail.Session.getStore(Session.java:496)
            at folderlist.main(folderlist.java:119)

  • How to run a program in background?

    Hi abapers,
    I want to run a program in background using sm36 and sm37.But i am not aware of input in that tansaction.So kindly tell me the steps ho run a program in background.
    Regards
    Ansuman

    Hi Ansuman Parhi,
    by useing T-codes
    First go to transaction SM36 to schedule the job.
    When you enter the "Start condition" for job, do as follow.
    Select processing by "Date/Time".
    Enter date as current date.
    Let us say you are scheduling this job today then give date 08/30/2007.
    Check "periodic job" checkbox.
    Hit "periodic value" button and select to run "Daily"
    Also have a look on below thread
    Re: How to run program in background?
    This is how to do it through code
    data: lv_job_name like tbtco-jobname,
    lv_job_nr like tbtco-jobcount,
    lv_job_released type c,
    lv_job_start_sofort type c,
    lv_print_parameters type pri_params.
    lv_job_name = 'Z_test'. " your background program name
    call function 'JOB_OPEN'
    exporting
    jobname = lv_job_name
    importing
    jobcount = lv_job_nr
    exceptions
    cant_create_job = 1
    invalid_job_data = 2
    jobname_missing = 3
    others = 4.
    if syst-subrc = 0.
    *submit job with all the selection screen params...
    submit (lv_job_name)
    with applfile = applfile
    with p_lines = p_lines
    with rfc_dest = rfcdest
    with p_selmtd = lv_selmtd
    with px_shsim = px_shsim
    with px_sherr = px_sherr
    user syst-uname
    via job lv_job_name number lv_job_nr and return.
    if sy-subrc = 0.
    call function 'JOB_CLOSE'
    exporting
    jobcount = lv_job_nr
    jobname = lv_job_name
    strtimmed = 'X'
    importing
    job_was_released = lv_job_released
    exceptions
    cant_start_immediate = 1
    invalid_startdate = 2
    jobname_missing = 3
    job_close_failed = 4
    job_nosteps = 5
    job_notex = 6
    lock_failed = 7
    others = 8.
    if syst-subrc 0.
    message i162(00) with
    'An error occured while closing the background job.'.
    stop.
    endif.
    endif.
    endif.
    skip 1.
    write: / 'Background process', lv_job_name ,
    'called successfully' no-gap.
    write: / 'You can check the job in transaction SM37'.
    Hope it will solve your problem..
    Thanks & Regards
    ilesh 24x7

  • How to run a program

    Hi all
    I have one commandline application written in Java, that depends on other files (.jar) to run. This is in Unix.
    When I make "java application", the system complains about the missing libraries. If I do "java -cp lib application", where lib is a directory with several files, it fails saying NoClassFound.
    How can I run my program?

    Hi all
    I have one commandline application written in Java,
    that depends on other files (.jar) to run. This is in
    Unix.
    When I make "java application", the system complains
    about the missing libraries. If I do "java -cp lib
    application", where lib is a directory with several
    files, it fails saying NoClassFound.
    How can I run my program?Unless java -cp lib contains class files that won't work. I assume that lib contains jar files and not class files. If this is the case the you need to java -cp lib\jar1.jar:lib\jar2.jar:lib\jar3.jar application

  • How to run the program  UMB_BSC_TABLE_CLEAN ?

    Hi Friends,
    I am getting a message telling inconsistency in the selection criteria while assigning the characteristic value in value fields of a measure of scorecard in SEM application. It's suggesting me to run the program "UMB_BSC_TABLE_CLEAN".
    In the selection screen of "UMB_BSC_TABLE_CLEAN" apart from field for scorecard name there are 2 bullets - one for "Clean" and another for "Repair" and a checkbox named "Check".
    Can anyone please tell me what are these selection screen options for ? Also to solve my problem how i'll run this program ?

    From the documentation of the program:
    <b>Selection</b>
    <i>Scorecard</i>: select the scorecards whose database tables are to be cleaned or repaired.
    <i>Type of Table Change</i>:
    <u>Clean Up</u>:
    Deletion of Scorecard elements that are no longer used or no longer need to be displayed
    Deletion of value fields with value field selections that do not have a SAP BW counterpart
    <u>Repair</u>
    Restoration of inconsistent value field selections
    Deletion of value fields for which the value field selections cannot be restored.
    <i>Check</i>: If you set this indicator, all inconsistent entries are listed without changing the database table(s).

  • How to run the program "RSR_GEN_DIRECT_ALL_QUERIES" in planning fuction?

    Hi all:
    How can i  run the program "RSR_GEN_DIRECT_ALL_QUERIES" in planning fuction?
    hope for your help.
    thanks.

    Hi,
    "RSR_GEN_DIRECT_ALL_QUERIES" is a report which can run in SE38.This is the report used to generate all the changes to reflect in BEx( also generate all BI queries for a info provider, or even all queries/mass generation  in the system).
    In the above , this can be assigned to variant in the process chain, which can  trigger  this  through customized planning function( Generate Button).
    Regards
    CSM Reddy

  • How to run BSP programs

    Hi,
    I am new to BSP. I want to know about BSP programing and how can i run the BSP programs? To run BSP program how can configure the internet services?
    Plese give the complete solution.
    Thanks & Regards,
    Dhanunjaya Reddy.

    hi,
    http://help.sap.com/saphelp_nw04/helpdata/en/c8/101c3a1cf1c54be10000000a114084/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2d0b74ae-0b01-0010-599a-94fc77b01e87
    thanks
    jaideep
    *reward points if usefull

  • How to Run std program with a specific variant for specific user?

    Hi guys
    We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how?
    one options we thought about was to create a transaction in SE93 and define the program to run with a predefined varaint and assign the new custom tcode to the user profile. But we have many different users and we will end up with creating many transactions which we would like to avoid. Is there any other option to control the std program such that each user can run the program only with a pre-defined varaint and the one which only the user is suppoed to run. thanks in advance.

    We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how
    you can do this..
    You can create a Custom table
    userid     keyfield
    program  keyfield
    variant    keyfield
    programdesc
    Make the table Maintaintable(usnig table maintenance )
    Now create another Program
    It takes input of the Program name( using selection screen)
    LOGIC
    in side that place a logic ,
    Based on the user name  and program name Get the variant name from above table
    Now Submit the program with the variant you have selected above.
    Use Variant Addition when you use SUBMIT
    So now program executed based on user variant.
    Now you create a Transaction for this program.
    When use Runs the Transaction , user needs to input the Program name which he wants to execute.
    and Output will be shown based on the variants
    Regards
    Vijay Babu Dudla

Maybe you are looking for