J boradic

Greenhorn
+ Follow
since Jun 24, 2010
Merit badge: grant badges
For More
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 J boradic

Hey, I'm using servlet technology in conjunction with spring security and hibernate to put together the back-end for my mobile application and I'm wondering if anyone has tips on making things as modular as possible. At the moment I basically have an authentication servlet which logs the user in and dispatches requests to one of three other servlets. (depending on what kind of activity my user is looking to do) For my application to be useful it will need to support a large number of users so I'll have to learn how to cluster Tomcat at somepoint and write another layer on top of what I already have. But for now assuming I'm just running on one server, whats the best way to structure servlet heirarchy (is more better, is it dependent on what kind of application your running, etc...) to ensure I get the most bang for my buck while keeping it easy to read for other developers of the program(this is more of a resume builder for me, I'm a college student trying to learn some web-dev over the summer).
13 years ago
I'm getting an exception when I send a doPost to my servlet... I think it has something to do with the container
because I keep getting the exception at line 101 even if add whitespace(so the exception should be at line 102 etc...). I think the server is running an older version or something... I included the stack trace and the relevent info but to be honest I don't think thats the problem

Please help this is a huge headache

LoginDoc = "<?xml version="1.0" encoding="UTF-8"?> <newUser><username>username</username><password>pass</password><email>mail@mail.com</email><firstName>chris</firstName><lastName>bo</lastName></newUser>";



Line 100: Node newUserNode = loginDoc.selectSingleNode("//newUser");
Line 101: logger.info((newUserNode.selectSingleNode("/username").getText()));


STACK TRACE:

SEVERE: Servlet.service() for servlet TestServlet threw exception
java.lang.NullPointerException
at com.borodic.TestServlet.doPost(TestServlet.java:101)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:613)



13 years ago
If I have a type list that is being persisted and I choose to sort it I see no reason why not the rows would be getting sorted in MySQL as well. If this isn't true just give me a heads up. PS I'm very new to ORM tech! Also if I have a datastructure HashMap<String, ArrayList<Object>> and I'm wondering how to properly annotate this. (there should only be one instance of this object active at any time)
Server side POJO persistence with hibernate... ya I researched apache derby a little more to realize it wasn't at all what I'm looking for. I'm currently working with JDBC MySQL and Hibernate to provide persistence in my app. I'm pretty new to this just learning the bare essentials then going from there. Lots of decisions to make without a lot of experience. Another quick question, when should I opt for direct storage in the database and when should I opt to use hibernate? Also, how is concurrent modification handled in MySQL(if I make beans I can synchronize obviously).
I'm very new to SQL database development and have narrowed my choices down to apache derby and mysql. I'm looking for the easiest to use solution while implementing hibernate to deal with the majority of my persistence problems. Any suggestions would be great, perhaps its just apples to oranges but I'd rather find out the major differences before choosing a solution.
I'm a college student working on some mobile applications this summer and I've been using servlets /w apache tomcat on Amazon EC2 instances for my backend. Before a few weeks ago, I never had never touched servlets or even heard of object persistence or EJB's. Anyways, there's obviously a lot to know and more than 1 way to skin a cat... I'm wondering based on other peoples experiences what is the best way to get into the brunt of J2EE development to ensure that whatever I am making is scalable.
13 years ago