Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSp on weblogic Server  RSS feed

 
kkailash
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends
Can any one tell me how where to place different files in weblogic Server to run jsp program. Problem Arises when using
java Beans(i.e. diferent java file) along with jsp files.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

"kkailash"
your name doesn't agree with the javaranch guidelines.
please take a moment and re-register after reviewing the guidelines at http://www.javaranch.com/name.jsp
thanks for your cooperation.
- satya
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wright now I�m having exactly the same problem, I�m looking for a way around and as soon as I find it I�ll post here. Pls do the same.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I�ve find something at: http://e-docs.bea.com/wls/docs60/jsp/reference.html#57732
it says:
The <jsp:useBean> tag attempts to retrieve an existing named Java object from a specific scope and, if not found, may attempt to instantiate a new object and associate it with the name given by the id attribute. The object is stored in a location given by the scope attribute, which determines the availability of the object. For example, the following tag attempts to retrieve a Java object of type examples.jsp.ShoppingCart from the HTTP session under the name cart.

<jsp:useBean id="cart" class="examples.jsp.ShoppingCart" scope="session"/>
If such an object does not currently exist, the JSP attempts to create a new object, and stores it in the HTTP session under the name cart. The class should be available in the CLASSPATH used to start WebLogic Server, or in the WEB-INF/classes directory of the Web Application containing the JSP.
I�ll try it now.
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi it�s working now here goes what I did:
I�ve created a directory under DefaultWebApp_myserver called beans to put my beans than I create a BEAN_HOME variable at startWebLogic.cmd that point to the beans directory and than I�ve appended %BEAN_HOME% to the SET CLASSPATH command in this same file, than I�ve put my beans under the beans directory and everything works well now. I�ve also noted that beans without package declarations did�nt work.
The lines I�ve edited at startWebLogic.cmd
set BEANS_HOME=%WL_HOME%\config\mydomain\applications\DefaultWebApp_myserver\beans
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;C:\weblogic\mssqlserver4v70\classes;C:\weblogic\mssqlserver4v70\license;%classpath%;%BEANS_HOME%;
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!