archana tiwari

Ranch Hand
+ Follow
since Mar 15, 2012
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 archana tiwari

how to remove this exception



HTTP Status 500 -

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

type Exception report

message

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

exception

java.lang.NullPointerException
LoginExample.Abcd.doPost(Abcd.java:69)
LoginExample.Abcd.doGet(Abcd.java:34)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.


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

Apache Tomcat/6.0.32
10 years ago
I am using servlet for my program. I want to use css and java script , i have given the right path in source path but program is not running properly. I am using eclipse .Is there any other option to include js and css file in eclipse?
10 years ago

How to remove this exception


type Exception report

message

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

exception

java.lang.NullPointerException
LoginExample.Generatepdf.doPost(Generatepdf.java:125)
LoginExample.Generatepdf.doGet(Generatepdf.java:30)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.

10 years ago

Tim Moores wrote:That looks pretty similar to what you posted in https://coderanch.com/t/570881/Servlets/java/calendar. How is it different?



same problem is with jsp.
10 years ago
because i have to use only servlet in my project.
10 years ago
I am using this code in my servlet but this is not working ....can you suggest me?



10 years ago

Ulf Dittmer wrote:I didn't say you should increment a string, I said you should convert the int to a string when calling the PdfPTable.addCell method.


thanks ...problem is solved....

Ulf Dittmer wrote:There is no method PdfPTable.addCell(int) - what made you think there is? If you want to add the value of i as a string then the easiest way is to construct a String from i and call PdfPTable.addCell(String).



but using string we can not increment it to 1 then 2 then 3 we get 1 then 11 then 111 by concatenating the string.

Ulf Dittmer wrote:The first thing to do is to move the "int i=1" outside of the loop.


I have checked it also .. i have put int i=1 outside the loop
but table.addCell(i); is giving error.

Ulf Dittmer wrote:If you want to print incremental numbers then don't reset i to 1 in each iteration.


but int i is giving error because The method addCell(PdfPCell) in the type PdfPTable is not applicable for the arguments (int).so what should i use?