Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di tony83
    Registrato dal
    Feb 2005
    Messaggi
    3,179

    Recuperare con jstl "request.getparameter"

    Come si recupera un parametro con jstl
    come già facevo con jsp: request.getparameter("valore") ?

    codice:
    <%@ page contentType="text/html" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    
    <f:view>
    <html>
    <head><title>Complete Person Information</title></head>
    <body leftmargin="0" rightmargin="0" topmargin="40" bottommargin="0">
    <center><h:form>
    <h:panelGrid width="375px" bgcolor="#e6edfd" columns="2" border="0">
           <f:facet name="header">
                <h:outputText value="You have entered information :"/>
           </f:facet>
    
            <h:outputText value="Name: " />
            <f:param name="valore" value="$(param.valore)"/>
            <h:outputText value="#{valore}" />
            
           <h:commandButton value="Modify" action="details" />
    
    </h:panelGrid>
    </h:form></center>
    </body>
    </html>
    </f:view>
    Tony

  2. #2
    Utente di HTML.it L'avatar di andbin
    Registrato dal
    Jan 2006
    residenza
    Italy
    Messaggi
    18,284

    Re: Recuperare con jstl "request.getparameter"

    Originariamente inviato da tony83
    Come si recupera un parametro con jstl
    come già facevo con jsp: request.getparameter("valore") ?
    A parte il fatto che il codice che hai postato usa JSF ... non JSTL. Comunque JSTL non ha tag "per leggere i parametri" (e credo nemmeno JSF, che non conosco però). Questo perché c'è EL (Expression Language), fatto apposta per queste cose. E appunto puoi farlo con $(param.valore), proprio come nel codice che hai postato.
    Andrea, andbin.devSenior Java developerSCJP 5 (91%) • SCWCD 5 (94%)
    java.util.function Interfaces Cheat SheetJava Versions Cheat Sheet

  3. #3
    Utente di HTML.it L'avatar di tony83
    Registrato dal
    Feb 2005
    Messaggi
    3,179

    Re: Re: Recuperare con jstl "request.getparameter"

    Originariamente inviato da andbin
    A parte il fatto che il codice che hai postato usa JSF ... non JSTL. Comunque JSTL non ha tag "per leggere i parametri" (e credo nemmeno JSF, che non conosco però). Questo perché c'è EL (Expression Language), fatto apposta per queste cose. E appunto puoi farlo con $(param.valore), proprio come nel codice che hai postato.
    non restituisce nulla..
    Si cmq parliamo di jsl!..
    Tony

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.