Using jsp in webi(BO).
How can i use Jsp in BusinessObjects Webintelligence tool and for what purpose i can use jsp coding to create reports?
Thanks in advance.
Rp
Hi Meghna,
Did you try this query in repository explorer?
This seems very complex query and as per error some mandatory initialization is missing
I guess each valuation have their own identifier, which you also have to pass as parameter.
Give a try in Repository explorer with all required parameters.
Regard
Sunil
Similar Messages
-
Hi
I want to use JSP and servlet pages in my web dynpro application
how can we add the JSP pages in web dynpro aaplication or how can I achive this functionality?
Thanks
NinadHi,
Have a look at this thread,
Re: web dynpro jsp
Regards,
Saravanan K -
Hi,
Can I use JSPs and Servlets without using the Application server in the web server?Hi,
By default JSP and Servlets are supported by iWS/SUN ONE Web Server. For iWS till version 4.1 you need to manually enable the servlet engine and jsp. This can be done from the Server side, goto admin mode, select the server for which you want to activate the JSP, select servlet tab and click on appropriate radio button (YES) for Enabling JSP's and Servlet's.
NOTE: If you disable Servlet engine and JSPs are enabled, JSPs will also be disabled.
From version 6, JSP support is enabled by default.
Regards
Srini -
Using JSPs as a generic text template language
I am about to start a project with a lot of code generation. I intend to use templates to minimise the amount of println's in my code and to ease maintenance.
I am looking at this style of code:
For each file to be generated:
1) Set up a Javabean with the relevant data
2) Call a template which will substitute data from the Javabean
3) Output the stream from that template to a file
I have looked at Velocity which is easy to call from Java without requiring a URL request. However, I would like to use the JSP syntax as this provides a standard way for me to do my templating (I already use JSPs for web page generation).
Does anyone know how I can use JSP s in this way, i.e. calling them from a command line. I have tried using jspexcutor but have had severe diffiulties when using with Tomcat 3.3.
Thanks in advance
MartinI'm doing this now to generate Data Access Objects. I wrote the template as a JSP file, and I'm opening up an URL connection and writing the results to a Java source file. It works, but it's not pretty. I'm also looking for a nice way to do templating but haven't found anything so far. If you find something please let me know.
Mark -
Facelet to crare web app, instead of using JSP; JSF1.2 spec in WebSphere6.1
Novice to JSF and Facelet. But, I had been using Struts since its inception.
I am required to use IBM's WebSphere Application Server 6.1 that comes with Servlet 2.4 and JSP 2.0. WebSphere 6.1 App Server limits me to using JSF 1.1. This is because, JSF 1.2 requires Servlet 2.5 and JSP 2.1, that is a part of WebSphere App Server 7.0; not a part of WebSphere 6.1.
Somebody suggested that it will be possible to use JSF 1.2 in WebSphere 6.1, if I were using Facelet, instead of JSP.
I am not eager to use JSF 1.1 and may have to forego JSF; unless and until I can use JSF 1.2.
The hold-up is that I cannot use JSF 1.2 spec in WebSphere 6.1. Is there is any way to use JSF 1.2 in WebSphere 6.1? Can I create an entire application using Facelet (instead of JSP) that will let me use JSF 1.2 spec in WebSphere 6.1? If so, how?
Here are my questions, especially because I am not very familiar with JSF and Facelet technology:
1. Can I use JSF 1.2 specification in WebSphere 6.1, if I were using facelet (as opposed to JSP) as my view technology?
2. Will it be possible to create an entire web app with facelt, instead o fusing any JSP at all? If so, how? Does it mean that all the GUI screens will only use facelet and no JSP at all?
3. Please explain how I can write a complex web app with 100s of screens using only facelet, instead of using JSP.
4. Please provide pointer on how JSF and facelet differ, or what are their demarcations boundaries.
Any comment and pointer will be greatly appreciated.Don't doublepost. It's rude. Stick to one topic. Continue here: [http://forums.sun.com/thread.jspa?threadID=5335001].
-
How can WLS use JSP pages in a Web Application (either a .war file or a war directory structure) without a java compiler?
I suspect either the JSP specification is flawed (i.e. it doesn't take account of servers using just a JRE), or BEA's implementation is broken.
Production servers do not have a JDK installed. They only have a JRE. Therfore a java compiler is not present on the machine that the Web Application is deployed onto.
On the development machine, when the server is requested to load the JSP it creates a tmpwar directory within the Web Application directory structure. This is then included in the resultant .war file thus:
D:\war>jar -tf gmi.war
META-INF/
META-INF/MANIFEST.MF
gmiService.jsp
WEB-INF/
WEB-INF/classes/
WEB-INF/classes/com/
WEB-INF/classes/com/bt/
WEB-INF/classes/com/bt/gmi/
WEB-INF/classes/com/bt/gmi/gmiService.class
WEB-INF/getList.xsl
WEB-INF/getListByConnection.xsl
WEB-INF/getListByDistrict.xsl
WEB-INF/getListByDistrictConnection.xsl
WEB-INF/lib/
WEB-INF/source/
WEB-INF/source/build.bat
WEB-INF/source/gmiService.java
WEB-INF/web.xml
WEB-INF/weblogic.xml
tmpwar/
tmpwar/jsp_servlet/
tmpwar/jsp_servlet/_gmiservice.class
tmpwar/jsp_servlet/_gmiservice.java
When deployed on the production server with the web.xml file set to use the following values (note XML stripped):
weblogic.jsp.pageCheckSeconds
-1
weblogic.jsp.precompile
false
weblogic.jsp.compileCommand
javac
weblogic.jsp.verbose
true
weblogic.jsp.packagePrefix
jsp_servlet
weblogic.jsp.keepgenerated
false
And in the weblogic.properties file:
weblogic.httpd.webApp.gmi=war/gmi
I've also tried with the .war file, but that insists on creating another tmpwar directory outside of the .war file.
Then, although I have set pageCheckSeconds to -1 (don't check and don't recompile) ter production server still attempts to recompile the JSP's:
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param verbose initialized to: true
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param packagePrefix initialized to: jsp_servlet
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param compileCommand initialized to: javac
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param srcCompiler initialized to weblogic.jspc
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param superclass initialized to null
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param workingDir initialized to: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param pageCheckSeconds initialized to: -1
Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: initialization complete
Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java file: /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java
Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java failed: Exception in thread "main" java.lang.NoClassDefFoundError: sun/tools/javac/Main
java.io.IOException: Compiler failed executable.exec([Ljava.lang.String;[javac, -classpath, /opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4boot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudscape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/weblogic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/wls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, -d, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war, /opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.java])
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.io.IOException.<init>(Compiled Code)
at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:187)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:118)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:142)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:744)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:692)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:251)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
at weblogic.kernel.ExecuteThread.run(Compiled Code)
The default Java compiler from sun lives in the tools.jar that comes with
the JDK. Just add that to your set of JARs which are deployed in production
and you should be fine. No need to install the full JDK - just make the
tools.jar available to WebLogic.
Regards
James
James Strachan
=============
email: [email protected]
web: http://www.metastuff.com
"Martin Webb" <[email protected]> wrote in message
news:[email protected]...
>
> How can WLS use JSP pages in a Web Application (either a .war file or a
war directory structure) without a java compiler?
>
> I suspect either the JSP specification is flawed (i.e. it doesn't take
account of servers using just a JRE), or BEA's implementation is broken.
>
> Production servers do not have a JDK installed. They only have a JRE.
Therfore a java compiler is not present on the machine that the Web
Application is deployed onto.
>
> On the development machine, when the server is requested to load the JSP
it creates a tmpwar directory within the Web Application directory
structure. This is then included in the resultant .war file thus:
>
> D:\war>jar -tf gmi.war
> META-INF/
> META-INF/MANIFEST.MF
> gmiService.jsp
> WEB-INF/
> WEB-INF/classes/
> WEB-INF/classes/com/
> WEB-INF/classes/com/bt/
> WEB-INF/classes/com/bt/gmi/
> WEB-INF/classes/com/bt/gmi/gmiService.class
> WEB-INF/getList.xsl
> WEB-INF/getListByConnection.xsl
> WEB-INF/getListByDistrict.xsl
> WEB-INF/getListByDistrictConnection.xsl
> WEB-INF/lib/
> WEB-INF/source/
> WEB-INF/source/build.bat
> WEB-INF/source/gmiService.java
> WEB-INF/web.xml
> WEB-INF/weblogic.xml
> tmpwar/
> tmpwar/jsp_servlet/
> tmpwar/jsp_servlet/_gmiservice.class
> tmpwar/jsp_servlet/_gmiservice.java
>
> When deployed on the production server with the web.xml file set to use
the following values (note XML stripped):
>
> weblogic.jsp.pageCheckSeconds
> -1
>
> weblogic.jsp.precompile
> false
>
> weblogic.jsp.compileCommand
> javac
>
> weblogic.jsp.verbose
> true
>
> weblogic.jsp.packagePrefix
> jsp_servlet
>
> weblogic.jsp.keepgenerated
> false
>
>
> And in the weblogic.properties file:
>
> weblogic.httpd.webApp.gmi=war/gmi
>
> I've also tried with the .war file, but that insists on creating another
tmpwar directory outside of the .war file.
>
>
> Then, although I have set pageCheckSeconds to -1 (don't check and don't
recompile) ter production server still attempts to recompile the JSP's:
>
>
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: init
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
verbose initialized to: true
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
packagePrefix initialized to: jsp_servlet
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
compileCommand initialized to: javac
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
srcCompiler initialized to weblogic.jspc
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
superclass initialized to null
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
workingDir initialized to:
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp: param
pageCheckSeconds initialized to: -1
> Mon Sep 25 11:40:11 BST 2000:<I> <WebAppServletContext-gmi> *.jsp:
initialization complete
> Mon Sep 25 11:40:12 BST 2000:<I> <WebAppServletContext-gmi> Generated java
file:
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
java
> Mon Sep 25 11:40:14 BST 2000:<E> <WebAppServletContext-gmi> Compilation of
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
java failed: Exception in thread "main" java.lang.NoClassDefFoundError:
sun/tools/javac/Main
>
> java.io.IOException: Compiler failed
executable.exec([Ljava.lang.String;[javac, -classpath,
/opt/Solaris_JRE_1.2.1_04/lib/rt.jar:/opt/Solaris_JRE_1.2.1_04/lib/i18n.jar:
/opt/Solaris_JRE_1.2.1_04/classes:/var/wls/5.1/weblogic/lib/weblogic510sp4bo
ot.jar:/var/wls/5.1/weblogic/classes/boot:/var/wls/5.1/weblogic/eval/cloudsc
ape/lib/cloudscape.jar:/var/wls/5.1/weblogic/lib/wleorb.jar:/var/wls/5.1/web
logic/lib/wlepool.jar:/var/wls/5.1/weblogic/lib/weblogic510sp4.jar:/var/wls/
5.1/weblogic/license:/var/wls/5.1/weblogic/classes:/var/wls/5.1/weblogic/lib
/weblogicaux.jar:/opt/wls-servers/gmiServer/weblogic/gmiServer/serverclasses
:/opt/wls-servers/gmiServer/weblogic/lotusxsl.jar:/opt/wls-servers/gmiServer
/weblogic/xerces.jar:/opt/wls-servers/gmiServer/weblogic/logging.jar::/opt/w
ls-servers/gmiServer/weblogic/war/gmi/WEB-INF/classes:/opt/wls-servers/gmiSe
rver/weblogic/war/gmi/_tmp_war, -d,
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war,
/opt/wls-servers/gmiServer/weblogic/war/gmi/_tmp_war/jsp_servlet/gmiService.
java])
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Compiled Code)
> at java.lang.Throwable.<init>(Compiled Code)
> at java.lang.Exception.<init>(Compiled Code)
> at java.io.IOException.<init>(Compiled Code)
> at
weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(Compiled Code)
> at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:200)
> at weblogic.servlet.jsp.JspStub.compilePage(Compiled Code)
> at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:173)
> at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:18
7)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:118)
> at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:142)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:744)
> at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:692)
> at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:251)
> at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:363)
> at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:263)
> at weblogic.kernel.ExecuteThread.run(Compiled Code)
>
>
>
-
How to use JSP in apache web server
hi all,
can anybody tell me how to use JSPs in Apache Web Server.
Thanks
sirYou would need a servlet container to run Servlets and JSPs. And Apache's Tomcat is one such free container available. Download Tomcat from http://jakarta.apache.org and integrate with Apache WS
HTH -
Configuring web.xml when using JSP as display technology
Hi,
I have a very simple HelloWorld style jsp.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<f:view>
<html>
<head>
<title>
JSF in Action - Hello, world!
</title>
</head>
<body>
<h:form id="welcomeForm">
<h:outputText id="welcomeOutput" value="Welcome to JavaServer Faces!"
style="font-family: Arial, sans-serif; font-size: 24; color: green;"/>
<p>
<h:message id="errors" for="helloInput" style="color: red"/>
</p>
<p>
<h:outputLabel for="helloInput">
<h:outputText id="helloInputLabel"
value="Enter number of controls to display:"/>
</h:outputLabel>
<h:inputText id="helloInput" value="#{helloBean.numControls}"
required="true">
<f:validateLongRange minimum="1" maximum="500"/>
</h:inputText>
</p>
<p>
<h:panelGrid id="controlPanel" binding="#{helloBean.controlPanel}"
columns="20" border="1" cellspacing="0"/>
</p>
<h:commandButton id="redisplayCommand" type="submit" value="Redisplay"
actionListener="#{helloBean.addControls}"/>
<h:commandButton id="goodbyeCommand" type="submit" value="Goodbye"
action="#{helloBean.goodbye}" immediate="true"/>
</h:form>
</body>
</html>
</f:view>To get this working I had to use the following web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>JSFHelloWorld3</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.faces</url-pattern>
</servlet-mapping>
</web-app>When I go to:
http://localhost:8080/MyApp/hello.jsp
I get:
org.apache.jasper.JasperException: An exception occurred processing JSP page /hello.jsp at line 23
20: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
21: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
22:
23: <f:view>
24: <html>
25: <head>
26: <title>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.RuntimeException: Cannot find FacesContext
javax.faces.webapp.UIComponentClassicTagBase.getFacesContext(UIComponentClassicTagBase.java:1855)
javax.faces.webapp.UIComponentClassicTagBase.setJspId(UIComponentClassicTagBase.java:1672)
org.apache.jsp.hello_jsp._jspx_meth_f_005fview_005f0(hello_jsp.java:119)But when I go to:
http://localhost:8080/MyApp/hello.faces
Everything is ok?
I am confused why?
Any help appreciated.I believe this is a url pattern issue. You have one for *.jsf as opposed to *.jsp.
<url-pattern>*.jsf</url-pattern>
This likely any pattern containing "faces".
<url-pattern>/faces/*</url-pattern>
Add one for *.jsp and you should be OK. -
Any good books on web application using JSP/servlet?
Does anyone know good books on how-to build enterprise web application using JSP/servlet? Aside from the book "Head First JSP/Servlet". Development using Netbeans is more preferrable.
801264 wrote:
What about the free web server? JBoss or Glassfish or something else? I prefer web/application server that is fully compatible with JEE6 (unlike Tomcat that can't handle EJB). thanksI'm a JBoss user myself, so naturally I would advise that to you if I were ignorant. I'm not however, so in stead I'll tell you to investigate yourself and see which one you prefer. Nobody is going to tell you which one to use as there is no such thing as a 'better' or 'best' server. Just different servers each with different issues.
And the community edition of JBoss has had many issues in the past (because Red Hat of course wants to advise you to go to the enterprise platform which ain't cheap), but JBoss 5.1 was a rock solid piece of software that I have had zero problems with (after reading the odd forum or two). JBoss 6 builds on top of JBoss 5.1 and provides the full JEE6 web profile; this means it does NOT provide a certified 'full' JEE6 stack yet. This means nothing however as all the services you may need in an enterprise application are already there.
BTW: for simple servlet programming, don't neglect Apache Tomcat. Its a lightweight server that just works. -
Stop web page caching in mozilla using jsp
Hi,
Is there any way to stop the web page caching in mozilla by using jsp code?
When the user presses the logout button i do not want them to be able to press the back button.
Thanks.Expire your pages (set proper headers and cache controls that apply to both browser and proxy servers) and code it so that every page with data you don't want displayed doesn't display unless someone is logged in.
Note that there is never a 100% guarantee that the browser won't cache the pages. It's really up to the user agent (and any proxies, if applicable) to agree to follow the no-cache REQUEST.
For this reason, any database interactions (that is, inserts and updates) should always check for a valid session before executing.
Using POST to submit requests to pages that do database interaction is also helpful, so when they hit the back button, they'll see that warning about the page being generated from POST data.
If the data is horribly sensitive (financials, etc that you don't want left open on a screen), don't give them a chance to use the back button. Open the application itself in a brand new window (a login page will open the new window), do all interaction in that window, and logging out closes the child window (and thus loses all history).
Since this may irritate the holy heck out of the casual user (or just plain not work with popup blockers) it is not recommended to be used casually.
Keep this reserved for very sensitive applications, not just the average web site / application or because you don't feel like coding proper safeguards.
HTH -
How to open a pdf file in a web browser using jsp
Hi,
I have a problem opening pdf file in browser using jsp.the following is my code.Can anyone help me.Thanks
response.setContentType("application/pdf");
String filename="C:\\FictPos\\mypdf.pdf";
File file = new File(filename);
FileInputStream in = new FileInputStream(file);
OutputStream out1=response.getOutputStream();
byte[] buf = new byte[4096];
int count = 0;
while ((count = in.read(buf)) >= 0)
out1.write(buf, 0, count);
in.close();
out1.close();
}Don't know the problem specifically, but here are some suggestions to investigate:
Does it show anything in the page when you view source on it?
I would recommend using a servlet rather than a JSP page for this, if only for the fact the JSPs can insert carriage returns into places where you might not want them to. This might screw up the PDF file format?
Try setting the a link to the jsp, right-click and "save target as..." just to see if it gets any response at all - ie bypass the browser display.
Good luck,
evnafets -
Use JSP to display different web contents with same HTML style?
I am very new to jsp. what i wanna do is to use jsp to link with the database containing different contents to display in a same xsl style. any advice will be much appreciated.
You can do anything in jsp that you can with html, javaScript, xhtml, xsl, there is no difference, just write your xsl the same as you would for a static page.
-
How can I connect to SQL server database thru local network by using JSP?
I'm currently doing a project by using JSP..And I need to display record from the SQL Server database in our school's local network. May I know how can I do that? How can I write the code so that I can able to access the SQL Server databsase Throught school's network by using JSP? Please tell me step by step how can I do that. I'm using Tomcat 4.1 as Web Server. And I had J2SE and J2EE installed in my computer.
first you have to establish a ODBC DSN on your computer,
that connects to the database...you can do that from your control pannel.
i assume that the TOMCAT server is residing on your computer....(if the webserver is in other computer then you would have to create a System DSN on the data sources ODBC option in the settings>control pannel of that machine)
then you can use that DSN name to connect to the data base from the class file....for further assistance on how to create the class that access the tutorials in sun site.
regards
G -
JSP, Data Web Bean, BC4J: Setting the where clause of a View Object at run time
Hi,
I am trying to develop a data web bean in which the where clause of a View Object will be set at run time and the results of the query then displayed.
My BC4J components are located in one project while the coding for the data web bean is in another project. I used the following code bu t it does not work. Could you please let me know what I am doing wrong?
public void populateOSTable(int P_EmpId)
String m_whereString = "EmpView.EMP_ID = " + P_EmpId;
String m_OrderBy = "EmpView.EMP_NAME";
oracle.jbo.ApplicationModule appModule = null;
ViewObject vo = appModule.findApplicationModule("EMPBC.EMPAppModule").findViewObject("EMPBC.EMPView");
vo.setWhereClause(m_whereString);
vo.setOrderByClause(m_OrderBy);
vo.executeQuery();
vo.next();
String empName numAttrs = vo.getAttribute(EmpName);
System.out.println(empName);
Thanks.<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDev Team (Laura):
Here is how I have usually done mine:
1. In the JSP, use a RowsetNavigator bean to set the where clause and execute the query.
2. Use a custom web bean to process the results of the query (print to HTML).
for example:
<jsp:useBean class="oracle.jbo.html.databeans.RowsetNavigator" id="rsn" scope="request" >
<%
// get the parameter from the find form
String p = request.getParameter("p");
String s = request.getParameter("s");
// store the information for reference later
session.putValue("p", p);
session.putValue("s", s);
// initialize the app module and view object
rsn.initialize(application,session, request,response,out,"wt_bc_WT_bcModule.wtjoinView");
// set the where clause string
String theclause = "presname = '" + p + "' AND slideno=" + s;
// set the where clause for the VO
rsn.getRowSet().getViewObject().setWhereClause(theclause);
rsn.getRowSet().getViewObject().executeQuery();
rsn.getRowSet().first();
%>
</jsp:useBean>
<jsp:useBean class="wt_bc.walkthruBean" id="wtb" scope="request" >
<%
// initialize the app module and VO
wtb.initialize(application,session, request,response,out,"wt_bc_WT_bcModule.wtjoinView");
wtb.render();
%>
In this case, the render method of my custom web bean mostly gets some session variables, and prints various content depending on the session variable values.
Hope this helps.
</jsp:useBean><HR></BLOCKQUOTE>
Laura can you give the code of your walkthru bean? i wna't to initialize a viewobject, set the where clause and give that viewobject back to initialize my navigatorbar.
Nathalie
null -
Error when run a simple sample using jsp tag
When i run a jsp using jsp tag, the tomcat gave me the following information:
Resolve entity failed-//Sun Microsystems,Inc.//DTD JSP Tag Library 1.2//EN http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
My tld file is:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>sample</short-name>
<uri>WEB-INF/sampleTag</uri>
<display-name>SampleTag</display-name>
<description>Sample TLD</description>
<tag>
<name>time</name>
<tag-class>com.sample.taglib.TimeTag</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
Anybody can tell me why?
Thanks!!!It's strange bacause DTD is available under given address.
Which JSP version are you using?
Do you have any other tld file, which uses the same DTD version? Do tags define in it work properly?
Maby try to use 1.1 version of DTD?
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">But remember than version 1.1 has another node names (see http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd).
Maybe you are looking for
-
Open, save and then fonts are missing
I am receiving InDesign 5.5 files from clients. I can open them, make changes, do a save-as and close. When I immediately re-open the file, I get an error that most of the fonts are missing. I am using Linotype Font Explorer X, v 1.2.3 and I understa
-
Hi I lost my iphone 5,and each time I try to log in to icloud to locate it I get a message that error while connecting to server.Pls advice on what to do to locate ot.Thank you.
-
Is there a way to access ABAP OO instances from a batch job report
Hello, I am looking for a way to access ABAP OO instances from a batch job report. My circumstances are the following: I have got some ABAP OO coding that identifies other objects (class instances) that have to be processed (they have a DoIt method t
-
Missing Developer toolbar in new application
Hi, There are several developers in my team and one of them cannot see the developer toolbar in a newly created application while others can see it. Any ideas on what might be causing this? We are in version 4.2
-
Ok, so my time machine external HD is a lacie 500GB connected by USB and with it's own plug into the wall power supply(plugged into a power strip, not directly into the wall, of course). Last night when i went to sleep I shut down my McBP and it the