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

Creating nested custom tag using jsp2 tag files
Unable to access session on JSP
Dealing with <html:options>
No tag “tableFacade” defined in tag library imported with prefix “jmesa”
how to refer values of one jsp file to other jsp
incorrect username and passwords
creating the welcome page
How to use list object in <c:forEach tag?
How to call a Servlet when I click on a Hyperlink
EL Messages on JSP page
showmodaldialog function in ie8
displaytag export options banner - place at top of table
JSP custom tag library (Unable to find setter method for the attribute)
JSP custom tag library (Passing Attributes)
creating a custom JSP tag
How to solve this problem with JSP tag extension?

Categories

HOME
java
yii2
cloud
atom-editor
omnet++
google-play
appx
react-router
octobercms
umd
icloud
alpha
enterprise-library-5
wamp
datastax-java-driver
windows-10-universal
offline
ibm-odm
aurigma
excel-vba-mac
google-cloud-speech
lucene.net
abi
css-animations
sox
tapestry
telerik-reporting
mmap
devops
java-7
smb
r-raster
fabric8
nameservers
galsim
lxd
hexo
overlap
appfabric
android-tabhost
sql-server-agent
jvm-languages
total-commander
import-from-excel
flashair
executenonquery
wso2carbon
react-scripts
clean-architecture
alphabet
colorama
slickedit
feeds
pg-dump
boost-preprocessor
zendesk-app
arrow-keys
spring-cache
orthogonal
mediaelement
specrun
messenger
time-and-attendance
file-writing
pcf
connect-by
hover-over
pagerank
design-by-contract
xpath-1.0
freelancer.com-api
ford-fulkerson
ios8-today-widget
spim
coveralls
drawbitmap
responsive-images
arcanist
formatjs
modalpopup
pick
camanjs
relocation
codeigniter-routing
device-manager
navigationservice
p4java
valuechangelistener
concurrent-collections
balanced-payments
html5-notifications
bulkloader
unc
rdoc
dsn
spring-portlet-mvc
javax.script
table-footer
netbeans-7.1
krl
fluent-interface
castle-monorail
audio-capture
sector

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