[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


jsp session variables

Posted on 2004-04-12
Medium Priority
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");

<input type="text" name= "anam" size = "4" value = "€ "'+p+'"" >
Question by:wallpaperpaste
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
  • 2
  • 2
LVL 28

Expert Comment

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

Author Comment

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

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

LVL 28

Accepted Solution

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

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

Author Comment

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


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

With the evolution of technology, we have finally reached a point where it is possible to have home automation features like having your thermostat turn up and door lock itself when you leave, as well as a complete home security system. This is a st…
If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

650 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