trinadh reddy

Ranch Hand
+ Follow
since Sep 22, 2005
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 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
3 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

pResponse.setContentType("application/pdf");
((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);
document.open();
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(org.apache.commons.io.FileUtils.readFileToString(file)));
// 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));




document.close();
docWriter.close();

baosPDF.writeTo(outStream);
outStream.flush();
}
catch (DocumentException exc){
throw new IOException(exc.getMessage());
}
finally {
outStream.close();
}

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
3 years ago
Hi,
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
Hi,
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
HI,
Iam trying to render HTML static content .but unable to success
here is the my code
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>
</head>
<body>



    <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" );
    </script>




    </body>
    </html>

    Please tell me the solution
    Hi
    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
    11 years ago

    [BPSouther: Added UBB Code Tags]
    [ November 16, 2006: Message edited by: Ben Souther ]
    11 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?
    11 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
    11 years ago
    what is the diffrence betweenString str="abc" ;
    and String str= new String("abc");
    11 years ago
    when iam retriving using getAttribute iam getting null
    12 years ago
    hi,
    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
    N:\IBM\WebSphere\AppServer\profiles\puvvada\installedApps\esignNode01Cell\DefaultApplication.ear\DefaultWebApplication.war
    and web.xml is in
    N:\IBM\WebSphere\AppServer\profiles\puvvada\installedApps\esignNode01Cell\DefaultApplication.ear\DefaultWebApplication.war\WEB-INF
    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
    12 years ago
    is there any api to retreive the path of web.xml
    in jsp file i have written like this
    <%=config.getInitParameter("sys")%>
    i should get the value as 100 but it is displaying null
    my web.xml
    <web-app>
    <servlet>
    <servlet-name>ss</servlet-name>
    <jsp-file>/initparams.jsp</jsp-file>
    <init-param>
    <param-name>sys</param-name>
    <param-value>100</param-value>
    </servlet>
    now i have deployed as war in another directory with same code and same web.xml.now when iam accessing in the browser iam getting the value.so the problem is not with the code.in my first program it is not accessiong the web.xml i think.so 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
    </web-app>
    12 years ago
    NoEnc.java:2: cannot resolve symbol
    symbol : class Base
    location: class sub
    public class sub extends Base{
    ^
    NoEnc.java:4: cannot resolve symbol
    symbol : class Base
    location: class sub Base b = new Base();
    ^
    NoEnc.java:4: cannot resolve symbol
    symbol : class Base
    location: class sub Base b = new Base();


    these are the errors i have got
    12 years ago