JSF 1.2 with SERVLET 2.3
Hi, i've download the latest JSF 1.2 RI but i can't see any page as i get the following error:
ava.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getContentType()Ljava/lang/String;
at com.sun.faces.context.ExternalContextImpl.getResponseContentType(ExternalContextImpl.java:277)
at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:167)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:131)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
The getContentType method that the exception describes is only available in servlet 2.4 but i'm using a servlet 2.3 only container. Can i use JSF 1.2 with servlet 2.3 ?
Thanks
I'm 90% sure that you cannot. JSF 1.2 is intended to be part of Java EE 5.0. Since Servlets 2.3 are part of J2EE 1.3, I don't think that it will work.
Adam
Similar Messages
-
help deployment java server faces with servlet 2.2
best regarsI'm 90% sure that you cannot. JSF 1.2 is intended to be part of Java EE 5.0. Since Servlets 2.3 are part of J2EE 1.3, I don't think that it will work.
Adam -
Mojarra JSF 2.1.x servlet requirement or dependency
Can anyone tell me how to reconcile this information?
http://javaserverfaces.java.net/nonav/rlnotes/2.1.0/releasenotes.html
says that JSF (Mojarra) 2.1 series depends on a servlet 3.0 container.
But http://download.java.net/maven/2/com/sun/faces/jsf-api/2.1.2/jsf-api-2.1.2.pom,
the maven config for JSF (Mojarra) 2.1 (2.1.2, in this case), shows a dependency on a servlet 2.5 container
We currently have a sandbox environment set up with a stack that can only provide servlet 2.5, and it seems to be working, with some occasional hiccups. Are we in for surprises down the line, or is the official requirement or dependency different than the actual dependency? In other words, is a stack with servlet 2.5 really sufficient for including JSF 2.1.x?
Thanks,
Josh913277 wrote:
From a chat just now on irc.freenode.net ##jsf:
[11:18] <@edburns> JSF 2.1 does not, and will not, require anything more than Servlet 2.5.
[11:19] <@edburns> JSF 2.2 will require Servlet 3.0. Practically speaking the requirement is due to the need to provide <h:inputFile> for file upload.
[11:21] <Jasman> Thank you, @edburns
[11:22] <Jasman> Why do the release notes say otherwise (for Mojarra 2.1.x)?
[11:22] <@edburns> Jasman: Thanks for pointing that out. I think it's an error in the relnotes.
[11:22] <@edburns> rogerk1: Can you please investigate the problem pointed out by Jasman here?
[11:23] <Jasman> Thanks for the clarificationAmazing. IRC is still alive and kicking :) -
Communicate with servlet after using Java Web Start?
Is it possible to communicate with servlet to get data back and forth
after using Web Start to download the client application?
The demos come with Java Web Start are applications which are
standalone, don't need communicate with the servlet on Web server
after being launched. I am wondering if it is possible, and how (HTTP
& JAX-RPC)?
Thanx in advance.I've done this using HTTP. I get the server and port from the codebase:
BasicService bs = null;
try {
bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
String codeBase = bs.getCodeBase().toString();
and use the java.net.HttpURLConnection and java.net.URL classes to send HTTP parameter values to the servlet and to receive results from the HttpURLConnection's input stream. -
Displaying *.pdf file on browser with servlet
hi all
this RAMESH,struggling to display a pdf file on browser from a remote mechine
earlier i tried with servlet
response.setContentenType("application/pdf")
out.println();
by this i am getting only some data as below
endobj
4 0 obj
<<
/ProcSet [ /PDF /Text /ImageB ]
/Font << /Fo0 21 0 R /Fo12 24 0 R /Fo13 27 0 R /Fo16 30 0 R /Fo18 33 0 R /Fo19 36 0 R >>
>>
endobj
For this purpose i have gone thru www.lowagie.com
and gone thru all examples but i am not getting how to display on browser or at least awt frame
please requesting all for suggest me some way
tanks all
-Rameshare you trying to
a) create a PDF dynamically
b) send an existing PDF -
Hi
i was trying to do some example with JNI. I can use JNI with standalone Java application but I just cannot figure out how I can use JNI with Servlet.
Can some one show me a sample code using JNI with Servlets.
thanks very muchhi,
I am also facing the same problem,
when I am using JNI with stand alone application it works fine but when i tried to use it with a servlet It gives unsatisfied linker error
stack: java.lang.UnsatisfiedLinkError: createSocket
at RelayConnector.createSocket(Native Method)
at RelayServlet.doGet(RelayServlet.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
It seems i have to do some path settings in my iplenet web server.
If some one have faced the problem i would be glad to know the solution for this, i am literally bugged up,.... -
Hi,
I am Tejas , a newbie with servlets. Now, I have a servlet which contains a Javascript method. On clicking a link , the Javascript method is called.
But however, I find that there is some trouble. I created a class called MainFrames.java, the object of which I am instantiating in the Javascript method.
But this code doesnt work properly. I have given the snippet below
out.println("<script type='text/javascript'>");
out.println("function threader()");
out.println("{");
out.println("alert('Inside Threader');");
out.println("<%@ page import=\"XcForm.MainFrames\"%>"); //I have a hunch that this statement is the problem
out.println("<%");
out.println("MainFrames mainframes = new MainFrames();"); //without the import statement above, the MainFrames.java class is not being recognised
out.println("%>");
out.println("}");
out.println("</script>");
Thanks in advance,
TejasDo not put presentation code in servlets. Put them in JSPs. And mixing serverside code (scriptlets) and clientside code (javascript) this way is indeed not going to work. That code will certainly not be executed in the order as you write. Serverside code is executed at the server and is finished when the response is completed. So any serverside code inside clientside code is alreay executed. Clientside code is executed at the client and will only execute when the response is completed (onload, etc) or when the client invokes it (onclick, onsubmit, etc). Further on, do not put business code in presentation code. Put them in servlets.
-
Some problems with servlet.jar and tomcat 4.1.27
Hello everybody,
I used to work with tomcat 3.3.1 and i've decided to use tomcat 4.1.27 now. The manual explains that we have to change de version of servlet.jar, it's done with servlet-2.3.jar but on tomcat starting i have this message:
jar not loaded. See servlet spec [...]. Offending class: javax/servlet/Servlet.class
what can i do, i've red all de documentation and i think all versions a OK??
thanks per advance
antoineI am running Tomcat 4.1.18, so your configuration may be slightly different. I found the Servlet.class file you are missing residing in the Tomcat/common/lib directory in the Servlet.jar file. Check your path and also make sure your Servlet.jar file contains the missing class.
-
JSF table component with paging
Are you aware of any existing JSF table component with both navigation and paging ?
I want to display the content of a database table with a large number of rows. The table component should be able to navigate through the entire table content, but building only a small ResultSet and dinamically populate it with data as we perform navigation.
Thanks,
CosminThanks for the answer.
But data scroller just takes a ResultSet and display it with navigation. It doesn't know about the total number of rows in the table. It only display the number of records in the ResultSet.
What I am looking for is a data scroller which based on some input parameters knows how to split the table in several ResultSets, dinamically change the ResultSet and display the total number of rows in the table and not in the current ResultSet. -
JSF 1.2 with WAS 6.1
Our current environment
WAS 6.1.0.9 and using jsf 1.1
Is it possible to upgrade to JSF 1.2 with upgrading to WAS 7 ?
ThanksWAS7 already ships with JSF 1.2. JSF 1.2 is supposed to be backwards compatible with JSF 1.1 without any pains. Only keep in mind that any fixed bugs in JSF 1.2 may cause your application to behave different as opposed to JSF 1.1, especially when the application is developed so that it -either awarely or unawarely- relies on the presence of those bugs.
-
Source code of JSF implementation bundled with JDeveloper
Where can I get the sources of JSF implementation bundled with JDeveloper 10.1.3.1 (1.1_02-b08)?
Fair enough. Yes, as far as I know those implementation classes aren't available. Contacting Sun's consulting services is one option, of course. Make sure you get someone who has actual experience with the classes in question, rather than just anyone who happens to be on the bench right now, 'cos they'll charge you handsomely either way.
I take it you've considered decompiling the classes in question ? Obviously there are legal issues to consider if you go that route, but I've found the Kaffe tool handy before now.
http://www.kaffe.org/
The only other thing I can think of is taking a dig around the IBM site to see if any of their equivalent classes are available in source form. I've always used the Sun versions, however, so I've no idea how likely this is.
Ok, I'm out of ideas. Will be interested to hear if you come up with something even more devious.
D. -
Communicating with Servlets....
hi!
Wat are all the different ways in which the JSP used to communicate with Servlet?
Thanx,
Rgds,
SasiJsp page communication with Servlets....
web.xml -- Servlets loaded during application startup
struts config -- Servlet mapping (w.r.t struts).
and u can import servlets in jsp and can use it... there are so many possible ways of using servlets coz jsp pages inturn convert into servlets and got executed..... -
Im using tomcat 4.06 and i have some problems with servlets and forwarding:
This is my servlet:
import java.io.PrintWriter;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
public class NTenant extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
String email = request.getParameter("tenant");
//insert new tenant into database.
System.out.println("Redirigiendo");
ServletContext sc = getServletConfig().getServletContext();
RequestDispatcher rdNext = sc.getRequestDispatcher("/tenantForm.html");
rdNext.forward(request, response);
System.out.println("Redirigido");
I get this error:
type Status report
message Servlet invoker is currently unavailable
description The requested service (Servlet invoker is currently unavailable) is not currently available.
This is my dir structure:
webapps\form\NewTenant.html
webapps\form\tenantForm.html
webapps\form\WEB-INF\web.xml
webapps\form\WEB-INF\classes\NTenant.class
webapps\form\WEB-INF\classes\TenantServlet.class
The problem is that i cannot find my html, what must i write here? sc.getRequestDispatcher("/tenantForm.html"); <-----
Thank you very muchI heve tried with "../tenantForm.html"
java.lang.IllegalArgumentException: Path ../tenantForm.html does not start with a "/" character
at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:572)
at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:174)
at NTenant.doPost(NTenant.java:19)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
Now Im trying with:
RequestDispatcher rdNext = sc.getRequestDispatcher "/../tenantForm.html");
And I got:
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
at NTenant.doPost(NTenant.java:20)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:465)
at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
at java.lang.Thread.run(Thread.java:536)
Any other idea? -
Hi
Does anyone know how to use dialogs with servlets? I'd like to show a confirm dialog on the client machine. My first idea was to use JOptionPane.showConfirmDialog as such in the servlet, but then of course de dialog pops-up on the server side, and not on client side.
Many thanks for the help,
NicYou need to use javascript to confirm, ask questions, etc...
You can see :
http://www.webreference.com/programming/javascript/confirm/
Or
http://www.bodo.com/javacool.htm
Fred -
Hi,
how we can use swings with servlets or jsps.
or
how we can display the browser in the swings.
please give me a valid answer with examples.Hi,
Your question is not clear... are you trying to display HTML using swing components or are you trying to use swing in a server-side application?
Some Swing components (e.g. JLabel) natively support simple html, so:
JLabel lbl = new JLabel("<html>hello <b>world</b></html>");would result in a JLabel that looks with the word "world" in bold. If you need also frames, css and javascript support - you'll need to reach for a 3^rd^ party library, I'm afraid.
As for using swing in servers, look at this article:
http://today.java.net/pub/a/today/2006/04/20/bringing-swing-to-the-web.html
If you meant neither, please explain more.
Hope this helps, though.
Michael Bar-Sinai
Maybe you are looking for
-
How do you fix this problem with the View Menu?
Hi. This is my first time on this forum so please forgive me if not worded correctly. I have recently installed CS5 on Windows 7. I work with large folders of images. When I open the folder the images are spread out with a big gap between each row of
-
In function module creation,table, view is better or structure is better ?
I am creating a new z function module. Under tables parameter, I need to create 'Profit_Center_Table' which should contain combination of ztable and cepc fields. as Tables Profit_Center_Table should contain List of ztable and cepc fields Is
-
"Security Warning" dialog box when click script set to Run at Server
I am rendering a PDF form using the renderForm component. I'm setting the Target URL. I have a script on a button set to "run at server". I can render my form in a browser and fill it out, but when I click the button I get a dialog box with a titl
-
i have just noticed that my headphone are not working
-
Hi, I have a setup ISE 1.1.1. Users are getting authenticate against AD. Everything is working fine except some users report disconnection. I see in the ISE that (Authentication failed: 24415 User authentication against Active Directory failed since