gaurav chhabra

Ranch Hand
+ Follow
since Jul 24, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by gaurav chhabra

sir thanks for reply

i have done all the things again as follows ..........

In the directory %TOMCAT_HOME%\webapps\ i have create the following folders:

1. %TOMCAT_HOME%\webapps\testTags
2. %TOMCAT_HOME%\webapps\testTags\META-INF
3. %TOMCAT_HOME%\webapps\testTags\WEB-INF
4. %TOMCAT_HOME%\webapps\testTags\WEB-INF\tlds
5. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes
6. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com
7. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com\tek271
8. %TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com\tek271\testTags

then i have written the tag handler and save the class file in ...

%TOMCAT_HOME%\webapps\testTags\WEB-INF\classes\com\tek271\testTags\TagError.class


then write tld and save it into .......

%TOMCAT_HOME%\webapps\testTags\WEB-INF\tlds\testTld.tld

then write web.xml and save it into ..........

%TOMCAT_HOME%\webapps\testTags\WEB-INF\web.xml

and save the file using jsp in.........

%TOMCAT_HOME%\webapps\testTags\testJsp.jsp


then i write in the url .....

http://localhost:8080/testTags/testJsp.jsp

but then it will give the error that .....

The requested resource (/testTags/testJsp.jsp) is not available.

please tell me that what to do ...i am using tomcat4.1 and jdk1.4

please help me out





gaurav chhabra


15 years ago
JSP
sir
i m using JSTL and i have written all the three files in proper in right manner ,,,,, that is .class file , .tld file and .jsp file but it is giving the error .........

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file

C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\tag_f_jsp.java:74: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.tag_f_jsp
t2 _jspx_th_ram1_sita_0 = (t2) _jspx_tagPool_ram1_sita_nobody.get(t2.class);
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\tag_f_jsp.java:74: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.tag_f_jsp
t2 _jspx_th_ram1_sita_0 = (t2) _jspx_tagPool_ram1_sita_nobody.get(t2.class);
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\tag_f_jsp.java:74: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.tag_f_jsp
t2 _jspx_th_ram1_sita_0 = (t2) _jspx_tagPool_ram1_sita_nobody.get(t2.class);
^
3 errors


my class file named is t2 and it is not able to compile as i have already set the path to servlet.jar but i dont know that why this is giving the error .......
please help me out

thank you
gaurav
15 years ago
JSP
hello sir
i m using JSTL and i have stored my .class file in \web-inf\classes and .tld file in \web-inf and jsp file in webapps\root . and i have written in webapps\web.xml
<web-app>
<taglib>

<taglib-uri>
jaishriram
</taglib-uri>

<taglib-location>
/WEB-INF/ram.tld
</taglib-location>

</taglib>

</web-app>

please tell me that what the use of written in <taglib-uri> tag . like i have written "jaishriram" there then how to use that one .
and please check my directories where i have put all the stuff

thank you
gaurav
15 years ago
JSP
JSP
thanks for reply

i hae a class file name t2.class and i have put that in the \webapps\root

and when i am using it through jsp file then it is saying that CANNOT RESOLVE SYMBOL t2....

please tell me that exactly what to do...

thank you

gaurav
15 years ago
JSP
JSP
hello buddy
as you are saying that your file contains the tag-libs that means that you have knowledge of JSTL .... i am new to JSTL and unable to run it could you please help me that how to run an application of JSTL

thank you
gaurav
15 years ago
JSP
JSP
open the page save it as page.html at the place of page.jsp
try it out

best of luck

gaurav
15 years ago
JSP
hello sir
i m using tomcat and new to JSTL , sir i have my JSP file as follows ...

t2_final.jsp

<!-- JAI SHRI RAM -->
<%@ taglib uri="first_taglib.tld" prefix="ram" %>

<HTML>
<HEAD>


<TITLE>JAI SHRI RAM</TITLE>

</HEAD>

<BODY>

<H1><ram:sita /></H1>


</BODY>
</HTML>


now i have my .TLD file as follows ........

first_taglib.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">;
<!-- a tag library descriptor -->
<taglib>


<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>ram</shortname>

<info>
A tag library from Core Servlets and JavaServer Pages,
http://www.coreservlets.com/.
</info>


<tag>

<name>sita</name>
<tagclass>t2</tagclass>
<bodycontent>EMPTY</bodycontent>
<info>Simplest example: inserts one line of output</info>


</tag>
<!-- Other tags defined later... -->


</taglib>

and my class file is as follows .......

t2.java

//JAI SHRI RAM

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;


public class t2 extends TagSupport {
public int doStartTag() {
try {
JspWriter out = pageContext.getOut();
out.print("Custom tag example " +
"(coreservlets.tags.ExampleTag)");
} catch(IOException ioe) {
System.out.println("Error in ExampleTag: " + ioe);
}
return(SKIP_BODY);
}
}


i have complied my file and get the class file successfuly and i have all the files in tomcat4.1\webapps\root\ .but when i am running it through browser then it is giving the error in the JSP file i.e ts_final, that it is unable to compile .... please tell me that why this error is coming/..

thanks for help
gauravt2.javafirst_taglib.tldt2_final.jsp
15 years ago
JSP
thank you sir for your response

the error is -------


HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file

C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\t2_final_jsp.java:82: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.t2_final_jsp
t2 _jspx_th_ram_sita_0 = (t2) _jspx_tagPool_ram_sita_nobody.get(t2.class);
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\t2_final_jsp.java:82: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.t2_final_jsp
t2 _jspx_th_ram_sita_0 = (t2) _jspx_tagPool_ram_sita_nobody.get(t2.class);
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\t2_final_jsp.java:82: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.t2_final_jsp
t2 _jspx_th_ram_sita_0 = (t2) _jspx_tagPool_ram_sita_nobody.get(t2.class);
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\t2_final_jsp.java:96: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.t2_final_jsp
t2 _jspx_th_ram_sita_1 = (t2) _jspx_tagPool_ram_sita_nobody.get(t2.class);
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\t2_final_jsp.java:96: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.t2_final_jsp
t2 _jspx_th_ram_sita_1 = (t2) _jspx_tagPool_ram_sita_nobody.get(t2.class);
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\t2_final_jsp.java:96: cannot resolve symbol
symbol : class t2
location: class org.apache.jsp.t2_final_jsp
t2 _jspx_th_ram_sita_1 = (t2) _jspx_tagPool_ram_sita_nobody.get(t2.class);
^
6 errors


at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:248)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:315)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)



--------------------------------------------------------------------------------

Apache Tomcat/4.1.31
15 years ago
JSP
hello sir

i am doing JSTL and i have written the JSP file , .TLD file and one tag handler file but when i am trying to run it it is giving the following error

org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Compiling 1 source file

please tell me that what to do

thank you
gaurav
15 years ago
JSP
hello sir
i have javax.servlet and javax.servlet.http.* package but plz tell me that how to get the JSP package ........ javax.servlet.jsp.* package ,,,,,

plz sir tell me from where to get it

thank you
gaurav
15 years ago
JSP
sir i m wrirting the code ..........

import javax.servlet.jsp.*;

and i have servlet.jar and jstl.jar in [tomcat] \ common \ lib
but it is then also giving the errors...........

plz tell me my error

thank you
gaurav
15 years ago
JSP
hello sir
i m new to servlet can u plz tell me that how to set the path of the package of javax.servlet.*

thank you
gaurav
15 years ago
hello sir
i m new to JSTL can u plz tell me that from where to download the package
javax.servlet.jsp.*;

can u plz give me the link

thank you
gaurav
15 years ago
JSP
hello sir
i have included the servlet.jar package in the common\lib but it is then also giving the error can u plz rectify me ..........

thanks
gaurav
15 years ago
hello sir
i m new to JSTL and plz tell me that before making the first programme what all i have to installed in my computer .....

thank you
guarav
15 years ago
JSP