Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

jsp session variables

Posted on 2004-04-12
4
413 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 27

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 27

Accepted Solution

by:
rrz earned 50 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Learn how to PXE Boot both BIOS & UEFI machines with DHCP Policies and Custom Vendor Classes
Read about why it is more lucrative for an IT company to participate in government projects.

829 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