Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with beans in JSP....URGENT

 
Raukutam Sandeep
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody,

since few days I have a problem with accessing beans in JSP page. Before I tell my probelm, can anybody tell me .....what is the best way to use a username throughout the session....(I'm developing an Intranet mailing system)?
I'm using beans to store a username and retrieve it throughout the session.... Is this a good practice?
For better understanding, I'll present the scenario.
I have signin.jsp page which allows the user to signin. The form action path in signin.jsp is set to login.jsp. The login.jsp contains code for verifying the user validity and if login is successful, the jsp page is forwarded to inbox.jsp else it is forwarded to invalid.jsp.
inbox.jsp contains two frames, one is dir.jsp and the other is blank.jsp
I want to use the username in blank.jsp(for example).
Now please tell me where should I place my bean code(I mean jsp:useBean and getProperty and setProperty tags) exactly..whether in login.jsp or inbox.jsp, so that I can use that username throughout my session.
Hope u understood the above scenario.
Please reply asap...This is URGENT...!!!
regds,
Sandeep.
 
Raghav Mathur
Ranch Hand
Posts: 641
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your logic is wrong !....tell me about the proj , i'll help you .
 
Raukutam Sandeep
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi raghav,

i'm developing a project on Intranet mailing System..
Before I tell u about my project, can u tell me where did I go wrong in my logic...
reply asap...
regds,
Sandeep.
 
kiran sana
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,
i know how to do it in weblogic server. compile that bean code & dump that class file (not java file, only class file)in weblogic/myserver/serverclasses directory. call that bean name in import statement in any page where u want to use that bean. it will work.
<%@ page language="java" import="Mock1,Question,java.util.*"%>
in the above example "Mock1" is a bean. like this u do it.
bye..
Kiran Sana.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic