Sangeetha Selvaraj

Greenhorn
+ Follow
since Jan 12, 2004
Merit badge: grant badges
For More
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 Sangeetha Selvaraj

To support clients without redirect capability, HttpServletRsponse.sendRedirect() method writes a short response body that "
contains a hyperlink to the new location"

Is this valid, cos i dont see anything like this in the API, and "clients without redirect capability?" meaning browsers which dont support redirect??

Thanks,
Sangeetha
From which interface(s) do you need to implement the methods if you want to create an iterative tag without body content? [Check all correct answers]
1. Tag
2. LoopTag
3. IterationTag
4. TagSupport
5. BodyTag

the site says the answer is 1,3.

the tag interface doesnt have the doAfterBody() , i think 3&4 is right but he has asked only for interfaces. whats the right solution.

Thanks
Sangeetha
Thanks Nicholas! that was exactly the answer i wanted to hear

Sangeetha
Hi,

Iam planning to take up the scwcd1.3 exam and iam aware that the hanumant book is the best one for that...are the methods that have been discussed in the book as per the objectives enough for the exam or do i need to go thro the api and know some more mtds that are there in each interface as well.

Thank you,
Sangeetha
Hi Shan,
U can use page directives to import classes, create custom error pages and also include pages..to include the pages at complile time u have to use the include directive
<%@ include file="path of the file u want to include" %>
here the code becomes part of the generated servlet so any changes to the jsp are reflected only when modified and recompiled.
to include a file at runtime u have to use the include action
<jsp:include page="path of the file u want to include" flush="true" />
here the included file never becomes part of the generated servlet(for the JSp) so any change to the included file is displayed in the jsp the next time the page is requested..
hope this helps, and i think there can be more than one page directive, iam not sure tho...hopefully some one will clear that up for both of us.
thanks so much!
20 years ago
thanks mike, i tried it out but same result...am i making a mistake in the path while calling for the error jsp file?....plz refer to my first post...
thanks again
20 years ago
JSP
Hi Prakash,
actually iam the one inducing the error for testing purposes...iam not using try catch..iam just trying to write to a file and so for testing i made it read only....so that an exception is created and i can see my custom error page..its status 500 error
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.io.FileNotFoundException: C:\Tomcat 5.0\webapps\murach\WEB-INF\etc\UserEmail.txt (Access is denied)
hope this helps
20 years ago
JSP
Also read in one of the prevs messages that the page directive in the html page should be above the html tag...i tried it as the first line in body and before html too...confused as to what is right
<%@ page errorPage="show_error_page.jsp" %>
before html tag or first line of body tag???
sorry for the 2nd post
20 years ago
JSP
Hi,
Iam aware that u have to include the page directive in the page where the error is generated so that it is forwarded to a jsp error page which has the directive "isErrorPage="true"...but doesnt seem to be working...
my html is in "c:\tomcat\webapps\app-name\subfolder" with the page directive before the <html> tag.
<%@ page errorPage="/subfolder/show_error_page.jsp" %>
my error page is in the same folder too named "show_error_page.jsp" with the foll code
<html>
<body>
<%@ isErrorPage = "true" %>
this is a custom error page
<p><i> <%= exception %> </i>
<body>
</html>
iam not sure where the mistake is...Greatly appreciate the help
20 years ago
JSP
Hi Mike and Bill,
iam learning servlets and JSP's and some what familiar with both though not very advanced....but an avid fan of harry potter and have read all the volumes...just wanted to know what book u guys are talking abt....i think jsp if from JSF framework? help me out
20 years ago
JSP
How to turn on servlet reloading in tomcat 5.0?
20 years ago
hi,
iam was trying out a simple example where iam trying to display the multiple choices in a list box with jsp....it gives the following error

Generated servlet error:
[javac] Compiling 1 source file
C:\Tomcat 5.0\work\Catalina\localhost\murach\org\apache\jsp\email4\show_005fmusic_005fchoices_jsp.java:60: illegal start of expression
<
^
1 error
this is the JSP code...i cant figure out where the mistake is...the string array variable and the syntax seems to be correct
<body>
<%
String firstName = request.getParameter("firstName");
String lastName = request.getParameter("lastName");
String emailAddress = request.getParameter("emailAddress");
%>
<h1>Thanks for joining our email list <%=firstName%></h1>
<%
String[] musicchoice = request.getParameterValues("music");
for(int i = 0; i < musicchoice.length; i++)
{
%>
<%= musicchoice[i] %> <br>
<%
}
<%>
</body>
20 years ago
JSP
iam also in the same position as in i want to start J2EE, i wud like to
know whether u got the book they mentioned "Murach's Java Servlets and
JSP" and whether it was as good as they say it is...if not what did u
do and i wud like suggestions on what book to buy?
will appreciate ur help.
20 years ago