Answers below: On Jul 28, 6:25 pm, sixcorners <[email protected]> wrote: > My first question: is there any reason in particular that packages > don't start with info? It always seems to be net, org, and com which > are the TLDs of whoever is developing the code, but I haven't seen > info. (I think I also checked for and didn't find examples of other > TLDs but I don't remember.)
There is no restriction on package names. TLD or no TLD it will work. The reason people use domain names is to ensure namespace separation. This is a fancy way to say that code that you create (from the domain you own) does not have compilation or execution 'collisions' or issues with code other people wrote. That's why you are not supposed to write code in the java.util package, for example, as it is reserved for language-specific code. > Here is my code:http://pastebin.com/aTkZ2FGM > My second question: Is there anything bad about initializing the > session and property variables statically? It's throwing a null > pointer exception whenever I try to get the servlet's init params. At the very least doing this is not a better practice. Look at using Apache's commons configuration library for initialization parameters. http://commons.apache.org/configuration/howto_properties.html > Third: Even when I wasn't getting the problem with the null pointer, > and session and properties were initialized in the doPost() function, > the code was not sending email. Is there anything obviously wrong with > the code? Did you configure your application to have an SMTP server? > Fourth: Is it ok to store API keys and things in the server init > parameters in web.xml? Is there a better way to store them? As long as > the server isn't setup to return the web.xml file when it is > requested, it should be secure right? You can store them there. Not an ideal location as you do not want to spread properties and configuration bits all over the place. No offense, but your questions do imply that you are not very familiar with Java EE development. I would highly recommend you look into spending a fair amount of time (an intense weekend will do) with a book such as http://volume1.coreservlets.com/ The book is free and online and will give you a great understanding of the core concepts. > Thanks for your time. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
