?
Solved

jsp session variables

Posted on 2004-04-12
4
Medium Priority
?
422 Views
Last Modified: 2010-04-01
Is it possible to insert a session variable as a value in a form? Ive tried this, it gets executed and the value is set buts its not inserted as a value in the form.

<% String p = (String)session.getAttribute("p");
out.print(p)
%>

<input type="text" name= "anam" size = "4" value = "€ "'+p+'"" >
0
Comment
Question by:wallpaperpaste
  • 2
  • 2
4 Comments
 
LVL 28

Expert Comment

by:rrz
ID: 10805345
><input type="text" name= "anam" size = "4" value = "€ "'+p+'"" >
instead you could use  
<input type="text" name= "anam" size = "4" value ="<%= '€ ' + p %>" />
rrz
0
 

Author Comment

by:wallpaperpaste
ID: 10805792
This is what im trying:
value ="<%= + pass %>" "

This is the error im getting:
operator + cannot be applied to java.lang.String


0
 
LVL 28

Accepted Solution

by:
rrz earned 150 total points
ID: 10805946
>This is what im trying:
value ="<%= + pass %>" "

maybe you should try  
value ="<%='whatever' + pass %>"
0
 

Author Comment

by:wallpaperpaste
ID: 10805985
Got it with this:
value ="<%=pass %>

thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If anyone asked you to network diagram of the internet, it was drawn in the form of a fluffy cloud which further became known as cloud computing. Popularly cloud computing is defined as workloads that run over the internet in a commercial provider’s…
LinkedIn blogging is great for networking, building up an audience, and expanding your influence as well. However, if you want to achieve these results, you need to work really hard to make your post worth liking and sharing. Here are 4 tips that ca…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question