Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

HttpSession wird immer wieder neu erzeugt!! HELFT MIR BITTE!!!

Thread view: 
che - 10 Oct 2005 00:30 GMT
Hi!

Ich arbeite gerade mit JSP und EJB 3.0.

Ich habe eine EJB 3.0 - EJB - Webshop-Anwendung erstellt, und
eigentlich läuft auch alles gut, bis auf die Tatsache, dass wenn ich
die Anwendung lokal aufrufe, die HttpSession immer wieder neu erzeugt
wird. Kennt jemand das Problem?

Details:

Ich habe meherer JSPs die immer wieder einen ControllerServlet
aufrufen, welches ihnen die angeforderten Objekte (EJB 3.0 Beans)
besorgt und diese Ihnen in den JSP Seiten (im Request und Session
Scope) anzeigt.

Die EJB 3.0 Beans: 5 Entities, 1 Stateful Session Bean (der Warenkorb)
und einige Stateless Session Beans...

Ich  arbeite mit JBoss als AppServer, und der WEbserver ist der in
Jboss integrierte Tomcat.

ICh arbeite an zwei Rechnern. Auf dem PC habe ich JBoss installiert und
die Anwendung darin deployed. Von meinem Notebook aus rufe ich die
Anwendung so auf:

http://192.168.2.2:8080/petshop

und alles ist OK!

Wenn ich aber lokal auf die Anwendung zugreifen will, also mit dem
Aufruf:
http://localhost:8080/petshop
ODER
http://127.0.0.1:8080/petshop

dann wird das Session Objekt immer wieder neu erzeugt, wenn ich das
Controller Servlet aufgerufen wird.

Kennt jemand den Grund dafür?

Ich wäre für jeden Tipp dankbar.
Roedy Green - 10 Oct 2005 08:51 GMT
>Hi!
>
[quoted text clipped - 38 lines]
>
>Ich wäre für jeden Tipp dankbar.

Here is my crude translation, designed primarily to stimulate German
speakers to provide a decent one:

I work with JSP and EJB 3.0. I wrote an EJB 3.0 - EJB - to Webshop
application, and everything runs fine , except for when I call the
application, it keeps creating a new HTTP session. Does someone know
what could be causing this? Detail: I have several JSPs which call
ControllerServlet again and again.

This  gets the requested objects (EJB 3,0 Beans) which are inserted
into the JSP (in the Request and session Scope). The EJB 3.0 Beans: 5
Entities, 1 Stateful session Bean (the shoppingcart) and some
Stateless session Beans. I work with JBoss as AppServer, and the Web
server is Tomcat integrated into Jboss. I work on two computers. On
the PC I installed JBoss and  the application. From my Notebook I call
application like this: http://192.168.2.2:8080/petshop and everything
is OK! If I, however, I want to access application locally, like this
with: http://localhost:8080/petshop OR http://127.0.0.1:8080/petshop
then the session is created again and again if the CONTROLLER Servlet
is called. Does someone know the reason for it? I would be for
grateful for any anwswer.


----------------------------

One thought.  You should have a line like this in your hosts file.  It
should not affect the 127.0.0.1, though, but you never know.

127.0.0.1         localhost

see http://mindprod.com/jgloss/hosts.html
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

che - 11 Oct 2005 10:02 GMT
Thank you Roedy.
I have checked the entries in that file, but the 127.0.0.1 localhost
entry exists there alreadey. It should be something else.
schulzp@fh-coburg.de - 31 Oct 2005 09:07 GMT
Hallo,

ich kann dir bei deinem Problem leider nicht helfen,
da ich mich selber gerade in EJB, JSP und Struts einarbeite!
Ich versuche auch einen Webshop mit diesen Technologien
zu erstellen! Hast du vielleich ein paar grundlegende Tipps
für die Vorgehensweise?

Danke

Patrick Schulz
schulzp@fh-coburg.de - 31 Oct 2005 09:02 GMT
Hallo,

ich kann dir bei deinem Problem leider nicht helfen,
da ich mich selber gerade in EJB, JSP und Struts einarbeite!
Ich versuche auch einen Webshop mit diesen Technologien
zu erstellen! Hast du vielleich ein paar Grundlegende Tipps
für die vorgehensweise?

Danke

Patrick Schulz
Dag Sunde - 31 Oct 2005 09:11 GMT
Hallo,

ich kann dir bei deinem Problem leider nicht helfen,
da ich mich selber gerade in EJB, JSP und Struts einarbeite!
Ich versuche auch einen Webshop mit diesen Technologien
zu erstellen! Hast du vielleich ein paar Grundlegende Tipps
für die vorgehensweise?

Jada Patrik, klart jeg vi hjelpe deg. Men du får nok mye
bedre respons hvis du skiver på et språk de fleste forstår!

(The above is in Norwegian, and says: "Of course we can
help you. But you will get a much better response if you
write in a language most people understand!)

Signature

Dag.

schulzp@fh-coburg.de - 31 Oct 2005 09:25 GMT
I also try to build a Webshop with EJB, JSP and Struts,
but I haven´t worked with these technologies yet.
Perhaps you can give me an approach?

Thanks
Dag Sunde - 31 Oct 2005 09:47 GMT
> I also try to build a Webshop with EJB, JSP and Struts,
> but I haven´t worked with these technologies yet.
> Perhaps you can give me an approach?

Ouch...

That is a tall order if you never worked with it before.
I think you should rethink your decision about J2EE if
you don't absolutely *know* that you're going to need it.

Anyway, here is a link to the whitepapers about some
different core aspects of J2EE:

http://java.sun.com/j2ee/reference/whitepapers/index.html

Also take a look at the last chapter of this doc:
(But read the whole thing)
http://java.sun.com/j2ee/reference/whitepapers/j2ee_guide.pdf

Signature

Dag.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.