Search Results

Search found 3678 results on 148 pages for 'jsf jsp el'.

Page 29/148 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • showmodaldialog function in ie8

    - by naweli
    i have written a showmodaldialog() fuction in a jsp file and its working well in firefox but in ie8 its now working,my code is here : <-----a.jsp------ <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"% Step Editor function test() { var retvalue; retvalue = window.showModalDialog("index.jsp"); } <--------- in the above code a.jsp is parent window which is calling index.jsp as child window. <----index.jsp-----

    Read the article

  • how to change radio buttons style in h:selectOneRadio

    - by Mahmoud Saleh
    i have h:selectOneRadio as follows: <div id="container" class="container"> <h:selectOneRadio layout="pageDirection" id="sel_radio" value="#{mBean.selectedRadio}"> <f:selectItem id="option1" itemLabel="item1" itemValue="1" /> <f:selectItem id="option2" itemLabel="item2" itemValue="2" /> </h:selectOneRadio> . . . </div> above will be rendered as follows: <div id="container" class="container"> <table> <tbody> <tr> <td> <input type="radio" name="myForm:sel_radio" id="myForm:sel_radio:0" value="1"> ISSUE: the container class gives default width for all inputs, that will affect on my radio button, here's the css class: .container input { width: 200px; } and i can't change this class because it's a template and used in other pages, i want to override this style in this page only. i tried to override it as by adding following style: .container #myForm:sel_radio:0 { width: 50px !important; } but it doesn't work too. please advise how to fix that, thanks.

    Read the article

  • Glassfish: Storing Java classes in the docroot folder?

    - by Tom Marthenal
    I'm very new to using Glassfish or JSP. I have this working in NetBeans (which has Glassfish bundled) but when I try to put it on my server which is running Glassfish Server, I really don't know what I'm doing. I can place a JSP file in "domains/domain1/docroot/index.jsp" and it will work when I visit my site, but I can't, for some reason, get Java classes to work. I copied the files in "/build/web/" from the NetBeans project to the docroot folder on my server. The errors I get when I visit the site are: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: string:///index_jsp.java:7: package test does not exist PWC6197: An error occurred at line: 5 in the jsp file: /index.jsp PWC6199: Generated servlet error: string:///index_jsp.java:52: cannot find symbol symbol : class TestClass location: class org.apache.jsp.index_jsp PWC6197: An error occurred at line: 5 in the jsp file: /index.jsp PWC6199: Generated servlet error: string:///index_jsp.java:52: cannot find symbol symbol : class TestClass location: class org.apache.jsp.index_jsp The actual Java class is in "WEB-INF/classes/test/TestClass.class" (it is pre-compiled). I really have no idea what I'm doing wrong so any help is greatly appreciated. Thanks!

    Read the article

  • ServeletException, Property <variable name> not found

    - by k9yosh
    What i'm trying to do is add a new variable to this previously created Managed Bean Hello.java and use it in my xhtml file binding to a text field. But it seems that it is not being found when i run it on the server. So it throws a "ServeletException" and says that the "property 'lname'(my variable) is not found". How do i solve this and why is this happening? This is my managed bean, package stack.tute.malinda.model; import javax.faces.bean.ManagedBean; import javax.faces.bean.RequestScoped; @ManagedBean @RequestScoped public class Hello { private String fname; private String message; private String lname; //trying to add this new variable and use it in my xhtml file in a text field. public String getLname() { return lname; } public void setLname(String lname) { this.lname = lname; } public String getName() { return fname; } public String createMessage() { message="Hello " + fname + ""+ lname +"!"; return null; } public void setName(String fname) { this.fname=fname; } public String getMessage() { return message; } } This is my xhtml code, <h:body> <fieldset style="padding: 1em; float:left; margin-right:0.5em; padding-top:0.2em; text-align:left; border:1px solid green; font-weight:bold;"> <legend>Personal Details</legend> <h:form> <h:outputLabel for="name" value="First Name :" required="true"/> <h:inputText id="name" value="#{hello.name}"/> <br/> //Trying to access that variable here. <h:outputLabel for="name1" value="Last Name :" required="true"/> <h:inputText id="name1" value="#{hello.lname}"/> <h:message for="name"/> <br/> <h:commandButton value="Say hello" action="#{hello.createMessage}"> <f:ajax execute="@form" render="@form"/> </h:commandButton> <br/> <h:outputText value="#{hello.message}"/> </h:form> </fieldset>

    Read the article

  • PrimeFaces commandButton doesn't navigate or update

    - by Sven
    I'am using Primefaces to make my app a little bit more beautiful. I noticed that p:commandButton and h:commandButton don't work the same way. The p:commandButton calls the method and nothing else hapens. The h:commandButton calls the method and returns a navigation. I have got trouble with redirecting after pressing the login button when using p:commandButton. How to deal with that? I do have an update parameter: <p:commandButton value="Login" action="#{login.login}" type="submit" update="msgs" />

    Read the article

  • <h:selectOneMenu> ValueChangeListener Problem

    - by Ehsun
    I have two <h:selectOneMenu> tags on my form like this: <h:outputText value="#{lbls.incomeType}:"/> <h:selectOneMenu id="incomeType" label="#{lbls.incomeType}" onchange="submit();" valueChangeListener="#{price.earnTypeValueChanged}" immediate="true"> <f:selectItems value="#{price.earnTypes}"/> <f:converter converterId="ir.khorasancustoms.EarnTypeConverter"/> </h:selectOneMenu> <h:message for="incomeType" infoClass="info" errorClass="error" warnClass="warning" fatalClass="fatal"/> <h:outputText value="#{lbls.earnAttribute}:"/> <h:selectOneMenu id="earnAttribute" label="#{lbls.earnAttribute}" value="#{price.price.earnAttribute}"> <f:selectItems value="#{price.earnAttributes}"/> <f:converter converterId="ir.khorasancustoms.EarnAttributeConverter"/> </h:selectOneMenu> <h:message for="incomeType" infoClass="info" errorClass="error" warnClass="warning" fatalClass="fatal"/> <h:messages globalOnly="true" layout="table" infoClass="info" warnClass="warning" errorClass="error" fatalClass="fatal"/> <h:button value="#{lbls.cancel}" outcome="index"/> <h:commandButton value="#{lbls.ok}" action="#{price.save}"/> the handler in the bean looks like this: public void earnTypeValueChanged(ValueChangeEvent event) { EarnType newEarnType = (EarnType) event.getNewValue(); earnAttributes = newEarnType.getAttributes(); FacesContext.getCurrentInstance().renderResponse(); } Everything works fine, except the user needs to press the OK button twice because the first one fires the earnTypeValueChanged. How is that caused and how can I fix it? Update 1: public void earnTypeValueChanged(ValueChangeEvent event) { EarnType oldEarnType = (EarnType) event.getOldValue(); EarnType newEarnType = (EarnType) event.getNewValue(); earnAttributes = newEarnType.getAttributes(); if (!newEarnType.equals(oldEarnType)) { FacesContext.getCurrentInstance().renderResponse(); } }

    Read the article

  • Object as itemValue in <f:selectItems>

    - by Ehsun
    Is it possible to have objects as itemValue in tag? for example I have a class Foo: public class Foo { private int id; private String name; private Date date; } And another class Bar public class Bar { private Foo foos; } public class BarBean { private Set<Foo> foos; } Now in a Bean called BarBean I need to have a to get the Foo of the current Bar from User like this: <h:selectOneMenu value="#{barBean.bar.foo}" required="true"> <f:selectItems value="#{barBean.foos}" var="foo" itemLabel="#{foo.name}" itemValue="#{foo}" /> </h:selectOneMenu> ---------------edited: my converter: package ir.khorasancustoms.g2g.converters; import ir.khorasancustoms.g2g.persistance.CatalogValue; import java.util.ResourceBundle; import javax.faces.application.FacesMessage; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.Converter; import javax.faces.convert.FacesConverter; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; @FacesConverter("ir.khorasancustoms.CatalogValueConverter") public class CatalogValueConverter implements Converter { @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { SessionFactory factory = new Configuration().configure().buildSessionFactory(); Session session = factory.openSession(); try { int id = Integer.parseInt(value); CatalogValue catalogValue = (CatalogValue) session.load(CatalogValue .class, id); return catalogValue; } catch (Exception ex) { Transaction tx = session.getTransaction(); if (tx.isActive()) { tx.rollback(); } ResourceBundle rb = ResourceBundle.getBundle("application"); String message = rb.getString("databaseConnectionFailed"); FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, message, message)); } finally { session.close(); } return null; } @Override public String getAsString(FacesContext context, UIComponent component, Object value) { return ((CatalogValue) value).getId() + ""; } } and my facelet: <h:outputText value="#{lbls.paymentUnit}:"/> <h:selectOneMenu id="paymentUnit" label="#{lbls.paymentUnit}" value="#{price.price.ctvUnit}" required="true"> <f:selectItems value="#{price.paymentUnits}"/> <f:converter converterId="ir.khorasancustoms.CatalogValueConverter"/> </h:selectOneMenu> <h:message for="paymentUnit" infoClass="info" errorClass="error" warnClass="warning" fatalClass="fatal"/>

    Read the article

  • Sector bancario, un reto de transformación tecnológica

    - by Fabian Gradolph
    El sector financiero se encuentra en un momento clave. No sólo por la coyuntura económica actual, sino también por cuestiones estructurales y normativas que obligan a las entidades bancarias -normalmente a la cabeza de la innovación tecnológica, por cierto- a seguir dando pasos hacia el futuro, manteniendo la tecnología en el corazón de su estrategia de negocio. Así se ha puesto de manifiesto en el encuentro que se ha celebrado hoy en Madrid: Oracle in Banking, donde expertos de Oracle, clientes de la compañía y analistas han puesto sobre la mesa algunos de los desafíos a los que se enfrenta el sector e ideas para aprovechar al máximo la tecnología en la resolución de estos desafíos. El evento ha sido todo un éxito, con asistencia masiva de clientes y partners. En la imagen que ilustra este artículo pueden verse, por este orden: una panorámica de la sala, Modesto Villajos, Regional Sales Manager de Oracle, quien ejerció de maestro de ceremonias. Leopoldo Boado, Country Manager de Oracle España, quien realizó la introducción, Alex Kwiatkowski, de IDC, quien expuso los prinicipales desafíos a los que se enfrenta la banca, y Máximo Díez, Senior Director Financial Services de Oracle, que planteó las diferentes estrategias de transformación que pueden emprender los bancos. El evento se completó con intervenciones de clientes de Oracle (Banco Espírito Santo -BES- de Portugal; y BBVA, de España), y presentaciones y demostraciones técnicas.  De particular interés fue la intervención de Alex Kwiatkowski. De acuerdo con su punto de vista hay cuatro áreas esenciales a las que se enfrenta el sector. La primera de ellas es el marco regulatorio. El sector financiero está sometido a una constante presión normativa (probablemente acrecentada en estos tiempos de incertidumbre), no sólo a nivel nacional, sino también a nivel europeo y global. El cumplimiento exquisito de todas estas normas es esencial para el buen funcionamiento del sistema. La segunda área crítica es la necesidad de ofrecer una experiencia de usuario multicanal satisfactoria, de forma que se potencie la retención de clientes. A veces es difícil darnos cuenta, pero hoy en día nuestras interacciones con el banco han alcanzado una gran diversidad de canales (sucursal, ATM, Internet, banca telefónica, banca móvil...). Esto supone un permanente desafío tecnológico y de procesos para las entidades financieras. El tercer elemento crítico es el del incremento de la eficiencia de las operaciones, manteniendo los costes bajo control o incluso reduciéndolos aún más. Por último, las entidades bancarias tienen ante sí el reto de encontrar nuevas fuentes de ingresos, de forma que el foco deje de estar únicamente en la reducción de costes y la minimización de riesgos. Lo cierto es que en la actualidad, la atención principal se centra en estos dos puntos, pero como mencionó Alex Kwiatkowski "los CIO`s de los bancos se van a plantar en la mesa del CEO con la necesidad de realizar renovaciones completas de los sistemas de core banking y la necesidad de invertir en el desarrollo de nuevos canales". Máximo Díez también enfatizó esta necesidad en su presentación. Los bancos tienen la obligación de econtrar nuevas fórmulas para impulsar el crecimiento, pero la implementación de estrategias en este sentido presenta fuertes desafíos a causa de las limitaciones de los sistemas IT existentes. No hay duda de que se presenta un futuro muy interesante en el ámbito tecnológico para el sector financiero. Lo que Oracle puede hacer y ofrece a las entidades financieras puede encontrarse en este enlace: Financial Services.

    Read the article

  • Access data of a XSL file from a JSF...

    - by Asela
    Hi all, I'm having 2 simple XML & XSL files as follows. form_1.xml <?xml version="1.0" encoding="windows-1252"?> <?xml-stylesheet type="text/xsl" href="form_1.xsl"?> <myform> </myform> form_1.xsl <?xml version="1.0" encoding="windows-1252"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="myform"> <html> <body> <form> <div align="center"> <h2>My first form in XSL</h2> <table cellspacing="1" cellpadding="1"> <tr> <td>First name : </td> <td> <input type="text"></input> </td> </tr> <tr> <td>Last name : </td> <td> <input type="text"></input> </td> </tr> <tr> <td>Address : </td> <td> <input type="text"></input> </td> </tr> </table> </div> </form> </body> </html> </xsl:template> </xsl:stylesheet> Now I have a JSF file where I have embeded the form_1.xml file inside an iFrame. Inside my JSF, I have submit & reset buttons as follows. myJsf.xhtml <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:utils="http://java.sun.com/jsf/composite/utils"> <h:head> <title>::: The form filler application :::</title> <link href="./css/styles.css" rel="stylesheet" type="text/css" /> </h:head> <h:body> <div align="center"> <table cellspacing="2" cellpadding="2"> <tr> <th class="title">&nbsp; My form filler &nbsp;</th> </tr> </table> <br /> <fieldset><legend>Fill appropriate data in the following form</legend> <h:form> <div align="center"> <table> <tr> <td colspan="2"><iframe src="form_1.xml" frameborder="0" width="500px" height="500px"></iframe></td> </tr> <tr></tr> <tr> <td align="right"><h:commandButton value="Save data" action="#{myManagedBean.printValuesEnteredInTheForm}" /></td> <td align="left"><h:commandButton type="reset" value="Clear" /></td> </tr> </table> </div> </h:form></fieldset> </div> </h:body> </html> Now my question is that upon clicking the Submit button in my JSF, how do I access the values which I have entered in the XSL file? Any help is greatly appreciated. Thanks in advance. Reagrds, Asela.

    Read the article

  • Learning MVC for a JSP Resource and ASP.Net WebForms Resource

    - by Lijo
    Statement from a colleque: - "People with ASP.Net WebForms skills should be able to learn it easily as the fundamental concept is same.” Consider two people –one from JSP background and other from ASP.Net WebForms background. Now both need to learn ASP.Net MVC in RAZOR. Do you think the person from ASP.Net Webforms background has significant advantage over the person from JSP background? My feeling is – it is equally difficult for JSP person and ASP.Net Webforms person to learn MVC with RAZOR. What is your take on it? Any statistics that you can provide for this?

    Read the article

  • JSP: How can I still get the code on my error page to run, even if I can't display it?

    - by Josh Hinman
    I've defined an error-page in my web.xml: <error-page> <exception-type>java.lang.Exception</exception-type> <location>/error.jsp</location> </error-page> In that error page, I have a custom tag that I created. The tag handler for this tag e-mails me the stacktrace of whatever error occurred. For the most part this works great. Where it doesn't work great is if the output has already begun being sent to the client at the time the error occurs. In that case, we get this: SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp] java.lang.IllegalStateException I believe this error happens because we can't redirect a request to the error page after output has already started. The work-around I've used is to increase the buffer size on particularly large JSP pages. But I'm trying to write a generic error handler that I can apply to existing applications, and I'm not sure it's feasible to go through hundreds of JSP pages making sure their buffers are big enough. Is there a way to still allow my stack trace e-mail code to execute in this case, even if I can't actually display the error page to the client?

    Read the article

  • Development deployment: how to achive edit-and-reload with JSP pages?

    - by doublep
    Out project uses WebLogic as web-server and uses mostly JSP for user interface. With standard setup it is possible to copy edited JSP files into the exploded deployment directory and WebLogic will automatically pick them up, recompile and serve new content through HTTP. However, is it possible to avoid copying at all, so that I just save a file in my editor and it is immediately (well, after a couple of seconds for recompilation) visible? The project uses Apache Ant as building tool. I would imagine what I want would be possible with symlinks (since this is for deployment only I don't care about cross-platformity), but then I don't see how it is possible to symlink lots of files at once with Ant. So, how do I achieve save-JSP-hit-F5-in-browser functionality either with some setting in WebLogic; or with symlinking JSPs using Apache Ant (instead of copying them as is done now); or something else completely?

    Read the article

  • What would be the simplest way to deal with a text file using JSP?

    - by Nano Taboada
    First and foremost I should acknowledge that I have no experience at all using Java ServerPages, but I'm positive about achieving this task if you guys help me out a bit since it doesn't seem like something difficult for a seasoned JSP programmer. Anyway the thing is, there's an actual running JSP application within a *NIX box which I somewhat administer with kind of good permissions. The idea is to create a new but dead simple JSP page to control some Korn Shell scripts I've got running there. So the goal is to make some sort of HTML form that will be writing some kind of scriptStatus.on / scriptStatus.off file: #!usr/bin/ksh # coolScript.sh # This is my cool script that is being launched by cron every 10 minutes. if [ -e scriptStatus.off ] then # monitor disabled else # monitor enabled fi which then can be checked for existence within the running script, therefore allowing to easily activate / deactivate it without actually have do deal with cron. Please let me know if all this does make any sense and don't hesitate to ask as much questions as needed. Thanks much in advance!

    Read the article

  • Is it possible to evaluate a JSP only once per session, and cache it after that?

    - by Bears will eat you
    My site has a nav menu that is dynamically built as a separate JSP, and included in most pages via <jsp:include />. The contents and styling of the menu are determined by which pages the user does and doesn't have access to. The set of accessible pages is retrieved from the database when a user logs in, and not during the course of a session. So, there's really no need to re-evaluate the nav menu code every time the user requests a page. Is there an easy way to generate the markup from the JSP only once per session, and cache/reuse it during the session?

    Read the article

  • JSF in jetty-equinox, Cannot find Bean classes in other bundles!

    - by Arnold
    Hi I have problems running JSF in an OSGi environment. I am using jetty web container and equinox to provide the OSGi functionality. The structure of my application is as follows: The first bundle has all the JSF libs, web.xml and a config.xml. It looks as the following: bundle1 ----src/main/java -------de/package ----------Activator.java ----------JSFResolver.java ----src/main/resource ------ WebContent ----------META-INF -------------face-config.xml --------------web.xhtml ----------start.xhtml -----------include.xhtml ----libs (containing all JSF required Jars) The structure of the second bundle is as follows: bundle2 ---src/main/java ------de/package ----------Bean.java ---src/main/resource ------META-INF ---------face-config.xml ------WebContent ---------index.xhtml When running the application of equinox, the bundle1 is the main bundle where all the browser requests are sent to. In the second bundle, the 'index.xhtml' file can be retrieved the by first bundle upon request. The 'index.xhtml' in bundle 2 gets its values and properties from the 'Bean.java' in bundle 2. The problem comes when i request the 'index.xhtml', the Bean.java class is not found. I think this is because the class loader of bundle1 cannot find it, it has no knowledge of it. So i would like to ask if anyone knows how to solve this problem. If so please do assist me, i have tried all the possibilities i had.. Is it infact possible to have JSF run on multiple bundles using the same FaceletsContex? Can i be able to have seperate faces-config.xml files in each bundle, which can all be connected other faces-config.xml in other bundles? Can anyone please provide me a solution. Sample code would help. thanks workspace_current.rar Arnold

    Read the article

  • Servlet/JSP Flow Control: Enums, Exceptions, or Something Else?

    - by Christopher Parker
    I recently inherited an application developed with bare servlets and JSPs (i.e.: no frameworks). I've been tasked with cleaning up the error-handling workflow. Currently, each <form> in the workflow submits to a servlet, and based on the result of the form submission, the servlet does one of two things: If everything is OK, the servlet either forwards or redirects to the next page in the workflow. If there's a problem, such as an invalid username or password, the servlet forwards to a page specific to the problem condition. For example, there are pages such as AccountDisabled.jsp, AccountExpired.jsp, AuthenticationFailed.jsp, SecurityQuestionIncorrect.jsp, etc. I need to redesign this system to centralize how problem conditions are handled. So far, I've considered two possible solutions: Exceptions Create an exception class specific to my needs, such as AuthException. Inherit from this class to be more specific when necessary (e.g.: InvalidUsernameException, InvalidPasswordException, AccountDisabledException, etc.). Whenever there's a problem condition, throw an exception specific to the condition. Catch all exceptions via web.xml and route them to the appropriate page(s) with the <error-page> tag. enums Adopt an error code approach, with an enum keeping track of the error code and description. The descriptions can be read from a resource bundle in the finished product. I'm leaning more toward the enum approach, as an authentication failure isn't really an "exceptional condition" and I don't see any benefit in adding clutter to the server logs. Plus, I'd just be replacing one maintenance headache with another. Instead of separate JSPs to maintain, I'd have separate Exception classes. I'm planning on implementing "error" handling in a servlet that I'm writing specifically for this purpose. I'm also going to eliminate all of the separate error pages, instead setting an error request attribute with the error message to display to the user and forwarding back to the referrer. Each target servlet (Logon, ChangePassword, AnswerProfileQuestions, etc.) would add an error code to the request and redirect to my new servlet in the event of a problem. My new servlet would look something like this: public enum Error { INVALID_PASSWORD(5000, "You have entered an invalid password."), ACCOUNT_DISABLED(5002, "Your account has been disabled."), SESSION_EXPIRED(5003, "Your session has expired. Please log in again."), INVALID_SECURITY_QUESTION(5004, "You have answered a security question incorrectly."); private final int code; private final String description; Error(int code, String description) { this.code = code; this.description = description; } public int getCode() { return code; } public String getDescription() { return description; } }; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String sendTo = "UnknownError.jsp"; String message = "An unknown error has occurred."; int errorCode = Integer.parseInt((String)request.getAttribute("errorCode"), 10); Error errors[] = Error.values(); Error error = null; for (int i = 0; error == null && i < errors.length; i++) { if (errors[i].getCode() == errorCode) { error = errors[i]; } } if (error != null) { sendTo = request.getHeader("referer"); message = error.getDescription(); } request.setAttribute("error", message); request.getRequestDispatcher(sendTo).forward(request, response); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } Being fairly inexperienced with Java EE (this is my first real exposure to JSPs and servlets), I'm sure there's something I'm missing, or my approach is suboptimal. Am I on the right track, or do I need to rethink my strategy?

    Read the article

  • Project Corndog: Viva el caliente perro!

    - by Matt Christian
    During one of my last semesters in college we were required to take a class call Computer Graphics which tried (quite unsuccessfully) to teach us a combination of mathematics, OpenGL, and 3D rendering techniques.  The class itself was horrible, but one little gem of an idea came out of it.  See, the final project in the class was to team up and create some kind of demo or game using techniques we learned in class.  My friend Paul and I teamed up and developed a top down shooter that, given the stringent timeline, was much less of a game and much more of 3D objects floating around a screen. The idea itself however I found clever and unique and decided it was time to spend some time developing a proper version of our idea.  Project Corndog as it is tentatively named, pits you as a freshly fried corndog who broke free from the shackles of fair food slavery in a quest to escape the state fair you were born in.  Obviously it's quite a serious game with undertones of racial prejudice, immoral practices, and cheap food sold at high prices. The game itself is a top down shooter in the style of 1942 (NES).  As a delicious corndog you will have to fight through numerous enemies including hungry babies, carnies, and the corndog serial-killer himself the corndog eating champion!  Other more engaging and frighteningly realistic enemies await as the only thing between you and freedom. Project Corndog is being developed in Visual Studio 2008 with XNA Game Studio 3.1.  It is currently being hosted on Google code and will be made available as an open source engine in the coming months.

    Read the article

  • Relationship DAO, Servlet, JSP and POJO

    - by John Hendrik
    I want to implement a JSP, POJO, DAO and Servlet in my J2EE program. However, I don't fully understand how the relationship between these elements should be. Is the following (MVC) setup the right way to do it? Main class creates servlet(controller) Servlet has a DAO defined in its class DAO has a POJO defined in its class Servlet communicates with the view (JSP page) Please give your feedback.

    Read the article

  • How to read attachment messages without using scriptlets in JSP?

    - by Stardust
    Hi, I want to know how can I read attachment messages without using scriplets in JSP? After getting Message object as an attribute by using request object from servlets, how can I confirm whether Message content is an instance of Multipart or not without using scriplets like: if(message.getContent() instanceOf Multipart) How can I read the content of any file by using EL in JSP? As I can't see any getRead method in inputStream subclass.

    Read the article

  • Should I add try/catch around when casting on an attribute of JSP implicit object?

    - by Michael Mao
    Hi all: Basically what I mean is like this: List<String[]> routes = (List<String[]>)application.getAttribute("routes"); For the above code, it tries to get an attribute named "routes" from the JSP implicit object - application. But as everyone knows, after this line of code, routes may very well contains a null - which means this application hasn't got an attribute named "routes". Is this "casting on null" good programming practice in Java or not? Basically I try to avoid exceptions such as java.io.InvalidCastException I reckon things like this are more as "heritage" of Java 1.4 when generic types were not introduced to this language. So I guess everything stored in application attributes as Objects (Similar to traditional ArrayList). And when you do "downcast", there might be invalid casts. What would you do in this case? Update: Just found that although in the implicit object application I did store a List of String arrays, when I do this : List<double[]> routes = (List<double[]>)application.getAttribute("routes"); It doesn't produce any error... And I felt not comfortable already... And even with this code: out.print(routes.get(0)); It does print out something strange : [Ljava.lang.String;@18b352f Am I printing a "pointer to String"? I can finally get an exception like this: out.print(routes.get(0)[1]); with error : java.lang.ClassCastException: [Ljava.lang.String; Because it was me to add the application attribute, I know which type should it be cast to. I feel this is not "good enough", what if I forget the exact type? I know there are still some cases where this sort of thing would happen, such as in JSP/Servlet when you do casting on session attributes. Is there a better way to do this? Before you say:"OMG, why you don't use Servlets???", I should justify my reason as this: - because my uni sucks, its server can only work with Servlets generated by JSP, and I don't really want to learn how to fix issues like that. look at my previous question on this , and this is uni homework, so I've got no other choice, forget all about war, WEB-INF,etc, but "code everything directly into JSP" - because the professors do that too. :)

    Read the article

  • How to give full path name in JSP programming?

    - by sujoy
    Actually when I run a particular JSP page it run perfectly(with external style sheet) but when servlet return back the control through RequestDispatcher, the page is not displaying properly means it don't took the css file path. In my program the stylesheet is present inside css directory and the page is present inside another directory named JSP. The code which include the css in the program is- <link rel="stylesheet" href="../css/stylesheet.css" type="text/css"/>

    Read the article

  • How can i maintain last cookie value in flex with jsp?

    - by praveen
    Hi All, my login form in flex when I login I have created a cookie in jsp like this name setValueCookie.jsp <%@ page language="java" import="java.util.* , javax.net.*" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <% String username = request.getParameter("value"); System.out.println("Email got in cookieSet = " + username); if(username==null) username=""; Date now = new Date(); String timestamp = now.toString(); Cookie cookie = new Cookie("username",username); cookie.setMaxAge(365 * 24 * 60 * 60); response.addCookie(cookie); %> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>DashBoard-Cookie</title> </head> <body> </body> </html> now using Http service request parameter i am passing username 'Value' to this jsp. and i am reading cookie value from getValueCookie.jsp like this <% String cookieName = "username"; Cookie cookies [] = request.getCookies (); Cookie myCookie = null; String result; if (cookies != null) { for (int i = 0; i < cookies.length; i++) { if (cookies [i].getName().equals (cookieName)) { myCookie = cookies[i]; break; } } } %> <data> <status><%=myCookie.getValue().toString()%></status> </data> through the httpservice value i am getting but if i open a new window or any new tab cookie value is not getting how can i solve this? Thanks in advance.

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >