aspose file tools*
The moose likes Servlets and the fly likes Java Secure shopping cart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Java Secure shopping cart" Watch "Java Secure shopping cart" New topic
Author

Java Secure shopping cart

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
HI

Which is the best way to design a SECURE shopping cart. Can I use Session beans ? we were planing to design the application in Servlets or in Struts

Please assist
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3225
    
  49

Meet Gaurav wrote:Which is the best way to design a SECURE shopping cart.
Use SSL.

Meet Gaurav wrote:Can I use Session beans ?
Yes.

Ps- If you can ask a more specific question, we will be able to give you some more helpful answers.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
What, exactly, do you mean by "secure"? SSL encrypts the data in transmission, but there are tons more issues to address before any web app can be considered secure. The SecurityFaq points to various articles on how to secure web apps.

Whether you use session beans or not, and whether you use raw servlets or Struts, has next to no impact on whether the application is secure.


Ping & DNS - my free Android networking tools app
Alpesh Padra
Ranch Hand

Joined: Jan 10, 2010
Posts: 41
As per my knowledge, SSL is best option. Use SSL in tomcat.
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Ya .. We bought a SSL certificate from www.GoDaddy.com. I got confused about the framework.

Whether I can use Session beans and invoke that from Struts ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
Whether I can use Session beans and invoke that from Struts ?

Why not? But what does that have to do with security?
Rohan kanade
Ranch Hand

Joined: Oct 22, 2009
Posts: 106
Meet Gaurav wrote:HI

Which is the best way to design a SECURE shopping cart. Can I use Session beans ? we were planing to design the application in Servlets or in Struts

Please assist


Struts is built on Servlets api and other java web related API's

If you want high productivity , I would suggest you use some framework and patterns instead of raw servlets.

Struts would be fine instead of servlets for increasing productivity in general.


SCJP 1.6 ,SCWCD 5
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Rohan kanade wrote:Struts would be fine instead of servlets for increasing productivity in general.


Great !!!.. I will use Struts but still am confused whether to use Session beans for shopping cart or Struts(Hitting DB without Session Beans) alone is enough..

Which is the Best Design for Shooping cart

Struts - DB

or

Struts - Session Beans - DB

or

Something Else ?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42648
    
  65
Struts would be fine instead of servlets for increasing productivity in general.

Great !!!.. I will use Struts

Struts may work out just fine, but so would any of a number of other frameworks. Nothing mentioned so far can serve as a basis for deciding for or against any particular framework.

but still am confused whether to use Session beans for shopping cart or Struts(Hitting DB without Session Beans) alone is enough..

What do you mean by "enough"? It will certainly work, if that's what you mean. EJBs have lost much of their sparkle over the years as other technologies have gained ground. JPA in particular is a strong contender for DB access (although that doesn't rule out -or rule in- using EJB).
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61661
    
  67

Rohan kanade wrote:Struts would be fine instead of servlets for increasing productivity in general.

That is highly debatable.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Rohan kanade
Ranch Hand

Joined: Oct 22, 2009
Posts: 106
Bear Bibeault wrote:
Rohan kanade wrote:Struts would be fine instead of servlets for increasing productivity in general.

That is highly debatable.


My statement was in context to what the OP wrote. I was not nor do i say that struts boosts productivity. A good programmer may use his/her own wrappers and libraries and be x times more productive than someone who is using struts or any other lib.
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
Ulf,

The reason am asking for the framework is “If suppose I have a product(only 1 item) and 2 customers were trying to buy at the same time” then it’s a problem how can I handle this situation in struts.

Whether sessions beans will be helpful to me at this situation ? or I can handle this in struts itself. Please assist
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Meet Gaurav wrote:The reason am asking for the framework is “If suppose I have a product(only 1 item) and 2 customers were trying to buy at the same time” then it’s a problem how can I handle this situation in struts.

Whether sessions beans will be helpful to me at this situation ? or I can handle this in struts itself. Please assist

It could be handled in any number of ways. Ultimately it's a database issue, though, if that's where you're storing your inventory levels.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java Secure shopping cart