Search Results

Search found 696 results on 28 pages for 'servlets'.

Page 1/28 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Servlets stats using wsadmin

    - by Nicholas Key
    Is there a way to probe the stats of servlets using wsadmin according to this MBean interface? http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.javadoc.doc/web/mbeanDocs/index.html For example, the names of the servlets, the URIs, etc

    Read the article

  • Linking session state between servlets and EJBs?

    - by wilth
    Hello, I have servlets (in a web module) that access stateless EJB beans (in an EJB module). The EJB module is built using SEAM. Users can have different roles and the EJB services check this using Seam's Identity. I also use a customized Authenticator (although this might not be relevant here). I noticed problems with this approach and I'm suspecting that the session context in the servlets is not "linked" with the session context in the EJB beans. What I think happens is something like: User Joe access servlet A and is assigned Session W1. Servlet A calls a login function on an EJB, using the EJB session E1. Later, user Mary accesses servlet A and is assigned Session W2. When calling the EJBs, however, the EJB session E1 is used and therefore Mary is authenticated as Joe. What also happens is that when Joe is calling the servlet twice in rapid succession, the same session W1 is used, but two different sessions E1 and E2 in the business layer, causing errors. I might be wrong in my suspicion, but maybe I'm actually expecting these "sessions" to be linked together while they in fact are not. If this is true, is there any way of achieving this? I could - of course - use stateful beans and save the authentication information in the beans, but this would break the "Identity" concept of Seam (and in general, it would be preferable to be able to use the Session context in my EJB beans). Any help and pointers are very welcome - thanks! Technology: EJB3, Seam 2.1.2. The servlets are actually the server-side of a GWT app, although I don't think this matters much. I'm using JBoss 5.

    Read the article

  • Spring 2.5 managed servlets: howto?

    - by EugeneP
    Correct me if anything is wrong. As I understand, all Spring functionality, namely DI works when beans are got thru Spring Context, ie getBean() method. Otherwise, none can work, even if my method is marked @Transactional and I will create the owning class with a new operator, no transaction management will be provided. I use Tomcat 6 as a servlet container. So, my question is: how to make Servlet methods managed by Spring framework. The issue here is that I use a framework, and its servlets extend the functionality of basic java Servlets, so they have more methods. Still, web.xml is present in an app as usual. The thing is that I do not control the servlets creation flow, I can only override a few methods of each servlet, the flow is basically written down in some xml file, but I control this process using a graphical gui. So, basically, I only add some code to a few methods of each Servlet. How to make those methods managed by Spring framework? The basic thing I need to do is making these methods transactional (@Transactional).

    Read the article

  • How to display Google Online Spreadsheets in browser using Servlets

    - by Javenerd
    I am looking for a solution on how to display Google spreadsheets in web page using Servlets. Something like this: user logs into the application and then opts to create a new google spreadsheet. I just want to know how to display google spread sheet in web application using servlets. I don't want to create a spreadsheet in my account and then make it shared and publish the URL in my web application. This does not fit my requirement. Can anyone help me how and where to start with this? PS: Same question asked in the below forums: http://www.google.com/support/forum/p/apps-apis/thread?tid=184ba3b87a181ac8&hl=en http://forums.sun.com/thread.jspa?threadID=5433760

    Read the article

  • How to get login password in servlets

    - by Dusk
    I've successfully implemented form based authentication, and now I want to get the username and password to initialize session object in javamail from servlets. How can I do that? I can getlogin username by using method request.getRemoteUser(), but I don't know how to get the password. If I create any session object like: authentication = new PasswordAuthentication(user,password); Properties props = new Properties(); props.put("mail.host", "localhost"); props.put("mail.debug",true); props.put("mail.store.protocol", "pop3"); props.put("mail.transport.protocol", "smtp"); Session session = Session.getInstance(props, this); then how can I get inbox messages from mail server based upon particular username and password, if I don't pass any password from servlets to PasswordAuthentication object?

    Read the article

  • How to create new account using servlets

    - by Alvin
    I want to know how can I create new account using servlets in post method? I'm currently following MVC design pattern, and I want to know if I pass the required data to register new account from JSP page, then how can I get that data in post method? As request.getParameter() method returning me null. How can I know that post method is calling to create new account? How can I pass all the relevant user information from servlets to model class for registering data to the database table?

    Read the article

  • How do I execute a sequence of servlets?

    - by Legend
    I have some servlets that act as individual URLs for populating a database for some dummy testing. Something of the form: public class Populate_ServletName extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType("text/plain"); //Insert records //Print confirmation } } I have about 6 such servlets which I want to execute in a sequence. I was thinking of using setLocation to set the next page to be redirected but was not sure if this is the right approach because the redirects should happen after the records have been inserted. Specifically, I am looking for something like this: public class Populate_ALL extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { resp.setContentType("text/plain"); //Call Populate_1 //Call Populate_2 //Call Populate_3 //... } } Any suggestions?

    Read the article

  • Please clarify a few points concerning Java Servlets

    - by EugeneP
    suppose, I use Tomcat as a web container. Is it true that once all the servlets found in a web-app/WEBAPPNAME are init(IALIZED) then every change of a Servlet's property will be seen to every session. So session 1 changes a property userName of a Servlet1 from "user1" to "user2" session 1 is closed. session 2 starts. It will see "user2" as the only value of Servlet1.userName property?? Any change of a Servlet's field will be seen to all subsequent sessions? Are servlets singletons, aren't they?

    Read the article

  • URL mapping in Servlets

    - by Kenshin
    I am building a site with JSPs and Servlets. How do I map a URL like this example.com/12345 so that I get the response as if the request was example.com/content.jsp?id=12345?

    Read the article

  • How to insert JSP functionality in Servlets?

    - by chustar
    How can I use Servlets to access the HTML uses of having JSP without having to have all my client-facing pages called *.jsp? I would rather do this than using all the response.write() stuff because I think it is easier to read and maintain when it is all clean "HTML". Is this is fair assesment?

    Read the article

  • how to know the protocol from servlets

    - by Dusk
    If I need to get inbox messages by passing request from servlets to javamail API , how can I know the protocol in which to retrieve inbox messages? Do I have to state the protocol in request URL? I've already checked in gmail, where they haven't stated any protocol, then How can I get inbox messages based on particular protocol like: POP3 or IMAP

    Read the article

  • How do you develop Java Servlets using Eclipse?

    - by Y Pgjn
    I would like to program Java servlets using Eclipse and I plan on deploying them using Tomcat. I think I can build the projects using Ant which is bundled with Eclipse. I have the standard Eclipse IDE. What options do I have for doing Servlet development in Eclipse? What changes do I need to make to Eclipse? Do I need to install a plug-in?

    Read the article

  • how to pass objects between two servlets?

    - by rohit
    hi, i am new to servlet programming. i want to know that... is it possible to pass objects between two servlets residing on different application servers??? say two tomcat servers... means what i want to do is: [browser]-- [app server 1 performs some operation on data]-- [server 2 does some operation on data] i am sure it is possible but can anyone tell me how??

    Read the article

  • How to create Chat application using Servlets & JSP

    - by Crazy boy
    I want to create chat application using Servlets & JSP. May I know how can I create chat application as I have never created before? How much knowledge I need to have to create chat application? Is there any need of networking API to create chat application? What's the design pattern I need to follow to create that application? Is there any need of database?

    Read the article

  • Node.js Or servlets?

    - by Nilesh
    I have heard a lot and read about the Javascript server side language i.e Node.js, and saw many comparisons in favor of Node. I don't understand what makes it better or faster, or how it even relates to something as mature as Java Servlets. But Servlets are built on top of a multithreaded programming language as opposed to Node.js. Then how can node.js be faster? If suppose 1000K users query for a database records, then shouldn't Node.js be slower than Servlets. Also Don't servlets have better security compared to Node.js?

    Read the article

  • Servlets vs Spring MVC??

    - by Jegan
    Hi All, I very often come across this question of why we have got lots of web frameworks addressing the same or similar drawbacks. when looking deeply, i also have given thought on why JSP / Servlets is not being used after the other web frameworks (like Struts, Spring MVC etc) have shown their existence? Is it because, the latest web frameworks does most of the things on its own? provides extensive features that is not available with Servlet / JSP? or the Servlet / JSP is impotent to deliver what latest framework does? Any help in the form of responses or resources is greatly appreciated. ~ JK

    Read the article

  • Servlets vs MVC frameworks

    - by Jegan
    I very often come across this question of why we have got lots of web frameworks addressing the same or similar drawbacks. When looking deeply, I also have given thought on why JSP / Servlets is not being used after the other web frameworks (like Struts, Spring MVC etc) have shown their existence? Is it because, the latest web frameworks does most of the things on its own? provides extensive features that is not available with Servlet / JSP? or the Servlet / JSP is impotent to deliver what latest framework does? Any help in the form of responses or resources is greatly appreciated.

    Read the article

  • request parameter is taking null value in servlets

    - by Dusk
    Hi, I want to know how can I get the value of the request parameters "j_username" and "j_password"? After successfully login using form based authentication, I want my servlet to get the value of parameters "j_username" and "j_password", but I'm getting null as the value in both parameters. Could anyone please tell me how can I get the actual value of both paramters? Servlets class : package foo; import javax.servlet.http.*; import javax.servlet.*; public class RequestHandler extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) { try { String user = request.getParameter("j_username"); String password = request.getParameter("j_password"); response.getWriter().println(user+" "+password); } catch(Exception e) { e.printStackTrace(); } } } output: null null

    Read the article

  • Java Logger with Servlets

    - by Sunny
    Hi Guys, I am using a wrapper class A which initializes the java.util.logger static class A { public static Logger logger; public static void init(){ logger = Logger.getLogger("test"); } Now, everywhere in my program I call A.init() and then logger.log("Message+uniqid"). But recently I moved to HTTP servlets and I am having problems. Basically, If a app is already running and the logger is logging... and someone else runs the app again, the logger from the previous instance stops and starts logging for the second one. Can anyone have a solution to how I should go about fixing this static variable issue? I can pass the logger into all constructor classes but thats really tedious. Any better solution would be appreciated..

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >