Search Results

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

Page 12/148 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • JSF-JSP cancel button returns a number format exception

    - by Barca
    I have a cancel button on a JSF-JSP page. It is handled by a method on the corresponding java class: public String cancel_action() { return "CANCEL"; This is configured in faces-config.xml as following: <navigation-rule> <from-view-id>/page2.jsp</from-view-id> <navigation-case> <from-outcome>CANCEL</from-outcome> <to-view-id>/page1.jsp</to-view-id> </navigation-case> </navigation-rule> Not sure why it is returning a number format exception. Any help will be highly appreciated.

    Read the article

  • HIt counter in JSF

    - by Hari kanna
    hi expertise... i want 2 add small module hit counter in my web app like in PHP we can use external text file to store number which icrement and write it on webpage but how to use in JSF my app is full of developing JSF...

    Read the article

  • JSF library for Master - Details screen

    - by user305702
    I have a JSF - Spring - iBatis Technical stack I need to create Master Details relationship screen with two level of Master _Details captured in single screen Which JSF library gives support for such requirements ??? Exact Need : Have to create at least 5-6 screens with Header- Line - LineItemDetails - LineTaxDetails - LineXYZDetails in single screen Please help with examples or urls regards Shridhar

    Read the article

  • Where JSF and struts2 fails/goods

    - by ch.o.i.ce
    I am begining a web system and can't decide what technology use! Struts2 and JSF (with jboss seam) are a nice choices, but I can't decide which's better. In JSF have some that I don't like, maybe its "paradigm" no action like. And Struts2, the peoples here don't use more. The system is a map collaborative web site.

    Read the article

  • JSF vs Stripes, which is best?

    - by Davoink
    Which is best, or in other words, whish is easiest to use? Stripes or JSF. Although I haven't used both in anger I need to gauge what is the best option to work with for both starting new projects and converting existing Struts projects. I have a fear that JSF won't render as nicely as I want but what are others experiences? Seems Stripes is far more straight forward, would I be correct in this assumption? Cheers.

    Read the article

  • WHich Implemtation of JSF 1.1 to USe MyFaces or Sun RI

    - by Macvin
    Hi, We want make a choice between SUN RI 1.1 JSF implementaiton and MyFaces . Appserver we will be using is Weblogic 8.1. Could you please rpovide main points for Comparison between the two Which one is better. Can we USe Facelets in SUN RI 1.1_02 . Which is the better choice if want to move the Application to JSF 1.2 and JDK 1.5 in Future. Thanks Mac

    Read the article

  • Websphere 7 and JSF 1.2 - Application was not properly initialized at startup, could not find Factor

    - by Shamik
    JSF 1.1 and websphere 6.1 was working properly in my case. Once I deployed that to a websphere 7 server, I received the following error - Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactoryat javax.faces.FactoryFinder.getFactory(FactoryFinder.java:270) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:164) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168) Not sure what it means, I have enabled JSF1.2 as project facet in the RAD but still keep getting the above error message and none of my jsf files are working.

    Read the article

  • JSF trimming white spaces

    - by msharma
    HI, I have an input field in which I want to trim any leading/trailing whitespaces. We are using JSF and binding the input field to a backing bean in the jsp using: <h:inputText id="inputSN" value="#{regBean.inputSN}" maxlength="10"/> My question is that besides validation can this be done in the jsp? I know we can also do this using the trim() java function in the Handler, but just wondering if there is a more elegant way to achieve this in JSF. Thanks.

    Read the article

  • JSF data transfer between UI and business layer

    - by Ram
    Hi, We are using JSF in UI, Spring in business layer, Hibernate in persistence layer. Now my question is how to pass data from the JSF UI to spring business layer. Can I directly use my business object in my backing bean or should I transfer data between the layer through DTO? Can one explain me with clear explanation if possible with piece of code and that related websites?

    Read the article

  • Reuse a facelet in multiple beans

    - by Seitaridis
    How do I invoke/access a property of a managed bean when the bean name is known, but is not yet constructed? For example: <p:selectOneMenu value="#{eval.evaluateAsBean(bean).text}" > <f:selectItems value="#{eval.evaluateAsBean(bean).values}" var="val" itemLabel="#{val}" itemValue="#{val}" /> </p:selectOneMenu> If there is a managed bean called testBean and in my view bean has the "testBean"value, I want the text or values property of testBean to be called. EDIT1 The context An object consists of a list of properties(values). One property is modified with a custom JSF editor, depending on its type. The list of editors is determined from the object's type, and displayed in a form using custom:include tags. This custom tag is used to dynamically include the editors <custom:include src="#{editor.component}">. The component property points to the location of the JSF editor. In my example some editors(rendered as select boxes) will use the same facelet(dynamicDropdown.xhtml). Every editor has a session scoped managed bean. I want to reuse the same facelet with multiple beans and to pass the name of the bean to dynamicDropdown.xhtml using the bean param. genericAccount.xhtml <p:dataTable value="#{group.editors}" var="editor"> <p:column headerText="Key"> <h:outputText value="#{editor.name}" /> </p:column> <p:column headerText="Value"> <h:panelGroup rendered="#{not editor.href}"> <h:outputText value="#{editor.component}" escape="false" /> </h:panelGroup> <h:panelGroup rendered="#{editor.href}"> <custom:include src="#{editor.component}"> <ui:param name="enabled" value="#{editor.enabled}"/> <ui:param name="bean" value="#{editor.bean}"/> <custom:include> </h:panelGroup> </p:column> </p:dataTable> #{editor.component} refers to a dynamicDropdown.xhtml file. dynamicDropdown.xhtml <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui"> <p:selectOneMenu value="#{eval.evaluateAsBean(bean).text}" > <f:selectItems value="#{eval.evaluateAsBean(bean).values}" var="val" itemLabel="#{val}" itemValue="#{val}" /> </p:selectOneMenu> </ui:composition> eval is a managed bean: @ManagedBean(name = "eval") @ApplicationScoped public class ELEvaluator { ... public Object evaluateAsBean(String el) { FacesContext context = FacesContext.getCurrentInstance(); Object bean = context.getELContext() .getELResolver().getValue(context.getELContext(), null, el); return bean; } ... }

    Read the article

  • why jsf is better than struts ?

    - by MemoryLeak
    someone said to me that jsf is better to share information within context, but struts 1.1 can't. In JSR168, if we need to develop a portlet, share information in context is critical. so jsf is better option. so what is share information within context ? Does that mean that different application deployed in the same container can share date ? Or what other means ?

    Read the article

  • JSF 2.0 sample or open source application

    - by Theo
    Does anyone know a complete JSF 2.0 sample or open source application using JSF 2.0 features (Facelets, Composite Component, Templates, Ajax, Navigation, etc.). Would be a good reference to learn some best practices. I'm talking about an application that you would also use in production. The only ones I know are ScrumToys and PetCatalog which are delivered with NetBeans 6.9 and are "tutorial-like" applications.

    Read the article

  • JSF 2.1 Spring 3.0 Integration

    - by danny.lesnik
    I'm trying to make very simple Spring 3 + JSF2.1 integration according to examples I googled in the web. So here is my code: My HTML submitted to actionController.actionSubmitted() method: <h:form> <h:message for="textPanel" style="color:red;" /> <h:panelGrid columns="3" rows="5" id="textPanel"> //all my bean prperties mapped to HTML code. </h:panelGrid> <h:commandButton value="Submit" action="#{actionController.actionSubmitted}" /> </h:form> now the Action Controller itself: @ManagedBean(name="actionController") @SessionScoped public class ActionController implements Serializable{ @ManagedProperty(value="#{user}") User user; @ManagedProperty(value="#{mailService}") MailService mailService; public void setMailService(MailService mailService) { this.mailService = mailService; } public void setUser(User user) { this.user = user; } private static final long serialVersionUID = 1L; public ActionController() {} public String actionSubmitted(){ System.out.println(user.getEmail()); mailService.sendUserMail(user); return "success"; } } Now my bean Spring: public interface MailService { void sendUserMail(User user); } public class MailServiceImpl implements MailService{ @Override public void sendUserMail(User user) { System.out.println("Mail to "+user.getEmail()+" sent." ); } } This is my web.xml <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <listener> <listener-class> org.springframework.web.context.request.RequestContextListener </listener-class> </listener> <!-- Welcome page --> <welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> <!-- JSF mapping --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> my applicationContext.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="mailService" class="com.vanilla.jsf.services.MailServiceImpl"> </bean> </beans> my faces-config.xml is the following: <application> <el-resolver> org.springframework.web.jsf.el.SpringBeanFacesELResolver </el-resolver> <message-bundle> com.vanilla.jsf.validators.MyMessages </message-bundle> </application> <managed-bean> <managed-bean-name>actionController</managed-bean-name> <managed-bean-class>com.vanilla.jsf.controllers.ActionController</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>mailService</property-name> <value>#{mailService}</value> </managed-property> </managed-bean> <navigation-rule> <from-view-id>index.xhtml</from-view-id> <navigation-case> <from-action>#{actionController.actionSubmitted}</from-action> <from-outcome>success</from-outcome> <to-view-id>submitted.xhtml</to-view-id> <redirect /> </navigation-case> </navigation-rule> My Problem is that I'm getting NullPointerExeption because my mailService Spring bean is null. public String actionSubmitted(){ System.out.println(user.getEmail()); //mailService is null Getting NullPointerException mailService.sendUserMail(user); return "success"; }

    Read the article

  • JSF composite component - weird behavior when trying to save state

    - by jc12
    I'm using Glassfish 3.2.2 and JSF 2.1.11 I'm trying to create a composite component that will take as parameters a string and a max number of characters and then will show only the max amount of characters, but it will have a "more" link next to it, that when clicked will expand the text to the full length and will then have a "less" link next to it to take it back to the max number of characters. I'm seeing some weird behavior, so I'm wondering if I'm doing something wrong. Here is my composite component definition: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite" xmlns:h="http://java.sun.com/jsf/html" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:p="http://primefaces.org/ui"> <composite:interface componentType="expandableTextComponent"> <composite:attribute name="name" required="true"/> <composite:attribute name="maxCharacters" required="true"/> <composite:attribute name="value" required="true"/> </composite:interface> <composite:implementation> <h:panelGroup id="#{cc.attrs.name}"> <h:outputText value="#{fn:substring(cc.attrs.value, 0, cc.attrs.maxCharacters)}" rendered="#{fn:length(cc.attrs.value) le cc.attrs.maxCharacters}"/> <h:outputText value="#{fn:substring(cc.attrs.value, 0, cc.attrs.maxCharacters)}" rendered="#{fn:length(cc.attrs.value) gt cc.attrs.maxCharacters and !cc.expanded}" style="margin-right: 5px;"/> <h:outputText value="#{cc.attrs.value}" rendered="#{fn:length(cc.attrs.value) gt cc.attrs.maxCharacters and cc.expanded}" style="margin-right: 5px;"/> <p:commandLink actionListener="#{cc.toggleExpanded()}" rendered="#{fn:length(cc.attrs.value) gt cc.attrs.maxCharacters}" update="#{cc.attrs.name}"> <h:outputText value="#{__commonButton.more}..." rendered="#{!cc.expanded}"/> <h:outputText value="#{__commonButton.less}" rendered="#{cc.expanded}"/> </p:commandLink> </h:panelGroup> </composite:implementation> </html> And here is the Java component: @FacesComponent("expandableTextComponent") public class ExpandableTextComponent extends UINamingContainer { boolean expanded; public boolean isExpanded() { return expanded; } public void toggleExpanded() { expanded = !expanded; } } Unfortunately expanded is always false every time the toggleExpanded function is called. However if I change the composite component to the following then it works. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite" xmlns:h="http://java.sun.com/jsf/html" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:p="http://primefaces.org/ui"> <composite:interface componentType="expandableTextComponent"> <composite:attribute name="name" required="true"/> <composite:attribute name="maxCharacters" required="true"/> <composite:attribute name="value" required="true"/> </composite:interface> <composite:implementation> <h:panelGroup id="#{cc.attrs.name}"> <h:outputText value="#{fn:substring(cc.attrs.value, 0, cc.attrs.maxCharacters)}" rendered="#{fn:length(cc.attrs.value) le cc.attrs.maxCharacters}"/> <h:outputText value="#{fn:substring(cc.attrs.value, 0, cc.attrs.maxCharacters)}" rendered="#{fn:length(cc.attrs.value) gt cc.attrs.maxCharacters and !cc.expanded}" style="margin-right: 5px;"/> <p:commandLink actionListener="#{cc.toggleExpanded()}" rendered="#{fn:length(cc.attrs.value) gt cc.attrs.maxCharacters and !cc.expanded}" update="#{cc.attrs.name}" process="@this"> <h:outputText value="#{__commonButton.more}..."/> </p:commandLink> <h:outputText value="#{cc.attrs.value}" rendered="#{fn:length(cc.attrs.value) gt cc.attrs.maxCharacters and cc.expanded}" style="margin-right: 5px;"/> <p:commandLink actionListener="#{cc.toggleExpanded()}" rendered="#{fn:length(cc.attrs.value) gt cc.attrs.maxCharacters and cc.expanded}" update="#{cc.attrs.name}" process="@this"> <h:outputText value="#{__commonButton.less}"/> </p:commandLink> </h:panelGroup> </composite:implementation> </html> If I place a breakpoint in the toggleExpanded function, it only gets called on the "more" link and not the "less" link. So the question is why doesn't it get called when I click on the "less" link? Shouldn't this code be equivalent to the code above? Is there a better way to save state in a component?

    Read the article

  • JSF tags not being rendered as HTML

    - by Toto
    I'm following the Java EE firstcup tutorial using Netbeans and Glassfish. When I execute the JSF web tier I've been instructed to code, the browser gets the same JSF markup coded in the .xhtml file, and the tags are not rendered as HTML tags. I know this by using the view source code in my browser. For example, for this code: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"> <h:head> <title>Page title here</title> </h:head> <h:body> <h2> <h:outputText value="#{bundle.WelcomeMessage}" /> </h2> </h:body> </html> The browser should get something like: <html ...> <head> <title>Page title here</title> </head> <body> <h2> the welcome message goes here </h2> </body> </html> Right? Well, my browser is getting jsf code (the first piece of code above) and not the html code (the second piece of code above). It seems to be a configuration problem in netbeans or glassfish but don't know what. Any ideas? This is my web.xml file: <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>/firstcup/*</url-pattern> </servlet-mapping> <session-config> <session-timeout> 30 </session-timeout> </session-config> <welcome-file-list> <welcome-file>greetings.xhtml</welcome-file> </welcome-file-list> </web-app> This is my faces-config.xml file: <?xml version='1.0' encoding='UTF-8'?> <!-- =========== FULL CONFIGURATION FILE ================================== --> <faces-config version="2.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"> <application> <resource-bundle> <base-name>firstcup.web.WebMessages</base-name> <var>bundle</var> </resource-bundle> <locale-config> <default-locale>en</default-locale> <supported-locale>es</supported-locale> </locale-config> </application> <navigation-rule> <from-view-id>/greetings.xhtml</from-view-id> <navigation-case> <from-outcome>success</from-outcome> <to-view-id>/response.xhtml</to-view-id> </navigation-case> </navigation-rule> </faces-config> Moreover: The url I'm entering in the browser is http://localhost:8081/firstcup/ but I've also tried: http://localhost:8081/firstcup/greetings.xhtml I've checked Glassfish logs and there's no information about not being able to load FacesServlet

    Read the article

  • Referencing CDI producer method result in h:selectOneMenu

    - by user953217
    I have a named session scoped bean CustomerRegistration which has a named producer method getNewCustomer which returns a Customer object. There is also CustomerListProducer class which produces all customers as list from the database. On the selectCustomer.xhtml page the user is then able to select one of the customers and submit the selection to the application which then simply prints out the last name of the selected customer. Now this only works when I reference the selected customer on the facelets page via #{customerRegistration.newCustomer}. When I simply use #{newCustomer} then the output for the last name is null whenever I submit the form. What's going on here? Is this the expected behavior as according to chapter 7.1 Restriction upon bean instantion of JSR-299 spec? It says: ... However, if the application directly instantiates a bean class, instead of letting the container perform instantiation, the resulting instance is not managed by the container and is not a contextual instance as defined by Section 6.5.2, “Contextual instance of a bean”. Furthermore, the capabilities listed in Section 2.1, “Functionality provided by the container to the bean” will not be available to that particular instance. In a deployed application, it is the container that is responsible for instantiating beans and initializing their dependencies. ... Here's the code: Customer.java: @javax.persistence.Entity @Veto public class Customer implements Serializable, Entity { private static final long serialVersionUID = 122193054725297662L; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Id @GeneratedValue() private Long id; public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @Override public String toString() { return firstName + ", " + lastName; } @Override public Long getId() { return this.id; } } CustomerListProducer.java: @SessionScoped public class CustomerListProducer implements Serializable { @Inject private EntityManager em; private List<Customer> customers; @Inject @Category("helloworld_as7") Logger log; // @Named provides access the return value via the EL variable name // "members" in the UI (e.g., // Facelets or JSP view) @Produces @Named public List<Customer> getCustomers() { return customers; } public void onCustomerListChanged( @Observes(notifyObserver = Reception.IF_EXISTS) final Customer customer) { // retrieveAllCustomersOrderedByName(); log.info(customer.toString()); } @PostConstruct public void retrieveAllCustomersOrderedByName() { CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<Customer> criteria = cb.createQuery(Customer.class); Root<Customer> customer = criteria.from(Customer.class); // Swap criteria statements if you would like to try out type-safe // criteria queries, a new // feature in JPA 2.0 // criteria.select(member).orderBy(cb.asc(member.get(Member_.name))); criteria.select(customer).orderBy(cb.asc(customer.get("lastName"))); customers = em.createQuery(criteria).getResultList(); } } CustomerRegistration.java: @Named @SessionScoped public class CustomerRegistration implements Serializable { @Inject @Category("helloworld_as7") private Logger log; private Customer newCustomer; @Produces @Named public Customer getNewCustomer() { return newCustomer; } public void selected() { log.info("Customer " + newCustomer.getLastName() + " ausgewählt."); } @PostConstruct public void initNewCustomer() { newCustomer = new Customer(); } public void setNewCustomer(Customer newCustomer) { this.newCustomer = newCustomer; } } not working selectCustomer.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title>Auswahl</title> </h:head> <h:body> <h:form> <h:selectOneMenu value="#{newCustomer}" converter="customerConverter"> <f:selectItems value="#{customers}" var="current" itemLabel="#{current.firstName}, #{current.lastName}" /> </h:selectOneMenu> <h:panelGroup id="auswahl"> <h:outputText value="#{newCustomer.lastName}" /> </h:panelGroup> <h:commandButton value="Klick" action="#{customerRegistration.selected}" /> </h:form> </h:body> </html> working selectCustomer.xhtml: <?xml version="1.0" encoding="UTF-8"?> <!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:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head> <title>Auswahl</title> </h:head> <h:body> <h:form> <h:selectOneMenu value="#{customerRegistration.newCustomer}" converter="customerConverter"> <f:selectItems value="#{customers}" var="current" itemLabel="#{current.firstName}, #{current.lastName}" /> </h:selectOneMenu> <h:panelGroup id="auswahl"> <h:outputText value="#{newCustomer.lastName}" /> </h:panelGroup> <h:commandButton value="Klick" action="#{customerRegistration.selected}" /> </h:form> </h:body> </html> CustomerConverter.java: @SessionScoped @FacesConverter("customerConverter") public class CustomerConverter implements Converter, Serializable { private static final long serialVersionUID = -6093400626095413322L; @Inject EntityManager entityManager; @Override public Object getAsObject(FacesContext context, UIComponent component, String value) { Long id = Long.valueOf(value); return entityManager.find(Customer.class, id); } @Override public String getAsString(FacesContext context, UIComponent component, Object value) { return ((Customer) value).getId().toString(); } }

    Read the article

  • Eclipse autocomplete (content assist) with jsf2.0, xhtml and primefaces 2.2.RC1

    - by Keating Wang
    I use windows 7. I set the ClassPath like this: D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\jsf-api.jar;D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\jsf-impl.jar;D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\primefaces-2.2.RC1.jar And I alse do this: Window Preferences General Content Types Text JSP Add (xhtml) But, it doesn't works. When I use netbeans. I do nothing, but the autocomplete function works well.

    Read the article

  • org.apache.jasper.JasperException .... Unterminated &lt;%@ page tag

    - by Ankur
    I get org.apache.jasper.JasperException: /index.jsp(2,1) Unterminated <%@ page tag The page tags look like this: <%@ page import="java.util.*" %> <%@ page import="au.edu.uwa.peb.autoextractor.model.ScanResultItem"; %> This seems to indicate to me that a < does not have a corresponding tag ... is this so ... my IDE does not highlight any errors so how can I find this unterminated tag. Is there a JSP validation tool that I can use, perhaps online? The stack trace looks like this: org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:132) org.apache.jasper.compiler.Parser.parseDirective(Parser.java:520) org.apache.jasper.compiler.Parser.parseTagFileDirectives(Parser.java:1784) org.apache.jasper.compiler.Parser.parse(Parser.java:127) org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:120) org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:165) org.apache.jasper.compiler.Compiler.compile(Compiler.java:332) org.apache.jasper.compiler.Compiler.compile(Compiler.java:312) org.apache.jasper.compiler.Compiler.compile(Compiler.java:299) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    Read the article

  • Guice and JSF 2

    - by digitaljoel
    I'm trying to use Guice to inject properties of a JSF managed bean. This is all running on Google App Engine (which may or may not be important) I've followed the instructions here: http://code.google.com/docreader/#p=google-guice&s=google-guice&t=GoogleAppEngine One problem is in the first step. I can't subclass the Servlet module and setup my servlet mappings there because Faces is handled by the javax.faces.webapp.FacesServlet which subclasses Servlet, not HttpServlet. So, I tried leaving my servlet configuration in the web.xml file and simply instantiating a new ServletModel() along with my business module when creating the injector in the context listener described in the second step. Having done all that, along with the web.xml configuration, my managed bean isn't getting any properties injected. The method is as follows @ManagedBean @ViewScoped public class ViewTables implements Serializable { private DataService<Table> service; @Inject public void setService( DataService<Table> service ) { this.service = service; } public List<Table> getTables() { return service.getAll(); } } So, I'm wondering if there is a trick to get Guice injecting into a JSF managed bean? I obviously can't use the constructor injection because JSF needs a no-arg constructor to create the bean.

    Read the article

  • jsf datatable lazy load filter and sorting

    - by darko petreski
    Hi, I have worked on several projects with a lot of data tables. The tables had sorting, filtering and paging of course on server side and with help of the db (all databases has implemented sording, filtering -where and limit the returned results). When workig on real application there are a thousands of even a millions rows. But I have seen several JSF dagatable components. They implement pagination, sorting and filtering on client side!! According to me this is very silly. This technology is called enterprise and they sort the data on the client side with java script! I have not seen any good JSF data grid that has build in features for sorting, filtering and lazy loading on the server side. Why is that? Am I looking in wrong direction or really there in no build support for this. Lately I am testing primefaces and lazy loading datatable. It really works fine, but the table i can only lazy load. If you add sort and filter then the problems begin. Conclusion: Is there any datatable JSF component than can perform lazy load pagination, and filtering and sorting on server side. If I need to implement my own solution thanks to the teams that made client side sorting and filtering, they are useless. Regards

    Read the article

  • Creating an inline function in a jsp?

    - by user246114
    Hi, I'm coming from (some limited) PHP experience, in which you can just declare functions in-line. I'm trying to the same thing with a JSP but not working. Trying something like: <%! private void generateSomething() { %> <p> Hello there! </p> <% } %> <% generateSomething(); %> is something like that possible? Basically I have a jsp that can generate a 3 different pages, and I wanted to put these each in a separate method. I have seen a few posts saying this is not a good idea, and to separate the presentation stuff, which is fine, I just want to see this in action, if possible, now I'm just curious, Thanks

    Read the article

  • trying to decide between asp.net and jsp

    - by Amir
    Hey Guys, I am wondering if anyone can shed some lights on the situation. I am about to start a project and trying to figure out what solution is best to go with asp.net or java jsp pages I have personally worked alot with .net and am really happy with the framework and Visual studio as IDE I find it easy to work with and there is a massive community support behind .net, i can get alot done quickly I have not every written anything use java jsp, there will be a learning curve here , so my experience is limited here. however after seeing jira i am very impressed with its capabilities, it has changed alot since the old days ( java 1.2 ) that i used to work with, and the fact that it runs under linux is a huge plus, so i am trying to decide is the learning curve, worth the price ? so given the situation above what would you recommended? Thanks, Amir

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >