looking for some help with a JSF app on glassfish, any takers?

8 views
Skip to first unread message

SidThunderbird

unread,
Oct 8, 2020, 6:10:55 PM10/8/20
to Omaha Java Users Group
hello, i'm in desperate need of help on a java server faces app i'm developing.

deals with h:fileInput tag, it's one of those cases where i can get the sample app to work, but when i bring the code into my app, it just silently fails.   have stared at everything top to bottom and am thinking i must have something different at the meta level that is preventing the backing bean from being instantiated properly or at all when i click the submit button.  

any takers?  in person outside or zoom, whatever works, there may be a beer or three involved or free food if it all works out.... dont know what else to do

SidThunderbird

unread,
Oct 8, 2020, 8:06:02 PM10/8/20
to Omaha Java Users Group
sometimes the most amazing thing in the world is that i can beat my head on the wall for days on a single problem, give up, put out an ask for help, and then go back and finally by some miracle fix the problem almost immediately... some quirk in the universe i guess which kinda means i shouldn't waste so much time before asking for help.  i am no expert on java ee but this is a project i spun up using an example maven archetype command and for whatever reason that didn't or doesnt set the headers in the web.xml correctly in order for this functionality to work some sort of namespace thing.  the maven web.xml header gets:

<!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>

and what i need, is :

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">

I know this has to do with namespace stuff and from what i can deduce from a quick google is that the former somehow meant that my web app was not configured to use the newer servlet specification and therefore the h:inputFile tag was probably not being recognized.    indeed, that's quite the swag given my lack of knowledge on such things, so i may be wrong but i feel like i'm in the ballpark -- if someone else can help me back round to home plate if i am still missing something, i'd appreciate it, but at least my app is working.   i dont see anything in the archetype command i used that would seem to have anything to do with it.
Reply all
Reply to author
Forward
0 new messages