Should I use JSP,JSTL,SERVLETs without a framework?

Hi Guys
I'm making a multi player browser game. The game will have some forms to setup data into the database and the player will be able to check other players data.
I will load the players data from the DB into a Bean when the application starts and then just get the other players information from DB when and if asked.
I'm planing on doing it as MVC2 using JSP, JSTL, SERVLETs, BEANs
Would you recommend me to use Struts for example? should I just use it without any framework?
I read a lot about Struts and can't really see what it can bring to an application like mine. I can use the i18n easily with JSTL and for few validation of forms I don't know if it's worth it.
What do you think? (-:
Thanks in advance
(-:

If your going to use MVC2 then I would use a framework, otherwise where are you going to get your MVC from, were you planning on writing an MVC yourself?

Similar Messages

  • How can i upload a image file to server by using jsp or servlet.

    Hi,
    I m gurumoorthy. how can i upload a image file to server by using jsp or servlet without using third party API. pls anyone send me atleast outline of the source code.
    Pls send me anyone.
    Regards,
    Gurumoorthy.

    I'm not an applet programmer so I can't give you much advice there.
    If you want to stream the file from the server before it's entirely uploaded, then I don't believe you can treat it like a normal file. If you're just wanting to throw it up there and then listen to it, then you can treat it like a normal file.
    But again, I'm not entirely certain. You might be able to stream the start of the file from the server while you're still uploading the end of it, but it probably depends on what method you're using to do the transfer.

  • Interesting single sigon application project using jsp and servlet....Help.

    A customer login's to my website using Enterprise login. I am supposed to have a link on my website to this other website(that also uses our Enterprise login details but hosted by other vendor/company on their server), and when I click this link the customes should automatically get logged in to this other website and get a welcome page(instead of login page).
    Below are the sequence of steps that the other website wants me to perform to get to his welcome page(i.e bypass his login page).
    FYI, I am planning to build a jsp page with a link to this other website. Can some body tell me how should I build the application(i.e) how jsp and servlets be build to interact to perform these operations. Any hep is greatly appreciated.
    1.When a user clicks on to other website link(available on my website), the browser generates an HTTP GET request to the Other website's session servlet. User's name is one of the parameters of this request.
    2.Other website receives the HTTP request and generates a unique session identifier for this user. An HTTP response to the end-user is then sent. The user's name and the session identifier are passed back as parameters in the redirect URL.
    3.The browser sends the HTTP request (GET) to the Verification Service that was specified in the redirect message. The parameters (user name and/or session id) will be passed as URL parameters.
    4.The Verification Service(of other website) authenticates the user. A redirect URL to it's sigon servlet(with parameter's User id and key) is then sent back to the user's browser.
    5.The end-user's browser will perform the redirect (performing an HTTP get operation to Other website's signon servlet with the username and the digest key).
    6.The other website will check if the parameter's passed is the same as the one passed earlier, if the user is who he says he is then he is redirected to the main page of the application.
    7.The browser will then redirect the user to Other website's main page (welcome.jsp).
    There seems's to be many calls to this other website that needs to be performed behind the scenes once a user clicks the link on my website.
    Please suggest and help me out.........
    Edited by: 836726 on Feb 21, 2011 3:41 PM

    Why are you trying to build a whole federated single sign on framework from scratch when you can just use/buy an existing and proven solution instead? There are a lot of security implication and trust issues involved for this so unless you already understand all of those I'd advise you not to re-invent the wheel. There are a lot of products available that do this. Try searching for '<vendor name> Access Manager' or OpenSSO.

  • Implementing  jdbc using jsp and servlets

    please give me documnetation and few programs with code .
    implementing or using jdbc with servlets and jsp.

    please give me documnetation and few programs with
    code .
    implementing or using jdbc with servlets and jsp.Well, which do you want to do? Implement JDBC with servlets and JSP - a tricky job, but there's no technical reason why you couldn't for instance write a class which both extends HttpServlet and implements java.sql.Driver. Wouldn't recommend it, though

  • When should we use JSP?

    Hello!
    I have a little general question about JSP because now I'm going to embark upon web development (till today I have been developing native applications). Is JSP used in really big web applications by professionals? I mean, something much bigger than simple forums, rather whole social networkings portals etc? And can JSP fully replace PHP (in practise) in a project or these technologies are rather mixed? Can you give me some examples of web portals developed in JSP? I hesitate between JSP or PHP. I'm familiar with Java and have no experience with PHP. I hope you will help me in making a right decision ;-).
    Kind regards,
    John.

    There are a few big choices for Web development:
    - PHP - long the first choice of teenagers and amateurs, recently with version 5 and frameworks like Symfony, it is maturing.
    - ASP - the Microsoft solution, easy to use, very little structure. A favorite with small business. Recently ASP.Net has provided objects.
    - CGI - used with Perl, this is the grand-daddy of them all, still used, cheap and cheerful, but it doesn't scale well.
    - JEE - Java Enterprise, provides more choices than you can shake a stick at, used by well to do amateurs, students, and big corporations. Hosting for JEE is much more expensive than for the first three, but it is much more powerful.
    ---- JSP - the favorite presentation system for Java servlets. This is a Java version of ASP, by itself it provides little structure
    ---- Velocity, Webmacro and Freemarker - template engines for Java, often run faster than JSP
    ---- Struts - Apache's MVC solution, uses JSP or Velocity for presentation
    ---- Spring MVC - the new system on the block, a big improvement over Struts, still uses JSP and Velocity for presentation
    ---- JSF - Sun's answer to MVC, a component based system like ASP.Net. Provides rapid development at the cost of being tied to forms and tables. Uses a strange version of JSP for presentation. Don't get me started on <verbatim>.

  • How to push back a message to browser using JSP or Servlet?

    Hi,
    I am coding some JSP and Servlet codes, and want to push back a mssage to browser and don't let browser first send a request to server like chat. Who can help me for that?
    Thanks,
    Wise

    You wrote:
    Not quite correct - see Pushlets:I wrote:
    "...to have code running on the client (eg an applet or a flash movie)"
    I add "...(eg an applet or a flash movie OR JavaScript)..." ;-)

  • Sending automatic mail using JSP or Servlet

    hello,
    i was just wondering if anyone out there knows how can automatically send emails to client from my application after receiving thier email address. the email address is received from a form and i want my application to automatically send a structured email to the client as soon as they click the send button. i am using JSP and tomcat as my server. any help will be appreciated

    You must create a class that sends the mail:
    A code example would be like this:
    import javax.mail.Message;
    import javax.mail.MessagingException;
    import javax.mail.Session;
    import javax.mail.Transport;
    import javax.mail.internet.InternetAddress;
    import javax.mail.internet.MimeMessage;
    import java.util.*;
    public class MailSender {
         public void postMail(String smtpsrv, String recipients[], String subject,
                   String message, String from) throws MessagingException {
              boolean debug = false;
              //Set the host smtp address
              Properties props = new Properties();
              props.put("mail.smtp.host", smtpsrv);
              // create some properties and get the default Session
              Session session = Session.getDefaultInstance(props, null);
              session.setDebug(debug);
              // create a message
              Message msg = new MimeMessage(session);
              // set the from and to address
              InternetAddress addressFrom = new InternetAddress(from);
              msg.setFrom(addressFrom);
              InternetAddress[] addressTo = new InternetAddress[recipients.length];
              for (int i = 0; i < recipients.length; i++) {
                   addressTo[i] = new InternetAddress(recipients);
              msg.setRecipients(Message.RecipientType.TO, addressTo);
              // Setting the Subject and Content Type
              msg.setSubject(subject);
              msg.setContent(message, "text/html;charset=utf-8");
              Transport.send(msg);
    You 'll find out that its easy to understand the code.
    I advise you not to change this code.
    I also include an example of how to right the JSP code:
    <%
    MailSender MS = new MailSender();
    try {
         MS.postMail(server, recipient,"Your E-mail Title", "BODY content", from);
         } catch (MessagingException e1) {
                        e1.printStackTrace();
    %>
    This JSP code follows the pattern of the above class
    Hope to help you
    Cheers!!!

  • Play an audio file in JSP or Servlet without asking to save

    Hi,
    I struck with one problem since so many days. My problem is, i am having stream content for ringtones to play in database. In servlet, i am setting the content type to *"audio/x-wav"* and writitng the response to the output stream by retrieving the streaming content from the database.
    The problem is, with Internet Explorer it's a working beauty that it was playing in Windows Media Player without asking for saving. But, the problem is with Mozilla browser which was showing the save as dialog box which i couldn't do.
    Is there any solution that i can play so that audio will be played without opening any player by default provided in the system or can i create a plugin for player in the server so that the player in the server will be opened and played without the need to search for players available in the system.
    Please provide me the solution.

    You need to embed an audio player in your JSP. You can use the HTML <object> tag for this.

  • Showing various images on browser using JSP and Servlet

    Hello Guys!
    I am starting to develop in Java and already I am facing a big problem.
    If somebody will have some tip or suggestion, will be very well comings!
    The application must present in browser images originnally of format TIF. As it is not a native format of the I.E. , I converted the image for JPG (without saving it on disk) and send it to the browser a encoded image (encode) using JAI library in one servlet had access by a JSP. Then, the structure of my application is thus:
    1) an archive JSP draws the initial screen in browser and presents one input text.
    2) later that the user places the parameter, I make an access to the database and read a quantity of images to be presented.
    3) From there in the proper JSP, I use de tag img src to send image to the browser in agreement archive the amount of images.
    It follows the code of the JSP:
    <% 
                    int intI=0;
                    int intCont=0;
                    if(blnImagem == true){
                        out.println("<br>");
                        out.println("<table border=0 STYLE=border-collapse:collapse>");
                        out.println("<tr>");
                        for(intI=0;intI < Processo.intQtdImagens;intI++){
                           Imagem.strImgTif = Imagem.IndicarImagem(Processo.strNmPath,Processo.strSubPath,Processo.intNuImagem,intI);                                                                    
                           out.println("<th>");
                           out.println("<table border=1 STYLE=border-collapse:collapse rules='cols'>");
                           out.println("<tr>");
                           out.println("<th>");
                           %>
                             <img src="ShowImg" WIDTH=100>
                           <%
                           out.println("</th>");
                           out.println("</tr>");
                           out.println("</table>");
    %>and code on the ShowImg servlet:
            response.setContentType("image/jpeg");       
            ServletOutputStream sos = response.getOutputStream();
            RenderedOp src = JAI.create("fileload", Imagem.strImgTif);           
            ImageEncoder encoder = ImageCodec.createImageEncoder("JPEG",sos,null);       
            encoder.encode(src); 
            sos.close();The problem is if I have 10 images to present, it WILL BE it is executed 10 times and it passes 10 names of different archives, but in the page only the last image is presented 10 times. It is as if it processed the TAG to the end of everything in way that the value of the static variable Imagem.strImgTif was chore only with the last value and the same loaded image 10 times. How I make to solve this? Somebody has some idea?
    THANK YOU !
    Emidio

    If I understand correctly what your problem is:
    Do this in the jsp:
    out.println("<img src=\"ShowImg?image=" + intI + "\" WIDTH=100>");
    In the image servlet, get the "image" parameter and parse it as an int. Move the Imagem.IndicarImagem() call to the image servlet.

  • Consuming a Web Service using JSP and servlet

    I have created a Web Service in Netbeans IDE 5.5. I developed a JSP to provide input to the Web Service, and a servlet that will pass the input to the web service through a request and outputs the result.
    I am getting the following error:
    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.init() for servlet TestServlet threw exception
    root cause
    java.lang.RuntimeException: WEB5002: Exception in handleBeforeEvent.
    root cause
    com.sun.enterprise.InjectionException: Exception attempting to inject Env-Prop: test.org.TestServlet/service@Field-Injectable Resource. Class name = test.org.TestServlet Field name=[email protected]@@@ into class test.org.TestServlet
    root cause
    javax.naming.NamingException [Root exception is java.lang.reflect.InvocationTargetException]
    root cause
    java.lang.reflect.InvocationTargetException
    root cause
    javax.xml.ws.WebServiceException: java.io.FileNotFoundException: http://localhost:8080/TestWebApplication/TestWSService?wsdl
    root cause
    java.io.FileNotFoundException: http://localhost:8080/TestWebApplication/TestWSService?wsdl
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server Platform Edition 9.0_01 logs.
    Any hints???

    You probably should post to either the NetBeans website mailing list, or the Sun forum that supports the Sun Application Server, as the error is the result of a configuration error of one or both of these products. A file can't be found:
    java.io.FileNotFoundException: http://localhost:8080/TestWebApplication/TestWSService?wsdl
    note The full stack traces of the exception and its root causes are available in the Sun Java System Application Server Platform Edition 9.0_01 logs.
    These forums are for support of the Java language.

  • Executing KSH shell scr thru web-page using JSP or servlets - req. assistan

    Hi - I have a shell scr which I regularly use thru UNIX terminal. It takes parameters like -stgdir=xxx, -abc, -def, etc. etc. and then kicks off processing whatever it's supposed to do. It does not run in the background, so in another screen I basically "tail" the logs. 2nd. script does the same but takes some user inputs interactively. Note that none of these scripts perform any sys admin activities, nor do they require root privileges.
    Priority is 1st. script - I was wondering if it's possible to build a servlet, which can invoke this script and thus I can deploy the servlet/jsp page combination in some web-server within the UNIX machine and be able to access it from my Windows PC, Firefox/IE. Once started, the servlet can do either (a) Provide a link which links to the log-file (b) Automatically do a page change and start showing the log-file.
    Is this possible and if yes if some help can be provided - much appreciated.
    2nd. script I believe would be a bit complex as the servlet need to capture user inputs and actually "mirror" the shell script queries back to the client. If any help can be rendered for this too, much appreciated.
    An important detail - the parameters for the 1st. script can not be hard-coded but need to be provided as an option to user, since the options can change with situation.
    Again - thanking you in advance.
    Edited by: baivab on Oct 9, 2008 1:29 AM

        ProcessBuilder pb1 = new ProcessBuilder("script1.sh "+param1+" "+param2);
        Process p1 = pb1.start();
        p1.waitFor()  // in case you want to wait for completion of the shell script
        ProcessBuilder pb2 = new ProcessBuilder("script2.sh "+param1+" "+param2);
        Process p2 = pb2.start();
        PrintWriter pw = new PrintWriter(p2.getOutputStream(), true);
        pw.println(input1);  // input1 is the input expected by the script2.shalso look at the API for ProcessBuilder and Process classes

  • Exporting into Excell format using JSP or Servlet

    Dear All
    Could anyone please give me a little suggestion on my project?
    I want to export the reports into MS Excell format from Servlet or JSP Page. Which one is effective and pls give some tips and sample code.
    With uncountable THANKS : )
    Ananth.P

    Hi
    I read about it in book Coreservlets and JSP pages author Marty Hall
    link : http://www.coreservlets.com/
    You can use content-type for excel and data which you want export to Excel place in HTML table or separete tab characters.
    My english is poor. I hope that You understand me.
    link:
    http://archive.coreservlets.com/JSP-Code/Excel.jsp

  • Using JSP in Web Server

    Hi,
    Can I use JSPs and Servlets without using the Application server in the web server?

    Hi,
    By default JSP and Servlets are supported by iWS/SUN ONE Web Server. For iWS till version 4.1 you need to manually enable the servlet engine and jsp. This can be done from the Server side, goto admin mode, select the server for which you want to activate the JSP, select servlet tab and click on appropriate radio button (YES) for Enabling JSP's and Servlet's.
    NOTE: If you disable Servlet engine and JSPs are enabled, JSPs will also be disabled.
    From version 6, JSP support is enabled by default.
    Regards
    Srini

  • Why we should use JSP instead of Servlet ?

    I want to know what are the advantages to use JSP over Servlet.

    hi
    Servlets are server exctension ( like CGI ) separate executable
    modules to serve any request efficiently.
    Servlets are pure java classes, u can use them the write an html code to browser.
    u have to compile the servlet before u use it.
    JSP page, is a text-base document , u can type html inside it , and u can use java as scripting language, so it is more easy to use jsp rather than servlet as each jsp page is translated into a servlet by JSP engine.
    Hope this will help
    Good luck
    Mohammed

  • Import contact from gmail yahoo hotmail aol using  jsp servlet

    hey can any one tell me the code to import contact list from gmail yahoo aol hotmail etc using jsp or servlet

    I guess you should look for these companies' Java APIs. Some of them (not sure if the ones you want) provides soap clients...

Maybe you are looking for

  • Additional appearance option for cross-references

    There should be a way to leave off the "preamble" part ("Figure", "Table", etc) of a paragraph number in a cross-reference. So instead of writing things like "As shown in Figure 5 through Figure 9...." we could write "As shown in Figures 5 through 9.

  • Credit check for Partially delivered order

    Dear Gurus We have a scenario where we are releasing a sales order (vkm3) forcefully since it is exceeding the dynamic credit check. Now when we do a partial delivery for the first time it is working fine, But when we again try to create a delivery f

  • G60-235DX Sound Card XP Drivers

    Hallo I bought a laptop of type  G60-235DX and I downgrated it to xp professiona. I founded at the forums some drivers for XP but there where some drivers which I didn't found it yet please can you help me.  Driveres which I need are for: Audio  Ethe

  • Dropdown List in Adobe Interactive Form Using Webdynpro ABAP

    Hi Pals, In my scenarion I need to list the Rating Code in the Dropdown list box of the Interactive Form. Form Created by using SFP transaction Not XML Schema interface Passing the values to the Form by using the default function module that which cr

  • Safari will not open on ipad

    safari will not open on ipad