JSP Session ID Problem
I have a problem, where I am getting two separate Session Id's within the
same browser instance. This is what I am doing:
User sees login.jsp. A form that calls a servlet, when they do the submit.
The first jsp and the servlet have the same Session ID. The servlet sets
some attributes for that user, then calls
response.sendRedirect(initial.jsp). The second jsp has a new Session ID, and
so doesn't see any of the attributes that the servlet set.
Am I doing something fundamentally wrong here, or is this a WLS problem? We
are on WLS 6.0, no service packs installed.
Thanks.
Jeff Pfost
[email protected]
Cookies or URL encoding? Cookies.
FYI. After that post, I download Service Pack 2 and applied it.
That fixed the problem, and now a redirect doesn't generate a
new session.
Thanks.
Jeff Pfost
[email protected]
"Cameron Purdy" <[email protected]> wrote in message
news:[email protected]...
> Cookies or URL encoding?
>
> Peace,
>
> --
> Cameron Purdy
> Tangosol, Inc.
> Clustering Weblogic? You're either using Coherence, or you should be!
> Download a Tangosol Coherence eval today at http://www.tangosol.com/
>
>
>
> "Jeff Pfost" <[email protected]> wrote in message
> news:[email protected]...
> > I have a problem, where I am getting two separate Session Id's within
the
> > same browser instance. This is what I am doing:
> >
> > User sees login.jsp. A form that calls a servlet, when they do the
submit.
> > The first jsp and the servlet have the same Session ID. The servlet sets
> > some attributes for that user, then calls
> > response.sendRedirect(initial.jsp). The second jsp has a new Session ID,
> and
> > so doesn't see any of the attributes that the servlet set.
> >
> > Am I doing something fundamentally wrong here, or is this a WLS problem?
> We
> > are on WLS 6.0, no service packs installed.
> >
> > Thanks.
> >
> > Jeff Pfost
> > [email protected]
> >
> >
> >
>
>
Similar Messages
-
BC4J. JSP, session problems
I would like to store session type information, ie client_id in a session object and be able to retrieve its value from any of my jsp pages.
Is there a jsp tag or some other JDev component that I should be using?
TIA<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Danny Gagliardi ([email protected]):
I would like to store session type information, ie client_id in a session object and be able to retrieve its value from any of my jsp pages.
Is there a jsp tag or some other JDev component that I should be using?
TIA<HR></BLOCKQUOTE>
You could try something like this in your jsp
<%
session.setAttribute("clientId", "1234");
%>
To get the clientId from the session try
<%
String ClientID = (String) session.getAttribute("clientId");
%>
Hope this help,
Kh -
JSP session getting destroyed when second user logs in
Hi,
I am facing a session related problem in a small login program in jsp. I am using three jsp pages, login.jsp (user logs in), page1.jsp (creates a session and stores username) and page2.jsp (accesses session).
Login.jsp:
No jsp actually. Just a simple html form.
Page1.jsp:
String name=request.getParameter("Name");
session=request.getSession(true);
session.setAttribute("Name",name);
Page2.jsp:
session=request.getSession(false);
if(session.isNew())
System.out.println("new session created");
String name=session.getAttribute("Name").toString();
As expected, it works like session getting set at page1 and used at page2. It works good if users log in one by one. The problem arises when 2 (or more users with different logins) try to access the page at same time. When a new user logs in, the previous user session gets destroyed (session.isNew() becomes true and session Id changes).
Is it the way I am using sessions (missing something), or there is some setting in tomcat server to specify maximum number of logins (sessions that can be handled).
Regards
KamalHi,
Thanks for reply, but I guess the problem is not clear. Let me explain..
A user logs in, he reaches first page (page1.jsp), here session is getting set. Then user goes to page2.jsp where application retrieves the information from session and uses it. It works all well.
When two (or more) user logs in.. First user logs in, he reaches page 1, session is set. But then another user logs in (different id) and a session is set for him as well. Now the problem here is that session for first user gets destroyed at this point, which is unexpected (two sessions should not conflict, on different machines).
Additionally, the problem does not happen necessarily at second login. eg. sometimes 4 users log in and when fifth one logs in, fourth gets logged out (session gets destroyed).
I am not able to figure out, whether the problem is in code (given in first post) or there is some tomcat setting responsible for this behavior.
Regards
Kamal -
Jsp session variable to call in java class.
here i am facing a problem in calling a jsp session varibale to java class.
in my code.. i have seperate files for jsp pages and packaged java classes.
as i am developing a web tire application. the data entered in the front end i am getting to jsp page and putting the mandatory in session to use in other pages. now here the same session vaiable i have to use/call in java class file.
Please refer me the best method and any references on this to call the session vaiable to java class file.
in jsp page i decleared like this:
session.setAttribute("stuIdentification",stuid);
this id i have to use in java class.file.
how to call it?
Thanks
KurraGimbal2's got the right idea.
The reasons for choosing point 1) are also valid. Whenever possible try and do as much code that is not specifically tied to your business objects inside your dynamic element (the jsp page) instead of your static one (the compiled class)
this allows you to very easily update your jsp to make any changes without having to recompile class code. Recompiling seems like a little thing when you are in development but imagine if the class is executed by a business critical application that faces forward to customers, recompiling will mean shutting down your servers and that may not be an option.
Regards,
David -
How to store jsp session data of different user in util.hashmap
how to store jsp session data of different user in java.util.hashmap
and access the data of all user on the server side
The same example is given in professional jsp but its not working.
I can use getIds() of httpsessioncontext but it's depricatedHi
I'm trying to make an example.
With the following codes you can get the date from the session.
request.getSession().getAttribute("sessionname")
To store it in a hashmap you could do it like this ->
Hashmap hm = new Hashmap();
hm.put(Object key, request.getSession().getAttribute("sessionname"));
I hope you understand it if not just write it!
Cyrill -
Help with jsp session validation
i've build up a page that only users wil 'administrator' as the session is variable can access. if they don't they will be directed to the login page.
However, I'm getting a null pointer exception.
my code is as follows:
<%@ page import="java.io.*"%>
<%
if (session.getAttribute("id").equals(null) || !(session.getAttribute("id").equals("administrator")))
response.sendRedirect("adminlogin.htm");
%>
Error Message:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
root cause
java.lang.NullPointerException
any pros please help? i know it's something to do with my jsp session validation. thanks in advance.one more thing, with regrads to the solution evnafets provided. I tried it out on all my pages that requires administrator rights and found that the code only redirects when it's not expecting any parameters. Else, it just display an error message there. Is there a way around this? Or I should let let my end user suffer?
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:534)
root cause
java.lang.NullPointerException
at org.apache.jsp.view_jsp._jspService(view_jsp.java:177)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:289)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:534) -
Jsp session variable in javascript
hi,
i want use a jsp session variable inside a javascript code, for this i am using the following function,
function checkList()
<% String ecode1=(String)session.getAttribute("e_numb"); %>
var code=<%=ecode1%>
alert (code)
this is showing an error can any one please help me,
thanks
saurabhYou have ',%String ecode1' within the javascript. JSP will not recognize 'String' as a java class unless you import the String class. Something like <%@ page import = "java.util.* " %> Incorrect. String is part of java.lang, which is always imported into a java class.
Most probably what is missing in the javascript is
- missing quotes ? Not sure if this value is meant to be interpreted as a number or not.
- missing semicolon
function checkList()
<% String ecode1=(String)session.getAttribute("e_numb"); %>
var code="<%=ecode1%>";
alert (code);
}Lets assume that the value of e_numb is "42"
after running this as a jsp, it should produce the following on the resulting html page. You can see it by viewing the source.
function checkList()
var code="42";
alert (code);
}Check that to see it has produced valid javascript
Cheers,
evnafets -
Session Expired Problem on OAS
Hi,
I often got the error message "Session Expired" displayed on my HTML page that serves Java Servlet output after some time.
I attempted to look through my Servlet source codes but it has no problem. In fact, it runs perfectly well on JavaWebServer2.0.
This seems to be a OAS problem. I'm using Oracle Application Server 4.0.8.1. I attempted changing the Servlet Cartridge's "Max session idle time" and observe the behaviour. It appears that when "Session Expired" problem happened, my servlet class never get called. OAS simply display a "Session Expired" message on the web page.
How can I avoid this? How can ask OAS to call my servlet's doGet() to create a new session when it expired?
Anyone knows how?
nullHi,
OAS has a limitation of 300 seconds. This value cannot be changed. See the release notes.
One possible way to get around this is to use the Oracle Supplied Session class and use the time feature in that.
This a big limitation and I am not sure why Oracle designed the product this way.
null -
Can we share ASP & JSP sessions? Is there any possibility?
regards
SreenivasWouldn't do much good even if you could (which I'm not at all sure about).
You couldn't share the data in the session as it's not stored in common format (Java Objects vs. ActiveX objects), though that might depend on the appserver in question and in some special cases Strings might be sharable.
At the very least you'd need an appserver that can run JSP and ASP side by side in the same web application. -
Hi, i am facing a problem of the Object set into a session not being visible to the others pages. what did i done wrongly?
here is the code:
in login.jsp (currently hardcode cos i haven recieve that part):
<%@page import="fantasy.team.*,java.util.Vector" session="true"%>
<%
Team t = new Team("Kacheek FC");
session.setAttribute("team",t);
if( session.getAttribute("team") ==null){
out.write("how come null");
}else{
out.write("not null");
%>
Select
//End of coding
not null will be printed
Following code belong to selectPlayer.jsp:
if( session.getAttribute("team") == null){
out.write("i am null"); }else{
out.write("i am not null");
i am null is printed
what is wrong with my coding?
thanks.i do a
if(session.isNew())
out.write("New");
and the result is new.
meaning that my session is invalidate.
that explain my value from "gone" rite?
how to solve this?
thanks. -
JSP Session problem in HTML frames????
Hi everybody;
I have a problem with session I think. My index page is created with 4 diffrent jsp's in 4 diffrent frames.After a while lets say 15 minutes when my session is expired.When I click one of my button ..The frames which linked with that button is show Http 500 error page.When I refreshes the web page they all gone.(and my web page goes normal again)
I want to ask you how can I handle this problem.How can I solve this error page showing and stop showing that error page instead of in each frame,to refresh the index page again??
Thanks for your consideration.....The first step is to decide whether 15 minutes is a suitable timeout for sessions.
If it isn't then simply increase it in web.xml. You may also decide that session persistence is worth enabling (if your Servlet container supports it).
If it's not then your pages will need to handle a null (or at least new) session slightly more elegantly. You're probably just getting a null pointer exception because something your pages is relying on is missing (a session attribute of some sort). Sometimes it's sufficient just to redirect the topmost window to the index page - not the greatest user experience in the world but at least consistent.
Hope this helps. -
JSP Session in JavaScript variable problem
Hi,
I have a session variable msgSize that is being set by a Java file in the session.
aRequest.getSession().setAttribute("msgSize", msgSize);It's value is variable depends on record count of recordset.
In JSP page where I have to assign it's value to a javascript variable. I am doing this a s follows. I have done this in the JSP file.
<script type="text/javascript" >
<!--
function getVal()
m=${msgSize};
-->
</script>First Problem is I am unable to get this value inside a External JS file. It throws error but inside jsp it is working. How can i use this inside External JS?
Second problem is once the above code executed value never refreshed to new value?
Means first time it executed it get value 200 next time again i executed the code the real recordset is 105 but still displaying 200. But when I restart the server next time it takes value 105 by itself....
How I tackle this problem.?
Regards,problem is I am not refreshing the whole JSP page everytime, only refreshing the partial page using ajax call that's why not getting the session new value...
any suggestions what to do to get new value? -
Newbie : JSP session problem after reload with IE refresh button.
Hi,
I had an issue with JSP reloading using tomcat 4.* and IE.
I have a jsp1.jsp is opened in two different IE windows(one by one). Once i refreshed using IE refresh button from the first window, its loaded with second windows session details. Its changess whole http request object with second window.
Am not sure , why its happening ? Could anybody shed light on this ?
Thanks and Regards
PVHello,
No, am not saving any form details . But i noticed session id is changing completely for the first window once i loads frame on the second window.
javascript:alert(document.cookie) Above scriptlet (IE address bar) returns session id from the second window rather than current window without refreshing, that means, its removed whole request completely or somehow manipulated previous sessions. Can anybody explain this behaviour ?
Thanks -
Jsp session problem when more than one user is loging from the same machine
Hi everybody,
I have created a login page and i use to store user name and password using sessions. It is working fine for one user from one machine. But if two or more users logged from the same machine, all the users are getting the same data as of the last user logged in. Also if one user is logged out all user sessions on that machine are expiring (same as previous YAHOO problem).
i think there is problem with session variables. The user name and password which i am storing in session variables are updating the same variables for all users. I think a seperate set of session variables are not creating for each user login.
Can any body help me plz....
regards,
Prasanth.CFirst, you need to clear any cookies you are setting.
Second, you need to synchronize some key data fetching blocks in your servlet.
Third, ensure that you are invalidating a session properly.
Don't ask me for more details. Google around for information ;)
Richard. -
Need help with JSP - Session Bean scenario
I have massive problems with a simple JSP <--> Statefull Session Bean scenario with Server Platform Edition 8.2 (build b06-fcs)
What I do is generating a Collection in session bean returning it to JSP
and giving the List back to Session Bean.
A weird exception happens when giving the List back to Session Bean
(see Exception details below)
The same code runs without any trouble on Jboss Application Server 4.0.3
Any help would be great!
Please see code below
Statefull Session Bean
<code>
package ejb;
import data.Produkt;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import javax.ejb.*;
* This is the bean class for the WarenkorbBean enterprise bean.
* Created 17.03.2006 09:53:25
* @author Administrator
public class WarenkorbBean implements SessionBean, WarenkorbRemoteBusiness, WarenkorbLocalBusiness {
private SessionContext context;
// <editor-fold defaultstate="collapsed" desc="EJB infrastructure methods. Click the + sign on the left to edit the code.">
// TODO Add code to acquire and use other enterprise resources (DataSource, JMS, enterprise bean, Web services)
// TODO Add business methods or web service operations
* @see javax.ejb.SessionBean#setSessionContext(javax.ejb.SessionContext)
public void setSessionContext(SessionContext aContext) {
context = aContext;
* @see javax.ejb.SessionBean#ejbActivate()
public void ejbActivate() {
* @see javax.ejb.SessionBean#ejbPassivate()
public void ejbPassivate() {
* @see javax.ejb.SessionBean#ejbRemove()
public void ejbRemove() {
// </editor-fold>
* See section 7.10.3 of the EJB 2.0 specification
* See section 7.11.3 of the EJB 2.1 specification
public void ejbCreate() {
// TODO implement ejbCreate if necessary, acquire resources
// This method has access to the JNDI context so resource aquisition
// spanning all methods can be performed here such as home interfaces
// and data sources.
// Add business logic below. (Right-click in editor and choose
// "EJB Methods > Add Business Method" or "Web Service > Add Operation")
public Collection erzeugeWarenkorb() {
//TODO implement erzeugeWarenkorb
ArrayList myList = new ArrayList();
for (int i=0;i<10;i++)
Produkt prod = new Produkt();
prod.setID(i);
prod.setName("Produkt"+i);
myList.add(prod);
return myList;
public void leseWarenkorb(Collection Liste) {
//TODO implement leseWarenkorb
Iterator listIt = Liste.iterator();
while(listIt.hasNext())
Produkt p = (Produkt)listIt.next();
System.out.println("Name des Produktes {0} "+p.getName());
</code>
<code>
package data;
import java.io.Serializable;
* @author Administrator
public class Produkt implements Serializable {
private int ID;
private String Name;
/** Creates a new instance of Produkt */
public Produkt() {
public int getID() {
return ID;
public void setID(int ID) {
this.ID = ID;
public String getName() {
return Name;
public void setName(String Name) {
this.Name = Name;
</code>
<code>
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="data.*"%>
<%@page import="javax.naming.*"%>
<%@page import="javax.rmi.PortableRemoteObject"%>
<%@page import="ejb.*"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Online Shop Warenkorb Test</h1>
<%--
This example uses JSTL, uncomment the taglib directive above.
To test, display the page like this: index.jsp?sayHello=true&name=Murphy
--%>
<%--
<c:if test="${param.sayHello}">
<!-- Let's welcome the user ${param.name} -->
Hello ${param.name}!
</c:if>
--%>
<%
Context myEnv = null;
WarenkorbRemote wr = null;
// Context initialisation
try
myEnv = (Context)new javax.naming.InitialContext();
/*Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
//env.put(Context.PROVIDER_URL, "jnp://wotan.activenet.at:1099");
env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
myEnv = new InitialContext(env);*/
catch (Exception ex)
System.err.println("Fehler beim initialisieren des Context: " + ex.getMessage());
// now lets work
try
Object ref = myEnv.lookup("ejb/WarenkorbBean");
//Object ref = myEnv.lookup("WarenkorbBean");
WarenkorbRemoteHome warenkorbrhome = (WarenkorbRemoteHome)
PortableRemoteObject.narrow(ref, WarenkorbRemoteHome.class);
wr = warenkorbrhome.create();
ArrayList myList = (ArrayList)wr.erzeugeWarenkorb();
Iterator it = myList.iterator();
while(it.hasNext())
Produkt p = (Produkt)it.next();
%>
ProduktID: <%=p.getID()%><br></br>Produktbezeichnung:
<%=p.getName()%><br></br><%
wr.leseWarenkorb(myList);
catch(Exception ex)
%><p style="color:red">Onlineshop nicht erreichbar</p><%=ex.getMessage()%>
<% }
%>
</body>
</html>
</code>
the exception
CORBA MARSHAL 1398079745 Maybe; nested exception is: org.omg.CORBA.MARSHAL: ----------BEGIN server-side stack trace---------- org.omg.CORBA.MARSHAL: vmcid: SUN minor code: 257 completed: Maybe at com.sun.corba.ee.impl.logging.ORBUtilSystemException.couldNotFindClass(ORBUtilSystemException.java:8101) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1013) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:879) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:873) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:863) at com.sun.corba.ee.impl.encoding.CDRInputStream.read_abstract_interface(CDRInputStream.java:275) at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:363) at com.sun.corba.ee.impl.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:526) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:333) at java.util.ArrayList.readObject(ArrayList.java:591) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.corba.ee.impl.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1694) at com.sun.corba.ee.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1212) at com.sun.corba.ee.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:400) at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:330) at com.sun.corba.ee.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:296) at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1034) at com.sun.corba.ee.impl.encoding.CDRInputStream.read_value(CDRInputStream.java:259) at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.read(DynamicMethodMarshallerImpl.java:333) at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.readArguments(DynamicMethodMarshallerImpl.java:393) at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:648) at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:192) at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1709) at com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:155) at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:184) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:129) at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:150) at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(Unknown Source) at ejb._WarenkorbRemote_DynamicStub.leseWarenkorb(_WarenkorbRemote_DynamicStub.java) at org.apache.jsp.index_jsp._jspService(index_jsp.java:122) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475) at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371) at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281) at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83) Caused by: java.lang.ClassNotFoundException ... 69 more ----------END server-side stack trace---------- vmcid: SUN minor code: 257 completed: MaybeHi,
I have found a way out by passing the reference of my EJB in the HttpSession object and using it inside the javabean..
Maybe you are looking for
-
Hi. I have been having problems with my PC and recently removed a lot of rubbish to clear it somewhat. I dont know if that is relavant however on top of that I have just received my replacement iPad2 which i had a proble with and thought I would jus
-
I haven't done anything to my MacBook since last week (upgraded to Lion), and on Monday morning it stopped receiving emails to my work account (MS Exchange). I have no problem sending emails from my work account. this is very strange. For clarity,
-
KDE is not updating correctly using pacman on my system. When I do: pacman -S kdebase It says: :: kdebase-3.2.3-1 is up to date. Upgrade anyway? But it is at 3.3......what's going wrong? -GPS
-
I can't get my iPhone to work.
It worked fine until I updated iTunes. Now iTunes asks me to restore to factory settings. I do that, but either it says it hasn't worked, or says it has worked but the phone isn't working. What should I do?
-
Confused by embedded color profile vs. working space
If you know that the destination of a photo is ultimately going to need the sRGB color profile (uploading book to blurb), and you are going from Lightroom to Photoshop ("edit in Photoshop CS5") do you "Convert document's colors to working space" of s