trinadh reddy

Ranch Hand
+ Follow
since Sep 22, 2005
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by trinadh reddy

we need to implement through code.not through drivers.iam not able to find anything with the resources provided.Could you please eloborate
7 years ago
I need to get the html in string when i hit the hit the jsp in servlets
basically i need to put the output of jsp in pdf file
when i hit one link i need to download that data in pdf file.
Iam using itextpdf.
sample code

((HttpServletResponse) pResponse).setHeader("Content-Disposition", "attachment; filename=report.pdf");

//Get the output stream for writing PDF object
OutputStream outStream=pResponse.getOutputStream();
ByteArrayOutputStream baosPDF = new ByteArrayOutputStream();

try {
Document document = new Document();
PdfWriter docWriter =PdfWriter.getInstance(document, baosPDF);;
String jspPath="C://workingcode//ATG//ATG10.1.1//Mergeingcode//atg//code//src//main//atg//myproj//Storefront//j2ee-apps//Storefront//store.war//myaccount//v2//sampledownload.jsp";
String csspath="C://workingcode//ATG//ATG10.1.1//Mergeingcode//atg//code//src//main//atg//myproj//StaticContent//css//test.css";

File file= new File(jspPath);

/ document.add(new Paragraph(;
// step 4
// XMLWorkerHelper.getInstance().parseXHtml(docWriter, document,new FileInputStream(jspPath),new FileInputStream(csspath) ,null ,new XMLWorkerFontProvider());

System.out.println( "PDF Created!" );

pRequest.getRequestDispatcher(jspPath).include(pRequest, responseWrapper);
String content = responseWrapper.getWriter().toString();

System.out.println("Output : " + content);

document.add(new Paragraph("ssss"));

document.add(new Paragraph(content));


catch (DocumentException exc){
throw new IOException(exc.getMessage());
finally {

i need to convert the sample download.jsp to html so that i can parse

// XMLWorkerHelper.getInstance().parseXHtml(docWriter, document,new FileInputStream(jspPath),new FileInputStream(csspath) ,null ,new XMLWorkerFontProvider());

Any help is appreciated
7 years ago
when iam trying to load the jsp its not working in IE but the same is working in mozilla and google chrome.
Iam using jquery-1.5.1
Any pointers to solve the problem
when iam tring to call the js from remote system its not working.but the same is working in my system
sample code:
<script type="text/javascript" src="http://wid0647:8080/wag/scripts/test.js"></script>
from jsp i caaled the above js which is available in another system.
it would be great if you provide the solution for this
how can i get the contextpath in javscript file
i mean to say i need to get contextpath in .js file
Iam trying to render HTML static content .but unable to success
here is the my code
<script src=""></script>
<script src=""></script>

    <script type="text/javascript">
    var movies = [{Name:"The Red Violin",ReleaseYear:"1998"},{Name:"Eyes Wide Shut",ReleaseYear:"1999"},{Name:"The Inheritance",ReleaseYear:"1976"}];

    var markup = "
  • ${Name}
  • ";

    // Compile the markup as a named template
    $.template( "movieTemplate", markup );

    // Render the template with the movies data and insert
    // the rendered HTML under the "movieList" element
    $.tmpl( "movieTemplate", movies).appendTo( "#movieList" );


    Please tell me the solution
    In java, objects can be stored by using Collections.
    but with out using Collections and DataStures(i.e Array s), we can
    store Objects.

    Thanks & Regards
    Laxman C Nagalla
    15 years ago

    [BPSouther: Added UBB Code Tags]
    [ November 16, 2006: Message edited by: Ben Souther ]
    15 years ago
    can i call a destroy()in doGet() explicitly?

    I tried to call the init() from doGet() it works fine but when iam trying to call destroy() explicitly it is giving the nullpointer exception.

    May i know the reason?
    15 years ago
    i have asked in one interview like this
    class a
    public int i;
    is it encapsulated
    i told that if the specifier is not public it is encapsulated
    can you tell me the solution for this
    15 years ago
    what is the diffrence betweenString str="abc" ;
    and String str= new String("abc");
    15 years ago
    when iam retriving using getAttribute iam getting null
    15 years ago
    i have modified that web.xml and added <servlet-mapping> enties also
    but still it is displaying null.
    i think it is not accessiong the corrext web.xml as i expected.
    in websphere i have dumped jsp file in
    and web.xml is in
    if i have deployed by copying the jsp file into that directory where should i edit my entries in web.xml. i have edited my entries in the above mentioned path web.xml.but it is displaying null
    16 years ago
    is there any api to retreive the path of web.xml
    in jsp file i have written like this
    i should get the value as 100 but it is displaying null
    my web.xml
    now i have deployed as war in another directory with same code and same when iam accessing in the browser iam getting the the problem is not with the my first program it is not accessiong the web.xml i i need to retreive the path of the web.xml.if there is an api to retreive the path of web.xml please reply to this
    16 years ago cannot resolve symbol
    symbol : class Base
    location: class sub
    public class sub extends Base{
    ^ cannot resolve symbol
    symbol : class Base
    location: class sub Base b = new Base();
    ^ cannot resolve symbol
    symbol : class Base
    location: class sub Base b = new Base();

    these are the errors i have got
    16 years ago