jsp-tags


Unable to access session on JSP


I have a JSP with netbiscuits code in it, I am now removing that netbiscuits code but after removing I am unable to get session from my previous page due to which I am unable to move ahead. I am using struts 1. Please suggest a solution to my problem, I would be grateful. Thanks in advance.
I am not sure about your problem.
Can you explain it little more?
Usually for accessing session in jsp pages we use the code with in scriptlets like
String x=(String)session.getAttribute("uname");
Type casting is required.
or use
String x=""+session.getAttribute("uname");
If you want to print it somewhere in the jsp page do,
<%= session.getAttribute("uname")%>
It will print the session value in jsp page.
otherwise use like
<% String x=""+session.getAttribute("uname"); %>
<%=x %>
For accessing in java pages
Map session = ActionContext.getContext().getSession();
String uname=""+session.get("uname");

Related Links

JSP Quiz process is not giving me the correct percentage scored
Refer the id variable of logic - iterate using jstl-el
Invalid tagdir attribute while web-fragment is used
JSP foreach tag for two variables
Adding Parameter to href tag before uri
Servlet exception stream closed jsp
creating and exporting a csv from Display tag table
bean write to number type id
restrict image file size in alloy UI
The function getContextPath must be used with a prefix when a default namespace is not specified
how can i retrive parameters from EncodeURL using jsp?
onclick tag giving error in h:commandLink
Displaytag - How to pass hidden value in url?
Embedding Tag Files in a JAR
Errors when the compiler is trying to build a custom JSP tag based on an Java Bean
Creating nested custom tag using jsp2 tag files

Categories

HOME
ms-access
bluetooth
fluentd
json.net
tesseract
octobercms
rsyslog
cakephp-2.5
mvvmcross
wamp
constraint-programming
multiple-records
cross-validation
basic
cloudkit
primary-key
vifm
task
size
msp430
netflix
telephony
openrefine
aurigma
solaris-10
jprofiler
dbext
accessor
format-specifiers
centos6.5
kannel
phpfox
fgetcsv
compatibility
srcset
unboundid
google-rich-snippets
ecto
twilio-api
catch-all
asset-pipeline
wallpaper
normal-distribution
git-merge
event-driven
c11
ssjs
bootstrapper
graphenedb
ensembles
gzipstream
janrain
nomethoderror
netcdf4
azure-application-gateway
pubmed
errordocument
winscp-net
darcs
snmptrapd
mcafee
spring-cache
synchronous
pycaffe
angular-strap
ableton-live
azure-sdk
plottable.js
autorest
ubuntu-10.04
sdf
apachebench
pagerank
execute
cannon.js
iis-arr
operation
directoryservices
camanjs
android-nested-fragment
xcode-6.2
titanium-modules
php-5.4
sgen
system.net.webexception
mysql-error-1062
mechanize-ruby
oracle-warehouse-builder
srs
java.nio.file
centos5
back-stack
padarn
mqx
anonymous-methods
isnullorempty
trusted
coderush
frameset
online-compilation
windows-phone-7.1.1
asyncfileupload
assembly-loading
whoosh
libc++
xfbml
sproutcore-2
mozilla-prism
xsdobjectgen
vc90
swing-app-framework
defensive-programming
dbisam
multiple-languages
commodore
document-conversion

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App