Jsf and Tomcat
Hi,
I'm a newbye. What server must I use for jsps create with Creator? Tomcat? Or Sun Java Server? Or only GlassFish? Which is better?
I am using Tomcat. It works fine for me. To be honest, I would not suggest Sun Java Application Server. You will know it when you play around with Java Creator Studio.
Message was edited by:
field
Similar Messages
-
Hi All,
Can JSF work on JDK 1.3.1 and tomcat 4.0.3I think not to both questions.
https://javaserverfaces.dev.java.net/faq.html#Code_build -
Communication problem between NetBeans and Tomcat
hi!
i got a quite mysterious problem. here is what happens:
- i start NetBeans 5.5.1 (the first time)
- i want to debug my JSF-Project, the Debugger starts
- After a few seconds the debugger waits for tomcat (it sais: "Waiting for Tomcat...") and tomcat starts
- Again after a few seconds the tomcat-debugger-output sais "Tomcat startet in 3333 ms".
okay.
when i enter http://localhost:8084/ in my browser i get the tomcat homepage, so the server has definitely started! But nothing happens in NetBeans and nothing happens with my project....
In the lower-right corner i see this blue working-bar that sais "deploying project" but nothing happens. The Project-Debugger-Output still sais "Waiting for Tomcat..." but nothing happens...
And after something around 3 minutes (i guess it's a timeout) i get the error "Starting of Tomcat failed." But is HAS started, i can login to the Administration-Area in my browser!
so i guess there is a communication problem between netbeans an tomcat. Netbeans waits for a message from tomcat but tomcat doesn't send it..or netbeans doesn't understand it.
But the story goes on:
When i press the debug-button a second time it takes only a few seconds till i get the message: "Tomcat server port 8084 already in use". OF COURSE! Because Tomcat has already startet and can't be stoped by NetBeans.
i'm trying to solve this problem for 4 days now, so i would be very happy if anyone has an idea where to start/continue the search...
thanks,
flo.
some system-info:
- windows vista business 32-bit
- no firewall is running
- AntiVir Personal Edition IS running
- Yahoo Widgets Engine IS running
- no other software is running
and finally the tomcat-log:
Using CATALINA_BASE: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base
Using CATALINA_HOME: C:\Program Files\NetBeans\enterprise3\apache-tomcat-5.5.17
Using CATALINA_TMPDIR: C:\Users\Administrator\.netbeans\5.5.1\apache-tomcat-5.5.17_base\temp
Using JRE_HOME: C:\Program Files\Java\jdk1.5.0_12
Listening for transport dt_shmem at address: tomcat_shared_memory_id
21.09.2007 18:27:50 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.5.0_12\bin;.;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\ThinkPad\ConnectUtilities;C:\Program Files\Common Files\Teleca Shared;C:\Program Files\Common Files\Adobe\AGL;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Program Files\cvsnt;
21.09.2007 18:27:50 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
21.09.2007 18:27:50 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1862 ms
21.09.2007 18:27:50 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
21.09.2007 18:27:50 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.17
21.09.2007 18:27:50 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
21.09.2007 18:27:53 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8084
21.09.2007 18:27:54 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
21.09.2007 18:27:54 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/31 config=null
21.09.2007 18:27:54 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
21.09.2007 18:27:54 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3626 msAs i wrote before, the same problem occured for me. I have found a solution which is : Go to tools menu and then select options . In the proxy info, select No Proxy.
I hope this help you -
Hello,
We are having a difficult time getting our app to work correctly on our load balanced system. Any help / suggestions would be greatly appreciated.
We have a very basic load balancer which is in round robin mode (this cannot be changed), two separate vms, each with an instance of apache(2.0.54) and tomcat(6.0.14). Each apache talks only to the tomcat on the same vm and the tomcats are configured to session replicate with each other (which is happening).
When I log in to the app and start pressing a few buttons there are no problems for a little while. I then leave the screen idle for 1 minute and resume pressing buttons. The main session bean which holds information about where the user is and other key information, gets its constructor called and is set back to default and the page goes back to the main menu. Immediately before the bean is reset, the logs show the following:
[MyApp] 17 Jun 2009 15:33:27,514 WARN: [ajp-8009-2 LoggerListener.onApplicationEvent(60)] : Authentication event AuthenticationSuccessEvent: v; details: (etc etc removed…)This is what the two logs look like:
VM1 - Authentication event
VM2 - Main menu
VM2 - Presss a button – progress a screen
VM2 - Presss a button – progress a screen
VM2 - Presss a button – progress a screen
VM2 - Presss a button – progress a screen
[wait 1 min]
VM1 - Authentication event
VM1 - Bean reset
Processing continues, but screen is redirected to main menu
We have the distributable tag in the web.xml file and javax.faces.STATE_SAVING_METHOD is set to client. Its set to client as the app will not work at all with it set to server (keeps asking for the user to re-log in).
Thank you,
VictoriaLooks like a Tomcat issue to me. JSF is not going to timeout in 1 minute. You might want to check your Tomcat replication settings. Note try to do a very simple loadbalancing application that just echos the Tomcat is executing on.
-
Hi,
I have a JSF project and would like to add a Captcha on the new user page.
I see several examples with Seam.
http://www.digitalsanctuary.com/tech-blog/java/jboss/seam/captcha-with-seam-in-three-minutes.html
http://thelabdude.blogspot.com/2009/05/user-registration-solution-using-jboss.html
1) What do I need to add Seam to my app? Is it worth it from Captcha?
http://livedemo.exadel.com/richfaces-demo/richfaces/paint2D.jsf?s=glassX
I copied this into my app to test and get several errors. I did not see the problem?
I see a NullPointer error..but dont know where to set it.
SEVERE: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.FacesException: Error send image
at org.richfaces.renderkit.html.Paint2DResource.send(Paint2DResource.java:192)
at org.ajax4jsf.resource.ResourceLifecycle.sendResource(ResourceLifecycle.java:221)
at org.ajax4jsf.resource.ResourceLifecycle.send(ResourceLifecycle.java:146)
at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:225)
at org.ajax4jsf.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:496)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.faces.el.EvaluationException: org.apache.jasper.el.JspELException: /loginTest.jsp(62,2) '#{paintBean.paint}' java.lang.NullPointerException
at org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor.invoke(MethodBindingMethodExpressionAdaptor.java:56)
at org.richfaces.renderkit.html.Paint2DResource.send(Paint2DResource.java:182)
... 17 more
Caused by: org.apache.jasper.el.JspELException: /loginTest.jsp(62,2) '#{paintBean.paint}' java.lang.NullPointerException
at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:77)
at org.richfaces.webapp.taglib.MethodBindingMethodExpressionAdaptor.invoke(MethodBindingMethodExpressionAdaptor.java:52)
... 18 more
Caused by: java.lang.NullPointerException
at com.netfixup.java.PaintBean.paint(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)Anyone out there have and easy quick way to do Captcha with just JSF ? or should I go with Seam?
Thanks
Phil
Edited by: nohacks on Aug 20, 2009 4:08 AMGoing to seam might not be the answer to your problems. For one seam is not easy to get running on anything but a JBoss server (it is possible, but not easy). Secondly Seam is aimed at bringing JSF and EJBs closer together, among other things. Since you are running on Tomcat, I don't think you are using EJBs and therefore the use of Seam degrades greatly.
The root of the problem is easy enough to spot:
/loginTest.jsp(62,2) '#{paintBean.paint}'So what is this paintBean doing? If you have access to the code, you could check out the method that gives the error:
com.netfixup.java.PaintBean.paintto try and figure out what is null. SOMETHING is apparently not initialized properly, but unless the server logs can give you a hint what that something is, it is hard to help you further. -
I am kind of a new guy to JSF and i have never used SSL or anything similar so forgive me if my question sounds stupid
I searched the forums for using https in JSF pages but there is no HOw-to guide or something.
Can anyone let me know what i need in order to make online web application use SSL (import libraries? edit xml?)
For the record i am currently using Netbeans with a Glassfish server
Thank youSSL is not front-end/web-app dependent, it is application server dependent. Some application server comes out of the box with SSL support, such as Tomcat and Glassfish. For configuring SSL in Glassfish, just read its documentation.
Here are some pointers: http://www.google.com/search?q=glassfish+ssl -
Problems with JSF and included subviews
Hi everybody,
I' ve got a problem with JSF and included subviews which makes me going
crazy. I've got no clue why my web-pages are represent wrongly. The only
tip I've got is that it must be connected with the kind I do include my JSF-pages.
When I use <%@file="sub.jsp"%> my pages are are represent right. When I use <jsp:include page="Sub.jsp" /> or <c:import url="Sub.jsp" /> ( mark: the usage of flush="true" or flush="false" doesn't matter )
my pages are represent wrongly.
The usage of tags like f:facet or f:verbatim were also included but didn't point to an solution.
I searched the whole Sun Developer Forum and some other web-sites for any solution for my problem but the given hints and clues didn't help. Now I'm trying to post my problem directly in Sun's Forum in hope to get help.
My environment is the following:
JAVA JDK 1.5 Update 4
Tomcat 5.5.9
JSLT 1.1
Sun JSF 1.1
Win 2K
Here's my code:
Main.jsp
<%@ page language="java"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName()
+ ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="stil.jsp" type="text/css" />
</head>
<body>
<f:view>
<h:form>
<div class="table">
<div class="tr">
<h:outputText styleClass="tdleft" value="value 1"/>
<h:outputText styleClass="tdinfo" value="value 2"/>
</div>
<div class="tr">
<h:outputText styleClass="tdleft" value="value 3"/>
<h:outputText styleClass="tdinfo" value="value 4"/>
</div>
</div>
</h:form>
<jsp:include page="Sub.jsp" />
</f:view>
</body>
</html>Sub.jsp
<%@ page language="java"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<f:subview id="subview">
<h:form>
<div class="table">
<div class="tr">
<h:outputText styleClass="tdleft" value="value 11"/>
<h:outputText styleClass="tdinfo" value="value 22"/>
</div>
<div class="tr">
<h:outputText styleClass="tdleft" value="value 33"/>
<h:outputText styleClass="tdinfo" value="value 44"/>
</div>
</div>
</h:form>
</f:subview>stil.jsp
<%@page contentType="text/css"%>
<%
String schwarz = "#000000",
grau1 = "#707070",
grau2 = "#c0c0c0",
grau3 = "#e0e0e0",
grau4 = "#e8e8e8",
grau5 = "#fdfdfd",
blau = "#0000dd",
tuerkis = "#00cfff";
String liniendicke = "1px",
linienart = "solid";
String allgemeineTextFarbe = schwarz;
String allgemeineHintergrundFarbe = grau3;
String infoTextFarbe = blau;
String fieldsetRandFarbe = blau;
String fieldsetRandDicke = liniendicke;
String fieldsetRandArt = linienart;
String hrLinienFarbe = blau;
String hrLinienDicke = liniendicke;
String hrLinienArt = linienart;
String inputAktivHintergrundFarbe = grau5;
String inputReadonlyHintergrundFarbe = grau4;
String inputPassivHintergrundFarbe = grau4;
String inputPassivFarbe = schwarz;
String inputRandFarbe1 = grau1;
String inputRandFarbe2 = grau5;
String inputRandDicke = liniendicke;
String inputRandArt = linienart;
String inputButtonHintergrundFarbe = grau3;
String legendenFarbe = blau;
String linkFarbe = blau;
String linkAktivFarbe = tuerkis;
String linkBesuchtFarbe = blau;
String linkFocusFarbe = tuerkis;
String objectGitterFarbe = grau5;
String objectGitterDicke = liniendicke;
String objectGitterArt = linienart;
String tabellenGitterFarbe = grau5;
String tabellenGitterDicke = liniendicke;
String tabellenGitterArt = linienart;
%>
<%-- ----------------------------------------------- --%>
<%-- Textdarstellung mittels der Display-Eigenschaft --%>
<%-- in den Tags div und span --%>
<%-- ----------------------------------------------- --%>
*.table {
display:table;
border-collapse:collapse;
*.tbody {
display:table-row-group;
*.tr {
display:table-row;
*.td,*.tdright,*.tdleft,*.tdinfo,*.th {
display:table-cell;
padding:3px;
vertical-align:middle;
*.td,*.th {
text-align:center;
*.tdright {
text-align:right;
*.tdleft {
text-align:left;
*.tdinfo {
color:<%=infoTextFarbe%>;
text-align:right;
*.th {
color:<%=infoTextFarbe%>;
font-weight:bold;
}thanks in advance
benjaminHello Zhong Li,
many thanks for your post, but it didn't work.
My problem is that the JSF-Components im my included or imported
JSP-Pages does not accept any kind of style or styleClass for
designing. The components take over the informations for colors
but not for alignment.
When I take a look at the generated JAVA-Source in $TOMCAT/WORK/WEBAPP for my sub.jsp ( sub.java )
it seems that the resulting HTML-page would be presented correctly.
But later when I start the application via Firefox or Mozilla the html-sourcecode is totally wrong.
In my example I create a simple grid with 2 rows and 2 columns.
Both columns contains JSF-Outtext-Components and are included with div-tags.
The generated Sub.java shows that the text would be setted in the div-tags. Unfortunately the html-sourcecode represented by my browser shows that jsf-text is not setted in the tags but in the <h:form> tags. The div-tags are neither rounded by <h:form> nor containing the JSF-OutText-Components.
Any clue?
Many thanks Benjamin
Here is the html-code from Firefox:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://polaris21:8080/webtest/">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="stil.jsp" type="text/css" />
</head>
<body>
<form id="_id0" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
<div class="table">
<div class="tr">
<span class="tdleft">value 1</span>
<span class="tdinfo">value 2</span>
</div>
<div class="tr">
<span class="tdleft">value 3</span>
<span class="tdinfo">value 4</span>
</div>
</div>
<input type="hidden" name="_id0" value="_id0" />
</form>
<form id="SUB:_id5" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
<span class="tdleft">value 11</span>
<span class="tdinfo">value 22</span>
<span class="tdleft">value 33</span>
<span class="tdinfo">value 44</span>
<input type="hidden" name="SUB:_id5" value="SUB:_id5" />
</form>
<div class="table">
<div class="tr">
</div>
<div class="tr">
</div>
</div>
</body>
</html> -
Buling a new Web Application using JSF and Ajax.
Hello Group,
I am a building a new web application using JSF and AJAX. Planning to use Myfaces Tomahawk, Dojo for Ajax, Hibernate, Spring,Eclipse IDE and Jetty Server.Can some one please suggest me will this be a right one for
building complex UI and will it support for using the jsf features and would like to know any other free open
source framework, ide, tools which support the best way for an agile project..?. There is restriction like i have to use java1.4jaisheela wrote:
Hello Friends,
I am also in the same situation.
I am a building a new web application using JSF and AJAX.
Requirement is I need to use IBM version of DOJO and JSF but I need to develop the whole application using Eclipse 3.3,2 and Tomcat 5.5.
With IBM version of DOJO and JSF, will Eclipse and Tomcat help to speed up the development or do you suggest me to go for Rational Application Developer and WebSphere Application Server.
If I need to go with RAD and WAS, then I am new to RAD and WAS, is it easy to use RAD and WAS for this kind of application and implement web applicaiton fast.
Any feedback will be great help.Those don't sound like requirements of the system to me. They sound more like someone wants to improve their CV/resume
From what I've read recently, if it's just fast you want, look at Ruby on Rails -
Jsf and richfaces version compatibility issue
Hi,
I am using JRE 1.5 , jsf 1.2 , richfaces 3.3.3 and deployed in Tomcat 6.0.18. I am getting following error.
javax.servlet.ServletException: /allocator.xhtml @30,163 <rich:tree> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: tree
javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)
root cause
javax.faces.view.facelets.TagException: /allocator.xhtml @30,163 <rich:tree> Tag Library supports namespace: http://richfaces.org/rich, but no tag was defined for name: tree
com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:289)
com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:228)
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
com.sun.org.apache.xerces.internal.parsers.XML11Configuration
Thanks,
BPradhanIn my development box , I can use any version of jre, tomcat.
But, we have our department dev and prod server configured with jre 1.5 and tomcat 6.0.18
Some other applications are running in those environment with jre 1.5 and tomcat 6.0.18. I cannot upgrade just for new application.
when tomcat6 was downloaded in our department dev and prod server , they are installed with jre5. Subsequently servers are upgraded with jre6 but it seems like tomcat recognises jre5 not jre6. Let me know if i am wrong about jre version tomcat is trying to use.
Also, can you help me with the environment I have and problems i am encountering with jsf and richfaces.
Thanks,
BPradhan
Edited by: user618018 on Feb 1, 2013 5:03 PM -
Problem launching a jsp page with eclipse and tomcat
Hi,
I have just started using eclipse and tomcat for creating dynamic web pages. I tried to launch a jsp page after starting the tomcat server with the URL: http://locahost:8080/HelloWorld/, an error page was displayed as below:
HTTP Status 404 -/
type Status report
message /_
description The requested resource (-) is not available
Apache Tomcat/5.5.17
I didn't get any error at the console and when i just typed http://localhost, a pop up menu saying that the connection was refused when attempting to contact localhost.
I'm not sure what is the problem here. Could it be the permssion to the localhost is not granted by the system as the eclipse IDE is running using linux?
Hope someone can help.
Thanks.http://www-128.ibm.com/developerworks/library/os-ectom/
-
Right problem with apache and tomcat
Bonjour;
I use a user login "apache" to stop/start Apache and tomcat. Because never launching apache et tomcat as root.
But I have the following problem with apache (file error.log) :
[Tue May 6 17:26:22 2003] [error] Connection "warpConnection" cannot connect
[Tue May 6 17:26:22 2003] [error] Cannot open connection "warpConnection"
[Tue May 6 17:27:01 2003] [error] Re-Trying to deploy connections
As root the error msg does'nt exists (lost)
Best regards;
A+;Run it from the shell to see whats wrong:
# httpd -
Authentication problem with JWS and TOMCAT
Hi everyone !
I have a problem with Java Web Start (1.0.1) and Tomcat (4.0.4).
I'm trying to call my application via Web server Tomcat with restricting access.
My configuration is the following :
The deployment descriptor web.xml is:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<mime-mapping>
<extension>jar</extension>
<mime-type>application/java-archive</mime-type>
</mime-mapping>
<mime-mapping>
<extension>java</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
<mime-mapping>
<extension>jnlp</extension>
<mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
<mime-mapping>
<extension>JNLP</extension>
<mime-type>application/x-java-jnlp-file</mime-type>
</mime-mapping>
<!-- Define a Security Constraint on this Application -->
<security-constraint>
<web-resource-collection>
<web-resource-name>Entire Application</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<!-- NOTE: This role is not present in the default users file -->
<role-name>standard</role-name>
</auth-constraint>
</security-constraint>
<!-- Define the Login Configuration for this Application -->
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>MY APPL</realm-name>
</login-config>
</web-app>
And jnlp File is:
<jnlp
spec="1.0+"
codebase="http://host:8080/Official/"
href="Application.jnlp">
<information>
<title>Application release 0.10</title>
<vendor> XXXX </vendor>
<homepage href="/"/>
<description>Application</description>
<description kind="short">My Application</description>
<icon href="Icon.gif"/>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.3"/>
<jar href="Jar1.jar"/>
<jar href="Jar2.jar"/>
<jar href="Jar3.jar"/>
<jar href="Jar4.jar"/>
<jar href="Jar5.jar"/>
<jar href="Jar6.jar"/>
<jar href="Jar7.jar"/>
<jar href="Jar8.jar"/>
<jar href="Jar9.jar"/>
<jar href="Jar10.jar"/>
<jar href="MyApplication.jar"/>
</resources>
<application-desc main-class="com.xxxx.tool.cm.MyApplication"/>
</jnlp>
With the above configuration the Java Web Start not work.
I'm expecting the message box for insert username and password instead it returns the messagge error :
An error occurred while launching/running the application.
Vendor: XXXX
Category: Download Error
Unable to load resource: http://host:8080/Official/Application.jnlp
The Exception error is:
JNLPException[category: Download Error : Exception: java.lang.NullPointerException : LaunchDesc: null ]
at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
at com.sun.javaws.cache.DownloadProtocol.isLaunchFileUpdateAvailable(Unknown Source)
at com.sun.javaws.LaunchDownload.getUpdatedLaunchDesc(Unknown Source)
at com.sun.javaws.Launcher.downloadResources(Unknown Source)
at com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source)
at com.sun.javaws.Launcher.handleLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
I have tried to remove the restrict access in the deployment descriptor (web.xml) and java Web Start WORKS !!!!!!
I'll appreciate any idea or hint!
Thanks in advanceCheck this out
http://forum.java.sun.com/thread.jsp?forum=38&thread=456250
Mad Einstein -
Why do I need to restart Apache and Tomcat every time a java file is change
If a java file is changed and complied the changes are not reflected if Tomcat is not restarted.
The settings in server.xml are as:
<!-- Tomcat Manager Context -->
<Context path="/manager" docBase="manager" debug="0" privileged="true"/>
<Context path="/cf" docBase="cf" debug="0" reloadable="false"/>
Here "cf" is my Application folder under webapps. The reloadable property when set to "true" for standalone Tomcat on Windows98 reflects the changes for compiled java files without restarting Tomcat. But on Linux 7.1 with Apache 1.3.19 and Tomcat 4.0.3 this is not working.
Also tried out with Manager Application of tomcat-users.xml with reloadable="false" as well as reloadable="true",
But when I reload the application using the command
http://servername:8080/manager/reload?path=/appli.name
It tells me that the application is reloaded but changes in the java file are still not reflected.
Also when reloaded through Manager Servlet, Only my load-on-startup servlet is reloaded, but other java classes are not.
Is it neccessary to execute this reload command from the server itself. I m executing it from a remote m/c. and have mapped the application with a domain name virtually.
Is it the case with Tomcat on Linux with Apache. Or is something going wrong on my part.
Can someone Help out plz.
Regards,
Rupalior you can "touch" your web.xml file.
touch web.xmlor that command is for *nix systems, not sure what the Windows command is. But basically, when you edit the web.xml, even if it means updating the last modified time, it will restart only your application and you should see the changes. -
Building a Simple JSF and Web Services App in JDeveloper 10.1.3 Preview
Hi
I was trying out this example of JSF and webservices at:
http://www.oracle.com/technology/products/jdev/101/howtos/jsfws/index.html
Has anyone tried it before? I'm getting the following error:
calling http://216.200.21.157:9090/soap
WARNING: Unable to connect to URL: http://216.200.21.157:9090/soap due to java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
java.rmi.RemoteException: ; nested exception is:
HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
at com.minc.ws.stockquery.proxy.runtime.NetXmethodsServicesStockquoteStockQuoteBinding_Stub.getQuote(NetXmethodsServicesStockquoteStockQuoteBinding_Stub.java:96)
at com.minc.ws.stockquery.proxy.NetXmethodsServicesStockquoteStockQuotePortClient.getQuote(NetXmethodsServicesStockquoteStockQuotePortClient.java:40)
at com.minc.ws.stockquery.proxy.NetXmethodsServicesStockquoteStockQuotePortClient.main(NetXmethodsServicesStockquoteStockQuotePortClient.java:29)
Caused by: HTTP transport error: javax.xml.soap.SOAPException: java.security.PrivilegedActionException: oracle.j2ee.ws.saaj.ContentTypeException: Not a valid SOAP Content-Type: text/html
at oracle.j2ee.ws.client.http.HttpClientTransport.invokeImpl(HttpClientTransport.java:142)
at oracle.j2ee.ws.client.http.HttpClientTransport.invoke(HttpClientTransport.java:118)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:175)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:112)
at com.minc.ws.stockquery.proxy.runtime.NetXmethodsServicesStockquoteStockQuoteBinding_Stub.getQuote(NetXmethodsServicesStockquoteStockQuoteBinding_Stub.java:79)
... 2 more
Any ideas?
Thanks
AlexI'm not using 10.1.3 preview. I was using 10.1.3.1 production. I just copied the title of the tutorial as my subject. sorry for the confusion!! :)
I used the HTTP analyzer and this is what I got in the header:
<HTML><HEAD><TITLE>TCP Packet Monitor Error</TITLE></HEAD><BODY>JDeveloper TCP Packet Monitor encountered an error retrieving<P><pre>POST http://216.200.21.157:9090/soap HTTP/1.1
Host: 216.200.21.157:9090
Proxy-Connection: Keep-Alive
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: Oracle HTTPClient Version 10h
SOAPAction: "urn:xmethods-delayed-quotes#getQuote"
Accept-Encoding: gzip, x-gzip, compress, x-compress
Content-type: text/xml; charset=UTF-8
Content-length: 680
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="urn:xmethods-delayed-quotes"><env:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" env:mustUnderstand="1"/></env:Header><env:Body><ns0:getQuote env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><symbol xsi:type="xsd:string">orcl</symbol></ns0:getQuote></env:Body></env:Envelope></pre><P>The error was :<P><pre>IOException retrieving the response: java.net.ConnectException: Connection refused: connect</pre><P></HTML>
It looks like I'm getting connection refused error... Hmmm.. wonder why?
I'll download 10.1.3.2 and see if that helps..
Thanks for looking into this!
Alex -
NetBeans 5.0 and Tomcat 4.1
Hello,
I'm using NetBeans 5.0 and I have been using the Bundled Tomcat version 5.5.9 for my servlet container and everything's been great. Now that I'm ready to push my application up to a web host, I found that my host (lunarpages) runs with Tomcat 4.1 which uses version 2.3 of the servlet container. Tomcat 5.5 uses servlet container 2.4.
So I downloaded Tomcat 4.1 (which has 2.3) and I don't know how to properly tell Netbeans to use it. When I open Server Manager and select 'Add Server', I can't just tell NetBeans to point to my Tomcat 4.1 directory. It wants me to select from a dropdown list of servers and Tomcat 4.1 isn't in the list.
I tried to fake NetBeans out by selecting the 'Tomcat 5' server and pointing to my Tomcat 4.1 directory but I'm getting the following message when I try to run:
FAIL - Unknown command /deploy
C:\workspace\myApp\nbproject\build-impl.xml:425: Deployment error:
Can anyone point me in the right direction on how to get Tomcat 4.1 running with NetBeans 5.0?
Thanks,
EricI found that my host (lunarpages) runs with Tomcat 4.1 which uses version 2.3 of the servlet containerPlease read the post before answering, the reasoning is crystal clear.
I don't have a concrete answer to this problem, but I do have a suggestion.
1) You can add your own tomcat server to netbeans. Under the runtime tab you will find servers, if you right click this you can add a server. Use this to manually configure your own server
2) as for the servlet spec problem, when creating a web project setting the java EE version to 1.3 might solve the problem... I can't tell this for sure because I've never done it.
Maybe you are looking for
-
how do i push an event on a calendar on my phone onto my laptop
-
Email Signatures With Pictures on iOS
Has anyone found a permanent solution to the issue of pasted images in Email Signatures on iOS turning into blank boxes? I'm able to successfully paste my email signature into the settings in iOS but after a few minutes, they turn into blank boxes.
-
Purchased for a mac but want to install on a dell
I bought LR a few years ago for my mac. Now I have a new Dell and want to install it on the new computer. How can I do this?
-
Cannot open database due to incorrect file size
Hi, we have a oracle database 8.0.5 and it crashed yesterday. now we cannot open the database (only mount readonly) due to an incorrect filesize of usr1orcl.ora. is there a simple way to open the database?
-
Hi Experts, Pl Explain, 1) What is Reseve Stock and On-Order stock? 2) How to clear these stocks? 3) There is any report in SAP Standard like MMBE to see all the stock in summrized from of Company level/ Plant Level etc. Regards, ViAngrish