Keeping Generate JSP Servlet Source
I want to keep the servlet source code generated by WL when compiling JSPs. In
our development environment we generate servlets on demand (we don't precompile
in ANT -- there are too many JSPs for that).
Elsewhere in this newsgroup I found a message that suggested adding this to the
web.xml file:
<context-param>
<param-name>weblogic.jsp.keepgenerated</param-name>
<param-value>true</param-value>
</context-param>
However, this seems to only keep the .class file, not the .java file. Unless I
am looking in the wrong place, WL isn't keeping the generated servlet source.
Does anyone know if/how this can be done?
Thanks.
"Aidan Monroe" <[email protected]> wrote in message
news:[email protected]...
>
> I want to keep the servlet source code generated by WL when compiling
JSPs. In
> our development environment we generate servlets on demand (we don't
precompile
> in ANT -- there are too many JSPs for that).
>
> Elsewhere in this newsgroup I found a message that suggested adding this
to the
> web.xml file:
>
> <context-param>
> <param-name>weblogic.jsp.keepgenerated</param-name>
> <param-value>true</param-value>
> </context-param>
>
> However, this seems to only keep the .class file, not the .java file.
Unless I
> am looking in the wrong place, WL isn't keeping the generated servlet
source.
> Does anyone know if/how this can be done?
WebLogic creates temporary directory something like:
D:\WebApp\WEB-INF\_tmp_war_WLS6server_WLS6server_WebApp\jsp_servlet
where it stores .java files (JSP files transformed into servlets before
compiling).
<jsp-descriptor>
<jsp-param>
<param-name>compileCommand</param-name>
<param-value>javac</param-value>
</jsp-param>
<jsp-param>
<param-name>precompile</param-name>
<param-value>false</param-value>
</jsp-param>
<jsp-param>
<param-name>workingDir</param-name>
<param-value>C:\TEMP\</param-value>
</jsp-param>
<jsp-param>
<param-name>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>
<jsp-param>
<param-name>pageCheckSeconds</param-name>
<param-value>5</param-value>
</jsp-param>
</jsp-descriptor>
workingDir parameter defines where WebLogic will store your files
Similar Messages
-
Generating the JSP from the Servlet source file
Hi,
Does anyone out there know if there is any utility/class/program which will generate a JSP from the Servlet Source file (.java file) or indeed from the compiled Servlet file (.class file)
If its possible to decompile a .class file into a .java file, surely it must be possible to convert the .java souce file into the .jsp file that created it.
any comments would be appreciated
RichardI am the author of the original JSP!
But I want to run a script on the generated Servlet source file,
changing its contents, and then generate the JSP that would have created the new Servlet source file.
but I need to know if theres anything that will reverse engineer a Servlet source into the generating JSP.
its a kind of of Jeopardy type thing! -
Classes involved in generating a servlet from a jsp
does anyone know how the servlet is generated by reading a jsp file. Can it be possible to
convert the jsp file in a DOM object and then applying a predefined template thru an XSLT to
generate the servlet file ..... what are the other considerations that usually goes in the
process of developing a servlet out of a jsp page can the same procedure if i am right be
used to generate the code for other technologies like EJB's and other templates .. kindly
reply back as this is urgent
thanks in advanceI know this answer isn't very useful, but the answer is "it depends." I.e. it depends on the app server. Tomcat, Weblogic, etc. do the translation differently. JSP/JSTL only define interfaces. If you want to see what your app server generates, there's usually a way to have the app server keep around the generated Java servlet code instead of deleting the file (as most app servers do by default). For example, with weblogic, make a weblogic.xml file (in the WEB-INF directory of the WAR) like this:
<weblogic-web-app>
<jsp-descriptor>
<jsp-param>
<param-name>keepgenerated</param-name>
<param-value>true</param-value>
</jsp-param>
</jsp-descriptor>
</weblogic-web-app>
You can learn alot from looking at this file, including finding subtle errors in your JSP when the error messages are absolutely no help at all (which happens disgustingly often). -
Apache TomCat 6.0 - Generate Servlet Source Code
sup java experts,
does anyone know how I can view the Servlet source code that's generated by the JSP engine?lol...thanks. I know it sounds like a dumb question after having read your answer but I thought TomCat (by default) doesn't save the auto-generated .java files and that i'd have to turn on that feature somehow.
Anyway, just to wrap up this question for future viewers, it turns out TomCat 6.0 does save the servlet source code generated by the JSP engine. I found mine in
C:\web\Tomcat 6.0\work\Catalina\localhost\_\org\apache\jsp\marc\test_jsp.java
Tomcat 6.0 = my installation folder
marc = a folder I created under the "ROOT" directory (the folder where you put your .jsp files so that the server can find them)
Thanks again njb7ty! -
How do i Create charts using JSP/Servlet & Database
I have to create charts which shows the graph of stock exchange.
i have a database that keeps the data for creating charts.
But i did not know how to create charts using jsp-servlet.
Any Example might help me to go forward.
Any help will be really appreciated.
Please Advice me.JFreeChart - You can generate the charts then convert them to image formats (PNG and JPEG) all using the JFreeChart API
http://www.jfree.org/jfreechart/ -
How can I call EJB from JSP/Servlets in iWS?
Hi!!
My JSP/Servlets are on iWS, and I deploy EJB on iAS.
In this case, I don't know how JSP/Servlet call EJb on iAS.
I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
I will thank you if you give me a simple example source using JSP/Servlet
and EJB.
Thanks in advance!!!
- Park-Park,
Why Are you running your JSP/Servlets in iWS instead of iAS? For whatever
reason,
look at the Converter sample from iAS. You will be doing RMI/IIOP in this
case and the sample explains in detail what to do.
hth,
-robert
"SungHyun, Park" <[email protected]> wrote in message
news:9jpfmt$[email protected]..
Hi!!
My JSP/Servlets are on iWS, and I deploy EJB on iAS.
In this case, I don't know how JSP/Servlet call EJb on iAS.
I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
I will thank you if you give me a simple example source using JSP/Servlet
and EJB.
Thanks in advance!!!
- Park- -
Separate jsp/servlets from EJBs for petstore
By default, petstore deploy all the web apps and EJBs in one ear. I am trying to
separate the JSP/servlets to deploy to diffent machine. I need to modify the client
InitialContext to point to the remote server. I took a look at the source and
there are many places using the default constructor of InitialContext to load
the default URL. I wrote a jndi.properties file that has the correct url and put
this to the classpath. I know this file needs to be put to the working directory,
too. In case of pet store web application, what should be the working directory?
Thanks, CathyI'm also interested in running the Pet Store application server and the database
(Oracle prefered) on different systems.
Is this configurable during runtime or does it require code modification, compilation
and deployment?
Thanks,
TL -
Is there any JSP/servlet opensource project like phpMyAdmin?
Is there any JSP/servlet opensource project existed which is designed to manipulate the database MySQL such as phpMyAdmin?
I would like to gain the source code and reference to its design pattern.I don't know about PHPMYAdmin but MySqlAdmin can do any job you need
http://www.skillipedia.com -
Advantages and Disadvantages of Applet over JSP/servlet
Can some one please let me know what are the major advantages and disadvantages of using Applets over JSP/Servlet technology?
Well, a servlet / jsp is generated on the server, an applet on the client side. That's the most important difference.
Appelt's usually are for little applications like games and stuff, you can run in a browser.
Servlets are for dynamic pages, for example database-viewing and stuf... -
Hi experts, when you're using Jsp/Servlet to implement the front-end web application, what options do you have for implementing some menu dropdown?
Is awt or swing can be used for that purpose?
How would you go about the layout management issue?
Thanks, and your reponse is appreciatedI guess You are looking for a solution in JSP/Servlets. Here is my program that might be help ful to you. This program will bring a drop down list that fetches the values from the database.
<table cellpadding=4 cellspacing=2 border=0 align=center>
<TR>
<TD><B>choose Code</B></TD>
<TD valign=top>
<!-- this code is to generate the list of Codes-->
<% String userId =(String) session.getValue("userName"); %>
<%
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String uId;
String returnString="";
String null_value="";
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection("jdbc:oracle:thin:@serverName:1521:localHost", "scott", "tiger");
if (con == null) {
System.out.println("Connection not found");
stmt = con.createStatement();
con.setAutoCommit(false);
String sql= "select code from example_list where user_id='"+userId+"'";
rs= stmt.executeQuery(sql);
%>
<select name="alcList">
<%String aString;
rs= stmt.executeQuery(sql);
while (rs.next()) {
%>
<option value="<%= aString = rs.getString("code") %>">
<%= aString %></option> <%}%></select><%
con.commit();
//returnString= true;
} catch(SQLException sqlex) {
sqlex.printStackTrace();
//return returnString;
} catch(Exception ex) {
ex.printStackTrace();
} finally {
stmt.close();
con.close();
stmt = null;
rs = null;
con = null;
%></TD>
<TD align=center>
<INPUT TYPE=submit SIZE=30 VALUE="Submit"></TD>
</TR>
</Table>
</FORM>
</BODY>
</HTML>if this doesn't answer your problem, Please post your question exactly. May be I can help you out.
Good Luck.
-Sreekanth varidhireddy -
Same JSP/Servlet is executing again and again
Hello,
We have some JSPs which do a lot of processing and is 'alive' for a long period
of time. If we use the JSP with small amouts of data, it is fine. But when we
use the JSP with lot of data, it seems to 'go in a loop'.
It is processing the data again and again and again and brings down our server.
We do not think it is the code that is wrong - as it processes perfectly if the
data is small or when our server is not busy. This problem happens if the data
is lot and the server is also busy. The JSP seems to be executing again and again.
Is there some type of 'refresh' logic in weblogic that refreshes the JSP/servlet
and makes it 'execute' again and again.
We are using WL 6.1
Thanks,
Oleg.Hi Oleg,
Could you tell us how you find out that there is an additional request?
Regards,
Slava Imeshev
"Oleg" <[email protected]> wrote in message
news:[email protected]...
>
Thank you Varad and Slava,
We don't use plagin for iplanet,
but our problem is very similar:
Weblogic generate additional request if the previous request toservlet/jsp is
taking long time.
Where I can configure JSP timeout to fix this problem?
Thank you very much.
Oleg.
"Varadharajan" <[email protected]> wrote:
Hi Oleg,
Are you using weblogic plugin for iplanet webserver ?
In weblogic server 6.1 sp3 there is a problem with this plugin. It would
generate
additional request if the previous request to servlet/jsp is taking more
than
the configurable timeout set in the obj.conf file of iplanet webserver.
This plugin problem is fixed in wls6.1 sp4.
Rgds,
Varad
"Slava Imeshev" <[email protected]> wrote:
Hi Oleg,
See my answers inline.
"Oleg" <[email protected]> wrote in message
news:[email protected]...
Hello,
We have some JSPs which do a lot of processing and is 'alive' for
a
long
period
of time. If we use the JSP with small amouts of data, it is fine.But
when we
use the JSP with lot of data, it seems to 'go in a loop'.I guess you need to figure out if "seems" really "does".
It is processing the data again and again and again and brings downour
server.
How do you know that a JSP goes into a loop?
We do not think it is the code that is wrong - as it processes
perfectly
if the
data is small or when our server is not busy. This problem happensif the
data
is lot and the server is also busy. The JSP seems to be executingagain
and again.
What load is considered to be high/low for you
application? Are you running a load test?
Is there some type of 'refresh' logic in weblogic that refreshes
the
JSP/servlet
and makes it 'execute' again and again.Normally Servlet/JSP enters service() method when
there is an incoming request. It should not be happening
at JSP's will.
Regards,
Slava Imeshev -
Metadata problem with JSP/servlet application
Hi,
I developed a JSP/servlet test application that makes
use of kodo 2.2.3 STANDARD EDITION for its persitence.
I successfully compile and annotate the application.
I am also able to successfully generate the db
schema with schematool.
Unfortunately, when I run the application using
Resin 2.0.2, Kodo is unable to initialize properly.
Initially it was not able to find "system.prefs" file.
I fixed that by putting "system.prefs" in WEB-INF\classes.
Unfortunately, Kodo is still unable to initialize and
gives the following message:
The system could not initialize; the following registered
persistent types are missing metadata
or have not been enhanced:
[class com.dpov.purchaseorder.PurchaseOrder,
class com.dpov.catalog.Product,
class com.dpov.uidgen.counter.Counter,
class com.dpov.catalog.dao.jdo.CategoryHierarchyEntry,
class com.dpov.catalog.dao.jdo.CategoryHierarchyDAO,
class com.dpov.pricelist.PriceInfo,
class com.dpov.pricelist.PriceList,
class com.dpov.catalog.Category,
class com.dpov.lineitem.LineItem,
class com.dpov.dealer.Dealer,
class com.dpov.user.User,
class com.dpov.customer.Customer].
I use "system.jdo" to describe metadata for the enhancer.
I tried to put it both in WEB-INF\lib and WEB-INF\classes but
it still fails.
Please note that:
1) my classpath variable is not set
2) my application's class file are in WEB-INF\classes
3) kodo jars are in WEB-INF\lib
4) mysql jdbc driver is in WEB-INF\lib
5) system.prefs is in WEB-INF\classes
6) system.jdo is in WEB-INF\classes
Thanks in advance,
Andrea
system.prefs
<?xml version="1.0"?>
<prefs>
<kodo-license-key>VALID KEY!</kodo-license-key>
<db>
<username></username>
<password></password>
<url>jdbc:mysql://localhost/kodo</url>
<driver>org.gjt.mm.mysql.Driver</driver>
<dictionary>
com.solarmetric.kodo.impl.jdbc.schema.dict.MySQLDictionary
</dictionary>
<warn-on-persistent-type-failure>true</warn-on-persistent-type-failure>
</db>
<tm-location>java:/TransactionManager</tm-location>
</prefs>
system.jdo
<?xml version="1.0"?>
<jdo>
<package name="com.dpov.uidgen.counter">
<class name="Counter" />
</package>
<package name="com.dpov.customer">
<class name="Customer" />
</package>
<package name="com.dpov.user">
<class name="User" />
</package>
<package name="com.dpov.dealer">
<class name="Dealer" />
</package>
<package name="com.dpov.catalog">
<class name="Product" />
</package>
<package name="com.dpov.catalog">
<class name="Category" />
</package>
<package name="com.dpov.catalog.dao.jdo">
<class name="CategoryHierarchyDAO">
<field name="categories">
<collection element-type="com.dpov.catalog.Category"/>
</field>
</class>
</package>
<package name="com.dpov.catalog.dao.jdo">
<class name="CategoryHierarchyEntry">
<field name="attributeValues">
<map key-type="String" value-type="CategoryHierarchyEntry"/>
</field>
<field name="productIds">
<collection element-type="String"/>
</field>
</class>
</package>
<package name="com.dpov.lineitem">
<class name="LineItem" />
</package>
<package name="com.dpov.purchaseorder">
<class name="PurchaseOrder">
<field name="lineItems">
<collection element-type="com.dpov.lineitem.LineItem"/>
</field>
</class>
</package>
<package name="com.dpov.pricelist">
<class name="PriceInfo" />
</package>
<package name="com.dpov.pricelist">
<class name="PriceList">
<field name="priceInfos">
<map key-type="String" value-type="PriceInfo"/>
</field>
</class>
</package>
</jdo>Hi,
I fixed my problem by setting the system wide variable (WindowsXP)
CLASSPATH to r:\\dealershop\\WEB-INF\\classes.
Thanks,
Andrea
andrea costantinis wrote:
Hi,
I developed a JSP/servlet test application that makes
use of kodo 2.2.3 STANDARD EDITION for its persitence.
I successfully compile and annotate the application.
I am also able to successfully generate the db
schema with schematool.
Unfortunately, when I run the application using
Resin 2.0.2, Kodo is unable to initialize properly.
Initially it was not able to find \"system.prefs\" file.
I fixed that by putting \"system.prefs\" in WEB-INF\\classes.
Unfortunately, Kodo is still unable to initialize and
gives the following message:
The system could not initialize; the following registered
persistent types are missing metadata
or have not been enhanced:
[class com.dpov.purchaseorder.PurchaseOrder,
class com.dpov.catalog.Product,
class com.dpov.uidgen.counter.Counter,
class com.dpov.catalog.dao.jdo.CategoryHierarchyEntry,
class com.dpov.catalog.dao.jdo.CategoryHierarchyDAO,
class com.dpov.pricelist.PriceInfo,
class com.dpov.pricelist.PriceList,
class com.dpov.catalog.Category,
class com.dpov.lineitem.LineItem,
class com.dpov.dealer.Dealer,
class com.dpov.user.User,
class com.dpov.customer.Customer].
I use \"system.jdo\" to describe metadata for the enhancer.
I tried to put it both in WEB-INF\\lib and WEB-INF\\classes but
it still fails.
Please note that:
1) my classpath variable is not set
2) my application\'s class file are in WEB-INF\\classes
3) kodo jars are in WEB-INF\\lib
4) mysql jdbc driver is in WEB-INF\\lib
5) system.prefs is in WEB-INF\\classes
6) system.jdo is in WEB-INF\\classes
Thanks in advance,
Andrea -
Can't get EntityManager access in JSP/Servlet
Hi all,
our team has started a EJB project (EJBs + JPA configurations)
we managed to access the configured JPA (EntityManager etc) within the EJB instance; however we don't know how to access the EntityManager within JSP/Servlet
Our project's structure:
1 EJB project (EJB classes, EntityBean classes, JPA configuration + eclipselink)
1 Web project (for JSP, Servlets)
the main problem is ... we can't access EntityManager(s) in JSP / Servlets (and we already tried using Struts2.0 to replace servlets/jsp... the problem is the same... so it is not ... the matter of choosing the view technology...)
JasonHi Jason,
How i tried to get EntityManager is as following:
Suppose I want to define my Persistence unit like Following:
*<Your-EAR>/APP-INF/classes/MyEmployee.java*
"*MyEmployee.java*"
package entityA;
import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import javax.persistence.*;
@Entity()
@Table(name="MYEMPLOYEE")
public class MyEmployee implements Serializable {
//default serial version id, required for serializable classes.
private static final long serialVersionUID = 1L;
private Long empno;
private String empname;
public MyEmployee() {
@Id()
@Column(name="EMPNO", unique=true, nullable=false, precision=22)
public Long getEmpno() {
return this.empno;
public void setEmpno(Long empno) {
this.empno = empno;
@Basic()
@Column(name="EMPNAME", length=15)
public String getEmpname() {
return this.empname;
public void setEmpname(String empname) {
this.empname = empname;
public boolean equals(Object other) {
if (this == other) {
return true;
if (!(other instanceof MyEmployee)) {
return false;
MyEmployee castOther = (MyEmployee)other;
return new EqualsBuilder()
.append(this.getEmpno(), castOther.getEmpno())
.isEquals();
public int hashCode() {
return new HashCodeBuilder()
.append(getEmpno())
.toHashCode();
public String toString() {
return new ToStringBuilder(this)
.append("empno", getEmpno())
.toString();
And I have Placed My "*persistence.xml*" file in *"<Your-EAR>/APP-INF/classes/META-INF/persistence.xml"*
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="JPA_A_EJB" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>entityA.MyEmployee</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>
<property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>
<property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:xe"/>
<property name="hibernate.connection.username" value="jack"/>
<property name="hibernate.connection.password" value="password"/>
</properties>
</persistence-unit>
</persistence>
***********************************HOW I Access The Above Unit from my EJB mentioned Below*******************************
"*EmployeeSessionBean.java*"
package sfsbA;
import entityA.*;
import javax.ejb.*;
import javax.persistence.*;
@Stateless
public class EmployeeSessionBean implements EmployeeSessionRemoteIntf
*@PersistenceContext*
protected EntityManager entityManager;
*///NOTE: Using the Above Technique You can access the "EntityManager" Object in your Servlets As well...Just write the Above two Lines inside your Servlet*
public void createEmployee(Long empno,String empname) throws Exception{
System.out.println("\n\tcreateEmployee() called. EntityManager entityManager = "+entityManager);
MyEmployee employee = new MyEmployee();
employee.setEmpno(empno);
employee.setEmpname(empname);
entityManager.persist(employee);
System.out.println("\n\t Entity Manager has persisted the Employee Information...");
int count = 0;
public EmployeeSessionBean() {
System.out.println("\n\t EmployeeSessionBean--> EmployeeSessionBean() invoked");
@Init("create")
public void initMethod() throws CreateException {
System.out.println("\n\t EmployeeSessionBean--> public void initMethod() invoked");
@Remove(retainIfException=true)
public void removeWithRetain() throws Exception{
System.out.println("\n\t EmployeeSessionBean--> removeWithRetain() invoked");
@Remove
public void removeWithoutRetain() throws Exception{
System.out.println("\n\t EmployeeSessionBean--> removeWithoutRetain() invoked");
public String printRemoteIntf () {
System.out.println("\n\t EmployeeSessionBean ---> public String printRemoteIntf () invoked");
return "ReplicableSFSRemoteObjectIntf";
public String printLocalIntf () {
System.out.println("\n\t EmployeeSessionBean ---> public String printLocalIntf () invoked");
return "ReplicableSFSLocalObjectIntf";
public String printBean () {
System.out.println("\n\t EmployeeSessionBean ---> public String printBean () invoked");
return "EmployeeSessionBean";
public int testIncrement() throws Exception
System.out.println("\n\t EmployeeSessionBean ---> public int testIncrement() invoked");
count=count+5;
return count;
public int testDecrement() throws Exception
System.out.println("\n\t EmployeeSessionBean ---> public int testDecrement() invoked");
count=count-2;
return count;
public int getCount() throws Exception
System.out.println("\n\t EmployeeSessionBean ---> public int getCount() invoked");
return count;
"*EmployeeSessionRemoteIntf.java*"
package sfsbA;
public interface EmployeeSessionRemoteIntf {
public void createEmployee(Long emono,String empname) throws Exception;
public void removeWithRetain()throws Exception;
public void removeWithoutRetain() throws Exception;
public String printBean ();
public int testIncrement() throws Exception;
public int testDecrement() throws Exception;
public int getCount() throws Exception;
*"ejb-jar.xml"*
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<enterprise-beans>
<session>
<ejb-name>EmployeeSessionBean</ejb-name>
<business-remote>sfsbA.EmployeeSessionRemoteIntf</business-remote>
<ejb-class>sfsbA.EmployeeSessionBean</ejb-class>
<session-type>Stateless</session-type>
</session>
</enterprise-beans>
</ejb-jar>
*"weblogic-ejb-jar.xml"* (I am writing these file Just because i want my Own JNDI Simple name...Not the Container Generated Complex JNDI name)
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/90" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>EmployeeSessionBean</ejb-name>
<stateless-session-descriptor>
<business-interface-jndi-name-map>
<business-remote>sfsbA.EmployeeSessionRemoteIntf</business-remote>
<jndi-name>EmployeeSessionBean</jndi-name>
</business-interface-jndi-name-map>
</stateless-session-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
"*application.xml*"
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' 'http://java.sun.com/dtd/application_1_3.dtd'>
<application>
<display-name>JPAs_Demo_Jason</display-name>
<module>
<ejb>AccessEntityManager.jar</ejb>
</module>
</application>
NOTE: The Jar "" Contains
1). EmployeeSessionBean
2). EmployeeSessionRemoteIntf
3). META-INF/ejb-jar.xml
4). META-INF/weblogic-ejb-jar.xml
Thanks
Jay SenSharma
http://jaysensharma.wordpress.com (Real WebLogic Stuff...Not less Than a Magic...Here)
Edited by: Jay SenSharma on Dec 16, 2009 10:59 PM
Edited by: Jay SenSharma on Dec 16, 2009 11:00 PM -
Overriding default jsp servlet mapping
I want to override the default jsp servlet mapping under a specific directory. I have the following entries in my application's web.xml file:
<servlet>
<servlet-name>CMS</servlet-name>
<jsp-file>/template/main.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>CMS</servlet-name>
<url-pattern>/raw/*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>CMS</servlet-name>
<url-pattern>/raw/*.jsp</url-pattern>
</servlet-mapping>
When I call up the page /raw/test.jsp, it is processed as a normal jsp page instead of by the custom mapping. Calling up the page /raw/test.html works as expected.
I am using the embedded server under JDeveloper 10.1.2.1.0.
Isn't an entry in the application's web.xml file meant to override system wide mappings?
Thanks for any help.
MartinI'm no expert on this but I have a hunch. 1st of all, your using a servlet mapping for a JSP. That's good and well but it seems that the container is complaining that there is no servlet named org.apache.jsp.jsp.info.ContactUs_jsp. In other words it looks like the JSP has not been compiled. At least not yet. Maybe try two things. Visit the JSP once with a browser at it's actual path "http://localhost:8080/<webapp>/jsp/info/ContactUs.jsp" the coerce a page compile. Then try it with your new mapped path. You see, just telling the container that there is a servlet mapped to the new URL doesn't force the container to generate the class. Something or someone must generate the servlet class file.
Honestly, I'm not sure of what your end goal is but maybe you might consider using a JSP pre-compiler? Or even better, register a servlet at the mapped path that fowards all requests into the desired folder.
Cliff -
Monitor my jsp-servlet application through the jmx
heloo,
i am new in JMX. and i want to manage(or monitor) my jsp-servlet application. there lots of
servlets and jsp files. its is running in tomcat. i made simple demo application which
is given by oracle tutorial. but it is just for one interface and its implementations so how
can i monitor my whole jsp-servlet application by JMX.
i want to Monitor three things
Memory
JVM
Thread
Thanks...Hi,
I fixed my problem by setting the system wide variable (WindowsXP)
CLASSPATH to r:\\dealershop\\WEB-INF\\classes.
Thanks,
Andrea
andrea costantinis wrote:
Hi,
I developed a JSP/servlet test application that makes
use of kodo 2.2.3 STANDARD EDITION for its persitence.
I successfully compile and annotate the application.
I am also able to successfully generate the db
schema with schematool.
Unfortunately, when I run the application using
Resin 2.0.2, Kodo is unable to initialize properly.
Initially it was not able to find \"system.prefs\" file.
I fixed that by putting \"system.prefs\" in WEB-INF\\classes.
Unfortunately, Kodo is still unable to initialize and
gives the following message:
The system could not initialize; the following registered
persistent types are missing metadata
or have not been enhanced:
[class com.dpov.purchaseorder.PurchaseOrder,
class com.dpov.catalog.Product,
class com.dpov.uidgen.counter.Counter,
class com.dpov.catalog.dao.jdo.CategoryHierarchyEntry,
class com.dpov.catalog.dao.jdo.CategoryHierarchyDAO,
class com.dpov.pricelist.PriceInfo,
class com.dpov.pricelist.PriceList,
class com.dpov.catalog.Category,
class com.dpov.lineitem.LineItem,
class com.dpov.dealer.Dealer,
class com.dpov.user.User,
class com.dpov.customer.Customer].
I use \"system.jdo\" to describe metadata for the enhancer.
I tried to put it both in WEB-INF\\lib and WEB-INF\\classes but
it still fails.
Please note that:
1) my classpath variable is not set
2) my application\'s class file are in WEB-INF\\classes
3) kodo jars are in WEB-INF\\lib
4) mysql jdbc driver is in WEB-INF\\lib
5) system.prefs is in WEB-INF\\classes
6) system.jdo is in WEB-INF\\classes
Thanks in advance,
Andrea
Maybe you are looking for
-
Can I turf it? That's really the heart of the question. Thanks.
-
ThinkPad W520: Parts Wrongly Listed in and/or Missing from Lenovo Order Status Page
I ordered a configured ThinkPad W520 off Lenovo.com for USD1500 yesterday. Later when I went back to check my order status, to my surprise some parts were either shown up incorrectly or simply missing. For example my ThinkPad W520 includes (but not
-
Handling unit Management - Reverse PGI issue
We have an issue in our production system with Reverse PGI- Transaction: VL09. We could not able to reverse PGI and we are getting an error message saying " *HU Items Material posting is inconsistent"* Message: HU General 327. We looked into OSS note
-
Hi I want to transfer Video from an old Sony Camcorder Hi8 that uses a DV 4 Pin Firewire to a Macbook Pro Retina with Thunderport 2. I understand i would have to use a Firewire 400 to Firewire 800 cable connected to a Firewire to Thunderport Adaptor
-
Daily Business Intelligence- DBI
Hi , Iam newbie to DBI. I have gone through the DBI implementation guide and tried to create a new report. Created a report and published it. In the process of creating Initial Request set (in Daily Business Intelligence Administrator), could not fin