sumit sharmast

Greenhorn
+ Follow
since Jul 29, 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 sumit sharmast

I created a small web application using MVC

I have doubt regarding the DAO class explanation.

In project report, can I write that:

In MVC architecture the DAO class comunnicates with database using JDBC and DAO class also comes in Model. Is this correct?

Please help.


Regards,

Sumit.
I added these 6 lines of code in web.xml and currency problem is solved now




I write this code here because I feel that giving a solution is better than suggesting a weblink to a problem.
9 years ago
JSP
Dear All,


When I run the below code, it is showing the currency symbol € with amount. But when I am calling this code in jsp it is not showing the currency symbol. Instead of currency symbol, it is showing ? symbol after the price


























9 years ago
Dear All,


When I run the below code, it is showing the currency symbol € with amount. But when I am calling this code in jsp it is not showing the currency symbol. Instead of currency symbol, it is showing ? symbol after the price


9 years ago
JSP
Dear All,

How can I send the value of quantity(droplist list) of below JSP to servlet(displayCart), please correct.



9 years ago
JSP
Dear Mr. Steve,

Thank you for your reply. What will be the correct argument inside the addItem method in the Servlet code, in place of addItem(t) ???

Can you correct it please. I would be very thankful.

Regards,

Sumit.
9 years ago
Dear All,

I am getting the following error in the SERVLET CODE. Please help.

ERROR MESSAGE:

HTTP Status 500 -

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

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet execution threw an exception


root cause

java.lang.Error: Unresolved compilation problems:
The method addItem(String, LineItem) in the type Cart is not applicable for the arguments (LineItem)
The method removeItem(String, LineItem) in the type Cart is not applicable for the arguments (LineItem)

music.cart.DisplayCartServlet.doPost(DisplayCartServlet.java:87)
music.cart.DisplayCartServlet.doGet(DisplayCartServlet.java:114)
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.20 logs.

Apache Tomcat/6.0.20
--------------------------------------------------------------------------------

LineItem.Java Code




Cart.Java Code


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

SERVLET CODE:


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


JDBC CODE:


9 years ago

Campbell Ritchie wrote:If you have an unresolved compilation problem, you should go back to Eclipse and over your mouse on the little red mark there. It will give an explanation of the problem and suggest some possible solutions.
You should never have tried to run that code; Eclipse will have give you a warning that there are errors, and you ought to have corrected them then.




What will be the correct argument in the Servlet code inside the addItem method, in place of addItem(t) ???
9 years ago
Dear Mr. Seetharaman,

Thank you for your reply. What will be the correct argument inside the addItem method in the Servlet code, in place of addItem(t) ???

Can you correct it please. I would be very thankful.

Regards,

Sumit.
9 years ago

Thank you sir for your suggestion.
9 years ago
Dear All,

I am getting the following error in the SERVLET CODE. Please help.

ERROR MESSAGE:

HTTP Status 500 -

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

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet execution threw an exception


root cause

java.lang.Error: Unresolved compilation problems:
The method addItem(String, LineItem) in the type Cart is not applicable for the arguments (LineItem)
The method removeItem(String, LineItem) in the type Cart is not applicable for the arguments (LineItem)

music.cart.DisplayCartServlet.doPost(DisplayCartServlet.java:87)
music.cart.DisplayCartServlet.doGet(DisplayCartServlet.java:114)
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.20 logs.

Apache Tomcat/6.0.20
--------------------------------------------------------------------------------

LineItem.Java Code




Cart.Java Code


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

SERVLET CODE:


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


JDBC CODE:


9 years ago
Dear All,

I tried to change from arraylist to hashtable. i changed because I want to see how the same thing is possible with hastable. I am a beginner and I am learning how to do same thing using different collections.

I am getting the following error in the SERVLET CODE. Please help.

ERROR MESSAGE:

HTTP Status 500 -

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

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet execution threw an exception


root cause

java.lang.Error: Unresolved compilation problems:
The method addItem(String, LineItem) in the type Cart is not applicable for the arguments (LineItem)
The method removeItem(String, LineItem) in the type Cart is not applicable for the arguments (LineItem)

music.cart.DisplayCartServlet.doPost(DisplayCartServlet.java:87)
music.cart.DisplayCartServlet.doGet(DisplayCartServlet.java:114)
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.20 logs.

Apache Tomcat/6.0.20
--------------------------------------------------------------------------------
LineItem.java Code



Cart.Java Code


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

SERVLET CODE:


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


JDBC CODE:

9 years ago
Thank you everyone for the suggestions.
9 years ago
Dear All,

I tried to use Hastable in Cart.Java class insted of given arraylist but not able to do it. I tried a lot but not successful. How can I do it, please guide me.

Regards,

Sumit.



-------------------------------------------------------------------------------------------------------------------------------------------
Below is the arraylist code of this class
--------------------------------------------------------------------------------------------------------------------------------------------
9 years ago