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

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
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?

Categories

HOME
winforms
server
dot
youtube-dl
at-command
sharepoint-designer
electronics
angular-ui-bootstrap
opengl-es-2.0
iggrid
facebook-php-sdk
adobe-analytics
row
zend-framework3
timeout
spring-tool-suite
visual-studio-cordova
jsdoc
oxyplot
google-cloud-speech
alpine
ml
extjs5
kannel
phpfox
xacml
gsoap
sql-server-2012-express
pim
rotational-matrices
amazon-kinesis-kpl
suricata
libvpx
android-browser
tasker
galen
gulp-sourcemaps
elmah
texmaker
powershell-dsc
wso2carbon
network-flow
komodoedit
ionicons
return-value
dotnetzip
git-diff
svmlight
slickedit
sybase-asa
django-scheduler
orthogonal
crosswalk-runtime
url-pattern
grails-tomcat-plugin
thrust
historian
natvis
cannon.js
metaclass
embedded-code
cakephp-3.1
microbenchmark
myo
createprocessasuser
composite
dia
zend-route
terminfo
sgen
mysql-error-1062
picturefill
algebraic-data-types
page-layout
xsockets.net
flash-builder4.5
delphi-6
kyotocabinet
hamiltonian-cycle
postgresql-performance
celltable
gdlib
xfbml
yslow
gamma
user-friendly
compiler-specific
django-notification

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