aspose file tools*
The moose likes JSP and the fly likes request time expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "request time expression" Watch "request time expression" New topic
Author

request time expression

sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1223
<jsp:setProperty name="address"
property="city"
value="<%= theCity %>" />

what is the theCity in here:

I used it as follows ,But it says name cann't be resolve

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

If you didn't define it, and it's not a JSP implicit variable, then it does not exist.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1223
what is mean not created.
this is my form


what else shuld i have to created ?
sam liya
Ranch Hand

Joined: Nov 25, 2008
Posts: 1223
cann't i used this to retrive the forms detail

Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874




What is "<%= name %>" here ? If you say its form input element "name" , i m afraid you can use like that.
How do you retrieve form element in Servlet ? using request object ? the same applies to JSP also . But JSP has 2 way to go

Use EL , the most simple way to get it. ${param.name}

Other bad way is to use scriplets like request.getParameter("name");
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61654
    
  67

aruna sameera wrote:cann't i used this to retrive the forms detail

No. In a modern JSP, you'd do that with the EL param built-in map; or better yet, you'd submit to a controller rather than a JSP.

But since you are still using old-fashioned scriptlets, you'd use the API on the request as Balu pointed out.

You really either need to read the JSP Specification, or find a good JSP tutorial. The questions you are asking show that you do not have a basic understand of what JSP is and how it operates. You can start with this article that describes JSP concepts and basic operation.
 
jQuery in Action, 2nd edition
 
subject: request time expression